From 2225959bc5c3588407e90a6285ab2c32b3481d90 Mon Sep 17 00:00:00 2001 From: schangxiang@126.com <schangxiang@126.com> Date: 周四, 05 12月 2024 12:59:12 +0800 Subject: [PATCH] 222 --- CC/iWareCC_ASRS/ThreadService/02_BZ39工位(补板后工位)/Outbound/2、DataProcess_RobotBuffer_IssueOutboundTask.cs | 30 ++++++++++++++++++++++++------ 1 files changed, 24 insertions(+), 6 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 3810906..cad750d 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" @@ -35,7 +35,7 @@ SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask = string.Empty; try {//SystemValue.isAllowRuning_DataProcess_RobotBuffer_IssueOutboundTask && - if ( SystemValue.isStartedModel) + if (SystemValue.isStartedModel) { var rgvLocation = StationLocationEnum.BZ39.ToString(); /* @@ -45,6 +45,24 @@ using (WmsDBModel wmsDB = new WmsDBModel()) { + var noFinishOutTask = TaskHandler.ValidateIssueTaskForNoFinishTaskByOutStore(wmsDB); + if (noFinishOutTask == true) + {//琛ㄧず娌℃湁鏈粨鏉熺殑鍑哄簱浠诲姟锛岄偅涔堝氨 鍒濆鍖栬姹傚嚭搴撴寚浠� + using (StationServiceClient client = new StationServiceClient()) + { + var res = await client.WriteOutStoreTaskInfoAsync(true, (int)EDevice.Station, rgvLocation, "", 0); + if (!res.result) + { + SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask = $"{rgvLocation.ToString()}-鍒濆鍖栬姹傚嚭搴撴寚浠� 澶辫触,WriteOutStoreTaskInfoAsync 杩斿洖:{res.resMsg}"; + continue; + } + else + { + //Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-鍒濆鍖栬姹傚嚭搴撴寚浠� 鎴愬姛,WriteOutStoreTaskInfoAsync锛屽弬鏁�: 绔欑偣{rgvLocation}"); + } + } + } + //瑕佹槸鏈夊凡涓嬪彂鐨勪换鍔★紝灏变笉瑕佹墽琛� var isValidate = TaskHandler.ValidateIssueOutTaskForRobotBuffer(wmsDB); if (!isValidate) @@ -57,7 +75,7 @@ if (string.IsNullOrEmpty(FormCC.currHandlerPackageCodeForIssueOutboundTask)) { var firstTask = wmsDB.wms_rbline_task.Where(x => - x.RbTaskType == (int)RbTaskTypeEnum.鍑哄簱浠诲姟 + (x.RbTaskType == (int)RbTaskTypeEnum.榻愬寘鍑哄簱浠诲姟 || x.RbTaskType == (int)RbTaskTypeEnum.寮哄埗鍑哄簱浠诲姟) && x.TaskStatus == (int)TaskStatusEnum.鏂板缓).OrderBy(x => x.CreateTime).FirstOrDefault(); if (firstTask == null) { @@ -70,7 +88,7 @@ else { var firstTask = wmsDB.wms_rbline_task.Where(x => - x.RbTaskType == (int)RbTaskTypeEnum.鍑哄簱浠诲姟 + (x.RbTaskType == (int)RbTaskTypeEnum.榻愬寘鍑哄簱浠诲姟 || x.RbTaskType == (int)RbTaskTypeEnum.寮哄埗鍑哄簱浠诲姟) && x.TaskStatus == (int)TaskStatusEnum.鏂板缓 && x.PackageCode == FormCC.currHandlerPackageCodeForIssueOutboundTask ).OrderBy(x => x.CreateTime).FirstOrDefault(); @@ -83,7 +101,7 @@ } var taskList = wmsDB.wms_rbline_task.Where(x => - x.RbTaskType == (int)RbTaskTypeEnum.鍑哄簱浠诲姟 + (x.RbTaskType == (int)RbTaskTypeEnum.榻愬寘鍑哄簱浠诲姟 || x.RbTaskType == (int)RbTaskTypeEnum.寮哄埗鍑哄簱浠诲姟) && x.TaskStatus == (int)TaskStatusEnum.鏂板缓).Where(x => x.PackageCode == FormCC.currHandlerPackageCodeForIssueOutboundTask).OrderBy(x => x.CreateTime).ToList(); if (taskList == null) { @@ -109,10 +127,10 @@ // Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-涓嬪彂鍑哄簱浠诲姟 鎴愬姛,OutboundFinishConfirmAsync锛屽弬鏁�: 绔欑偣{rgvLocation}"); //} - var res = await client.WriteOutStoreTaskInfoAsync((int)EDevice.Station, rgvLocation, doTask.PlaceCode, Convert.ToInt32(doTask.TaskNo)); + var res = await client.WriteOutStoreTaskInfoAsync(false, (int)EDevice.Station, rgvLocation, doTask.PlaceCode, Convert.ToInt32(doTask.TaskNo)); if (!res.result) { - SystemWarningMsg._lbl_alert_DataProcess_BZ39 = $"{rgvLocation.ToString()}-涓嬪彂鍑哄簱浠诲姟 澶辫触,WriteOutStoreTaskInfoAsync 杩斿洖:{res.resMsg}"; + SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask = $"{rgvLocation.ToString()}-涓嬪彂鍑哄簱浠诲姟 澶辫触,WriteOutStoreTaskInfoAsync 杩斿洖:{res.resMsg}"; continue; } else -- Gitblit v1.9.3