From 7eea88e84bbf07bb30910a65f72ede6776394adb Mon Sep 17 00:00:00 2001 From: lilili Date: Wed, 12 Apr 2023 14:40:30 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=9D=A1=E7=A0=81?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ICSSoft.DataProject/ICSSubmitService.cs | 6 +++--- WMS-BS/NFine.Application/WMS/DeciliterApp.cs | 12 ++++++------ WMS-BS/NFine.Application/WMS/WMSCreateItemLotApp.cs | 7 ++++--- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs index 81de658..1dfb0c7 100644 --- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs +++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs @@ -1552,7 +1552,7 @@ namespace ICSSoft.DataProject RETURN END " + sql + "AND Otin.InCode = '" + JsonData.TransCode + @"' - GROUP BY a.ID,con.ContainerCode,con.ContainerName,a.LotNo,a.InvCode,inv.InvName,inv.InvStd,inv.InvUnit,a.WarehouseCode, + GROUP BY a.ID,con.ContainerCode,con.ContainerName,a.LotNo,a.InvCode,inv.InvName,inv.InvStd,inv.InvUnit,inv.EATTRIBUTE1,a.WarehouseCode, wh.WarehouseName,a.LocationCode,loc.LocationName,CASE WHEN (invBat.BatchEnable IS NULL AND ISNULL(inv.BatchEnable, '0')='1') OR ISNULL(invBat.BatchEnable, '0')='1' THEN ISNULL(ext.BatchCode, '') ELSE '' END,inv.AmountUnit, ext.ID,ext.ProjectCode,ext.Version,ext.Brand,ext.cFree1,ext.cFree2,ext.cFree3,ext.cFree4,ext.cFree5,ext.cFree6,ext.cFree7,ext.cFree8,ext.cFree9,ext.cFree10,a.MUSER,a.MTIME"; @@ -1605,7 +1605,7 @@ namespace ICSSoft.DataProject INNER JOIN ICSBomALL b ON a.ID=b.ContainerID ) " + sql + "AND Otin.InCode = '" + JsonData.TransCode + @"' - GROUP BY a.ID,con.ContainerCode,con.ContainerName,a.LotNo,a.InvCode,inv.InvName,inv.InvStd,inv.InvUnit,a.WarehouseCode, + GROUP BY a.ID,con.ContainerCode,con.ContainerName,a.LotNo,a.InvCode,inv.InvName,inv.InvStd,inv.InvUnit,inv.EATTRIBUTE1,a.WarehouseCode, wh.WarehouseName,a.LocationCode,loc.LocationName,CASE WHEN (invBat.BatchEnable IS NULL AND ISNULL(inv.BatchEnable, '0')='1') OR ISNULL(invBat.BatchEnable, '0')='1' THEN ISNULL(ext.BatchCode, '') ELSE '' END,inv.AmountUnit, ext.ID,ext.ProjectCode,ext.Version,ext.Brand,ext.cFree1,ext.cFree2,ext.cFree3,ext.cFree4,ext.cFree5,ext.cFree6,ext.cFree7,ext.cFree8,ext.cFree9,ext.cFree10,a.MUSER,a.MTIME"; @@ -1852,7 +1852,7 @@ namespace ICSSoft.DataProject #region 原条码 if (ScanType == "LOTNO") { - sql = sql + @" AND log.BusinessCode IN('" + type + @"') GROUP BY log.ID,a.ID,con.ContainerCode,con.ContainerName,a.LotNo,a.InvCode,inv.InvName,inv.InvStd,inv.InvUnit,inv.LotEnable,a.WarehouseCode, + sql = sql + @" AND log.BusinessCode IN('" + type + @"') GROUP BY log.ID,a.ID,con.ContainerCode,con.ContainerName,a.LotNo,a.InvCode,inv.InvName,inv.InvStd,inv.InvUnit,inv.LotEnable,inv.EATTRIBUTE1,a.WarehouseCode, wh.WarehouseName,a.LocationCode,loc.LocationName,CASE WHEN(invBat.BatchEnable IS NULL AND ISNULL(inv.BatchEnable, '0')= '1') OR ISNULL(invBat.BatchEnable, '0')= '1' THEN ISNULL(ext.BatchCode, '') ELSE '' END,inv.AmountUnit, ext.ID,ext.ProjectCode,ext.Version,ext.Brand,ext.cFree1,ext.cFree2,ext.cFree3,ext.cFree4,ext.cFree5,ext.cFree6,ext.cFree7,ext.cFree8,ext.cFree9,ext.cFree10,a.MUSER,a.MTIME "; diff --git a/WMS-BS/NFine.Application/WMS/DeciliterApp.cs b/WMS-BS/NFine.Application/WMS/DeciliterApp.cs index faac9ba..97a735c 100644 --- a/WMS-BS/NFine.Application/WMS/DeciliterApp.cs +++ b/WMS-BS/NFine.Application/WMS/DeciliterApp.cs @@ -51,8 +51,8 @@ namespace NFine.Application.WMS string msg = ""; try { - var jsonDate= Parameter.ToJson(); - string a = Parameter; + string user = NFine.Code.OperatorProvider.Provider.GetCurrent().UserCode; + string userName = NFine.Code.OperatorProvider.Provider.GetCurrent().UserName; var models = Parameter.ToObject>().FirstOrDefault(); StringBuilder sqlString = new StringBuilder(); @@ -66,20 +66,20 @@ namespace NFine.Application.WMS sqlString.Append($@" INSERT INTO ICSInventoryLot (ID,LotNo,InvCode,ProductDate,ExpirationDate,Quantity,Amount,ExtensionID,Type,PrintTimes,LastPrintUser, LastPrintTime,MUSER,MUSERName,MTIME,WorkPoint,EATTRIBUTE1 ) SELECT NEWID(),'{mode.CurrentLotNo}',InvCode,ProductDate,ExpirationDate,CONVERT(NUMERIC(10,2),{mode.CurrentQuantity}),Amount,ExtensionID,Type,PrintTimes, - LastPrintUser,LastPrintTime,'{models.User}','{models.User}','{models.MTIME}',WorkPoint,'{models.LotNo}' + LastPrintUser,LastPrintTime,'{user}','{userName}','{models.MTIME}',WorkPoint,'{models.LotNo}' FROM ICSInventoryLot WHERE LotNo='{models.LotNo}' "); sqlString.Append($@" INSERT INTO ICSWareHouseLotInfo SELECT - NEWID(), '{mode.CurrentLotNo}', WarehouseCode, LocationCode, InvCode, CONVERT(NUMERIC(10,2),{mode.CurrentQuantity}), InDate, LockQuantity, '{models.User}', MUSERName, '{models.MTIME}', WorkPoint, EATTRIBUTE1 + NEWID(), '{mode.CurrentLotNo}', WarehouseCode, LocationCode, InvCode, CONVERT(NUMERIC(10,2),{mode.CurrentQuantity}), InDate, LockQuantity, '{user}','{userName}', '{models.MTIME}', WorkPoint, EATTRIBUTE1 FROM ICSWareHouseLotInfo WHERE LotNo='{models.LotNo}' "); sqlString.Append($@" UPDATE [dbo].[ICSWareHouseLotInfo] SET [Quantity] = Quantity-{mode.CurrentQuantity.ToInt()} Where [LotNo]='{models.LotNo}' "); - sqlString.Append($@" INSERT INTO ICSWareHouseLotInfoLog SELECT NEWID(), Identification, TransCode, TransSequence, '{mode.CurrentLotNo}', InvCode, FromWarehouseCode, FromLocationCode, ToWarehouseCode, ToLocationCode, CONVERT(NUMERIC(10,2),{mode.CurrentQuantity}), Memo, Lock, '4', BusinessCode, ERPUpload, ERPID, ERPDetailID, ERPCode, ERPSequence, LogID, MergeID, '{models.User}', '{models.User}', '{models.MTIME}', WorkPoint, EATTRIBUTE1, EATTRIBUTE2, EATTRIBUTE3 + sqlString.Append($@" INSERT INTO ICSWareHouseLotInfoLog SELECT NEWID(), Identification, TransCode, TransSequence, '{mode.CurrentLotNo}', InvCode, FromWarehouseCode, FromLocationCode, ToWarehouseCode, ToLocationCode, CONVERT(NUMERIC(10,2),{mode.CurrentQuantity}), Memo, Lock, '4', BusinessCode, ERPUpload, ERPID, ERPDetailID, ERPCode, ERPSequence, LogID, MergeID, '{user}','{userName}', '{models.MTIME}', WorkPoint, EATTRIBUTE1, EATTRIBUTE2, EATTRIBUTE3 FROM ICSWareHouseLotInfoLog WHERE LotNo='{models.LotNo}' "); - sqlString.Append($@" INSERT INTO ICSInventoryLotDetail SELECT '{mode.CurrentLotNo}', TransCode, TransSequence,'{models.User} ', '{models.User}', '{models.MTIME}', WorkPoint, EATTRIBUTE1 FROM ICSInventoryLotDetail WHERE LotNo='{models.LotNo}';"); + sqlString.Append($@" INSERT INTO ICSInventoryLotDetail SELECT '{mode.CurrentLotNo}', TransCode, TransSequence,'{user}','{userName}', '{models.MTIME}', WorkPoint, EATTRIBUTE1 FROM ICSInventoryLotDetail WHERE LotNo='{models.LotNo}';"); sqlString.Append($@" UPDATE [dbo].[ICSWareHouseLotInfoLog] SET [Quantity] = Quantity-{mode.CurrentQuantity.ToInt()} Where [LotNo]='{models.LotNo}' "); diff --git a/WMS-BS/NFine.Application/WMS/WMSCreateItemLotApp.cs b/WMS-BS/NFine.Application/WMS/WMSCreateItemLotApp.cs index 43081ef..8504c40 100644 --- a/WMS-BS/NFine.Application/WMS/WMSCreateItemLotApp.cs +++ b/WMS-BS/NFine.Application/WMS/WMSCreateItemLotApp.cs @@ -1687,9 +1687,10 @@ where a.DNType='3' and a.Status='2' and a.EATTRIBUTE1 is NOT null object Figure = GetDecimalDigits(); #region [SQL] string sql = @"select a.ID,a.ApplyNegCode,a.Sequence,a.SourceDetailID,a.InvCode,b.InvName,b.InvDesc,b.InvStd,b.InvUnit, - CAST(a.Quantity AS DECIMAL(18,{0})) as Quantity ,CAST(a.Amount AS DECIMAL(18,{0})) as Amount,CAST(a.IssueNegQuantity AS DECIMAL(18,{0})) as IssueNegQuantity ,a.ExtensionID,a.MUSERName,a.MTIME ,CAST(c.LOTQTY AS DECIMAL(18,{0})) as LOTQTY -,f.Colspan ,f.ProjectCode ,f.BatchCode ,f.Version ,f.Brand ,f.cFree1 ,f.cFree2 ,f.cFree3 ,f.cFree4 -,f.cFree5 ,f.cFree6 ,f.cFree7 ,f.cFree8 ,f.cFree9 ,f.cFree10 + CAST(a.Quantity AS DECIMAL(18,{0})) as Quantity ,CAST(a.Amount AS DECIMAL(18,{0})) as Amount,CAST(a.IssueNegQuantity AS DECIMAL(18,{0})) as IssueNegQuantity + ,a.ExtensionID,a.MUSERName,a.MTIME ,CAST(c.LOTQTY AS DECIMAL(18,{0})) as LOTQTY + ,f.Colspan ,f.ProjectCode ,f.BatchCode ,f.Version ,f.Brand ,f.cFree1 ,f.cFree2 ,f.cFree3 ,f.cFree4 + ,f.cFree5 ,f.cFree6 ,f.cFree7 ,f.cFree8 ,f.cFree9 ,f.cFree10 from ICSMOApplyNegDetail a left join ICSMOApplyNeg d on a.ApplyNegCode=d.ApplyNegCode and a.WorkPoint=d.WorkPoint left join ICSInventory b on a.InvCode=b.InvCode and a.WorkPoint=b.WorkPoint From c7a0235dd382391639359d7dbcbf4f90ca237d0e Mon Sep 17 00:00:00 2001 From: lilili Date: Wed, 12 Apr 2023 15:32:58 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Root/ICSSoft.Frame.Data.Entity.dll | Bin 105984 -> 105984 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/ICSSoft.FromERP/Root/ICSSoft.Frame.Data.Entity.dll b/ICSSoft.FromERP/Root/ICSSoft.Frame.Data.Entity.dll index 1ff02078ec5e172c915f314f7c0ee9d65d9b0d3b..63e3252e018d6992b5b475f8b80ff800d28de3e0 100644 GIT binary patch delta 1589 zcmZvcZA@EL7{{M;545+nrI%9L0$W+ZEbRug$%ZwCLt2kRnwcd=!Of_Ni7bwnZfqkN$%x|c^!5x$-2L#s_xJpt z^MCF+xw(N0lE4MYP!N~D_}Elm+?1JtKmr_YI}DJ*H6j2i0*4C zo96k% z0U(!43bp~)@L>8IVq<*EkPvM&{J+s9Ha4NnP2AkQ`8G|W+s<4%54p)us&1#7*0Jd! za}x&Fcw$Q&DKO+dWbT_{Z2)h2YN(nxh(tT=OxsFi$8 z>#d}$%1AC1sz{qsO6gi|o~ngrXzpWrCK}*8EyP!3RJCr@GHI=qOcWJ!ULeo)>PW3c z&wItO2#CXyL;fnVkt3Gv#AdOPZ|J>`-nG{4PV6~+n51FjW zAy@VmB2N?*4?3|2v{CZ$OPH)g4smzo(YjMB8o!Wjr^Z?p(5suz$riu^kMB+IMEtBlrl0{CEWbu!bZa$-LmU^MJkxhV!2 zzR%ln0LB=dV{E9|L`5S2d*+w$vSWl6bBOP zzC$S*3G_k3tGx|ko$EM@3$ncs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