From ac66dba0b77aaa628960c36b33d85b4f677546e9 Mon Sep 17 00:00:00 2001 From: lixh Date: Thu, 2 Jun 2022 17:43:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=95=E6=8D=AE=E5=90=88=E5=B9=B6=E5=90=8E?= =?UTF-8?q?=E4=B8=8D=E8=83=BD=E6=89=AB=E5=8E=9F=E5=8D=95=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs | 5 +++++ .../ICSSoft.DataProject/ICSWareHouseLotInfoService.cs | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs index 3ea2334..5c5e40d 100644 --- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs +++ b/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 diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs index 9416fb8..aafd859 100644 --- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs +++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs @@ -38,7 +38,8 @@ namespace ICSSoft.DataProject { ///添加库存(原条码退回,更新库存;新条码直接入库) string sql = string.Empty; - if (BusinessCode != TransTypeEnum.SalesReturnBack.GetDescription()) + if (BusinessCode != TransTypeEnum.SalesReturnBack.GetDescription() + && 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}'";