huangxiaoqiang
2025-09-11 ca529041b8113b3684c387ba71471d47aa59cdef
代码提交
已修改4个文件
54 ■■■■ 文件已修改
项目代码/WCS/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCS/WCSServices/WIDESEAWCS_Tasks/StackerCraneJob/StackerCraneTaskCommand.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCS/WCSServices/WIDESEAWCS_Tasks/原料库/ConveyorLineJob_YL2ndFloor.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCS/WCSServices/WIDESEAWCS_Tasks/原料库/StackerCraneJob_YLSC3.cs 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ÏîÄ¿´úÂë/WCS/WCSServices/WIDESEAWCS_TaskInfoService/TaskService.cs
@@ -926,8 +926,8 @@
                    if (task.TaskState == (int)TaskStatusEnum.Line_Executing)
                    {
                        #region å…¥åº“调用接口获取货位地址
                        //string? local = RequestAssignLocation(task.TaskNum, task.Roadway);
                        string? local = "SC05_YLDual-002-090-009-01";
                        string? local = RequestAssignLocation(task.TaskNum, task.Roadway);
                        //string? local = "SC05_YLDual-002-090-009-01";
                        if (!string.IsNullOrEmpty(local))
                        {
                            task.CurrentAddress = stationManger.StackerCraneStationCode;
@@ -946,8 +946,8 @@
                    }
                    else if (task.TaskState == (int)TaskStatusEnum.AGV_Finish)
                    {
                        //content = AssignYLRoadwayNo(task.PalletCode);
                        content.OK(data: "SC05_YLDual");
                        content = AssignYLRoadwayNo(task.PalletCode);
                        //content.OK(data: "SC05_YLDual");
                        if (!content.Status)
                        {
                            return content.Error($"请求入库失败:{content.Message}");
@@ -983,8 +983,8 @@
                }
                task.ModifyDate = DateTime.Now;
                task.Modifier = "System";
                BaseDal.UpdateData(task);
                //UpdateTask(task, nextStatus);
                //BaseDal.UpdateData(task);
                UpdateTask(task, nextStatus);
                content = WebResponseContent.Instance.OK();
            }
            catch (Exception ex)
ÏîÄ¿´úÂë/WCS/WCSServices/WIDESEAWCS_Tasks/StackerCraneJob/StackerCraneTaskCommand.cs
@@ -112,6 +112,11 @@
        public short WorkType { get; set; }
        /// <summary>
        /// å®Œæˆä¿¡å·
        /// </summary>
        public short WriteFinish { get; set; }
        /// <summary>
        /// æ‰˜ç›˜ç±»åž‹
        /// </summary>
        public short PalletType { get; set; }
ÏîÄ¿´úÂë/WCS/WCSServices/WIDESEAWCS_Tasks/Ô­ÁÏ¿â/ConveyorLineJob_YL2ndFloor.cs
@@ -155,6 +155,7 @@
            conveyorLine.SetValue(ConveyorLineDBName.TaskNum, taskCommand.TaskNum, childDeviceCode);
            conveyorLine.SetValue(ConveyorLineDBName.TargetAddress, taskCommand.TargetAddress, childDeviceCode);
            conveyorLine.SetValue(ConveyorLineDBName.Weight, taskCommand.Weight, childDeviceCode);
            conveyorLine.SetValue(ConveyorLineDBName.Barcode, taskCommand.Barcode, childDeviceCode);
            conveyorLine.SetValue(ConveyorLineDBName.ResponState, 86, childDeviceCode);
            for (int i = 0; i < 6; i++)
@@ -162,7 +163,7 @@
                ConveyorLineTaskCommand command = conveyorLine.ReadCustomer<ConveyorLineTaskCommand>(childDeviceCode);
                if (command != null)
                {
                    if (command.TaskNum == taskCommand.TaskNum && command.TargetAddress == taskCommand.TargetAddress && command.Weight == taskCommand.Weight)
                    if (command.TaskNum == taskCommand.TaskNum && command.TargetAddress == taskCommand.TargetAddress && command.Weight == taskCommand.Weight && command.Barcode == taskCommand.Barcode)
                    {
                        WriteInfo(conveyorLine.DeviceName, $"时间:【{DateTime.Now}】写入任务成功写入次数{i}写入任务【{JsonConvert.SerializeObject(taskCommand)}】");
                        return true;
@@ -172,6 +173,11 @@
                        conveyorLine.SetValue(ConveyorLineDBName.TaskNum, taskCommand.TaskNum, childDeviceCode);
                        Thread.Sleep(100);
                    }
                    if (command.Barcode != taskCommand.Barcode)
                    {
                        conveyorLine.SetValue(ConveyorLineDBName.Barcode, taskCommand.Barcode, childDeviceCode);
                        Thread.Sleep(100);
                    }
                    if (command.TaskNum != taskCommand.TaskNum)
                    {
                        conveyorLine.SetValue(ConveyorLineDBName.TaskNum, taskCommand.TaskNum, childDeviceCode);
ÏîÄ¿´úÂë/WCS/WCSServices/WIDESEAWCS_Tasks/Ô­ÁÏ¿â/StackerCraneJob_YLSC3.cs
@@ -76,8 +76,8 @@
                                        commonStackerCrane.LastTaskType = task.TaskType;
                                        task.Dispatchertime = DateTime.Now;
                                        task.ExceptionMessage = "";
                                        //_taskService.UpdateTask(task, TaskStatusEnum.SC_Executing);
                                        _taskService.UpdateTaskStatusToNext(task);
                                        _taskService.UpdateTask(task, TaskStatusEnum.SC_Executing);
                                        //_taskService.UpdateTaskStatusToNext(task);
                                        commonStackerCrane.Communicator.Write("DB1000.20.0", true);
                                        //延时1s
                                        Thread.Sleep(1000);
@@ -141,33 +141,20 @@
                        //原料一楼出库下发线体逻辑
                        if (stationManger.StationDeviceCode == "CL1_YL")
                        {
                            IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == stationManger.StationDeviceCode);
                            if (device != null)
                            {
                                OtherDevice conveyorLine = (OtherDevice)device;
                                conveyorLine.SetValue(ConveyorLineDBName.TaskNum, taskNum, stationManger.StationCode);
                                conveyorLine.SetValue(ConveyorLineDBName.TargetAddress, router.NextPosi, stationManger.StationCode);
                                conveyorLine.SetValue(ConveyorLineDBName.ResponState, 86, stationManger.StationCode);
                                // å †åž›æœºå®Œæˆ
                                _taskService.UpdateTask(task, TaskStatusEnum.Line_Execute, deviceCode: stationManger.StationDeviceCode, currentAddress: stationManger.StationCode, nextAddress: router.NextPosi);
                            }
                            else
                            {
                                WriteInfo(deviceCode, $"未找到出库站台【{stationManger.StationDeviceCode}】对应的通讯对象,无法发送输送线出库信号");
                                _taskService.UpdateTaskExceptionMessage(taskNum, $"未找到出库站台【{stationManger.StationDeviceCode}】对应的通讯对象,无法发送输送线出库信号");
                                return WebResponseContent.Instance.Error($"未找到出库站台【{stationManger.StationDeviceCode}】对应的通讯对象,无法发送输送线出库信号");
                            }
                        }//原料二楼出库下发线体逻辑
                        else
                        else//原料二楼出库下发线体逻辑
                        {
                            IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == stationManger.StationDeviceCode);
                            if (device != null)
                            {
                                CommonConveyorLine conveyorLine = (CommonConveyorLine)device;
                                conveyorLine.SetValue(WR_CLineYLDB.WR_Task, taskNum, stationManger.StationCode);
                                conveyorLine.SetValue(WR_CLineYLDB.WR_ToHode, router.NextPosi, stationManger.StationCode);
                                conveyorLine.SetValue(WR_CLineYLDB.WR_Reresult, 86, stationManger.StationCode);
                                conveyorLine.SetValue(ConveyorLineDBName.TaskNum, taskNum, stationManger.StationCode);
                                conveyorLine.SetValue(ConveyorLineDBName.TargetAddress, router.NextPosi, stationManger.StationCode);
                                conveyorLine.SetValue(ConveyorLineDBName.Width, task.TaskLength, stationManger.StationCode);
                                conveyorLine.SetValue(ConveyorLineDBName.Barcode, task.PalletCode, stationManger.StationCode);
                                conveyorLine.SetValue(ConveyorLineDBName.ResponState, 86, stationManger.StationCode);
                                _taskService.UpdateTaskStatusToNext(task);
                            }
                            else