Browse Source

终止流程功能,车位更新完善,增加提示

yc_t 6 years ago
parent
commit
bda2db4359

+ 41 - 18
PLCLinker/centralController/FormCentralController.Designer.cs

@@ -129,6 +129,7 @@
             this.shortcut_sysInfo = new DevComponents.DotNetBar.ButtonItem();
             this.shortcut_about = new DevComponents.DotNetBar.ButtonItem();
             this.shortcut_close = new DevComponents.DotNetBar.ButtonItem();
+            this.shortcut_pause = new DevComponents.DotNetBar.ButtonItem();
             this.dockSite3 = new DevComponents.DotNetBar.DockSite();
             this.panelDockContainer10 = new DevComponents.DotNetBar.PanelDockContainer();
             this.dockContainerItem2 = new DevComponents.DotNetBar.DockContainerItem();
@@ -216,9 +217,9 @@
             this.dockSite_mainView.Dock = System.Windows.Forms.DockStyle.Fill;
             this.dockSite_mainView.DocumentDockContainer = new DevComponents.DotNetBar.DocumentDockContainer(new DevComponents.DotNetBar.DocumentBaseContainer[] {
             ((DevComponents.DotNetBar.DocumentBaseContainer)(new DevComponents.DotNetBar.DocumentDockContainer(new DevComponents.DotNetBar.DocumentBaseContainer[] {
-                        ((DevComponents.DotNetBar.DocumentBaseContainer)(new DevComponents.DotNetBar.DocumentBarContainer(this.bar_mainWin, 503, 326))),
-                        ((DevComponents.DotNetBar.DocumentBaseContainer)(new DevComponents.DotNetBar.DocumentBarContainer(this.bar_side, 360, 326)))}, DevComponents.DotNetBar.eOrientation.Horizontal))),
-            ((DevComponents.DotNetBar.DocumentBaseContainer)(new DevComponents.DotNetBar.DocumentBarContainer(this.bar_bottom, 871, 181)))}, DevComponents.DotNetBar.eOrientation.Vertical);
+                        ((DevComponents.DotNetBar.DocumentBaseContainer)(new DevComponents.DotNetBar.DocumentBarContainer(this.bar_mainWin, 503, 415))),
+                        ((DevComponents.DotNetBar.DocumentBaseContainer)(new DevComponents.DotNetBar.DocumentBarContainer(this.bar_side, 360, 415)))}, DevComponents.DotNetBar.eOrientation.Horizontal))),
+            ((DevComponents.DotNetBar.DocumentBaseContainer)(new DevComponents.DotNetBar.DocumentBarContainer(this.bar_bottom, 866, 83)))}, DevComponents.DotNetBar.eOrientation.Vertical);
             this.dockSite_mainView.Location = new System.Drawing.Point(0, 121);
             this.dockSite_mainView.Name = "dockSite_mainView";
             this.dockSite_mainView.Size = new System.Drawing.Size(866, 547);
@@ -231,6 +232,7 @@
             this.bar_mainWin.AccessibleName = "DotNetBar Bar";
             this.bar_mainWin.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
             this.bar_mainWin.AlwaysDisplayDockTab = true;
+            this.bar_mainWin.BackColor = System.Drawing.SystemColors.GradientActiveCaption;
             this.bar_mainWin.CanCustomize = false;
             this.bar_mainWin.CanDockBottom = false;
             this.bar_mainWin.CanDockDocument = true;
@@ -257,7 +259,7 @@
             this.bar_mainWin.Name = "bar_mainWin";
             this.bar_mainWin.SelectedDockTab = 4;
             this.bar_mainWin.SingleLineColor = System.Drawing.SystemColors.ControlDarkDark;
-            this.bar_mainWin.Size = new System.Drawing.Size(503, 326);
+            this.bar_mainWin.Size = new System.Drawing.Size(503, 415);
             this.bar_mainWin.Stretch = true;
             this.bar_mainWin.Style = DevComponents.DotNetBar.eDotNetBarStyle.Office2003;
             this.bar_mainWin.TabIndex = 0;
