From 37184b1d1ac000a6ee40e397e2336b213e705902 Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周四, 17 4月 2025 13:08:45 +0800
Subject: [PATCH] 包中只有一块板时,认定为 不齐包 【Editby shaocx,2025-04-01】
---
CC/iWareCC_ASRS/ThreadService/02_BZ39工位(补板后工位)/Inbound/3、DataProcess_RobotBuffer_FinishTask.cs | 67 ++++++++++++++++++++++++---------
1 files changed, 49 insertions(+), 18 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/Inbound/3\343\200\201DataProcess_RobotBuffer_FinishTask.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/Inbound/3\343\200\201DataProcess_RobotBuffer_FinishTask.cs"
index 545466a..333df92 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/Inbound/3\343\200\201DataProcess_RobotBuffer_FinishTask.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/Inbound/3\343\200\201DataProcess_RobotBuffer_FinishTask.cs"
@@ -101,7 +101,7 @@
// DetailName = upiObj.DetailName,
// OrderId = task.OrderId,
// CreateTime = DateTime.Now,
- // CreateUserName = "CC",
+ // CreateUserName = SysGloble.WCSSystem,
// InTime = DateTime.Now,
// OperReason = "鍏ュ簱",
// PackageCode = task.PackageCode,
@@ -198,12 +198,13 @@
wms_stock_quan qun = new wms_stock_quan()
{
Id = Yitter.IdGenerator.YitIdHelper.NextId(),
+ Shelf = upiObj.Shelf,
Upi = upiCode,
PlanNo = task.PlanNo,
DetailName = upiObj.DetailName,
OrderId = task.OrderId,
CreateTime = DateTime.Now,
- CreateUserName = "CC",
+ CreateUserName = SysGloble.WCSSystem,
InTime = DateTime.Now,
OperReason = "鍏ュ簱",
PackageCode = task.PackageCode,
@@ -224,28 +225,58 @@
var place = StationHandler.GetPlaceByPlaceCode(task.PlaceCode, wmsDB);
place.PlaceStatus = (int)PlaceStatusEnum.姝e父;
- if (isFlagFinish == false)
+ //if (isFlagFinish == false)
+ //{
+ // //缁橮LC鎺ㄩ�佷换鍔″畬鎴愮‘璁や俊鍙�
+ // using (StationServiceClient client = new StationServiceClient())
+ // {
+ // var res = await client.InboundFinishConfirmAsync((int)EDevice.Station, true, rgvLocation);
+ // if (!res.result)
+ // {
+ // SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_FinishTask = $"{rgvLocation.ToString()}-涓嬪彂鍏ュ簱浠诲姟 澶辫触,InboundFinishConfirmAsync 杩斿洖:{res.resMsg}";
+ // return false;
+ // }
+ // else
+ // {
+ // Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-涓嬪彂鍏ュ簱浠诲姟 鎴愬姛,InboundFinishConfirmAsync锛屽弬鏁�: 绔欑偣{rgvLocation}");
+ // }
+ // }
+ //}
+
+ var flag = isFlagFinish ? "浜哄伐寮哄埗瀹屾垚" : "锛堣嚜鍔ㄥ畬鎴愶級";
+ WmsRecordUpiProcessHandler.SaveWmsRecordUpiProcess(wmsDB, upiObj, task.PlaceCode, "缂撳瓨鍏ュ簱瀹屾垚(" + flag + "):" + task.PlaceCode);
+
+ int changeNum = wmsDB.SaveChanges();
+ if (changeNum > 0)
{
- //缁橮LC鎺ㄩ�佷换鍔″畬鎴愮‘璁や俊鍙�
- using (StationServiceClient client = new StationServiceClient())
+ //蹇呴』瑕佺粰PLC涓嬪彂鎴愬姛,瑙e喅鍙兘浼氱粰PLC閲嶅涓嬪彂浠诲姟鐨勬儏鍐�
+ var isRight = true;
+
+ if (isFlagFinish == false)
{
- var res = await client.InboundFinishConfirmAsync((int)EDevice.Station, true, rgvLocation);
- if (!res.result)
+ while (isRight)
{
- SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_FinishTask = $"{rgvLocation.ToString()}-涓嬪彂鍏ュ簱浠诲姟 澶辫触,InboundFinishConfirmAsync 杩斿洖:{res.resMsg}";
- return false;
- }
- else
- {
- Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-涓嬪彂鍏ュ簱浠诲姟 鎴愬姛,InboundFinishConfirmAsync锛屽弬鏁�: 绔欑偣{rgvLocation}");
+ var obj = FormCC.stationView.R_StationForReadCommList.Where(x => x.StationCode == rgvLocation.ToString()).FirstOrDefault();
+ isRight = obj.R_InboundFinish;
+ //缁橮LC鎺ㄩ�佷换鍔″畬鎴愮‘璁や俊鍙�
+ using (StationServiceClient client = new StationServiceClient())
+ {
+ var res = await client.InboundFinishConfirmAsync((int)EDevice.Station, true, rgvLocation);
+ if (!res.result)
+ {
+ SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_FinishTask = $"{rgvLocation.ToString()}-涓嬪彂鍏ュ簱浠诲姟 澶辫触,InboundFinishConfirmAsync 杩斿洖:{res.resMsg}";
+ Log4NetHelper.WriteErrorLog(logType, $"{rgvLocation.ToString()}-瀹屾垚鍏ュ簱浠诲姟鍐欏叆銆恡rue銆� 澶辫触,InboundFinishConfirmAsync锛岃繑鍥�:{res.resMsg}锛屽弬鏁�:TaskNo:{task.TaskNo}, PlaceCode锛歿task.PlaceCode},鏉$爜:{task.Upi}");
+ }
+ else
+ {
+ Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-瀹屾垚鍏ュ簱浠诲姟鍐欏叆銆恡rue銆� 鎴愬姛,InboundFinishConfirmAsync锛屽弬鏁�:TaskNo:{task.TaskNo}, PlaceCode锛歿task.PlaceCode},鏉$爜:{task.Upi}");
+ //isRight = false;
+ }
+ }
+ Thread.Sleep(1000);
}
}
}
-
-
- WmsRecordUpiProcessHandler.SaveWmsRecordUpiProcess(wmsDB, upiObj, task.PlaceCode, "缂撳瓨鍏ュ簱瀹屾垚:" + task.PlaceCode);
-
- wmsDB.SaveChanges();
return true;
}
--
Gitblit v1.9.3