Browse Source

调整接口

master
lilili 2 years ago
parent
commit
9ed1862621
  1. 2
      ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs
  2. 10
      ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs

2
ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs

@ -5403,7 +5403,7 @@ namespace ICSSoft.DataProject
AND Sequence = '{item.TransSequence}' AND Sequence = '{item.TransSequence}'
AND WorkPoint = '{item.WorkPoint}' AND WorkPoint = '{item.WorkPoint}'
AND Type = '{item.TransType}'"; AND Type = '{item.TransType}'";
var workPoint=DBHelper.ExecuteScalar(checksql, cmd).ToString();
var workPoint=DBHelper.ExecuteScalar(checksql, cmd)?.ToString();
if (workPoint == null|| workPoint=="") if (workPoint == null|| workPoint=="")
{ {
tranferWorkpoint = item.WorkPoint; tranferWorkpoint = item.WorkPoint;

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

@ -987,8 +987,8 @@ namespace ICSSoft.DataProject
AND Sequence = '{TransSequence}' AND Sequence = '{TransSequence}'
AND WorkPoint = '{WorkPoint}' AND WorkPoint = '{WorkPoint}'
AND Type = '{TransType}'"; AND Type = '{TransType}'";
var workPoint = DBHelper.ExecuteScalar(checksql, cmd);
if (workPoint == null)
var workPoint = DBHelper.ExecuteScalar(checksql, cmd).ToString();
if (workPoint == null|| workPoint=="")
{ {
tranferWorkpoint = WorkPoint; tranferWorkpoint = WorkPoint;
} }
@ -1046,7 +1046,7 @@ namespace ICSSoft.DataProject
throw new Exception(language.GetNameByCode("WMSAPIInfo166")); throw new Exception(language.GetNameByCode("WMSAPIInfo166"));
} }
///更新库存 ///更新库存
sql = @"UPDATE ICSWareHouseLotInfo SET Quantity=ISNULL(Quantity,0)-'{2}',LocationCode = '{3}',
sql = @"UPDATE ICSWareHouseLotInfo SET Quantity=ISNULL(Quantity,0)-'{2}',--LocationCode = '{3}',
WorkPoint ='{4}' WHERE LotNo='{0}' AND WorkPoint='{1}'; WorkPoint ='{4}' WHERE LotNo='{0}' AND WorkPoint='{1}';
UPDATE ICSInventoryLot SET WorkPoint='{4}' WHERE LotNo='{0}' AND WorkPoint='{1}'; UPDATE ICSInventoryLot SET WorkPoint='{4}' WHERE LotNo='{0}' AND WorkPoint='{1}';
@ -1099,7 +1099,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}','{4}','{3}',InvCode,'{2}',InDate,LockQuantity
select NEWID(),'{0}','{4}','{5}',InvCode,'{2}',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}'";
@ -1116,7 +1116,7 @@ namespace ICSSoft.DataProject
FROM ICSInventoryLot a FROM ICSInventoryLot a
INNER JOIN ICSInventoryLotDetail b ON b.LotNo='{3}' AND a.WorkPoint=b.WorkPoint INNER JOIN ICSInventoryLotDetail b ON b.LotNo='{3}' AND a.WorkPoint=b.WorkPoint
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='{3}' AND a.WorkPoint='{1}'";
sql = string.Format(sql, lotstr, tranferWorkpoint, User,LotNo); sql = string.Format(sql, lotstr, tranferWorkpoint, User,LotNo);
if (!DBHelper.ExecuteNonQuery(sql, cmd)) if (!DBHelper.ExecuteNonQuery(sql, cmd))

Loading…
Cancel
Save