@@ -271,7 +273,7 @@
             this.pdc_devStatus.DisabledBackColor = System.Drawing.Color.Empty;
             this.pdc_devStatus.Location = new System.Drawing.Point(3, 28);
             this.pdc_devStatus.Name = "pdc_devStatus";
-            this.pdc_devStatus.Size = new System.Drawing.Size(497, 295);
+            this.pdc_devStatus.Size = new System.Drawing.Size(497, 384);
             this.pdc_devStatus.Style.Alignment = System.Drawing.StringAlignment.Center;
             this.pdc_devStatus.Style.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground;
             this.pdc_devStatus.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder;
@@ -286,7 +288,7 @@
             this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
             this.panel1.Location = new System.Drawing.Point(0, 0);
             this.panel1.Name = "panel1";
-            this.panel1.Size = new System.Drawing.Size(497, 295);
+            this.panel1.Size = new System.Drawing.Size(497, 384);
             this.panel1.TabIndex = 2;
             // 
             // tableLayoutPanel2
@@ -374,7 +376,7 @@
             this.NumMachineMonitorPanel.DisabledBackColor = System.Drawing.Color.Empty;
             this.NumMachineMonitorPanel.Location = new System.Drawing.Point(3, 28);
             this.NumMachineMonitorPanel.Name = "NumMachineMonitorPanel";
-            this.NumMachineMonitorPanel.Size = new System.Drawing.Size(497, 295);
+            this.NumMachineMonitorPanel.Size = new System.Drawing.Size(497, 384);
             this.NumMachineMonitorPanel.Style.Alignment = System.Drawing.StringAlignment.Center;
             this.NumMachineMonitorPanel.Style.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground;
             this.NumMachineMonitorPanel.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder;
@@ -388,7 +390,7 @@
             this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
             this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 0);
             this.flowLayoutPanel1.Name = "flowLayoutPanel1";
-            this.flowLayoutPanel1.Size = new System.Drawing.Size(497, 295);
+            this.flowLayoutPanel1.Size = new System.Drawing.Size(497, 384);
             this.flowLayoutPanel1.TabIndex = 1;
             this.flowLayoutPanel1.Resize += new System.EventHandler(this.flowLayoutPanel1_Resize);
             // 
@@ -397,7 +399,7 @@
             this.paymentPanel.DisabledBackColor = System.Drawing.Color.Empty;
             this.paymentPanel.Location = new System.Drawing.Point(3, 28);
             this.paymentPanel.Name = "paymentPanel";
-            this.paymentPanel.Size = new System.Drawing.Size(497, 295);
+            this.paymentPanel.Size = new System.Drawing.Size(497, 384);
             this.paymentPanel.Style.Alignment = System.Drawing.StringAlignment.Center;
             this.paymentPanel.Style.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground;
             this.paymentPanel.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder;
@@ -410,7 +412,7 @@
             this.ParkingSpaceMonitorPanel.DisabledBackColor = System.Drawing.Color.Empty;
             this.ParkingSpaceMonitorPanel.Location = new System.Drawing.Point(3, 28);
             this.ParkingSpaceMonitorPanel.Name = "ParkingSpaceMonitorPanel";
-            this.ParkingSpaceMonitorPanel.Size = new System.Drawing.Size(497, 295);
+            this.ParkingSpaceMonitorPanel.Size = new System.Drawing.Size(497, 384);
             this.ParkingSpaceMonitorPanel.Style.Alignment = System.Drawing.StringAlignment.Center;
             this.ParkingSpaceMonitorPanel.Style.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground;
             this.ParkingSpaceMonitorPanel.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder;
@@ -431,7 +433,7 @@
             this.testPanel.DisabledBackColor = System.Drawing.Color.Empty;
             this.testPanel.Location = new System.Drawing.Point(3, 28);
             this.testPanel.Name = "testPanel";
