From c9cd6646fdd1296a7feeb4384ebfe06ab90a52d7 Mon Sep 17 00:00:00 2001 From: IPC-610 <IPC-610@DESKTOP-6LEOOS3> Date: 星期三, 27 十一月 2024 08:25:17 +0800 Subject: [PATCH] 修改批次长度判断 ,批次长度增加为11位和12位 --- Wms/WMS.BLL/BllAsnServer/BllBoxInfoServer.cs | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Wms/WMS.BLL/BllAsnServer/BllBoxInfoServer.cs b/Wms/WMS.BLL/BllAsnServer/BllBoxInfoServer.cs index 9ccdc0a..4736f19 100644 --- a/Wms/WMS.BLL/BllAsnServer/BllBoxInfoServer.cs +++ b/Wms/WMS.BLL/BllAsnServer/BllBoxInfoServer.cs @@ -572,7 +572,7 @@ { throw new Exception("鏈煡璇㈠埌鍗曟嵁鏄庣粏淇℃伅"); } - if (asnList.LotNo.Length != 10) + if (asnList.LotNo.Length != 10 && asnList.LotNo.Length != 11 && asnList.LotNo.Length != 12) { throw new Exception("鍗曟嵁杩涘巶缂栧彿浣嶆暟闀垮害閿欒"); } @@ -739,7 +739,7 @@ var timeStr = toDayTime.Substring(2, 6); if (lotStr == timeStr) { - maxLotNoStr = toDayTime.Substring(2, 6) + (int.Parse(maxCode.Substring(6, 4)) + 1).ToString().PadLeft(4, '0'); + maxLotNoStr = toDayTime.Substring(2, 6) + (int.Parse(maxCode.Substring(maxCode.Length - 4, 4)) + 1).ToString().PadLeft(4, '0'); } else { @@ -783,7 +783,7 @@ } else { - maxBoxCode = maxBoxCode.Substring(0, 11) + (int.Parse(maxBoxCode.Substring(11, 6)) + 1).ToString().PadLeft(6, '0'); + maxBoxCode = maxBoxCode.Substring(0, maxBoxCode.Length - 6) + (int.Parse(maxBoxCode.Substring(maxBoxCode.Length - 6, 6)) + 1).ToString().PadLeft(6, '0'); } // 灏嗘潯鐮佷繚瀛樺埌鍘熸枡鏉$爜琛� @@ -956,7 +956,7 @@ } else { - maxboxcode2 = maxboxcode2.Substring(0, 11) + (int.Parse(maxboxcode2.Substring(11, 6)) + 1).ToString().PadLeft(6, '0'); + maxboxcode2 = maxboxcode2.Substring(0, maxboxcode2.Length - 6) + (int.Parse(maxboxcode2.Substring(maxboxcode2.Length-6, 6)) + 1).ToString().PadLeft(6, '0'); } //鑾峰彇绠卞唴鏀爣绛炬暟閲� if (i == labelNum2) @@ -1000,7 +1000,7 @@ } else { - maxboxcode3 = maxboxcode3.Substring(0, 11) + (int.Parse(maxboxcode3.Substring(11, 4)) + 1).ToString().PadLeft(4, '0'); + maxboxcode3 = maxboxcode3.Substring(0, maxboxcode3.Length - 4) + (int.Parse(maxboxcode3.Substring(maxboxcode3.Length - 4, 4)) + 1).ToString().PadLeft(4, '0'); } //var ssss = d.ToString("0"); -- Gitblit v1.8.0