Browse Source

单据合并后不能扫原单据

master
lixh 3 years ago
parent
commit
ac66dba0b7
  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
ELSE
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 + @"
END";
#endregion

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

@ -38,7 +38,8 @@ namespace ICSSoft.DataProject
{
///添加库存(原条码退回,更新库存;新条码直接入库)
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}')
BEGIN
@ -644,7 +645,7 @@ namespace ICSSoft.DataProject
RETURN
END
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
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}'";

Loading…
Cancel
Save