From 66820281eb452bd79735b03c3175b64cec861699 Mon Sep 17 00:00:00 2001 From: duyongjia <adu_555@163.com> Date: 星期三, 08 一月 2025 14:44:11 +0800 Subject: [PATCH] 增加根据重量判断是否是空托盘判断逻辑 --- 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs | 24 ++++++++++++------------ 项目资料/接口文档/广西弗迪输送线交互-12-13.xlsx | 0 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs | 17 +++++++++++++---- 3 files changed, 25 insertions(+), 16 deletions(-) diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" index b3f9774..3da8be7 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" @@ -481,15 +481,15 @@ _unitOfWorkManage.BeginTran(); UpdateTaskStatus(task.TaskId, (int)TaskOutStatusEnum.SC_OutFinish); _taskExecuteDetailService.AddTaskExecuteDetail(task.TaskId, $"鍫嗗灈鏈哄嚭搴撳畬鎴�"); - ServiceLogger.WriteDebug("StackCraneTaskCompleted", $"鍫嗗灈鏈哄嚭搴撳畬鎴愮姸鎬佸洖鍐橶MS"); + ServiceLogger.WriteDebug("StackCraneTaskCompleted", $"鍫嗗灈鏈哄嚭搴撳畬鎴愮姸鎬佸洖鍐橶MS,浠诲姟鍙�:銆恵taskNum}銆�"); var response = HttpHelpers.Post<WebResponseContent>(url.Replace("PDA", "Task") + "UpdateTaskStatus?taskNum=" + task.TaskNum, "", "鏇存柊浠诲姟鐘舵��"); if(response.Status) { - ServiceLogger.WriteDebug("StackCraneTaskCompleted", $"鍫嗗灈鏈哄嚭搴撳畬鎴愮姸鎬佸洖鍐橶MS鎴愬姛"); + ServiceLogger.WriteDebug("StackCraneTaskCompleted", $"鍫嗗灈鏈哄嚭搴撳畬鎴愮姸鎬佸洖鍐橶MS鎴愬姛,浠诲姟鍙�:銆恵taskNum}銆�"); } else { - ServiceLogger.WriteDebug("StackCraneTaskCompleted", $"鍫嗗灈鏈哄嚭搴撳畬鎴愮姸鎬佸洖鍐橶MS澶辫触"); + ServiceLogger.WriteDebug("StackCraneTaskCompleted", $"鍫嗗灈鏈哄嚭搴撳畬鎴愮姸鎬佸洖鍐橶MS澶辫触,浠诲姟鍙�:銆恵taskNum}銆�"); } _unitOfWorkManage.CommitTran(); return content.OK(); @@ -508,33 +508,33 @@ _unitOfWorkManage.BeginTran(); UpdateTaskStatus(task.TaskId, (int)TaskInStatusEnum.SC_InFinish); _taskExecuteDetailService.AddTaskExecuteDetail(task.TaskId, $"鍫嗗灈鏈哄叆搴撳畬鎴�"); - ServiceLogger.WriteDebug("StackCraneTaskCompleted", $"鍫嗗灈鏈哄叆搴撳畬鎴愮姸鎬佸洖鍐橶MS"); + ServiceLogger.WriteDebug("StackCraneTaskCompleted", $"鍫嗗灈鏈哄叆搴撳畬鎴愮姸鎬佸洖鍐橶MS,浠诲姟鍙�:銆恵taskNum}銆�"); var response= HttpHelpers.Post<WebResponseContent>(url.Replace("PDA", "Task") + "UpdateTaskStatus?taskNum=" + task.TaskNum, "", "鏇存柊浠诲姟鐘舵��"); if(response.Status) { - ServiceLogger.WriteDebug("StackCraneTaskCompleted", $"鍫嗗灈鏈哄叆搴撳畬鎴愮姸鎬佸洖鍐橶MS鎴愬姛"); + ServiceLogger.WriteDebug("StackCraneTaskCompleted", $"鍫嗗灈鏈哄叆搴撳畬鎴愮姸鎬佸洖鍐橶MS鎴愬姛,浠诲姟鍙�:銆恵taskNum}銆�"); } else { - ServiceLogger.WriteDebug("StackCraneTaskCompleted", $"鍫嗗灈鏈哄叆搴撳畬鎴愮姸鎬佸洖鍐橶MS澶辫触"); + ServiceLogger.WriteDebug("StackCraneTaskCompleted", $"鍫嗗灈鏈哄叆搴撳畬鎴愮姸鎬佸洖鍐橶MS澶辫触,浠诲姟鍙�:銆恵taskNum}銆�"); } UpdateTaskStatus(task.TaskId, (int)TaskInStatusEnum.InFinish); _taskExecuteDetailService.AddTaskExecuteDetail(task.TaskId, $"鍏ュ簱浠诲姟瀹屾垚"); //if (App.User.UserId > 0) //{ task.Modifier = "System"; - ServiceLogger.WriteDebug("StackCraneTaskCompleted", $"鍏ュ簱浠诲姟瀹屾垚鍥炲啓WMS"); + ServiceLogger.WriteDebug("StackCraneTaskCompleted", $"鍏ュ簱浠诲姟瀹屾垚鍥炲啓WMS,浠诲姟鍙�:銆恵taskNum}銆�"); var response2 = HttpHelpers.Post<WebResponseContent>(url.Replace("PDA", "Task") + "TaskCompleted?taskNum=" + task.TaskNum, "", "浠诲姟瀹屾垚"); if (response2.Status) { - ServiceLogger.WriteDebug("StackCraneTaskCompleted", $"鍏ュ簱浠诲姟瀹屾垚鍥炲啓WMS鎴愬姛"); + ServiceLogger.WriteDebug("StackCraneTaskCompleted", $"鍏ュ簱浠诲姟瀹屾垚鍥炲啓WMS鎴愬姛,浠诲姟鍙�:銆恵taskNum}銆�"); _unitOfWorkManage.CommitTran(); return content.OK(); } else { - ServiceLogger.WriteDebug("StackCraneTaskCompleted", $"鍏ュ簱浠诲姟瀹屾垚鍥炲啓WMS澶辫触"); + ServiceLogger.WriteDebug("StackCraneTaskCompleted", $"鍏ュ簱浠诲姟瀹屾垚鍥炲啓WMS澶辫触,浠诲姟鍙�:銆恵taskNum}銆�"); _unitOfWorkManage.RollbackTran(); return content = WebResponseContent.Instance.Error(response.Message); } @@ -594,17 +594,17 @@ public WebResponseContent OutBoundTaskByWMS(int taskNum) { WebResponseContent content = new WebResponseContent(); - ServiceLogger.WriteDebug("OutBoundTaskByWMS", $"鍑哄簱浠诲姟瀹屾垚鍥炲啓WMS"); + ServiceLogger.WriteDebug("OutBoundTaskByWMS", $"鍑哄簱浠诲姟瀹屾垚鍥炲啓WMS锛屼换鍔″彿锛歿taskNum}"); var response = HttpHelpers.Post<WebResponseContent>(url.Replace("PDA", "Task") + "TaskCompleted?taskNum=" + taskNum, "", "浠诲姟瀹屾垚"); if (response.Status) { - ServiceLogger.WriteDebug("OutBoundTaskByWMS", $"鍑哄簱浠诲姟瀹屾垚鍥炲啓WMS鎴愬姛"); + ServiceLogger.WriteDebug("OutBoundTaskByWMS", $"鍑哄簱浠诲姟瀹屾垚鍥炲啓WMS鎴愬姛锛屼换鍔″彿锛歿taskNum}"); _unitOfWorkManage.CommitTran(); return content.OK(); } else { - ServiceLogger.WriteDebug("OutBoundTaskByWMS", $"鍑哄簱浠诲姟瀹屾垚鍥炲啓WMS澶辫触"); + ServiceLogger.WriteDebug("OutBoundTaskByWMS", $"鍑哄簱浠诲姟瀹屾垚鍥炲啓WMS澶辫触锛屼换鍔″彿锛歿taskNum}"); _unitOfWorkManage.RollbackTran(); return content = WebResponseContent.Instance.Error(response.Message); } diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs" index 021918d..6dcdd61 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs" @@ -18,6 +18,7 @@ using AutoMapper; using Quartz; using System.Data; +using System.Threading.Tasks; using WIDESEAWCS_Common.TaskEnum; using WIDESEAWCS_ITaskInfoRepository; using WIDESEAWCS_ITaskInfoService; @@ -29,7 +30,7 @@ namespace WIDESEAWCS_Tasks { [DisallowConcurrentExecution] - public class CommonConveyorLineJob : IJob + public class CommonConveyorLineJob :JobBase, IJob { private readonly ITaskService _taskService; private readonly ITaskRepository _taskRepository; @@ -89,10 +90,18 @@ } else//濡傛灉鏍规嵁鎵樼洏鏉$爜鏌ヤ笉鍒颁换鍔★紝鍒欒涓烘槸绌烘墭鐩橈紝绌烘墭鐩樺叆搴撳彲浠ヤ笉闇�瑕佺粍鐩橈紝鐩存帴鏂板缓浠诲姟锛屼篃鍙互鐩存帴涓嬬┖鎵樺嚭搴撲换鍔� { - if (command.ISInFinish == 1) + + if (command.ISInFinish == 1)//澧炲姞鏍规嵁閲嶉噺鍒ゆ柇鏄惁鏄┖鎵樼洏鍒ゆ柇閫昏緫 { - //鍏堜笉缁橮LC鍏ュ簱纭淇″彿锛岃皟WMS绌烘墭鍏ュ簱浠诲姟鎺ュ彛 - _taskService.GenerateEmptyInBoundTask(command.CL1002Barcode); + if (command.Weight <= 600) + { + //鍏堜笉缁橮LC鍏ュ簱纭淇″彿锛岃皟WMS绌烘墭鍏ュ簱浠诲姟鎺ュ彛 + _taskService.GenerateEmptyInBoundTask(command.CL1002Barcode); + } + else + { + WriteDebug(nameof(CommonConveyorLineJob), $"鐢熸垚绌烘墭鍏ュ簱浠诲姟鏃讹紝閲嶉噺瓒呴噸锛岀敓鎴愮┖鎵樺叆搴撲换鍔″け璐ワ紒"); + } } } diff --git "a/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\346\226\207\346\241\243/\345\271\277\350\245\277\345\274\227\350\277\252\350\276\223\351\200\201\347\272\277\344\272\244\344\272\222-12-13.xlsx" "b/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\346\226\207\346\241\243/\345\271\277\350\245\277\345\274\227\350\277\252\350\276\223\351\200\201\347\272\277\344\272\244\344\272\222-12-13.xlsx" new file mode 100644 index 0000000..b416602 --- /dev/null +++ "b/\351\241\271\347\233\256\350\265\204\346\226\231/\346\216\245\345\217\243\346\226\207\346\241\243/\345\271\277\350\245\277\345\274\227\350\277\252\350\276\223\351\200\201\347\272\277\344\272\244\344\272\222-12-13.xlsx" Binary files differ -- Gitblit v1.9.3