From 291f66df5621f0644ce9d15548eb6590045691f0 Mon Sep 17 00:00:00 2001 From: wankeda <Administrator@DESKTOP-HAU3ST3> Date: 星期一, 14 四月 2025 09:26:43 +0800 Subject: [PATCH] 添加PDA下发输送线回流任务 --- 代码管理/NEWCode/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs | 15 ++++++++++++--- 1 files changed, 12 insertions(+), 3 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/NEWCode/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/NEWCode/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs" index 2e871c8..68847ca 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/NEWCode/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/NEWCode/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs" @@ -52,6 +52,9 @@ } public Task Execute(IJobExecutionContext context) + + + { try { @@ -112,7 +115,7 @@ string taskType = request.Value.Contains("ZJXL") ? "姝f瀬" : "璐熸瀬"; // 鏌ヨ鏄惁瀛樺湪宸茬敓鎴愮殑鏂颁换鍔� - var task = _taskRepository.QueryFirst(x => x.SourceAddress == fromAdd && x.TaskState == (int)TaskInStatusEnum.InNew); + var task = _taskRepository.QueryFirst(x => x.SourceAddress == fromAdd);//&& x.TaskState == (int)TaskInStatusEnum.InNew if (task != null) { ConsoleHelper.WriteInfoLine($"{nameof(CommonConveyorLineJob)}: {taskType}{requestType},浠诲姟宸茬敓鎴愬瓨鍦紝绋嶅悗閲嶈瘯......"); @@ -145,7 +148,7 @@ } string fromAdd = request.Value; - string taskType = request.Value.Contains("ZJXL") ? "姝f瀬" : "璐熸瀬"; + string taskType = "璐熸瀬"; //request.Value.Contains("ZJXL") ? "姝f瀬" : // 鏍规嵁浠诲姟绫诲瀷纭畾璇锋眰鍦板潃 (string upRequest, string gmRequest, string gmState) = GetRequestAddresses(taskType); @@ -190,6 +193,11 @@ // 杈呭姪鏂规硶锛氬垱寤轰换鍔″璞� private Dt_Task CreateTask(string currentAddress, string targetAddress, string remark, string palletCode, string taskType) { + Dt_Task dt_Task = _taskRepository.QueryFirst(x => x.SourceAddress == currentAddress); + if (dt_Task != null) + { + return null; + } return new Dt_Task { TaskNum = _taskService.GetTaskNum(), @@ -198,11 +206,12 @@ CurrentAddress = currentAddress, SourceAddress = currentAddress, TaskState = targetAddress != "WaitBind" ? (int)TaskInStatusEnum.InNew : (int)TaskInStatusEnum.InPending, - TaskType = (int)TaskInboundTypeEnum.Inbound, + TaskType = (int)TaskOutboundTypeEnum.Outbound, Grade = 1, PalletCode = palletCode, TargetAddress = targetAddress, NextAddress = targetAddress, + Barcode = "", Roadway = $"{taskType}AGV", WMSId = 0, Remark = remark -- Gitblit v1.9.3