duyong пре 3 година
родитељ
комит
a083c89b03
3 измењених фајлова са 35 додато и 7 уклоњено
  1. 30 2
      CarMeterSystem/frmMain.cs
  2. 4 4
      CarMeterSystem/frmOneYardToEnd.cs
  3. 1 1
      Common/cacheCls/PbCache.cs

+ 30 - 2
CarMeterSystem/frmMain.cs

@@ -397,6 +397,8 @@ namespace CarMeterSystem
         private int iCountPark = 0;
         private string editCarNo = "";
 
+        private bool isCarSource = false;
+
         private bool isResFlag = true;
         private string RFIDCarNo = "";
         private string isWriteRFID = AppConfigCache.isWriteRFID;
@@ -467,6 +469,7 @@ namespace CarMeterSystem
             //这里每隔0.5秒执行一次
             try
             {
+                PbCache.carNoSource = 1;
                 if (e.carno == "nown")
                 {
                     e.carno = "";
@@ -631,7 +634,7 @@ namespace CarMeterSystem
                 if (e.weight > 500)
                 {
                     isResFlag = true;
-
+                    isCarSource = true;
                     if (PbCache.dtStartTime == null)
                         PbCache.dtStartTime = DateTime.Now;
                     isLedWrite = true;
@@ -797,6 +800,10 @@ namespace CarMeterSystem
                             { }
                             else
                             {
+                                if (PbCache.carNoSource == 1)
+                                {
+                                    PbCache.carNoSource = 2;
+                                }
                                 mwUpdate.rfidCar = rmTRFIDEventData.Data[0].text;
                                 sCarNo = rmTRFIDEventData.Data[0].text;
                                 RFIDCarNo = rmTRFIDEventData.Data[0].text;
@@ -807,6 +814,7 @@ namespace CarMeterSystem
                         #region 计量员修改的车号信息
                         if (PbCache.monitor != null && !string.IsNullOrEmpty(PbCache.monitor.setCar))
                         {
+                            PbCache.carNoSource = 4;
                             sCarNo = PbCache.monitor.setCar;
                             bEditCar = true;
                             flagCarMonit = true;
@@ -961,6 +969,19 @@ namespace CarMeterSystem
                         RFIDCarNo = "";
                     }
 
+                    //车号来源记录
+                    if (isCarSource)
+                    {
+                        meterWorkScheduledHelp1.baseSpotNo = PbCache.sportInfo.baseSpotNo;
+                        meterWorkScheduledHelp1.baseSpotName = PbCache.sportInfo.baseSpotName;
+                        meterWorkScheduledHelp1.carNo = string.IsNullOrEmpty(PbCache.collect.carno) ? PbCache.resultCarNo : PbCache.collect.carno;
+                        meterWorkScheduledHelp1.helpContent = PbCache.carNoSource.ToString();
+                        meterWorkScheduledHelp1.warmType = "8";
+                        meterWorkScheduledHelp1.warmTypeName = "车号来源记录";
+                        meterWorkScheduledHelpService.add(meterWorkScheduledHelp1);
+                        isCarSource = false;
+                    }
+
                     PbCache.isOvertimeAlarm = false; //是否超时报警
                     PbCache.strCode = "";
                     PbCache.strState = "";
@@ -1306,6 +1327,10 @@ namespace CarMeterSystem
         {
             try
             {
+                if (PbCache.carNoSource == 1 || PbCache.carNoSource == 2)
+                {
+                    PbCache.carNoSource = 3;
+                }
                 codeFlag = true;
                 string token = httpRequest.GetToken();
                 string carNo = httpRequest.getCarNo(strCode, token);
@@ -1320,7 +1345,10 @@ namespace CarMeterSystem
 
         private void DecodeQRCode(string strCode)
         {
-            
+            if (PbCache.carNoSource == 1 || PbCache.carNoSource == 2)
+            {
+                PbCache.carNoSource = 3;
+            }
             codeFlag = true;
             //frmOneYardToEnd frmOneYardToEnd = new frmOneYardToEnd();
             Hashtable hashTable = new Hashtable();

+ 4 - 4
CarMeterSystem/frmOneYardToEnd.cs

@@ -290,12 +290,12 @@ namespace CarMeterSystem
                 //判断区域是否正确
                 if (!areaInfo.ValidMethod(PbCache.sportInfo, txtCarNo.Text) && PbCache.monitor.validArea == "1" && !isCompare)
                 {
-                    vicPlayClass.GetVoicePlay("计量失败,异地洁净,请联系计量大厅", PbCache.collect.carno);
-                    PbCache.ResultMessage = "计量失败:异地结净,请联系计量大厅"; //btnSave_Click
-                    led_controler.setStaticLineMsg(PbCache.sportInfo.ledIp, "计量失败:异地结净,请联系计量大厅");
+                    vicPlayClass.GetVoicePlay("计量失败,禁止毛皮在不同磅点计量,请联系计量大厅", PbCache.collect.carno);
+                    PbCache.ResultMessage = "计量失败,禁止毛皮在不同磅点计量,请联系计量大厅"; //btnSave_Click
+                    led_controler.setStaticLineMsg(PbCache.sportInfo.ledIp, "计量失败,禁止毛皮在不同磅点计量,请联系计量大厅");
                     PbCache.isLockFrm = false;
                     btnSave.Enabled = true;
-                    setMsg("计量失败:异地结净,请联系计量大厅");
+                    setMsg("计量失败,禁止毛皮在不同磅点计量,请联系计量大厅");
                     return;
                 }
 

+ 1 - 1
Common/cacheCls/PbCache.cs

@@ -58,7 +58,7 @@ namespace Common
         public static bool isTareWgt { get; set; }
 
         /// <summary>
-        /// 车号数据来源(1-正常,2-扫码,3-rfid,4-车号重置)
+        /// 车号数据来源(1-正常,2-rfid,3-扫码,4-车号重置)
         /// </summary>
         public static int carNoSource { get; set; }