瀏覽代碼

winfrom提交

duyong 3 年之前
父節點
當前提交
c00da48d39
共有 5 個文件被更改,包括 143 次插入40 次删除
  1. 2 2
      CarMeterSystem/App.config
  2. 65 18
      CarMeterSystem/Form1.cs
  3. 66 19
      CarMeterSystem/frmMain.cs
  4. 5 1
      Common/vo/base/MeterBaseSpotInfo.cs
  5. 5 0
      Common/vo/work/MeterWorkMonitor.cs

+ 2 - 2
CarMeterSystem/App.config

@@ -5,13 +5,13 @@
 	</startup>
 	<appSettings>
 		<!--<add key="ServiceUrl" value="http://127.0.0.1:9004/v1" />-->
-    <!--<add key="ServiceUrl" value="http://10.104.4.105:9004/v1" />-->
+    <add key="ServiceUrl" value="http://10.104.4.105:9004/v1" />
     <!--<add key="ServiceUrl" value="http://192.168.216.143:9004/v1" />-->
     <!--<add key="ServiceUrl" value="http://192.168.137.136:9004/v1" />-->
     <!--<add key="ServiceUrl" value="http://10.104.0.1:9004/v1" />-->
     <!--<add key="ServiceUrl" value="http://192.168.107.60:8888/icore.icp.winform/pass/jlcar"/>-->
     <!--<add key="ServiceUrl" value="http://192.168.185.29/icore.icp.winform/pass/jlcar"/>-->
-    <add key="ServiceUrl" value="http://10.99.81.20/icore.icp.web/pass/systemBase/v1"/>
+    <!--<add key="ServiceUrl" value="http://10.99.81.20/icore.icp.web/pass/systemBase/v1"/>-->
     <!--<add key="ServiceUrl" value="http://jgwzjl.jiugang.com/icore.icp.web/pass/systemBase/v1"/>-->
     <!--<add key="ServiceUrl" value="http://10.130.1.2/icore.icp.web/pass/systemBase/v1"/>-->
     <!--实时库地址-->

+ 65 - 18
CarMeterSystem/Form1.cs

@@ -442,39 +442,85 @@ namespace CarMeterSystem
                 //}
 
                 // 司机扫码为空,取工控机二维码
