Browse Source

批次启用优化

master
Shaobin 6 months ago
parent
commit
a364408f48
  1. 2
      ICSSoft.ToERP/ICSSoft.ERPWMS.csproj
  2. 16
      ICSSoft.ToERP/SQL/CreateOrDeleteInventoryLot.cs

2
ICSSoft.ToERP/ICSSoft.ERPWMS.csproj

@ -4,7 +4,7 @@
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<FileVersion>1.0.0.14</FileVersion>
<FileVersion>1.0.0.15</FileVersion>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

16
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 EffectiveEnable = "";
String Colspan = ""; String Colspan = "";
@ -174,7 +176,7 @@ namespace ICSSoft.ERPWMS.SQL
} }
//检验自由项 //检验自由项
if (BatchEnable == "1")
if (BatchEnable == "TRUE")
{ {
Colspan = "" + "~" + entity.BatchNo + "~" + "" Colspan = "" + "~" + entity.BatchNo + "~" + ""
+ "~" + "" + "~" + entity.Extension1 + "~" + "" + "~" + entity.Extension1
@ -201,7 +203,7 @@ namespace ICSSoft.ERPWMS.SQL
if (dttt.Rows.Count == 0) if (dttt.Rows.Count == 0)
{ {
IDD = Guid.NewGuid().ToString(); 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) 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}'"; 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("物料代码不存在!"); throw new Exception("物料代码不存在!");
} }
string BatchEnable = dtInvCheck.Rows[0]["BatchEnable"].ToString();
string BatchEnable = dtInvCheck.Rows[0]["BatchEnable"].ToString().ToUpper();
Log.WriteLogFile("是否启用批次:" + BatchEnable, "创建删除条码日志");
String EffectiveEnable = ""; String EffectiveEnable = "";
String Colspan = ""; String Colspan = "";
String IDD = ""; String IDD = "";
@ -308,7 +310,7 @@ namespace ICSSoft.ERPWMS.SQL
dtt = entity.dDisableDate; dtt = entity.dDisableDate;
} }
//检验自由项 //检验自由项
if (BatchEnable=="1")
if (BatchEnable=="TRUE")
{ {
Colspan = "" + "~" + entity.BatchNo + "~" + "" Colspan = "" + "~" + entity.BatchNo + "~" + ""
+ "~" + "" + "~" + entity.Extension1 + "~" + "" + "~" + entity.Extension1
@ -334,7 +336,7 @@ namespace ICSSoft.ERPWMS.SQL
if (dttt.Rows.Count == 0) if (dttt.Rows.Count == 0)
{ {
IDD = Guid.NewGuid().ToString(); 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) 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}'"; select '{18}','{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}','{8}','{9}','{10}','{11}','{12}','{13}','{14}',GETDATE(),'{15}','{16}','{17}'";

Loading…
Cancel
Save