-            this.testPanel.Size = new System.Drawing.Size(497, 295);
+            this.testPanel.Size = new System.Drawing.Size(497, 384);
             this.testPanel.Style.Alignment = System.Drawing.StringAlignment.Center;
             this.testPanel.Style.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground;
             this.testPanel.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder;
@@ -705,10 +707,10 @@
             this.bar_bottom.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] {
             this.dci_ParkingRecords});
             this.bar_bottom.LayoutType = DevComponents.DotNetBar.eLayoutType.DockContainer;
-            this.bar_bottom.Location = new System.Drawing.Point(0, 329);
+            this.bar_bottom.Location = new System.Drawing.Point(0, 418);
             this.bar_bottom.Name = "bar_bottom";
             this.bar_bottom.SelectedDockTab = 0;
-            this.bar_bottom.Size = new System.Drawing.Size(866, 218);
+            this.bar_bottom.Size = new System.Drawing.Size(866, 129);
             this.bar_bottom.Stretch = true;
             this.bar_bottom.Style = DevComponents.DotNetBar.eDotNetBarStyle.Office2003;
             this.bar_bottom.TabIndex = 1;
@@ -720,7 +722,7 @@
             this.RecordsMonitorPanel.DisabledBackColor = System.Drawing.Color.Empty;
             this.RecordsMonitorPanel.Location = new System.Drawing.Point(3, 28);
             this.RecordsMonitorPanel.Name = "RecordsMonitorPanel";
-            this.RecordsMonitorPanel.Size = new System.Drawing.Size(860, 187);
+            this.RecordsMonitorPanel.Size = new System.Drawing.Size(860, 98);
             this.RecordsMonitorPanel.Style.Alignment = System.Drawing.StringAlignment.Center;
             this.RecordsMonitorPanel.Style.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground;
             this.RecordsMonitorPanel.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder;
@@ -755,7 +757,7 @@
             this.dgvx_parkingRecords.Location = new System.Drawing.Point(0, 0);
             this.dgvx_parkingRecords.Name = "dgvx_parkingRecords";
             this.dgvx_parkingRecords.RowTemplate.Height = 23;
-            this.dgvx_parkingRecords.Size = new System.Drawing.Size(860, 187);
+            this.dgvx_parkingRecords.Size = new System.Drawing.Size(860, 98);
             this.dgvx_parkingRecords.TabIndex = 0;
             // 
             // parkingRecordsID
@@ -845,6 +847,7 @@
             this.bar_side.AccessibleName = "DotNetBar Bar";
             this.bar_side.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
             this.bar_side.AlwaysDisplayDockTab = true;
+            this.bar_side.BackColor = System.Drawing.SystemColors.GradientActiveCaption;
             this.bar_side.CanDockBottom = false;
             this.bar_side.CanDockDocument = true;
             this.bar_side.CanDockLeft = false;
@@ -861,7 +864,8 @@
             this.bar_side.Location = new System.Drawing.Point(506, 0);
             this.bar_side.Name = "bar_side";
             this.bar_side.SelectedDockTab = 0;
-            this.bar_side.Size = new System.Drawing.Size(360, 326);
+            this.bar_side.SingleLineColor = System.Drawing.SystemColors.ActiveCaptionText;
+            this.bar_side.Size = new System.Drawing.Size(360, 415);
             this.bar_side.Stretch = true;
             this.bar_side.Style = DevComponents.DotNetBar.eDotNetBarStyle.Office2003;
             this.bar_side.TabIndex = 2;
@@ -873,7 +877,7 @@
             this.terminalMonitorPanel.DisabledBackColor = System.Drawing.Color.Empty;
             this.terminalMonitorPanel.Location = new System.Drawing.Point(3, 28);
             this.terminalMonitorPanel.Name = "terminalMonitorPanel";
