Browse Source

代码提交

BourneCao 3 years ago
parent
commit
95845fdc50
2 changed files with 17 additions and 8 deletions
  1. 2 2
      CarMeterSystem/frmMain.cs
  2. 15 6
      CarMeterSystem/frmOneYardToEnd.cs

+ 2 - 2
CarMeterSystem/frmMain.cs

@@ -480,9 +480,9 @@ namespace CarMeterSystem
                 {
                     if (string.IsNullOrEmpty(sweepCodeClass.StrCode))
                     {
-                        if (string.IsNullOrEmpty(PbCache.strCode))
+                        codeFlag = false;
+                        if (!string.IsNullOrEmpty(PbCache.strCode))
                         {
-                            codeFlag = false;
                             firstCode = "";
                             PbCache.strCode = "";
                             l.WriteLog(12, "主线程扫码值为空时清空;sweepCodeClass.StrCode值为" + sweepCodeClass.StrCode + " ;PbCache.strCode值为:" + PbCache.strCode);

+ 15 - 6
CarMeterSystem/frmOneYardToEnd.cs

@@ -1076,12 +1076,8 @@ namespace CarMeterSystem
                 }
                 try
                 {
-                    if (isMeasureSuccess && PbCache.collect.weight > 500)
-                    {
-                        isStop = true;
-                        readVoicd();
-                        isStop = false;
-                    }
+                    
+
                     if (PbCache.collect.weight < 500)
                     {
                         PbCache.strState = "";
@@ -1091,12 +1087,23 @@ namespace CarMeterSystem
                         PbCache.addWgt = 0;
                         this.Hide();
                         hidWindow();
+                        return;
                     }
                     else
                     {
                         ucWeightCarTJXJG1.setWgtBackColor(true);
                     }
 
+                    // 成功就只播语音,不再做任何处理
+                    if (isMeasureSuccess)
+                    {
+                        isStop = true;
+                        readVoicd();
+                        isStop = false;
+
+                        return;
+                    }
+
                     if (PbCache.collect.parkStatus == 3)
                     {
                         meterWorkScheduledHelpTimerPark.baseSpotNo = PbCache.sportInfo.baseSpotNo;
@@ -1278,6 +1285,7 @@ namespace CarMeterSystem
                             //txtMsgInfo.Text = "当前重量已超量程,秤体量程为【" + PbCache.range.upperRange / 1000 + "】T,不允许进行自助计量操作!";
                             setMsg("当前重量已超量程,秤体量程为【" + PbCache.range.upperRange / 1000 + "】T,不允许进行自助计量操作!");
                             isPlayRangeVoice = true;
+                            return;
                         }
                     }
                     if (PbCache.collect.weightStatus == 0 && !PbCache.monitorResult.valid_park_status)
@@ -1291,6 +1299,7 @@ namespace CarMeterSystem
                             PbCache.ResultMessage = "车辆超出秤台,请调整车位"; //btnSave_Click
                             led_controler.setStaticLineMsg(PbCache.sportInfo.ledIp, "车辆超出秤台,请调整车位");
                             isPlayCalibVoice = true;
+                            return;
                         }
                     }
                     if (PbCache.isOvertimeAlarm)