From 67f5edce916d4cb8b13a0aafa637af1ad0c7161f Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周二, 03 12月 2024 14:55:37 +0800
Subject: [PATCH] 2
---
CC/iWareCC_ASRS/ThreadService/02_BZ39工位(补板后工位)/Inbound/1、DataProcess_BZ39.cs | 38 +++++++++++++++++---------------------
1 files changed, 17 insertions(+), 21 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/1\343\200\201DataProcess_BZ39.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/1\343\200\201DataProcess_BZ39.cs"
index 6c3ed53..f68f565 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/1\343\200\201DataProcess_BZ39.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/1\343\200\201DataProcess_BZ39.cs"
@@ -34,13 +34,18 @@
SystemWarningMsg._lbl_alert_DataProcess_BZ39 = string.Empty;
try
{
- if (SystemValue.isAllowRuning_DataProcess_BZ39 && SystemValue.isStartedModel)
+ if (SystemValue.isStartedModel)//SystemValue.isAllowRuning_DataProcess_BZ39 &&
{
var rgvLocation = StationLocationEnum.BZ39.ToString();
/*
* 1銆佷粠鏁版嵁搴撲腑鍒ゆ柇鏄惁榻愬
* 2銆佹牴鎹綈濂楃粨鏋滐紝鎺ㄩ�佺粰PLC
*/
+ if (FormCC.stationView == null)
+ {
+ SystemWarningMsg._lbl_alert_DataProcess_BZ39 = $"{rgvLocation.ToString()}-鑾峰彇PLC瀵硅薄涓簄ull";
+ continue;
+ }
var obj = FormCC.stationView.R_StationForReadCommList.Where(x => x.StationCode == rgvLocation.ToString()).FirstOrDefault();
if (obj.R_ReqParseData)
{
@@ -55,15 +60,15 @@
using (WmsDBModel wmsDB = new WmsDBModel())
{
//涓嶅啀鎷︽埅
- /*
+
//瑕佹槸鏈夊凡涓嬪彂鐨勪换鍔★紝灏变笉瑕佹墽琛�
- var isValidate = TaskHandler.ValidateIssueTaskForRobotBuffer(wmsDB);
+ var isValidate = TaskHandler.ValidateIssueTaskForNoFinishTaskByUpi(wmsDB, upiCode);
if (!isValidate)
{
- SystemWarningMsg._lbl_alert_DataProcess_BZ39 = $"{rgvLocation.ToString()}-鏈夆�樺凡涓嬪彂鈥欑殑浠诲姟锛屼笉鑳藉鐞�,姝ゆ寰幆缁撴潫";
+ SystemWarningMsg._lbl_alert_DataProcess_BZ39 = $"{rgvLocation.ToString()}-鏈夆�樻湭缁撴潫鈥欑殑浠诲姟锛屼笉鑳藉鐞�,姝ゆ寰幆缁撴潫";
continue;
}
- //*/
+ //
var upiObj = wmsDB.mes_batchOrderUPI_new.Where(x => x.UPI == upiCode).FirstOrDefault();
if (upiObj == null)
{
@@ -97,8 +102,8 @@
PlaceCode = place.PlaceCode,
RbTaskType = (int)RbTaskTypeEnum.鍏ュ簱浠诲姟,
RbTaskTypeEnumName = RbTaskTypeEnum.鍏ュ簱浠诲姟.ToString(),
- TaskStatus = (int)TaskStatusEnum.宸蹭笅鍙�,
- TaskStatusName = TaskStatusEnum.宸蹭笅鍙�.ToString(),
+ TaskStatus = (int)TaskStatusEnum.鏂板缓,
+ TaskStatusName = TaskStatusEnum.鏂板缓.ToString(),
TaskMsg = "鍏ュ簱",
@@ -110,22 +115,10 @@
wmsDB.wms_rbline_task.Add(task);
+ //涓存椂
+ /*
using (StationServiceClient client = new StationServiceClient())
{
- //涓嶅啀鎷︽埅
- /*
- //棣栧厛鍏堟竻鐞�
- var res = await client.InboundFinishConfirmAsync((int)EDevice.Station, false, rgvLocation);
- if (!res.result)
- {
- SystemWarningMsg._lbl_alert_DataProcess_BZ39 = $"{rgvLocation.ToString()}-涓嬪彂鍏ュ簱浠诲姟 澶辫触,InboundFinishConfirmAsync 杩斿洖:{res.resMsg}";
- continue;
- }
- else
- {
- Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-涓嬪彂鍏ュ簱浠诲姟 鎴愬姛,InboundFinishConfirmAsync锛屽弬鏁�: 绔欑偣{rgvLocation}");
- }
- //*/
var res = await client.WriteInStoreTaskInfoAsync((int)EDevice.Station, rgvLocation, place.PlaceCode,
(short)upiObj.Length,
@@ -140,11 +133,14 @@
Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-涓嬪彂鍏ュ簱浠诲姟 鎴愬姛,WriteInStoreTaskInfoAsync锛屽弬鏁�: 绔欑偣{rgvLocation}");
}
}
+ //*/
place.PlaceStatus = (int)PlaceStatusEnum.閿佸畾;
+ WmsRecordUpiProcessHandler.SaveWmsRecordUpiProcess(wmsDB, upiObj, "BZ39", "缂撳瓨鍏ュ簱锛�"+ place.PlaceCode);
+
wmsDB.SaveChanges();
}
}
--
Gitblit v1.9.3