-            this.terminalMonitorPanel.Size = new System.Drawing.Size(354, 295);
+            this.terminalMonitorPanel.Size = new System.Drawing.Size(354, 384);
             this.terminalMonitorPanel.Style.Alignment = System.Drawing.StringAlignment.Center;
             this.terminalMonitorPanel.Style.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground;
             this.terminalMonitorPanel.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder;
@@ -888,7 +892,7 @@
             this.flp_Term.Location = new System.Drawing.Point(0, 0);
             this.flp_Term.Name = "flp_Term";
             this.flp_Term.Padding = new System.Windows.Forms.Padding(5);
-            this.flp_Term.Size = new System.Drawing.Size(354, 295);
+            this.flp_Term.Size = new System.Drawing.Size(354, 384);
             this.flp_Term.TabIndex = 0;
             // 
             // dci_terminal
@@ -929,6 +933,7 @@
             this.bar_notification.AccessibleName = "DotNetBar Bar";
             this.bar_notification.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
             this.bar_notification.AutoSyncBarCaption = true;
+            this.bar_notification.BackColor = System.Drawing.SystemColors.GradientActiveCaption;
             this.bar_notification.CloseSingleTab = true;
             this.bar_notification.Controls.Add(this.warningPanel);
             this.bar_notification.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
@@ -1038,6 +1043,7 @@
             this.bar_Menu.AccessibleDescription = "DotNetBar Bar (bar_Menu)";
             this.bar_Menu.AccessibleName = "DotNetBar Bar";
             this.bar_Menu.AccessibleRole = System.Windows.Forms.AccessibleRole.MenuBar;
+            this.bar_Menu.BackColor = System.Drawing.SystemColors.GradientActiveCaption;
             this.bar_Menu.DockSide = DevComponents.DotNetBar.eDockSide.Top;
             this.bar_Menu.Font = new System.Drawing.Font("微软雅黑", 9F);
             this.bar_Menu.IsMaximized = false;
@@ -1247,6 +1253,7 @@
             this.bar_shortcut.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] {
             this.shortcut_login,
             this.shortcut_logout,
+            this.shortcut_pause,
             this.shortcut_sysInfo,
             this.shortcut_about,
             this.shortcut_close});
@@ -1290,6 +1297,7 @@
             // shortcut_login
             // 
             this.shortcut_login.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText;
+            this.shortcut_login.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
             this.shortcut_login.Image = global::centralController.Properties.Resources.pc;
             this.shortcut_login.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
             this.shortcut_login.Name = "shortcut_login";
@@ -1300,6 +1308,7 @@
             // shortcut_logout
             // 
             this.shortcut_logout.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText;
+            this.shortcut_logout.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
             this.shortcut_logout.Image = global::centralController.Properties.Resources.monitor;
             this.shortcut_logout.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
             this.shortcut_logout.Name = "shortcut_logout";
@@ -1310,6 +1319,7 @@
             // shortcut_sysInfo
             // 
             this.shortcut_sysInfo.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText;
+            this.shortcut_sysInfo.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
             this.shortcut_sysInfo.Image = global::centralController.Properties.Resources.sysExplain1;
             this.shortcut_sysInfo.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
             this.shortcut_sysInfo.Name = "shortcut_sysInfo";
@@ -1320,6 +1330,7 @@
             // shortcut_about
             // 
             this.shortcut_about.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText;
+            this.shortcut_about.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
             this.shortcut_about.Image = global::centralController.Properties.Resources.about;
             this.shortcut_about.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
             this.shortcut_about.Name = "shortcut_about";
@@ -1329,6 +1340,7 @@
             // shortcut_close
             // 
             this.shortcut_close.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText;
+            this.shortcut_close.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
             this.shortcut_close.Image = global::centralController.Properties.Resources.close;
             this.shortcut_close.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
             this.shortcut_close.Name = "shortcut_close";
@@ -1337,6 +1349,16 @@
             this.shortcut_close.Text = "退出";
             this.shortcut_close.Click += new System.EventHandler(this.shortcut_close_Click);
             // 
