From a770206c91e495b802b3e9371e06834586ad7715 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期四, 30 十月 2025 20:17:30 +0800
Subject: [PATCH] 1
---
新建文件夹/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/Business.cs | 34 +++++++++++++++++++++-------------
1 files changed, 21 insertions(+), 13 deletions(-)
diff --git "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/Business.cs" "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/Business.cs"
index 9eee10d..5d99726 100644
--- "a/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/Business.cs"
+++ "b/\346\226\260\345\273\272\346\226\207\344\273\266\345\244\271/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/Business.cs"
@@ -69,7 +69,7 @@
if (response == null || response.resultCode != "0" || requestData == null)
{
// 璋冪敤寮傚父鎺ュ彛
- SendErrorToUpstream(1, "", response.resultMsg ?? "涓婃父鎺ュ彛杩斿洖澶辫触", "");
+ //SendErrorToUpstream(1, "", response.resultMsg ?? "涓婃父鎺ュ彛杩斿洖澶辫触", "");
return responseContent.Error(response.resultMsg ?? "涓婃父鎺ュ彛杩斿洖澶辫触");
}
@@ -154,7 +154,7 @@
{
_unitOfWorkManage.RollbackTran();
_messageInfoService.AddMessageInfo(messageGroupBy, name, ex.Message, messageStatus);
- SendErrorToUpstream(1, "", ex.Message, "");
+ //SendErrorToUpstream(1, "", ex.Message, "");
//return responseContent.Error("鍚屾澶辫触: " + ex.Message);
}
};
@@ -164,7 +164,7 @@
catch (Exception ex)
{
// 鍏ㄥ眬寮傚父鏃讹紝涔熸帹閫佸紓甯哥粰涓婃父
- SendErrorToUpstream(1, "", ex.Message, "");
+ //SendErrorToUpstream(1, "", ex.Message, "");
return responseContent.Error("鍚屾澶辫触: " + ex.Message);
}
}
@@ -193,7 +193,7 @@
if (response.resultCode != "0")
{
- SendErrorToUpstream(3, "", response.resultMsg ?? "涓婃父鎺ュ彛杩斿洖澶辫触", "");
+ //SendErrorToUpstream(3, "", response.resultMsg ?? "涓婃父鎺ュ彛杩斿洖澶辫触", "");
return responseContent.Error(response.resultMsg ?? "涓婃父鎺ュ彛杩斿洖澶辫触");
}
@@ -282,7 +282,7 @@
{
_unitOfWorkManage.RollbackTran();
_messageInfoService.AddMessageInfo(messageGroupBy, name, ex.Message, messageStatus);
- SendErrorToUpstream(3, "", ex.Message, "");
+ //SendErrorToUpstream(3, "", ex.Message, "");
//return responseContent.Error("鍚屾澶辫触: " + ex.Message);
}
}
@@ -290,7 +290,7 @@
}
catch (Exception ex)
{
- SendErrorToUpstream(3, "", ex.Message, "");
+ //SendErrorToUpstream(3, "", ex.Message, "");
return responseContent.Error("鍚屾澶辫触: " + ex.Message);
}
}
@@ -395,7 +395,7 @@
}
else
{
- SendErrorToUpstream(3, order.Order_no, resp?.msg ?? "WCS 鎺ㄩ�佸け璐�", "");
+ //SendErrorToUpstream(3, order.Order_no, resp?.msg ?? "WCS 鎺ㄩ�佸け璐�", "");
Console.WriteLine($"璁㈠崟 {order.Order_no} 鎺ㄩ�佸け璐ワ細{resp?.msg}");
return new WebResponseContent { Status = false, Message = "璁㈠崟鎺ㄩ�佸け璐�" };
}
@@ -507,14 +507,14 @@
}
else
{
- SendErrorToUpstream(3, order.Out_no, resp?.msg ?? "WCS 鎺ㄩ�佸け璐�", "");
+ //SendErrorToUpstream(3, order.Out_no, resp?.msg ?? "WCS 鎺ㄩ�佸け璐�", "");
Console.WriteLine($"璁㈠崟 {order.Out_no} 鎺ㄩ�佸け璐ワ細{resp?.msg}");
}
//鍒犻櫎鍏ㄩ儴鐘朵负宸插畬鎴愮殑鏄庣粏鍜岃〃澶达紝绉诲叆鍘嗗彶琛�
}
catch (Exception ex)
{
- SendErrorToUpstream(3, order.Out_no, ex.Message, "");
+ //SendErrorToUpstream(3, order.Out_no, ex.Message, "");
Console.WriteLine($"璁㈠崟 {order.Out_no} 鎺ㄩ�佸紓甯革細{ex.Message}");
}
}
@@ -546,7 +546,7 @@
foreach (var inorder in inorders)
{
var Orders = _cabinOrderServices.Db.Queryable<Dt_CabinOrder>().Where(x => x.Order_no == inorder).Includes(x => x.Details).ToList();
-
+
if (!Orders.Where(x => x.OdrderStatus != "宸插畬鎴�").Any())
{
if (Orders.FirstOrDefault().Order_type == InOrderTypeEnum.Allocat.ObjToInt().ToString())
@@ -581,11 +581,16 @@
}
else
{
+ string mess = "涓婃姤ERP鏃犲搷搴�";
+ if (response != null) mess = response.resultMsg;
+ _messageInfoService.AddMessageInfo(MessageGroupByEnum.InOrderAlarm, $"鍏ュ簱鍗曞彿銆恵inorder}銆戝畬鎴愪笂鎶RP澶辫触", mess);
//_unitOfWorkManage.RollbackTran();
- SendErrorToUpstream(2, "", $"涓婃父鎺ュ彛杩斿洖澶辫触: {response.resultMsg}", inorder);
+ //SendErrorToUpstream(2, "", $"涓婃父鎺ュ彛杩斿洖澶辫触: {response.resultMsg}", inorder);
continue;
}
}
+
+
}
}
#endregion
@@ -639,7 +644,7 @@
};
var result = HttpHelper.Post(url, requestDate.ToJsonString());
var response = JsonConvert.DeserializeObject<UpstreamOrderResponse>(result);
- if (response.resultCode == "0")
+ if (response != null && response.resultCode == "0")
{
foreach (var item in Orders)
{
@@ -651,8 +656,11 @@
}
else
{
+ string mess = "涓婃姤ERP鏃犲搷搴�";
+ if (response != null) mess = response.resultMsg;
+ _messageInfoService.AddMessageInfo(MessageGroupByEnum.OutOrderAlarm, $"鍑哄簱鍗曞彿銆恵outorder}銆戝畬鎴愪笂鎶RP澶辫触", mess);
//_unitOfWorkManage.RollbackTran();
- SendErrorToUpstream(4, "", $"涓婃父鎺ュ彛杩斿洖澶辫触: {response.resultMsg}", outorder);
+ //SendErrorToUpstream(4, "", $"涓婃父鎺ュ彛杩斿洖澶辫触: {response.resultMsg}", outorder);
continue;
}
}
--
Gitblit v1.9.3