Browse Source

未拍到号牌以默认号牌停车

yct 6 years ago
parent
commit
054ec82a25
1 changed files with 10 additions and 3 deletions
  1. 10 3
      PLCLinker/centralController/Terminal/Terminal.cs

+ 10 - 3
PLCLinker/centralController/Terminal/Terminal.cs

@@ -498,9 +498,10 @@ namespace Terminal
                         }
 
                         //无论号牌有无,皆记录或更新当前号牌,若无则填入默认号牌
+                        string currentLic = "";
                         lock (idLicMap)
                         {
-                            string currentLic = license == "" ? Monitor.Monitor.defaultLic : license;
+                            currentLic = license == "" ? Monitor.Monitor.defaultLic : license;
                             try
                             {
                                 if (idLicMap.ContainsKey(term.terminalID))
@@ -530,7 +531,7 @@ namespace Terminal
                         }
                         Log.WriteLog(LogType.process, LogFile.INFO, "号牌" + license + "已记录");
                         //未获得号牌,告知PLC终止,告诉终端提示用户重新操作
-                        if (license == "")
+                        if (currentLic == "")
                         {
                             MainBlockStru mbs = new MainBlockStru
                             {
@@ -591,6 +592,12 @@ namespace Terminal
                                 ts.licVerification = 1;
                                 Monitor.Monitor.PLC.WriteToPLC(ts, PLCDataType.central);
                             }
+                            if (term.btnStatus == (short)0)
+                            {
+                                ts.licVerification = 2;
+                                Monitor.Monitor.PLC.WriteToPLC(ts, PLCDataType.central);
+                                Log.WriteLog(LogType.process,LogFile.ERROR,"空按钮状态拍号牌");
+                            }
                             //无论是否注册,皆告知PLC,已获取号牌或比对异常、终止流程
                             MainBlockStru mbst = new MainBlockStru
                             {
@@ -602,7 +609,7 @@ namespace Terminal
                             };
                             Monitor.Monitor.PLC.WriteToPLC(mbst, PLCDataType.central);
                             //号牌获取结果被清零才跳出
-                            Monitor.Monitor.SetNotification("已写入号牌获取结果,等待号牌机启动指令清零", parkMonitor.model.TextColor.Info);
+                            Monitor.Monitor.SetNotification("已写入号牌获取结果"+ numReceivedStatus + ",等待号牌机启动指令清零", parkMonitor.model.TextColor.Info);
                         }
                         int countdown = 10;
                         while (countdown-- > 0)