+            // shortcut_pause
+            // 
+            this.shortcut_pause.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
+            this.shortcut_pause.Image = global::centralController.Properties.Resources.circulate;
+            this.shortcut_pause.ImagePosition = DevComponents.DotNetBar.eImagePosition.Top;
+            this.shortcut_pause.Name = "shortcut_pause";
+            this.shortcut_pause.ShowSubItems = false;
+            this.shortcut_pause.Text = "停止流程";
+            this.shortcut_pause.Click += new System.EventHandler(this.shortcut_pause_Click);
+            // 
             // dockSite3
             // 
             this.dockSite3.AccessibleRole = System.Windows.Forms.AccessibleRole.Window;
@@ -1618,6 +1640,7 @@
         private DevComponents.DotNetBar.LabelX lbx_PLCStatus;
         private System.Windows.Forms.Panel panel1;
         private DevComponents.DotNetBar.ButtonItem btn_config;
+        private DevComponents.DotNetBar.ButtonItem shortcut_pause;
     }
 }
 

+ 41 - 2
PLCLinker/centralController/FormCentralController.cs

@@ -539,6 +539,8 @@ namespace centralController
             }
             else
             {
+                //Console.WriteLine("---------------------");
+                //Console.WriteLine(rtb_notification.SelectionStart);
                 string appendingText = str;
                 rtb_notification.AppendText(appendingText);
                 string currentTxt = rtb_notification.Text;
@@ -565,7 +567,9 @@ namespace centralController
                         rtb_notification.SelectionColor = Color.Red;
                         break;
                 }
-                rtb_notification.Select(index + appendingText.Length - 1, 0);
+                //rtb_notification.Select(index + appendingText.Length - 1, 0);
+                if (!rtb_notification.Focused)
+                    rtb_notification.ScrollToCaret();
             }
             //rtb_notification.Text = Monitor.Monitor.ins.GetNotification();
 
@@ -766,7 +770,42 @@ namespace centralController
         {
             Close();
         }
-
+        /// <summary>
+        /// 终止与启动流程
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void shortcut_pause_Click(object sender, EventArgs e)
+        {
+            if (shortcut_pause.Enabled)
+            {
+                shortcut_pause.Enabled = false;
+                Monitor.Monitor.globalStatus = !Monitor.Monitor.globalStatus;
+                if (Monitor.Monitor.globalStatus)
+                {
+                    shortcut_pause.Image = Properties.Resources.circulate;
+                    shortcut_pause.Text = "点击终止";
+                }
+                else
+                {
+                    shortcut_pause.Image = Properties.Resources.circulate2;
+                    shortcut_pause.Text = "点击启动";
+                }
+                Monitor.Monitor.SetNotification(Monitor.Monitor.globalStatus ? "工作正常" : "终止状态");
+                Task.Factory.StartNew(() =>
+                {
+                    Thread.Sleep(3000);
+                    try
+                    {
+                        this.Invoke(new Action(() =>
+                        {
+                            shortcut_pause.Enabled = true;
+                        }));
+                    }
+                    catch (Exception ex) { Console.WriteLine(ex.Message); }
+                });
+            }
+        }
         #endregion
 
     }

+ 3 - 1
PLCLinker/centralController/Monitor/SystemInitializer.cs

@@ -64,6 +64,7 @@ namespace Monitor
                 Monitor.advertPath = ConfigurationManager.AppSettings.Get("advertPath");
                 //配置文件读取结束,进入状态1
                 Monitor.initializeState = 1;
+                Monitor.globalStatus = false;
                 initStatus = true;
             }
             catch (Exception e) { Console.WriteLine("初始化," + e.Message); return; }
@@ -167,7 +168,8 @@ namespace Monitor
                 case 5:
                     Console.WriteLine("初始化成功");
                     Monitor.SetNotification("clear");