-                if (string.IsNullOrEmpty(sweepCodeClass2.StrCode))
+                if (PbCache.sportInfo.scanRequireValid == "1")
                 {
-                    if (string.IsNullOrEmpty(sweepCodeClass.StrCode))
+                    if (PbCache.monitor.isValidScan == "0")
                     {
-                        if (string.IsNullOrEmpty(PbCache.strCode))
+                        if (string.IsNullOrEmpty(sweepCodeClass2.StrCode))
                         {
-                            codeFlag = false;
-                            firstCode = "";
-                            PbCache.strCode = "";
-                            //l.WriteLog(12, "主线程扫码值为空时清空;sweepCodeClass.StrCode值为" + sweepCodeClass.StrCode + " ;PbCache.strCode值为:" + PbCache.strCode);
-                        }
-                    }
-                    else
-                    {
-                        if (sweepCodeClass.StrCode.Substring(0, 3) == "TWB")
-                        {
-                            DecodeQRCodeYMT(sweepCodeClass.StrCode);
+                            if (string.IsNullOrEmpty(sweepCodeClass.StrCode))
+                            {
+                                if (string.IsNullOrEmpty(PbCache.strCode))
+                                {
+                                    codeFlag = false;
+                                    firstCode = "";
+                                    PbCache.strCode = "";
+                                    //l.WriteLog(12, "主线程扫码值为空时清空;sweepCodeClass.StrCode值为" + sweepCodeClass.StrCode + " ;PbCache.strCode值为:" + PbCache.strCode);
+                                }
+                            }
+                            else
+                            {
+                                if (sweepCodeClass.StrCode.Substring(0, 3) == "TWB")
+                                {
+                                    DecodeQRCodeYMT(sweepCodeClass.StrCode);
+                                }
+                                else
+                                {
+                                    DecodeQRCode(sweepCodeClass.StrCode);
+                                }
+                            }
                         }
                         else
                         {
-                            DecodeQRCode(sweepCodeClass.StrCode);
+                            if (sweepCodeClass2.StrCode.Substring(0, 3) == "TWB")
+                            {
+                                DecodeQRCodeYMT(sweepCodeClass2.StrCode);
+                            }
+                            else
+                            {
+                                DecodeQRCode(sweepCodeClass2.StrCode);
+                            }
+
                         }
                     }
                 }
                 else
                 {
-                    if (sweepCodeClass2.StrCode.Substring(0, 3) == "TWB")
+                    if (string.IsNullOrEmpty(sweepCodeClass2.StrCode))
                     {
-                        DecodeQRCodeYMT(sweepCodeClass2.StrCode);
+                        if (string.IsNullOrEmpty(sweepCodeClass.StrCode))
+                        {
+                            if (string.IsNullOrEmpty(PbCache.strCode))
+                            {
+                                codeFlag = false;
+                                firstCode = "";
+                                PbCache.strCode = "";
+                                //l.WriteLog(12, "主线程扫码值为空时清空;sweepCodeClass.StrCode值为" + sweepCodeClass.StrCode + " ;PbCache.strCode值为:" + PbCache.strCode);
+                            }
+                        }
+                        else
+                        {
+                            if (sweepCodeClass.StrCode.Substring(0, 3) == "TWB")
+                            {
+                                DecodeQRCodeYMT(sweepCodeClass.StrCode);
+                            }
+                            else
+                            {
+                                DecodeQRCode(sweepCodeClass.StrCode);
+                            }
+                        }
                     }
                     else
                     {
-                        DecodeQRCode(sweepCodeClass2.StrCode);
+                        if (sweepCodeClass2.StrCode.Substring(0, 3) == "TWB")
+                        {
+                            DecodeQRCodeYMT(sweepCodeClass2.StrCode);
+                        }
+                        else
+                        {
+                            DecodeQRCode(sweepCodeClass2.StrCode);
+                        }
+
                     }
                 }
                 #endregion
@@ -932,6 +978,7 @@ namespace CarMeterSystem
                     meterWorkMonitorEventDataI.validLianda = "1";
                     meterWorkMonitorEventDataI.validMatClick = "1";
                     meterWorkMonitorEventDataI.setCar = "";
+                    meterWorkMonitorEventDataI.isValidScan = "1";
                     meterWorkMonitorEventDataI.rfidCar = "";
                     meterWorkMonitorEventDataI.photoCar = "";
                     meterWorkMonitorEventDataI.scanCar = "";

+ 66 - 19
CarMeterSystem/frmMain.cs

@@ -519,41 +519,86 @@ namespace CarMeterSystem
                 //}
 
                 // 司机扫码为空,取工控机二维码
