Browse Source

冒-盘点合并

master
陈季伟 2 years ago
parent
commit
642e5131bc
  1. 10
      ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs

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

@ -827,14 +827,14 @@ namespace ICSSoft.DataProject
MTIME,WorkPoint,EATTRIBUTE1) MTIME,WorkPoint,EATTRIBUTE1)
SELECT NEWID(),'{3}','{4}','{5}',a.LotNo ,a.InvCode , SELECT NEWID(),'{3}','{4}','{5}',a.LotNo ,a.InvCode ,
a.WarehouseCode,a.LocationCode,'','',a.Quantity, a.WarehouseCode,a.LocationCode,'','',a.Quantity,
'','0','{6}','{7}','0','',
'{8}','0','{6}','{7}','0','',
'','','',f.F_Account ,f.F_RealName , '','','',f.F_Account ,f.F_RealName ,
SYSDATETIME() ,a.WorkPoint ,'' SYSDATETIME() ,a.WorkPoint ,''
FROM ICSWareHouseLotInfo a FROM ICSWareHouseLotInfo a
INNER JOIN Sys_SRM_User f ON f.F_Account='{2}' AND a.WorkPoint=f.F_Location INNER JOIN Sys_SRM_User f ON f.F_Account='{2}' AND a.WorkPoint=f.F_Location
WHERE a.LotNo='{0}' AND a.WorkPoint='{1}' WHERE a.LotNo='{0}' AND a.WorkPoint='{1}'
"; ";
sql = string.Format(sql, LotNo, WorkPoint, User, Identification, TransCode, TransSequence, TransType, TransTypeEnum.LOTCheckAfter.GetDescription<DBValue>());
sql = string.Format(sql, LotNo, WorkPoint, User, Identification, TransCode, TransSequence, TransType, TransTypeEnum.LOTCheckAfter.GetDescription<DBValue>(), CheckKind);
if (!DBHelper.ExecuteNonQuery(sql, cmd)) if (!DBHelper.ExecuteNonQuery(sql, cmd))
{ {
@ -1202,12 +1202,12 @@ namespace ICSSoft.DataProject
END END
INSERT INTO ICSWareHouseLotInfoLog(ID,Identification,TransCode,TransSequence,LotNo,InvCode, INSERT INTO ICSWareHouseLotInfoLog(ID,Identification,TransCode,TransSequence,LotNo,InvCode,
FromWarehouseCode,FromLocationCode,ToWarehouseCode,ToLocationCode,Quantity,
ToWarehouseCode,ToLocationCode,Quantity,
Memo,Lock,TransType,BusinessCode,ERPUpload,ERPID, Memo,Lock,TransType,BusinessCode,ERPUpload,ERPID,
ERPDetailID,ERPCode,ERPSequence,MUSER,MUSERName, ERPDetailID,ERPCode,ERPSequence,MUSER,MUSERName,
MTIME,WorkPoint,EATTRIBUTE1) MTIME,WorkPoint,EATTRIBUTE1)
SELECT NEWID(),'{3}','{4}','{5}',a.LotNo ,a.InvCode , SELECT NEWID(),'{3}','{4}','{5}',a.LotNo ,a.InvCode ,
c.WarehouseCode,c.LocationCode,'{9}','{10}','{6}',
'{9}','{10}','{6}',
'','0','{7}','{8}','0','', '','0','{7}','{8}','0','',
'','','',f.F_Account ,f.F_RealName , '','','',f.F_Account ,f.F_RealName ,
SYSDATETIME() ,a.WorkPoint ,'' SYSDATETIME() ,a.WorkPoint ,''
@ -1229,7 +1229,7 @@ namespace ICSSoft.DataProject
RETURN RETURN
END END
UPDATE ICSWareHouseLotInfo SET WarehouseCode='{2}',LocationCode='{3}',Quantity='{4}' WHERE LotNo='{0}' AND WorkPoint='{1}'
UPDATE ICSWareHouseLotInfo SET WarehouseCode='{2}',LocationCode='{3}',Quantity=Quantity+'{4}' WHERE LotNo='{0}' AND WorkPoint='{1}'
"; ";
sql = string.Format(sql, LotNo, WorkPoint, WarehouseCode, LocationCode, Quantity); sql = string.Format(sql, LotNo, WorkPoint, WarehouseCode, LocationCode, Quantity);

Loading…
Cancel
Save