Browse Source

winfrom提交

duyong 4 năm trước cách đây
mục cha
commit
064f8530d3

+ 48 - 0
Common/vo/base/MeterBaseSpecialUnit.cs

@@ -0,0 +1,48 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Common
+{
+    public class MeterBaseSpecialUnit
+    {
+        /// <summary>
+        /// 特殊单位编号
+        /// <summary>
+        //[AttributeID("carNo")]
+        public string unitNo { get; set; }
+
+        /// <summary>
+        /// 特殊单位名称
+        /// <summary>
+        //[AttributeID("carNo")]
+        public string unitName { get; set; }
+
+        /// <summary>
+        /// 特殊单位名称
+        /// <summary>
+        //[AttributeID("carNo")]
+        public string valueFlag { get; set; }
+
+        /// <summary>
+        /// 创建时间
+        /// <summary>
+        //[AttributeID("carNo")]
+        public string createTime { get; set; }
+
+        /// <summary>
+        /// 创建人编号
+        /// <summary>
+        //[AttributeID("carNo")]
+        public string createManNo { get; set; }
+
+        /// <summary>
+        /// 创建人名称
+        /// <summary>
+        //[AttributeID("carNo")]
+        public string createManName { get; set; }
+
+    }
+}

+ 25 - 3
MeterSceneLibrary/JISCO/InnerCarJISCO.cs

@@ -32,6 +32,10 @@ namespace MeterSceneLibrary
         // 构建一次计量数据
         private MeterWorkCarActualFirst mwaf = new MeterWorkCarActualFirst();
 
+        private MeterBaseCarService carService = new MeterBaseCarService();
+
+        private MeterBaseSpecialUnitService meterBaseSpecialUnitService = new MeterBaseSpecialUnitService();
+
         // 结净最小值,默认取配置文件
         private double diffrentWgt = AppConfigCache.differenceWgt;
 
@@ -104,6 +108,24 @@ namespace MeterSceneLibrary
                 // 存在一条预处理数据
                 else if (list == null || list.Count == 1)
                 {
+                    //拿到车辆
+                    RESTfulResult<List<MeterBaseCar>> resCarList = carService.doQueryCarList(new MeterBaseCar { carNo = PbCache.lockCarNo });
+                    RESTfulResult<List<MeterBaseSpecialUnit>> sunitList = meterBaseSpecialUnitService.doQueryCarList(new MeterBaseSpecialUnit { unitNo = resCarList.Data[0].usetDepartmentNo });
+
+                    if (sunitList.Data == null || sunitList.Data.Count != 1)
+                    {}
+                    else
+                    {
+                        if (rmX.Data[0].submitFlag == "1")
+                        {}
+                        else
+                        {
+                            rt = saveMethod.doError("该车为特殊车辆,需要确认重量");
+                            return rt;
+                        }
+                    }
+
+
                     // 查已选择的委托
                     RESTfulResult<List<PreTrackScale>> rmScale = preTrackScaleService.doQueryByFlag(new PreTrackScale { carNo = PbCache.lockCarNo, lineDesc = "1" });
 
@@ -1196,7 +1218,7 @@ namespace MeterSceneLibrary
                                     if (firstList == null || firstList.Count == 0)
                                     {
                                         //在皮重误差内
-                                        if (PbCache.monitorResult.valid_wgt == true || listMonitor.Data[0].validPredictionDiff == "0")
+                                        if (PbCache.monitorResult.valid_wgt == true || listMonitor.Data[0].validWgt == "0")
                                         {
                                             //正常保存一次数据
                                             mwaf.weightType = "1";
@@ -1217,7 +1239,7 @@ namespace MeterSceneLibrary
                                     else if (firstList.Count == 1 && firstList[0].weightType != "0")
                                     {
                                         // 在皮重误差内
-                                        if (PbCache.monitorResult.valid_wgt == true || listMonitor.Data[0].validPredictionDiff == "0")
+                                        if (PbCache.monitorResult.valid_wgt == true || listMonitor.Data[0].validWgt == "0")
                                         {
                                             //保存一条作废的皮重数据
                                             mwaf.weightType = "1";
@@ -1239,7 +1261,7 @@ namespace MeterSceneLibrary
                                     else if (firstList.Count == 1 && firstList[0].weightType == "0")
                                     {
                                         RESTfulResult<List<PreTrackScale>> scales = preTrackScaleService.doQueryWf(new PreTrackScale { predictionNo = firstList[0].predictionNo });
-                                        if (PbCache.monitorResult.valid_wgt == true || listMonitor.Data[0].validPredictionDiff == "0")
+                                        if (PbCache.monitorResult.valid_wgt == true || listMonitor.Data[0].validWgt == "0")
                                         {
                                             #region 期限皮注释
                                             // 判断车辆是否具有期限皮重权限

+ 4 - 1
MeterSceneLibrary/JISCO/private/SaveMethod.cs

@@ -4,7 +4,6 @@ using System;
 using System.Collections.Generic;
 using System.Text;
 using System.Threading.Tasks;
-//using CarMeterSystem;
 
 namespace MeterSceneLibrary.JISCO
 {
@@ -38,6 +37,7 @@ namespace MeterSceneLibrary.JISCO
                 EntityBase<PreTrackScale> entityBase = new EntityBase<PreTrackScale>();
                 model = entityBase.format<MeterWorkCarActualFirst>(scale, model);
             }
+
             //操作日志
             MeterMonitorNote monitorNote = new MeterMonitorNote();
             monitorNote.baseSpotNo = model.baseSpotNo;
@@ -108,6 +108,9 @@ namespace MeterSceneLibrary.JISCO
                 netDb.isPreScale = "1";
             }
 
+            PbCache.mwPreFirst = actualFirst2;
+            PbCache.isPre = true;
+
             if (actualFirst2.meterWeight.Value > actualFirst.meterWeight.Value)
             {
                 actualFirst2.weightType = "0";//毛重