parent
commit
1a19ad3768
  1. 5
      ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs
  2. 5
      ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs

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

@ -720,6 +720,11 @@ namespace ICSSoft.DataProject
END END
ELSE ELSE
BEGIN BEGIN
IF EXISTS(SELECT a.ID FROM {1} INNER JOIN ICSMOPickMerge c ON a.ID=c.SourceID AND a.WorkPoint=c.WorkPoint WHERE {2})
BEGIN
RAISERROR('" + language.GetNameByCode("WMSAPIInfo194") + @"',16,1);
RETURN
END
" + sqlCheck + sql + @" " + sqlCheck + sql + @"
END"; END";
#endregion #endregion

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

@ -38,7 +38,8 @@ namespace ICSSoft.DataProject
{ {
///添加库存(原条码退回,更新库存;新条码直接入库) ///添加库存(原条码退回,更新库存;新条码直接入库)
string sql = string.Empty; string sql = string.Empty;
if (BusinessCode != TransTypeEnum.SalesReturnBack.GetDescription<DBValue>())
if (BusinessCode != TransTypeEnum.SalesReturnBack.GetDescription<DBValue>()
&& string.IsNullOrWhiteSpace(LogID))
{ {
sql = @"IF EXISTS(SELECT a.LotNo FROM ICSWareHouseLotInfo a WHERE a.LotNo='{0}' AND a.WorkPoint='{1}') sql = @"IF EXISTS(SELECT a.LotNo FROM ICSWareHouseLotInfo a WHERE a.LotNo='{0}' AND a.WorkPoint='{1}')
BEGIN BEGIN
@ -644,7 +645,7 @@ namespace ICSSoft.DataProject
RETURN RETURN
END END
INSERT INTO ICSInventoryLot(ID,LotNo,InvCode,ProductDate,ExpirationDate,Quantity,ExtensionID,Type,MUSER,MUSERName,MTIME,WorkPoint,EATTRIBUTE1) INSERT INTO ICSInventoryLot(ID,LotNo,InvCode,ProductDate,ExpirationDate,Quantity,ExtensionID,Type,MUSER,MUSERName,MTIME,WorkPoint,EATTRIBUTE1)
SELECT NEWID(),'{4}' ,a.InvCode,a.ProductDate,a.ExpirationDate ,'{3}',a.ExtensionID,'10',f.F_Account ,f.F_RealName ,SYSDATETIME() ,a.WorkPoint ,a.LotNo
SELECT NEWID(),'{4}' ,a.InvCode,a.ProductDate,a.ExpirationDate ,'{3}',a.ExtensionID,'101',f.F_Account ,f.F_RealName ,SYSDATETIME() ,a.WorkPoint ,a.LotNo
FROM ICSInventoryLot a FROM ICSInventoryLot 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}'";

Loading…
Cancel
Save