From 142e78034cdc629f74090caa62b9b2d216eb0a86 Mon Sep 17 00:00:00 2001 From: schangxiang@126.com <schangxiang@126.com> Date: 周六, 23 11月 2024 16:07:08 +0800 Subject: [PATCH] 222 --- CC/iWareCC_ASRS/ThreadService/02_BZ39工位(补板后工位)/Outbound/2、DataProcess_RobotBuffer_IssueOutboundTask.cs | 18 +++++++++++++----- 1 files changed, 13 insertions(+), 5 deletions(-) diff --git "a/CC/iWareCC_ASRS/ThreadService/02_BZ39\345\267\245\344\275\215\357\274\210\350\241\245\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/Outbound/2\343\200\201DataProcess_RobotBuffer_IssueOutboundTask.cs" "b/CC/iWareCC_ASRS/ThreadService/02_BZ39\345\267\245\344\275\215\357\274\210\350\241\245\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/Outbound/2\343\200\201DataProcess_RobotBuffer_IssueOutboundTask.cs" index 350b79c..fcb9640 100644 --- "a/CC/iWareCC_ASRS/ThreadService/02_BZ39\345\267\245\344\275\215\357\274\210\350\241\245\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/Outbound/2\343\200\201DataProcess_RobotBuffer_IssueOutboundTask.cs" +++ "b/CC/iWareCC_ASRS/ThreadService/02_BZ39\345\267\245\344\275\215\357\274\210\350\241\245\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/Outbound/2\343\200\201DataProcess_RobotBuffer_IssueOutboundTask.cs" @@ -30,7 +30,7 @@ LogType logType = LogType.DataProcess_RobotBuffer_IssueOutboundTask; while (true) { - Thread.Sleep(2000);//浼戠湢2绉掞紝灏嗕紤鐪犲啓鍒板墠闈紝鏄负浜嗕笅闈㈢殑continue鏂规硶鎵ц鍚庝笉鏄剧ず閿欒淇℃伅鐨勬彁绀猴紒锛侊紒銆怑ditBy shaocx,2022-05-24銆� + Thread.Sleep(1000);//浼戠湢2绉掞紝灏嗕紤鐪犲啓鍒板墠闈紝鏄负浜嗕笅闈㈢殑continue鏂规硶鎵ц鍚庝笉鏄剧ず閿欒淇℃伅鐨勬彁绀猴紒锛侊紒銆怑ditBy shaocx,2022-05-24銆� SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask = string.Empty; try { @@ -52,11 +52,19 @@ continue; } - + //鍙栧垱寤烘椂闂存渶鏃╃殑閭d釜瑕佸嚭搴撶殑鍖� + var firstTask = wmsDB.wms_rbline_task.Where(x => + x.RbTaskType == (int)RbTaskTypeEnum.鍑哄簱浠诲姟 + && x.TaskStatus == (int)TaskStatusEnum.鏂板缓).OrderBy(x => x.CreateTime).FirstOrDefault(); + if (firstTask == null) + { + SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask = $"{rgvLocation.ToString()},鏍规嵁 娌℃湁鎵惧埌 鏂板缓 鐨勪换鍔� "; + continue; + } var taskList = wmsDB.wms_rbline_task.Where(x => x.RbTaskType == (int)RbTaskTypeEnum.鍑哄簱浠诲姟 - && x.TaskStatus == (int)TaskStatusEnum.鏂板缓).OrderBy(x => x.PackageCode).ToList(); + && x.TaskStatus == (int)TaskStatusEnum.鏂板缓).Where(x => x.PackageCode == firstTask.PackageCode).OrderBy(x => x.CreateTime).ToList(); if (taskList == null) { SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask = $"{rgvLocation.ToString()},鏍规嵁 娌℃湁鎵惧埌 鏂板缓 鐨勪换鍔� "; @@ -64,13 +72,13 @@ } var doTask = taskList.FirstOrDefault(); - + //杩欓噷涓嬪彂 鍑哄簱浠诲姟 using (StationServiceClient client = new StationServiceClient()) { //棣栧厛瑕佹竻鐞� - var res = await client.OutboundFinishConfirmAsync((int)EDevice.Station, true, rgvLocation); + var res = await client.OutboundFinishConfirmAsync((int)EDevice.Station, false, rgvLocation); if (!res.result) { SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_FinishTaskForOutbound = $"{rgvLocation.ToString()}-涓嬪彂鍑哄簱浠诲姟 澶辫触,OutboundFinishConfirmAsync 杩斿洖:{res.resMsg}"; -- Gitblit v1.9.3