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, 10 insertions(+), 5 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 6d62fda..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,9 +52,9 @@ } public Task Execute(IJobExecutionContext context) - - - + + + { try { @@ -115,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},浠诲姟宸茬敓鎴愬瓨鍦紝绋嶅悗閲嶈瘯......"); @@ -148,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); @@ -193,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(), -- Gitblit v1.9.3