冒林杰 2 years ago
parent
commit
f88ed1d718
  1. 24
      ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs

24
ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs

@ -671,7 +671,7 @@ namespace ICSSoft.DataProject
} }
#endregion #endregion
sql = @"INSERT INTO ICSWareHouseLotInfo(ID,LotNO,WarehouseCode,LocationCode,InvCode,Quantity,InDate,LockQuantity,MUSER,MUSERName,MTIME,WorkPoint,EATTRIBUTE1) 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}','' ,MUSER,MUSERName,GETDATE(),'{3}',''
from ICSWareHouseLotInfo from ICSWareHouseLotInfo
where LotNO='{1}' AND WorkPoint='{3}'"; where LotNO='{1}' AND WorkPoint='{3}'";
@ -702,7 +702,7 @@ namespace ICSSoft.DataProject
MTIME,WorkPoint,EATTRIBUTE1,LogID) MTIME,WorkPoint,EATTRIBUTE1,LogID)
SELECT NEWID(),'{3}','{4}','{5}','{10}' ,a.InvCode , SELECT NEWID(),'{3}','{4}','{5}','{10}' ,a.InvCode ,
c.WarehouseCode,c.LocationCode,'','','{6}', c.WarehouseCode,c.LocationCode,'','','{6}',
'','0','{7}','105','0','',
'','0','{7}','{8}','0','',
'','','',f.F_Account ,f.F_RealName , '','','',f.F_Account ,f.F_RealName ,
SYSDATETIME() ,a.WorkPoint ,'','{9}' SYSDATETIME() ,a.WorkPoint ,'','{9}'
FROM ICSInventoryLot a 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) catch (Exception)
{ {

Loading…
Cancel
Save