分支自 SuZhouGuanHong/TaiYuanTaiZhong

dengjunjie
2024-07-19 7a4c218909936721fe281737491d10efc7378e09
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/Services/WCS/Partial/VV_DispatchService.cs
@@ -63,19 +63,21 @@
            {
                if (!scheduler.IsRun())
                {
                    WIDESEA.Helper.GetToken();
                    var cooRes = CoonPLC();
                    var startRes = SrartScheduler();
                    if (startRes.Status)
                    {
                        if (cooRes.Status)
                        {
                            WriteDBLog.Success($"开启服务", new { æ•°æ® = "服务启动成功!" }, "PCS", UserContext.Current.UserTrueName);
                            WriteDBLog.Success($"开启服务", new { æ•°æ® = "服务启动成功!" }, "PCS", UserContext.Current.UserName);
                            return webResponse.OK("服务启动成功!");
                        }
                        else
                        {
                            //返回PLC异常
                            WriteDBLog.Error($"开启服务", new { æ•°æ® = cooRes }, "PCS", UserContext.Current.UserTrueName);
                            WriteDBLog.Error($"开启服务", new { æ•°æ® = cooRes }, "PCS", UserContext.Current.UserName);
                            return cooRes;
                        }
                    }
@@ -83,7 +85,7 @@
                    {
                        //调度启动失败,关闭全部
                        //WriteLog.Write_Log("服务", "服务", "启动服务\n[调度异常]" + startRes.Message);
                        WriteDBLog.Error($"开启服务", new { æ•°æ® = startRes.Message }, "PCS", UserContext.Current.UserTrueName);
                        WriteDBLog.Error($"开启服务", new { æ•°æ® = startRes.Message }, "PCS", UserContext.Current.UserName);
                        return startRes;
                    }
                }
@@ -149,7 +151,7 @@
                    PLCClient client = null;
                    if (plc.plcinfo_type == "Simene")
                    {
                        client = new SiemensPLCClient()
                        client = new SiemensPLCClient(plc.plcinfo_model)
                        {
                            PLCName = plc.plcinfo_name,
                            Ip = plc.plcinfo_ip,
@@ -236,6 +238,7 @@
                {
                    order.dbAddress = item.plcdetail_db + "." + item.plcdetail_value;
                }
                order.opratortype = item.plcdetail_opratortype;
                order.dataLen = item.plcdetail_len;
                order.Methods = item.plcdetail_number;//
                itmes.Add(order);