add
zongzhibin
2024-11-24 d89732b82ff7fc047628ca3772311a0fbeea3553
CC/iWareCC_ASRS/FormCC.cs
@@ -5,6 +5,7 @@
using iWareCC.SrmService;
using iWareCC.StationService;
using iWareCC.ThreadService;
using iWareCC.ThreadService._03_BZ12_机器人码包工位_;
using iWareCC.WCF;
using iWareCommon.Common.Globle;
using iWareCommon.Utils;
@@ -12,6 +13,7 @@
using iWareModel.Entity.AGV;
using iWareSql.DataAccess;
using iWareSql.DBModel;
using iWareSql.WmsDBModel;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
@@ -30,6 +32,12 @@
{
    public partial class FormCC : Form
    {
        /// <summary>
        /// 全局—是否可以运行执行出库模式
        /// </summary>
        public static bool IsAllowRunOutMode = false;
        /// <summary>
        /// 1号堆垛机入库口扫码强制验证通过
        /// </summary>
@@ -224,10 +232,11 @@
            //重新获取发动机信息
            new Thread(DataProcess_269.Handler).Start();
            //1014库位转运到1020线程
            new Thread(DataProcess_BZ39.Handler).Start();
            new Thread(DataProcess_BZ12.Hander).Start();
            new Thread(DeleteData).Start();
@@ -300,7 +309,7 @@
            }
            else
            {//正式模式 
                rgvServiceClient = new RgvServiceClient();
                stationServiceClient = new StationServiceClient();
            }
            this.lbl_IsSimulationPLC.BackColor = IsSimulationPLC ? Color.Red : Color.Green;
@@ -1715,7 +1724,7 @@
            DialogResult dr = MessageBox.Show("确定要启动【" + currentCheckModelText + "】模式吗?", "启动模式", messButton);
            if (dr == DialogResult.OK)//如果点击“确定”按钮
            {
                using (DbModel edm = new DbModel())
                using (WmsDBModel edm = new WmsDBModel())
                {
                    var ccSystem = BasicDataSetHandler.GetCCSystem(edm);
                    if (ccSystem == null)
@@ -1774,7 +1783,7 @@
        /// <returns></returns>
        private bool CommonStopService()
        {
            using (DbModel edm = new DbModel())
            using (WmsDBModel edm = new WmsDBModel())
            {
                var ccSystem = BasicDataSetHandler.GetCCSystem(edm);
                if (ccSystem == null)
@@ -1790,7 +1799,7 @@
                    ccSystem.Machine = string.Empty;
                    ccSystem.LastMachine = Dns.GetHostName();
                    ccSystem.LastUnLineTime = DateTime.Now;
                    ccSystem.ModifyTime = DateTime.Now;
                    ccSystem.UpdateTime = DateTime.Now;
                    int i = edm.SaveChanges();
                    if (i <= 0)