From 9597b1df912c1ca4401a74970d9472e268b3a9c2 Mon Sep 17 00:00:00 2001 From: schangxiang@126.com <schangxiang@126.com> Date: 周六, 07 12月 2024 15:12:59 +0800 Subject: [PATCH] 33 --- CC/iWareCC_ASRS/ThreadService/02_BZ39工位(补板后工位)/Outbound/3、DataProcess_RobotBuffer_FinishTaskForOutbound.cs | 21 +++++++++++++++++++-- 1 files changed, 19 insertions(+), 2 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/3\343\200\201DataProcess_RobotBuffer_FinishTaskForOutbound.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/3\343\200\201DataProcess_RobotBuffer_FinishTaskForOutbound.cs" index 5b01710..f98b054 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/3\343\200\201DataProcess_RobotBuffer_FinishTaskForOutbound.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/3\343\200\201DataProcess_RobotBuffer_FinishTaskForOutbound.cs" @@ -29,6 +29,11 @@ if (SystemValue.isStartedModel) { var rgvLocation = StationLocationEnum.BZ39.ToString(); + if (FormCC.stationView == null) + { + SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_FinishTaskForOutbound = $"{rgvLocation.ToString()}-鑾峰彇PLC瀵硅薄涓簄ull"; + continue; + } var obj = FormCC.stationView.R_StationForReadCommList.Where(x => x.StationCode == rgvLocation.ToString()).FirstOrDefault(); if (obj.R_OutboundFinish) { @@ -52,7 +57,7 @@ { var task = wmsDB.wms_rbline_task.Where(x => x.TaskNo == obj.R_Outbound_TaskID.ToString() - && x.RbTaskType == (int)RbTaskTypeEnum.鍑哄簱浠诲姟 + && (x.RbTaskType == (int)RbTaskTypeEnum.榻愬寘鍑哄簱浠诲姟 || x.RbTaskType == (int)RbTaskTypeEnum.寮哄埗鍑哄簱浠诲姟) ).OrderByDescending(x => x.Id).FirstOrDefault(); if (task == null) { @@ -79,6 +84,18 @@ SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_FinishTaskForOutbound = $"{rgvLocation.ToString()},鏍规嵁UPI:{upiCode}娌℃湁鎵惧埌瀵硅薄 "; continue; } + //鏇存柊鏉夸欢鐨勭姸鎬佸拰鍖哄煙 + if (task.RbTaskType == (int)RbTaskTypeEnum.榻愬寘鍑哄簱浠诲姟) + { + upiObj.UpiStatus = (int)UpiStatusEnum.宸查綈鍖�; + upiObj.AreaCode = (int)AreaCodeEnum.鐮佸灈鍖哄煙; + } + else if (task.RbTaskType == (int)RbTaskTypeEnum.寮哄埗鍑哄簱浠诲姟) + { + upiObj.UpiStatus = (int)UpiStatusEnum.宸蹭笅绾�; + upiObj.AreaCode = (int)AreaCodeEnum.涓嬬嚎鍖哄煙; + } + //搴撳瓨鍑忓皯 wms_stock_quan qun = wmsDB.wms_stock_quan.Where(x => x.PlaceCode == task.PlaceCode).FirstOrDefault(); wmsDB.wms_stock_quan.Remove(qun); @@ -105,7 +122,7 @@ } } - WmsRecordUpiProcessHandler.SaveWmsRecordUpiProcess(wmsDB, upiObj, task.PlaceCode, $"鍑虹紦瀛樺簱锛歿task.PlaceCode},"+task.TaskMsg); + WmsRecordUpiProcessHandler.SaveWmsRecordUpiProcess(wmsDB, upiObj, task.PlaceCode, $"鍑虹紦瀛樺簱锛歿task.PlaceCode}," + task.TaskMsg); wmsDB.SaveChanges(); } -- Gitblit v1.9.3