Browse Source

调整成品条码生成规则

master
lilili 1 year ago
parent
commit
f5a3991b4f
  1. 10
      WMS-BS/NFine.Application/WMS/WMSCreateItemLotApp.cs

10
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

Loading…
Cancel
Save