-                    Monitor.SetNotification("初始化成功", parkMonitor.model.TextColor.Log);
+                    Monitor.SetNotification("初始化成功,耗时:" + String.Format("{0:N2}秒" ,mt.GetInterval().TotalSeconds), parkMonitor.model.TextColor.Log);
+                    Monitor.globalStatus = true;
                     break;
             }
             //Monitor.SetNotification("aaaaaaaaaaaaaaaa", parkMonitor.model.TextColor.Info);

+ 42 - 30
PLCLinker/centralController/Terminal/Terminal.cs

@@ -35,26 +35,6 @@ namespace Terminal
         private static List<bool> lockList = new List<bool>();
         public static bool isClosing = false;
 
-        public void FeeCal()
-        {
-
-        }
-
-        public void GetTerminalState()
-        {
-
-        }
-
-        private object SearchPaymentScheme()
-        {
-            return null;
-        }
-
-        private void UpdateParkingRecords(int Object)
-        {
-
-        }
-
         /// <summary>
         /// 从终端结构体中获得车牌号
         /// </summary>
@@ -357,6 +337,10 @@ namespace Terminal
                         {
                             ParkingSpaceStru ps = Monitor.Monitor.parkingSpaceInfo[i];
                             ps.spaceStatus = (short)((ParkingSpaceStru)received[0]).spaceStatus;
+                            ps.receiptNum = ((ParkingSpaceStru)received[0]).receiptNum;
+                            ps.length = (short)((ParkingSpaceStru)received[0]).length;
+                            ps.width = (short)((ParkingSpaceStru)received[0]).width;
+                            ps.height = (short)((ParkingSpaceStru)received[0]).height;
                             Monitor.Monitor.parkingSpaceInfo[i] = ps;
                             break;
                         }
@@ -487,6 +471,12 @@ namespace Terminal
                 //if (numMachineLaunch == terminalInfo[i].terminalID)
                 if (terminalInfo[i].numMachineLaunch == 1 && terminalInfo[i].licVerification == 0)
                 {
+                    if (!Monitor.Monitor.globalStatus)
+                    {
+                        Monitor.Monitor.SetNotification("号牌系统已暂停,请检查无误后手动开启",parkMonitor.model.TextColor.Warning);
+                        Thread.Sleep(5000);
+                        return;
+                    }
                     int numReceivedStatus = 0;//1获得,2终止
                     TerminalStru term = terminalInfo[i];
                     if (term.terminalStatus == (short)1)
@@ -604,6 +594,8 @@ namespace Terminal
                             else
                                 Thread.Sleep(500);
                         }
+                        if (countdown == 0)
+                            Monitor.Monitor.SetNotification("提醒:未检测到号牌机启动指令被清零", parkMonitor.model.TextColor.Warning);
                     }
                 }
             }
@@ -619,21 +611,34 @@ namespace Terminal
             //int processCompleted = Monitor.Monitor.mainBlockInfo.processCompleted;
             int currentTerm = Monitor.Monitor.mainBlockInfo.terminalID;
             int parkingSpaceID = 0;
-            if (processAttrib == 1)
+            if (processAttrib == 1 && Monitor.Monitor.globalStatus)
             {
                 TerminalStru term = new TerminalStru();
                 string license;
                 //等待完成信号
-                if (Monitor.Monitor.mainBlockInfo.parkingRunning != 1 || Monitor.Monitor.mainBlockInfo.processCompleted != 1)
+                while (true)
                 {
-                    if (Monitor.Monitor.mainBlockInfo.processStopped == 1)
+                    if (Monitor.Monitor.mainBlockInfo.processStopped == 1 || !Monitor.Monitor.globalStatus)
                     {
-                        Log.WriteLog(LogType.process,LogFile.ERROR,"停车流程中断");
+                        Log.WriteLog(LogType.process, LogFile.ERROR, "停车流程中断");
+                        Monitor.Monitor.SetNotification("停车流程中断", parkMonitor.model.TextColor.Warning);
                         Thread.Sleep(500);
                         ClearTerminal(term.terminalID);
                         ResetCompleteSignal();
+                        //流程终端清除记录的号牌
+                        try { idLicMap.Remove(currentTerm); }
+                        catch { }
+                        return;
                     }
-                    return;
+                    if(Monitor.Monitor.mainBlockInfo.processCompleted == 1)
+                    {
+                        if (!idLicMap.ContainsKey(currentTerm))
+                        {
+                            Log.WriteLog(LogType.process, LogFile.ERROR, "停车结束时未找到号牌");
+                        }
+                        break;
+                    }
+                    Thread.Sleep(200);
                 }
                 //找到终端号,判断是否注册用户
                 //拿到号牌
@@ -646,7 +651,7 @@ namespace Terminal
                             term = terminalInfo[i];
                     }
                     //term = terminalInfo[currentTerm - 1];
