Browse Source

调整检验合格单生成条码规则

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

10
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

Loading…
Cancel
Save