From f88ed1d7185bbf59d04f32e0e78cdf5700aa7d98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=92=E6=9E=97=E6=9D=B0?= <1205395967@qq.com> Date: Fri, 2 Sep 2022 11:34:01 +0800 Subject: [PATCH] Mao --- .../ICSWareHouseLotInfoService.cs | 24 ++----------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs index a5eb067..93bddf6 100644 --- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs +++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs @@ -671,7 +671,7 @@ namespace ICSSoft.DataProject } #endregion sql = @"INSERT INTO ICSWareHouseLotInfo(ID,LotNO,WarehouseCode,LocationCode,InvCode,Quantity,InDate,LockQuantity,MUSER,MUSERName,MTIME,WorkPoint,EATTRIBUTE1) - select NEWID(),'{0}',WarehouseCode,LocationCode,InvCode,'{2}',InDate,LockQuantity + select NEWID(),'{0}',WarehouseCode,LocationCode,InvCode,'0',InDate,LockQuantity ,MUSER,MUSERName,GETDATE(),'{3}','' from ICSWareHouseLotInfo where LotNO='{1}' AND WorkPoint='{3}'"; @@ -702,7 +702,7 @@ namespace ICSSoft.DataProject MTIME,WorkPoint,EATTRIBUTE1,LogID) SELECT NEWID(),'{3}','{4}','{5}','{10}' ,a.InvCode , c.WarehouseCode,c.LocationCode,'','','{6}', - '','0','{7}','105','0','', + '','0','{7}','{8}','0','', '','','',f.F_Account ,f.F_RealName , SYSDATETIME() ,a.WorkPoint ,'','{9}' FROM ICSInventoryLot a @@ -804,26 +804,6 @@ namespace ICSSoft.DataProject } } - ///添加库存 - sql = @"IF NOT EXISTS(SELECT a.ID FROM ICSWareHouseLotInfo a WHERE a.LotNo='{0}' AND a.WorkPoint='{1}' AND Quantity>0) - BEGIN - RAISERROR('" + language.GetNameByCode("WMSAPIInfo038") + @"',16,1); - RETURN - END - IF EXISTS(SELECT a.ID FROM ICSWareHouseLotInfo a WHERE LotNo='{0}' AND WorkPoint='{1}' AND a.Quantity<{4}) - BEGIN - RAISERROR('" + language.GetNameByCode("WMSAPIInfo167") + @"',16,1); - RETURN - END - - UPDATE ICSWareHouseLotInfo SET WarehouseCode='{2}',LocationCode='{3}' WHERE LotNo='{0}' AND WorkPoint='{1}' - "; - sql = string.Format(sql, LotNo, WorkPoint, WarehouseCode, LocationCode, Quantity); - - if (!DBHelper.ExecuteNonQuery(sql, cmd)) - { - throw new Exception(language.GetNameByCode("WMSAPIInfo168"));//"库存表更新失败!"); - } } catch (Exception) {