1
huangxiaoqiang
2025-06-03 a4c8fa1c25d1755356afe2bfa21a66125254ce47
1
已修改2个文件
64 ■■■■ 文件已修改
CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs 62 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json
@@ -11,7 +11,7 @@
  "ConnectionStringsEncryption": false,
  "MainDB": "DB_WIDESEA", //当前项目的主库,所对应的连接字符串的Enabled必须为true
  //连接字符串
  "ConnectionString": "Data Source=.;Initial Catalog=WIDESEA_WCSDB3F;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  "ConnectionString": "Data Source=.;Initial Catalog=WIDESEA_WCSDB_BB3F;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  //"ConnectionString": "Data Source=127.0.0.1;Initial Catalog=WIDESEA_WCSDB_BB3F;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
  //跨域
  "Cors": {
CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs
@@ -259,61 +259,27 @@
                    Platform platform = _platFormRepository.QueryFirst(x => x.DeviceCode == conveyorLine.DeviceCode && x.PlatCode == childDeviceCode && x.Status == "Active");
                    if (platform != null && !string.IsNullOrEmpty(platform.Location))
                    {
                        if (platform.PlatCode == "1299" || platform.PlatCode == "1295" || platform.PlatCode == "1291" || platform.PlatCode == "1287" || platform.PlatCode == "1283")
                        var strings = platform.Location.Split(',').ToList();
                        foreach (var ite in strings)
                        {
                            Platform platformJZ = _platFormRepository.QueryFirst(x => x.PlatCode == "10086" && x.Status == "Active");
                            if (platformJZ != null)
                            // 读取任务命令
                            ConveyorLineTaskCommand command1 = conveyorLine.ReadCustomer<ConveyorLineTaskCommand>(ite);
                            if (command1.InteractiveSignal != 2)
                            {
                                var strings = platform.Location.Split(',').ToList();
                                foreach (var ite in strings)
                                command.InteractiveSignal = writeInteractiveSignal;
                                int count = strings.Count;
                                // 获取处理方法
                                MethodInfo? method = GetType().GetMethod(platform.ExecutionMethod);
                                if (method != null)
                                {
                                    // 读取任务命令
                                    ConveyorLineTaskCommand command1 = conveyorLine.ReadCustomer<ConveyorLineTaskCommand>(ite);
                                    if (command1.InteractiveSignal != 2)
                                    {
                                        command.InteractiveSignal = writeInteractiveSignal;
                                        int count = strings.Count;
                                        // 获取处理方法
                                        MethodInfo? method = GetType().GetMethod(platform.ExecutionMethod);
                                        if (method != null)
                                        {
                                            command.InteractiveSignal = commandWrite.WriteInteractiveSignal;
                                            // 调用处理方法
                                            method.Invoke(this, new object[] { conveyorLine, command, childDeviceCode, count, platform });
                                        }
                                    }
                                    command.InteractiveSignal = commandWrite.WriteInteractiveSignal;
                                    // 调用处理方法
                                    method.Invoke(this, new object[] { conveyorLine, command, childDeviceCode, count, platform });
                                }
                            }
                        }
                        else
                        {
                            var strings = platform.Location.Split(',').ToList();
                            foreach (var ite in strings)
                            {
                                // 读取任务命令
                                ConveyorLineTaskCommand command1 = conveyorLine.ReadCustomer<ConveyorLineTaskCommand>(ite);
                                if (command1.InteractiveSignal != 2)
                                {
                                    command.InteractiveSignal = writeInteractiveSignal;
                                    int count = strings.Count;
                                    // 获取处理方法
                                    MethodInfo? method = GetType().GetMethod(platform.ExecutionMethod);
                                    if (method != null)
                                    {
                                        command.InteractiveSignal = commandWrite.WriteInteractiveSignal;
                                        // 调用处理方法
                                        method.Invoke(this, new object[] { conveyorLine, command, childDeviceCode, count, platform });
                                    }
                                }
                            }
                        }
                    }
                    //if (conveyorLine.DeviceCode == "1001")
                    //{
                    //    ConsoleHelper.WriteSuccessLine("ProcessDeviceAsync方法结束时间:" + DateTime.Now.ToString("G") + $"点位:{childDeviceCode}");
                    //}
                }
            }
            catch (Exception ex)