From 3c5a57e55861a305b53089c91ef12c9edfbdafd0 Mon Sep 17 00:00:00 2001
From: admin <qiutairan163@163.com>
Date: 星期二, 18 十一月 2025 11:46:40 +0800
Subject: [PATCH] 托盘中含有的执行中的单据GetRunSoNoticeList增加SONo降序排序
---
Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs b/Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs
index 775c4d6..bdd298f 100644
--- a/Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs
+++ b/Wms/WMS.BLL/BllAsnServer/ArrivalNoticeServer.cs
@@ -273,6 +273,7 @@
*/
var TypeLot = "1, 5, 6, 7"; //鎵规鍙负绌哄崟鎹被鍨�
+ int codeStrNum = 0;
try
{
if (model.Origin == "褰曞叆" || model.Origin == "瀵煎叆")
@@ -378,13 +379,16 @@
&& m.CreateTime.ToString("yyyyMM") == DateTime.Now.ToString("yyyyMM")).Max(m => m.BoxCodeStr);
if(string.IsNullOrWhiteSpace(maxBoxCodeStr))
{
- maxBoxCodeStr = "BK" + toDayTime.Substring(2, 4) + "0001";
+ string codeEndStr = (1 + codeStrNum).ToString().PadLeft(4, '0');
+ maxBoxCodeStr = "BK" + toDayTime.Substring(2, 4) + codeEndStr;
}
else
{
- maxBoxCodeStr = "BK" + (int.Parse(maxBoxCodeStr.Replace("BK", "")) + 1).ToString();
+ maxBoxCodeStr = "BK" + (int.Parse(maxBoxCodeStr.Replace("BK", "")) + 1 + codeStrNum).ToString();
}
detailModel.BoxCodeStr = maxBoxCodeStr;
+
+ codeStrNum++;
}
// 鍒ゆ柇鏄惁宸插瓨鍦ㄥ綋鍓嶆槑缁�
@@ -520,6 +524,7 @@
}
catch (Exception ex)
{
+ Db.Ado.RollbackTran();
throw new Exception(ex.Message);
}
}
@@ -864,6 +869,7 @@
}
catch (Exception ex)
{
+ Db.Ado.RollbackTran();
throw ex;
}
}
@@ -1533,10 +1539,10 @@
var response = HttpHelper.DoPost(url, jsonData, "鍏ュ簱鍗曞畬鎴愪笂浼�", "SAP");
- var obj = JsonConvert.DeserializeObject<ErpModel>(response);//瑙f瀽杩斿洖鏁版嵁
- if (obj.Success != 0)
+ var obj = JsonConvert.DeserializeObject<SapResultModel>(response);//瑙f瀽杩斿洖鏁版嵁
+ if (obj.RESULT != true)
{
- throw new Exception("涓婁紶澶辫触" + obj.Message);
+ throw new Exception("涓婁紶澶辫触" + obj.MESSAGE);
}
#endregion
--
Gitblit v1.8.0