1
wankeda
2025-04-15 99d9d4ed78eeb7b59c5c2ce314a82765f08a600a
´úÂë¹ÜÀí/NEWCode/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs
@@ -53,8 +53,6 @@
        public Task Execute(IJobExecutionContext context)
        {
            try
            {
@@ -68,8 +66,8 @@
                // å®šä¹‰çº¿ä½“实盘入库请求的地址和任务类型
                var requests = new Dictionary<string, string>
                {
                    { "DB1002.1093.0", "ZJXL-WLX002" },
                    { "DB1002.1493.0", "FJXL-WLX002" }
                    { "DB1002.693.0", "ZJXL-WLX002" },
                    { "DB1002.1093.0", "FJXL-WLX002" }
                };
                // å®šä¹‰çº¿ä½“空盘回流请求的地址和任务类型
@@ -123,7 +121,7 @@
                }
                // æŸ¥è¯¢ä»»åŠ¡ç±»åž‹å¯¹åº”çš„czTask
                DtCZTask czTask = _taskCZRepository.QueryFirst(x => x.TaskType == taskType);
                DtCZTask czTask = _taskCZRepository.QueryFirst(x => x.TaskType == taskType && x.TaskStatus == TaskInStatusEnum.InFinish.ToString());
                if (czTask == null)
                {
                    ConsoleHelper.WriteInfoLine($"{nameof(CommonConveyorLineJob)}: {taskType}{requestType},{taskType}任务不存在,稍后重试......");
@@ -131,7 +129,7 @@
                }
                // åˆ›å»ºå¹¶æ·»åŠ æ–°ä»»åŠ¡åˆ°ä»»åŠ¡ä»“åº“
                task = CreateTask(fromAdd, czTask.TaskEndAddress, czTask.TaskOrderNo, czTask.TaskProductCode, taskType);
                task = CreateTask(fromAdd, czTask.TaskEndAddress, czTask.TaskOrderNo, czTask.TaskProductCode, taskType, czTask.Id);
                _taskRepository.AddData(task);
                ConsoleHelper.WriteInfoLine($"{nameof(CommonConveyorLineJob)}: {taskType}{requestType},任务已生成,等待执行......");
            }
@@ -191,7 +189,7 @@
        }
        // è¾…助方法:创建任务对象
        private Dt_Task CreateTask(string currentAddress, string targetAddress, string remark, string palletCode, string taskType)
        private Dt_Task CreateTask(string currentAddress, string targetAddress, string remark, string palletCode, string taskType, int czTaskID = 0)
        {
            Dt_Task dt_Task = _taskRepository.QueryFirst(x => x.SourceAddress == currentAddress);
            if (dt_Task != null)
@@ -213,7 +211,7 @@
                NextAddress = targetAddress,
                Barcode = "",
                Roadway = $"{taskType}AGV",
                WMSId = 0,
                WMSId = czTaskID > 0 ? czTaskID : 0,
                Remark = remark
            };
        }