-                    Thread.Sleep(1000);
+                    Thread.Sleep(500);
                     parkingSpaceID = Monitor.Monitor.mainBlockInfo.currentParkingSpaceID;
                     //找到停车位置
                     //for (int s = 0; s < Monitor.Monitor.parkingSpaceInfo.Count; s++)
@@ -667,7 +672,7 @@ namespace Terminal
                             ClearTerminal(term.terminalID);
                         }
                         catch { }
-                        Monitor.Monitor.SetNotification("无车位或凭证号", parkMonitor.model.TextColor.Warning);
+                        Monitor.Monitor.SetNotification("无车位或凭证号,车位:"+parkingSpaceID+",凭证号:"+term.receiptNum, parkMonitor.model.TextColor.Warning);
                         return;
                     }
                     UpdateVehicle(license, 0, 0, true, false, 0);
@@ -1148,10 +1153,16 @@ namespace Terminal
                 bool value = false;
                 if (termIndex != -1 && termCalcMap.Count >= termIndex && termCalcMap.TryGetValue(termIndex, out value) && !value && ts.cmd == 2 && receiptNum != 0)
                 {
+                    if (!Monitor.Monitor.globalStatus)
+                    {
+                        Monitor.Monitor.SetNotification("取车计费系统已暂停,请检查无误后手动开启", parkMonitor.model.TextColor.Warning);
+                        Thread.Sleep(5000);
+                        return;
+                    }
                     //fetchState = Monitor.Monitor.mainBlockInfo.fetchingRunning;
                     Monitor.Monitor.SetNotification(termIndex + "号终端准备计算费用", parkMonitor.model.TextColor.Log);
                     termCalcMap[termIndex] = true;
-                    Console.WriteLine("终端编号" + termIndex);
+                    //Console.WriteLine("终端编号" + termIndex);
 
                     int parkingRecordsID = 0;
                     int remoteParkingRecordsID = 0;
@@ -1262,9 +1273,10 @@ namespace Terminal
                             int count = 0;
                             while (!isClosing && termIndex != -1)
                             {
-                                if (Monitor.Monitor.mainBlockInfo.processStopped == 1)
+                                if (Monitor.Monitor.mainBlockInfo.processStopped == 1 || !Monitor.Monitor.globalStatus)
                                 {
-                                    Log.WriteLog(LogType.process, LogFile.INFO, "检测到流程中断");
+                                    Log.WriteLog(LogType.process, LogFile.INFO, "取车流程中断");
+                                    Monitor.Monitor.SetNotification("取车流程中断", parkMonitor.model.TextColor.Warning);
                                     ClearTerminal(terminalInfo[termIndex].terminalID);
                                     //停车流程确保已清除中控块完成信号
                                     Thread.Sleep(500);

BIN
PLCLinker/centralController/obj/Release/centralController.Properties.Resources.resources


BIN
PLCLinker/centralController/obj/Release/centralController.csproj.GenerateResource.Cache


BIN
PLCLinker/centralController/resource/image/map/circulate.png


BIN
PLCLinker/centralController/resource/image/map/circulate2.png