From 6fb9acd1a65da4cb57408a4832d4bee4203f3bb4 Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周五, 22 11月 2024 13:18:36 +0800
Subject: [PATCH] 增加 任务表
---
CC/iWareCC_ASRS/ThreadService/01_BZ01工位(清灰,洗板后工位)/DataProcess_BZ01.cs | 60 ++++++++++++++++++++++++++++++++++++++++++++++--------------
1 files changed, 46 insertions(+), 14 deletions(-)
diff --git "a/CC/iWareCC_ASRS/ThreadService/01_BZ01\345\267\245\344\275\215\357\274\210\346\270\205\347\201\260\357\274\214\346\264\227\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/DataProcess_BZ01.cs" "b/CC/iWareCC_ASRS/ThreadService/01_BZ01\345\267\245\344\275\215\357\274\210\346\270\205\347\201\260\357\274\214\346\264\227\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/DataProcess_BZ01.cs"
index 8c4b728..b99875d 100644
--- "a/CC/iWareCC_ASRS/ThreadService/01_BZ01\345\267\245\344\275\215\357\274\210\346\270\205\347\201\260\357\274\214\346\264\227\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/DataProcess_BZ01.cs"
+++ "b/CC/iWareCC_ASRS/ThreadService/01_BZ01\345\267\245\344\275\215\357\274\210\346\270\205\347\201\260\357\274\214\346\264\227\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/DataProcess_BZ01.cs"
@@ -63,30 +63,62 @@
}
//鏌ヨ鏄惁榻愬寘
var allList = wmsDB.mes_batchOrderUPI_new.Where(x => x.PackageCode == upiObj.PackageCode).ToList();
- var isQiTaoList = allList.Where(x => x.AreaCode == (int)AreaCodeEnum.缂撳瓨鍒嗘嫞鍖�).ToList();
+ var isQiTaoList = allList.Where(x => x.AreaCode == (int)AreaCodeEnum.寰呯紦瀛樺垎鎷e尯
+ ||
+ x.AreaCode == (int)AreaCodeEnum.缂撳瓨鍒嗘嫞鍖�
+ ||
+ x.AreaCode == (int)AreaCodeEnum.鐮佸灈鍖哄煙
+ ||
+ x.AreaCode == (int)AreaCodeEnum.鏈哄櫒浜哄矝缂撳瓨鍖哄煙
+ ).ToList();
if (isQiTaoList.Count() != allList.Count())
{//涓嶉綈鍖�
qitaoReault = false;
+ upiObj.AreaCode = (int)AreaCodeEnum.缂撳瓨鍒嗘嫞鍖�;
}
else
{//榻愬寘
qitaoReault = true;
+ upiObj.AreaCode = (int)AreaCodeEnum.鐮佸灈鍖哄煙;
}
+
+ using (StationServiceClient client = new StationServiceClient())
+ {
+ var res = await client.WriteQiTaoInfoAsync((int)EDevice.Station, rgvLocation, qitaoReault);
+ if (!res.result)
+ {
+ SystemWarningMsg._lbl_alert_DataProcess_BZ01 = $"{rgvLocation.ToString()}-鎺ㄩ�侀綈濂楃粨鏋滃け璐�,WriteQiTaoInfoAsync杩斿洖:{res.resMsg}";
+ continue;
+ }
+ else
+ {
+ Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-鎺ㄩ�侀綈濂楃粨鏋滄垚鍔�,WriteQiTaoInfoAsync锛屽弬鏁�: 绔欑偣{rgvLocation},榻愬缁撴灉:{qitaoReault}");
+ }
+ }
+
+ //鏇存柊UPI鐘舵��
+ var upiObjList = wmsDB.mes_batchOrderUPI_new.Where(x => x.UPI == upiCode).ToList();
+ foreach (var item in upiObjList)
+ {
+ if (qitaoReault)
+ {
+ item.UpiStatus = (int)UpiStatusEnum.宸查綈鍖�;
+ }
+ else
+ {
+ item.UpiStatus = (int)UpiStatusEnum.涓嶉綈鍖�;
+ }
+ }
+ //鏇存柊 鏈�鍚庝竴娆″湪 BZ_01鐨勭郴缁熷鐞嗙殑鏉夸欢 鏁版嵁
+ var rbRunMode = wmsDB.wms_rbline_runmode.FirstOrDefault();
+ rbRunMode.PlanNo = upiObj.PlanNo;
+ rbRunMode.OrderId = upiObj.OrderId;
+ rbRunMode.PackageCode = upiObj.PackageCode;
+
+ wmsDB.SaveChanges();
}
- using (StationServiceClient client = new StationServiceClient())
- {
- var res = await client.WriteQiTaoInfoAsync((int)EDevice.Station, rgvLocation, qitaoReault);
- if (!res.result)
- {
- SystemWarningMsg._lbl_alert_DataProcess_BZ01 = $"{rgvLocation.ToString()}-鎺ㄩ�侀綈濂楃粨鏋滃け璐�,WriteQiTaoInfoAsync杩斿洖:{res.resMsg}";
- continue;
- }
- else
- {
- Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-鎺ㄩ�侀綈濂楃粨鏋滄垚鍔�,WriteQiTaoInfoAsync锛屽弬鏁�: 绔欑偣{rgvLocation},榻愬缁撴灉:{qitaoReault}");
- }
- }
+
}
}
}
--
Gitblit v1.9.3