From 7896204926b63fe0a1e9bdfcdf6098df4bedc8fc Mon Sep 17 00:00:00 2001 From: yangtm Date: Thu, 25 Apr 2024 17:16:08 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B4=A7=E6=9F=9C-WMS=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=EF=BC=8C=E6=93=8D=E4=BD=9C=E4=BA=BA=E6=9C=89=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E5=B0=B1=E6=8F=92=E5=85=A5=E4=BA=BA=E5=91=98=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=EF=BC=8C=E6=B2=A1=E8=B4=A6=E5=8F=B7=E6=8F=92=E5=85=A5=E7=BC=96?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ICSWareHouseLotInfoService.cs | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs index ec67e7f..3e37cf1 100644 --- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs +++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs @@ -485,12 +485,13 @@ namespace ICSSoft.DataProject END END INSERT INTO ICSWareHouseLotInfo(ID,LotNO,WarehouseCode,LocationCode,InvCode,Quantity,InDate,LockQuantity,MUSER,MUSERName,MTIME,WorkPoint,EATTRIBUTE1) - SELECT NEWID(),a.LotNo ,e.WarehouseCode,d.LocationCode,a.InvCode ,'{3}',SYSDATETIME(),'0','{2}','{2}',SYSDATETIME() ,a.WorkPoint ,'' + SELECT NEWID(),a.LotNo ,e.WarehouseCode,d.LocationCode,a.InvCode ,'{3}',SYSDATETIME(),'0','{2}',isnull(f.F_RealName,'{2}'),SYSDATETIME() ,a.WorkPoint ,'' FROM ICSInventoryLot a INNER JOIN ICSInventoryLotDetail b ON a.LotNo=b.LotNo AND a.WorkPoint=b.WorkPoint --INNER JOIN ICSOApplyNegDetail c ON b.TransCode=c.OApplyNegCode AND b.TransSequence=c.Sequence AND b.WorkPoint=c.WorkPoint INNER JOIN ICSLocation d ON d.LocationCode='{4}' AND a.WorkPoint=d.WorkPoint INNER JOIN ICSWarehouse e ON d.WHID=e.ID AND d.WorkPoint=e.WorkPoint + left JOIN Sys_SRM_User f ON f.F_Account='{2}' AND a.WorkPoint=f.F_Location WHERE a.LotNo='{0}' AND a.WorkPoint='{1}' END"; sql = string.Format(sql, dr["LotNo"].ToString(), dr["WorkPoint"].ToString(), User, dr["Quantity"].ToString(), LocationCode); @@ -509,11 +510,12 @@ namespace ICSSoft.DataProject SELECT NEWID(),'{3}',b.TransCode,b.TransSequence,a.LotNo ,a.InvCode , '','',c.WarehouseCode,c.LocationCode,'{6}', '','0','{4}','{5}','0','', - '','','','{2}','{2}', + '','','','{2}',isnull(f.F_RealName,'{2}'), SYSDATETIME() ,a.WorkPoint ,'' FROM ICSInventoryLot a INNER JOIN ICSInventoryLotDetail b ON a.LotNo=b.LotNo AND a.WorkPoint=b.WorkPoint INNER JOIN ICSWareHouseLotInfo c ON a.LotNo=c.LotNo AND a.WorkPoint=c.WorkPoint + left JOIN Sys_SRM_User f ON f.F_Account='{2}' AND a.WorkPoint=f.F_Location WHERE a.LotNo='{0}' AND a.WorkPoint='{1}' "; sql = string.Format(sql, dr["LotNo"].ToString(), dr["WorkPoint"].ToString(), User, Identification, TransType, BusinessCode, dr["Quantity"].ToString()); @@ -711,9 +713,10 @@ namespace ICSSoft.DataProject } string sql = string.Empty; sql = @" INSERT INTO ICSWareHouseLotInfo(ID,LotNO,WarehouseCode,LocationCode,InvCode,Quantity,InDate,LockQuantity,MUSER,MUSERName,MTIME,WorkPoint,EATTRIBUTE1) - SELECT NEWID(),a.LotNo ,'{4}','{5}',a.InvCode ,'{3}',SYSDATETIME(),'0','{2}','{2}',SYSDATETIME() ,a.WorkPoint ,'' + SELECT NEWID(),a.LotNo ,'{4}','{5}',a.InvCode ,'{3}',SYSDATETIME(),'0','{2}',isnull(f.F_RealName,'{2}'),SYSDATETIME() ,a.WorkPoint ,'' FROM ICSInventoryLot a INNER JOIN ICSInventoryLotDetail b ON a.LotNo=b.LotNo AND a.WorkPoint=b.WorkPoint + left JOIN Sys_SRM_User f ON f.F_Account='{2}' AND a.WorkPoint=f.F_Location WHERE a.LotNo='{0}' AND a.WorkPoint='{1}'"; sql = string.Format(sql, LotNo, WorkPoint, User, Quantity, WHCode, LocationCode); @@ -731,12 +734,12 @@ namespace ICSSoft.DataProject SELECT NEWID(),'{3}',b.TransCode,b.TransSequence,a.LotNo ,a.InvCode , '','',c.WarehouseCode,c.LocationCode,'{6}', '','0','{4}','{5}','0','', - '','','','{2}','{2}', + '','','','{2}',isnull(f.F_RealName,'{2}'), SYSDATETIME() ,a.WorkPoint ,'' FROM ICSInventoryLot a INNER JOIN ICSInventoryLotDetail b ON a.LotNo=b.LotNo AND a.WorkPoint=b.WorkPoint INNER JOIN ICSWareHouseLotInfo c ON a.LotNo=c.LotNo AND a.WorkPoint=c.WorkPoint - --INNER JOIN Sys_SRM_User f ON f.F_Account='{2}' AND a.WorkPoint=f.F_Location + left JOIN Sys_SRM_User f ON f.F_Account='{2}' AND a.WorkPoint=f.F_Location WHERE a.LotNo='{0}' AND a.WorkPoint='{1}' "; sql = string.Format(sql, LotNo, WorkPoint, User, Identification, TransType, BusinessCode, Quantity); @@ -996,11 +999,11 @@ namespace ICSSoft.DataProject SELECT NEWID(),'{3}','{4}','{5}',a.LotNo ,a.InvCode , c.WarehouseCode,c.LocationCode,'','','{6}', '','0','{7}','{8}','0','', - '','','','{2}','{2}', + '','','','{2}',isnull(f.F_RealName,'{2}'), SYSDATETIME() ,a.WorkPoint ,'','{9}' FROM ICSInventoryLot a INNER JOIN ICSWareHouseLotInfo c ON a.LotNo=c.LotNo AND a.WorkPoint=c.WorkPoint - --INNER JOIN Sys_SRM_User f ON f.F_Account='{2}' AND a.WorkPoint=f.F_Location + left JOIN Sys_SRM_User f ON f.F_Account='{2}' AND a.WorkPoint=f.F_Location WHERE a.LotNo='{0}' AND a.WorkPoint='{1}' "; sql = string.Format(sql, LotNo, WorkPoint, User, Identification, TransCode, TransSequence, Quantity, TransType, BusinessCode, MergeID); @@ -1093,11 +1096,11 @@ namespace ICSSoft.DataProject SELECT NEWID(),'{3}','{4}','{5}',a.LotNo ,a.InvCode , c.WarehouseCode,c.LocationCode,'','','{6}', '','0','{7}','{8}','0','', - '','','','{2}','{2}', + '','','','{2}',isnull(f.F_RealName,'{2}'), SYSDATETIME() ,a.WorkPoint ,'','{9}' FROM ICSInventoryLot a INNER JOIN ICSWareHouseLotInfo c ON a.LotNo=c.LotNo AND a.WorkPoint=c.WorkPoint - --INNER JOIN Sys_SRM_User f ON f.F_Account='{2}' AND a.WorkPoint=f.F_Location + left JOIN Sys_SRM_User f ON f.F_Account='{2}' AND a.WorkPoint=f.F_Location WHERE a.LotNo='{0}' AND a.WorkPoint='{1}' "; sql = string.Format(sql, dr["LotNo"].ToString(), WorkPoint, User, Identification, TransCode, dr["TransSequence"].ToString() @@ -1246,10 +1249,11 @@ namespace ICSSoft.DataProject SELECT NEWID(),'{3}','{4}','{5}',a.LotNo ,a.InvCode , c.WarehouseCode,c.LocationCode,'','','{6}', '','0','{7}','{8}','0','', - '','','','{2}','{2}', + '','','','{2}',isnull(f.F_RealName,'{2}'), SYSDATETIME() ,a.WorkPoint ,'','{9}' FROM ICSInventoryLot a INNER JOIN ICSWareHouseLotInfo c ON a.LotNo=c.LotNo AND a.WorkPoint=c.WorkPoint + left JOIN Sys_SRM_User f ON f.F_Account='{2}' AND a.WorkPoint=f.F_Location WHERE a.LotNo='{0}' AND a.WorkPoint='{1}'"; sql = string.Format(sql, LotNO, WorkPoint, User, Identification, TransCode, DocLineNO, lotQuantity, TransType, BusinessCode, MergeID);