From a364408f48f080f964829fd23a389bea9152f82e Mon Sep 17 00:00:00 2001 From: Shaobin Date: Wed, 26 Jun 2024 09:09:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=B9=E6=AC=A1=E5=90=AF=E7=94=A8=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ICSSoft.ToERP/ICSSoft.ERPWMS.csproj | 2 +- ICSSoft.ToERP/SQL/CreateOrDeleteInventoryLot.cs | 16 +++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/ICSSoft.ToERP/ICSSoft.ERPWMS.csproj b/ICSSoft.ToERP/ICSSoft.ERPWMS.csproj index dd36f0f..b8414c6 100644 --- a/ICSSoft.ToERP/ICSSoft.ERPWMS.csproj +++ b/ICSSoft.ToERP/ICSSoft.ERPWMS.csproj @@ -4,7 +4,7 @@ net6.0 enable enable - 1.0.0.14 + 1.0.0.15 diff --git a/ICSSoft.ToERP/SQL/CreateOrDeleteInventoryLot.cs b/ICSSoft.ToERP/SQL/CreateOrDeleteInventoryLot.cs index 1c5e215..ed2975d 100644 --- a/ICSSoft.ToERP/SQL/CreateOrDeleteInventoryLot.cs +++ b/ICSSoft.ToERP/SQL/CreateOrDeleteInventoryLot.cs @@ -135,7 +135,9 @@ namespace ICSSoft.ERPWMS.SQL } - string BatchEnable = dtInvCheck.Rows[0]["BatchEnable"].ToString(); + string BatchEnable = dtInvCheck.Rows[0]["BatchEnable"].ToString().ToUpper(); + + Log.WriteLogFile("是否启用批次:" + BatchEnable, "创建删除条码日志"); String EffectiveEnable = ""; String Colspan = ""; @@ -174,7 +176,7 @@ namespace ICSSoft.ERPWMS.SQL } //检验自由项 - if (BatchEnable == "1") + if (BatchEnable == "TRUE") { Colspan = "" + "~" + entity.BatchNo + "~" + "" + "~" + "" + "~" + entity.Extension1 @@ -201,7 +203,7 @@ namespace ICSSoft.ERPWMS.SQL if (dttt.Rows.Count == 0) { IDD = Guid.NewGuid().ToString(); - if (BatchEnable == "1") + if (BatchEnable == "TRUE") { sql = @"Insert into ICSExtension(ID, Colspan, ProjectCode, BatchCode, Version, Brand, cFree1, cFree2, cFree3, cFree4, cFree5, cFree6, cFree7, cFree8, cFree9, cFree10, MTIME, MUSER, MUSERName, WorkPoint) select '{18}','{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}','{8}','{9}','{10}','{11}','{12}','{13}','{14}',GETDATE(),'{15}','{16}','{17}'"; @@ -269,9 +271,9 @@ namespace ICSSoft.ERPWMS.SQL throw new Exception("物料代码不存在!"); } - string BatchEnable = dtInvCheck.Rows[0]["BatchEnable"].ToString(); - + string BatchEnable = dtInvCheck.Rows[0]["BatchEnable"].ToString().ToUpper(); + Log.WriteLogFile("是否启用批次:" + BatchEnable, "创建删除条码日志"); String EffectiveEnable = ""; String Colspan = ""; String IDD = ""; @@ -308,7 +310,7 @@ namespace ICSSoft.ERPWMS.SQL dtt = entity.dDisableDate; } //检验自由项 - if (BatchEnable=="1") + if (BatchEnable=="TRUE") { Colspan = "" + "~" + entity.BatchNo + "~" + "" + "~" + "" + "~" + entity.Extension1 @@ -334,7 +336,7 @@ namespace ICSSoft.ERPWMS.SQL if (dttt.Rows.Count == 0) { IDD = Guid.NewGuid().ToString(); - if (BatchEnable == "1") + if (BatchEnable == "TRUE") { sql = @"Insert into ICSExtension(ID, Colspan, ProjectCode, BatchCode, Version, Brand, cFree1, cFree2, cFree3, cFree4, cFree5, cFree6, cFree7, cFree8, cFree9, cFree10, MTIME, MUSER, MUSERName, WorkPoint) select '{18}','{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}','{8}','{9}','{10}','{11}','{12}','{13}','{14}',GETDATE(),'{15}','{16}','{17}'";