From 53a4c145a57b41787bb02b4f1d54d928aaaf8c2e Mon Sep 17 00:00:00 2001 From: lilili Date: Mon, 11 Sep 2023 11:39:11 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=A3=80=E9=AA=8C?= =?UTF-8?q?=E5=90=88=E6=A0=BC=E5=8D=95=E7=94=9F=E6=88=90=E6=9D=A1=E7=A0=81?= =?UTF-8?q?=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WMS-BS/NFine.Application/WMS/WMSCreateItemLotApp.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/WMS-BS/NFine.Application/WMS/WMSCreateItemLotApp.cs b/WMS-BS/NFine.Application/WMS/WMSCreateItemLotApp.cs index abc4645..23729b3 100644 --- a/WMS-BS/NFine.Application/WMS/WMSCreateItemLotApp.cs +++ b/WMS-BS/NFine.Application/WMS/WMSCreateItemLotApp.cs @@ -1518,7 +1518,8 @@ insert into ICSInventoryLot decimal minPackQty = Convert.ToDecimal(queryParam["minPackQty"].ToString()); decimal thisCreateQty = Convert.ToDecimal(queryParam["thisCreateQty"].ToString()); decimal LOTQTY = minPackQty; - string Pre = "DN" + DNCode + Sequence; + var dateString = DateTime.Now.ToString("yyMMdd").Substring(1); + string Pre = "DN" + DNCode + dateString; string sql = string.Empty; string MUSER = NFine.Code.OperatorProvider.Provider.GetCurrent().UserCode; string MUSERNAME = NFine.Code.OperatorProvider.Provider.GetCurrent().UserName; @@ -1590,7 +1591,7 @@ WHERE SELECT @locationCodeCurrent"; object locationCode = SqlHelper.ExecuteScalar(locstionsql); - string LotNo = GetSerialCode(WorkPoint, "ICSInventoryLot", "LotNO", Pre, 5); + string LotNo = GetSerialCode(WorkPoint, "ICSInventoryLot", "LotNO", Pre, 2); sql += string.Format(@"Insert into ICSInventoryLotDetail(LotNo, TransCode,TransSequence,MUSER,MUSERName,MTIME,WorkPoint,EATTRIBUTE1) Values('{0}','{1}','{2}','{3}','{4}',getdate(),'{5}','{6}')", LotNo, DNCode, Sequence, MUSER, MUSERNAME, WorkPoints, locationCode); @@ -1709,6 +1710,7 @@ WHERE return 0; DataTable table = dataset.Tables[0]; StringBuilder sqlString = new StringBuilder(); + var dateString = MTime.ToString("yyMMdd").Substring(1); for (int i = 0; i < table.Rows.Count; i++) { string dnCode = table.Rows[i]["DNCode"].ToString(); @@ -1719,9 +1721,9 @@ WHERE string sequence = table.Rows[i]["Sequence"].ToString(); string extensionID = table.Rows[i]["ExtensionID"].ToString(); string amount = table.Rows[i]["Amount"].ToString(); - string code = "DN" + table.Rows[i]["DNCode"].ToString() + table.Rows[i]["Sequence"].ToString(); + string code = "DN" + table.Rows[i]["DNCode"].ToString() + dateString; //条码 - string LotNo = GetSerialCode(workPoint, "ICSInventoryLot", "LotNO", code, 5); + string LotNo = GetSerialCode(workPoint, "ICSInventoryLot", "LotNO", code, 2); //获取推荐库位 var locstionsql = $@"DECLARE @locationCodeCurrent VARCHAR(50) SET @locationCodeCurrent=(SELECT From f5a3991b4f1f990981ccbba588b2b24c39aba3d5 Mon Sep 17 00:00:00 2001 From: lilili Date: Mon, 11 Sep 2023 14:25:21 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=88=90=E5=93=81?= =?UTF-8?q?=E6=9D=A1=E7=A0=81=E7=94=9F=E6=88=90=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WMS-BS/NFine.Application/WMS/WMSCreateItemLotApp.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/WMS-BS/NFine.Application/WMS/WMSCreateItemLotApp.cs b/WMS-BS/NFine.Application/WMS/WMSCreateItemLotApp.cs index 23729b3..cac83fe 100644 --- a/WMS-BS/NFine.Application/WMS/WMSCreateItemLotApp.cs +++ b/WMS-BS/NFine.Application/WMS/WMSCreateItemLotApp.cs @@ -2031,7 +2031,8 @@ WHERE decimal minPackQty = Convert.ToDecimal(queryParam["minPackQty"].ToString()); decimal thisCreateQty = Convert.ToDecimal(queryParam["thisCreateQty"].ToString()); decimal LOTQTY = minPackQty; - string Pre = "KCP" + RCVCode + Sequence; + string dateString = DateTime.Now.ToString("yyMMdd").Substring(1); + string Pre = "KCP" + RCVCode + dateString; string sql = string.Empty; string MUSER = NFine.Code.OperatorProvider.Provider.GetCurrent().UserCode; string MUSERNAME = NFine.Code.OperatorProvider.Provider.GetCurrent().UserName; @@ -2062,7 +2063,7 @@ WHERE MUSER, MUSERNAME, WorkPoints); } - string LotNo = GetSerialCode(WorkPoint, "ICSInventoryLot", "LotNO", Pre, 5); + string LotNo = GetSerialCode(WorkPoint, "ICSInventoryLot", "LotNO", Pre, 2); sql += string.Format(@"Insert into ICSInventoryLotDetail(LotNo, TransCode,TransSequence,MUSER,MUSERName,MTIME,WorkPoint) Values('{0}','{1}','{2}','{3}','{4}',getdate(),'{5}' )", LotNo, RCVCode, Sequence, MUSER, MUSERNAME, WorkPoints); @@ -2101,6 +2102,7 @@ insert into ICSInventoryLot return 0; DataTable table = dataset.Tables[0]; StringBuilder sqlString = new StringBuilder(); + string dateString = MTime.ToString("yyMMdd").Substring(1); for (int i = 0; i < table.Rows.Count; i++) { string dnCode = table.Rows[i]["RCVCode"].ToString(); @@ -2111,9 +2113,9 @@ insert into ICSInventoryLot string sequence = table.Rows[i]["Sequence"].ToString(); string extensionID = table.Rows[i]["ExtensionID"].ToString(); string amount = table.Rows[i]["Amount"].ToString(); - string code = "KCP" + dnCode + sequence; ; + string code = "KCP" + dnCode + dateString; //条码 - string LotNo = GetSerialCode(workPoint, "ICSInventoryLot", "LotNO", code, 5); + string LotNo = GetSerialCode(workPoint, "ICSInventoryLot", "LotNO", code, 2); //获取推荐库位 var locstionsql = $@"DECLARE @locationCodeCurrent VARCHAR(50) SET @locationCodeCurrent=(SELECT