-                if (string.IsNullOrEmpty(sweepCodeClass2.StrCode))
+                if (PbCache.sportInfo.scanRequireValid == "1")
                 {
-                    if (string.IsNullOrEmpty(sweepCodeClass.StrCode))
+                    if (PbCache.monitor.isValidScan == "0")
                     {
-                        if (string.IsNullOrEmpty(PbCache.strCode))
+                        if (string.IsNullOrEmpty(sweepCodeClass2.StrCode))
                         {
-                            codeFlag = false;
-                            firstCode = "";
-                            PbCache.strCode = "";
-                            //l.WriteLog(12, "主线程扫码值为空时清空;sweepCodeClass.StrCode值为" + sweepCodeClass.StrCode + " ;PbCache.strCode值为:" + PbCache.strCode);
-                        }
-                    }
-                    else
-                    {
-                        if (sweepCodeClass.StrCode.Substring(0,3) == "TWB")
-                        {
-                            DecodeQRCodeYMT(sweepCodeClass.StrCode);
+                            if (string.IsNullOrEmpty(sweepCodeClass.StrCode))
+                            {
+                                if (string.IsNullOrEmpty(PbCache.strCode))
+                                {
+                                    codeFlag = false;
+                                    firstCode = "";
+                                    PbCache.strCode = "";
+                                    //l.WriteLog(12, "主线程扫码值为空时清空;sweepCodeClass.StrCode值为" + sweepCodeClass.StrCode + " ;PbCache.strCode值为:" + PbCache.strCode);
+                                }
+                            }
+                            else
+                            {
+                                if (sweepCodeClass.StrCode.Substring(0, 3) == "TWB")
+                                {
+                                    DecodeQRCodeYMT(sweepCodeClass.StrCode);
+                                }
+                                else
+                                {
+                                    DecodeQRCode(sweepCodeClass.StrCode);
+                                }
+                            }
                         }
                         else
                         {
-                            DecodeQRCode(sweepCodeClass.StrCode);
+                            if (sweepCodeClass2.StrCode.Substring(0, 3) == "TWB")
+                            {
+                                DecodeQRCodeYMT(sweepCodeClass2.StrCode);
+                            }
+                            else
+                            {
+                                DecodeQRCode(sweepCodeClass2.StrCode);
+                            }
+
                         }
                     }
                 }
                 else
                 {
-                    if (sweepCodeClass2.StrCode.Substring(0, 3) == "TWB")
+                    if (string.IsNullOrEmpty(sweepCodeClass2.StrCode))
                     {
-                        DecodeQRCodeYMT(sweepCodeClass2.StrCode);
+                        if (string.IsNullOrEmpty(sweepCodeClass.StrCode))
+                        {
+                            if (string.IsNullOrEmpty(PbCache.strCode))
+                            {
+                                codeFlag = false;
+                                firstCode = "";
+                                PbCache.strCode = "";
+                                //l.WriteLog(12, "主线程扫码值为空时清空;sweepCodeClass.StrCode值为" + sweepCodeClass.StrCode + " ;PbCache.strCode值为:" + PbCache.strCode);
+                            }
+                        }
+                        else
+                        {
+                            if (sweepCodeClass.StrCode.Substring(0, 3) == "TWB")
+                            {
+                                DecodeQRCodeYMT(sweepCodeClass.StrCode);
+                            }
+                            else
+                            {
+                                DecodeQRCode(sweepCodeClass.StrCode);
+                            }
+                        }
                     }
                     else
                     {
-                        DecodeQRCode(sweepCodeClass2.StrCode);
+                        if (sweepCodeClass2.StrCode.Substring(0, 3) == "TWB")
+                        {
+                            DecodeQRCodeYMT(sweepCodeClass2.StrCode);
+                        }
+                        else
+                        {
+                            DecodeQRCode(sweepCodeClass2.StrCode);
+                        }
+
                     }
-                    
                 }
                 #endregion
 
@@ -610,6 +655,7 @@ namespace CarMeterSystem
                     PbCache.collect.parkStatus = e.parkStatus;
                     PbCache.collect.datetime = e.datetime;
                     PbCache.collect.licType = e.licType;
+                    PbCache.collect.carno = e.carno;
                 }
 
                 if (PbCache.collect != null && PbCache.collect.weightStatus == 0)
@@ -1032,6 +1078,7 @@ namespace CarMeterSystem
                     meterWorkMonitorEventDataI.validLianda = "1";
                     meterWorkMonitorEventDataI.validMatClick = "1";
                     meterWorkMonitorEventDataI.setCar = "";
+                    meterWorkMonitorEventDataI.isValidScan = "1";
                     meterWorkMonitorEventDataI.rfidCar = "";
                     meterWorkMonitorEventDataI.photoCar = "";
                     meterWorkMonitorEventDataI.scanCar = "";

+ 5 - 1
Common/vo/base/MeterBaseSpotInfo.cs

@@ -164,6 +164,10 @@ namespace Common
 		/// 是否允许使用期限皮重
 		/// <summary>
 		public string allowedTareWeight { get; set; }
-		
+
+		/// <summary>
+		///  扫码是否需要验证(0:不需要;1:需要)
+		/// <summary>
+		public string scanRequireValid { get; set; }
 	}
 }

+ 5 - 0
Common/vo/work/MeterWorkMonitor.cs

@@ -315,5 +315,10 @@ namespace Common
         /// 零点报警
         /// </summary>
         public string isZeroState { get; set; }
+
+        /// <summary>
+        /// 验证扫码 0不验证  1验证
+        /// </summary>
+        public string isValidScan { get; set; }
     }
 }