From 093a1f1e49f482a58cb95f6562ab6c890bb03c89 Mon Sep 17 00:00:00 2001
From: zongzhibin <zongzhibin@weben-smart.com>
Date: 周四, 28 11月 2024 09:53:16 +0800
Subject: [PATCH] add
---
CC/iWareCC_ASRS/ThreadService/02_BZ39工位(补板后工位)/Inbound/1、DataProcess_BZ39.cs | 56 +++++++++++++++++++++++++++++++++++++++-----------------
1 files changed, 39 insertions(+), 17 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 a2e042f..6c3ed53 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"
@@ -30,7 +30,7 @@
LogType logType = LogType.DataProcess_BZ39;
while (true)
{
- Thread.Sleep(2000);//浼戠湢2绉掞紝灏嗕紤鐪犲啓鍒板墠闈紝鏄负浜嗕笅闈㈢殑continue鏂规硶鎵ц鍚庝笉鏄剧ず閿欒淇℃伅鐨勬彁绀猴紒锛侊紒銆怑ditBy shaocx,2022-05-24銆�
+ Thread.Sleep(1000);//浼戠湢2绉掞紝灏嗕紤鐪犲啓鍒板墠闈紝鏄负浜嗕笅闈㈢殑continue鏂规硶鎵ц鍚庝笉鏄剧ず閿欒淇℃伅鐨勬彁绀猴紒锛侊紒銆怑ditBy shaocx,2022-05-24銆�
SystemWarningMsg._lbl_alert_DataProcess_BZ39 = string.Empty;
try
{
@@ -54,6 +54,8 @@
var qitaoReault = false;
using (WmsDBModel wmsDB = new WmsDBModel())
{
+ //涓嶅啀鎷︽埅
+ /*
//瑕佹槸鏈夊凡涓嬪彂鐨勪换鍔★紝灏变笉瑕佹墽琛�
var isValidate = TaskHandler.ValidateIssueTaskForRobotBuffer(wmsDB);
if (!isValidate)
@@ -61,6 +63,7 @@
SystemWarningMsg._lbl_alert_DataProcess_BZ39 = $"{rgvLocation.ToString()}-鏈夆�樺凡涓嬪彂鈥欑殑浠诲姟锛屼笉鑳藉鐞�,姝ゆ寰幆缁撴潫";
continue;
}
+ //*/
var upiObj = wmsDB.mes_batchOrderUPI_new.Where(x => x.UPI == upiCode).FirstOrDefault();
if (upiObj == null)
{
@@ -75,28 +78,14 @@
continue;
}
- using (StationServiceClient client = new StationServiceClient())
- {
- var res = await client.WriteInStoreTaskInfoAsync((int)EDevice.Station, rgvLocation, place.PlaceCode, (short)upiObj.Length,
- (short)upiObj.Width, (short)upiObj.Thk);
- if (!res.result)
- {
- SystemWarningMsg._lbl_alert_DataProcess_BZ39 = $"{rgvLocation.ToString()}-涓嬪彂鍏ュ簱浠诲姟 澶辫触,WriteInStoreTaskInfoAsync 杩斿洖:{res.resMsg}";
- continue;
- }
- else
- {
- Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-涓嬪彂鍏ュ簱浠诲姟 鎴愬姛,WriteInStoreTaskInfoAsync锛屽弬鏁�: 绔欑偣{rgvLocation}");
- }
- }
//璁板綍浠诲姟
var _id = Yitter.IdGenerator.YitIdHelper.NextId();
+ var plcTaskNo = BusinessHelper.CreatePlcTaskIdForSrmTask();
var task = new wms_rbline_task()
{
Id = _id,
- TaskNo = _id.ToString(),
-
+ TaskNo = plcTaskNo,
UPI = upiObj.UPI,
Length = upiObj.Length,
Width = upiObj.Width,
@@ -121,6 +110,39 @@
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,
+ (short)upiObj.Width, (short)upiObj.Thk, Convert.ToInt32(task.TaskNo));
+ if (!res.result)
+ {
+ SystemWarningMsg._lbl_alert_DataProcess_BZ39 = $"{rgvLocation.ToString()}-涓嬪彂鍏ュ簱浠诲姟 澶辫触,WriteInStoreTaskInfoAsync 杩斿洖:{res.resMsg}";
+ continue;
+ }
+ else
+ {
+ Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-涓嬪彂鍏ュ簱浠诲姟 鎴愬姛,WriteInStoreTaskInfoAsync锛屽弬鏁�: 绔欑偣{rgvLocation}");
+ }
+ }
+
+
+
place.PlaceStatus = (int)PlaceStatusEnum.閿佸畾;
wmsDB.SaveChanges();
--
Gitblit v1.9.3