From bb0b36f639c1af60690bddd720cd9756d3e38ca4 Mon Sep 17 00:00:00 2001 From: Mao <1205395967@qq.com> Date: Mon, 18 Jul 2022 11:35:25 +0800 Subject: [PATCH] Mao update --- .../ICSSoft.DataProject/ICSSubmitService.cs | 2 +- .../ICSSoft.DataProject/ICSWareHouseLotInfoService.cs | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs index 8e98654..4420f18 100644 --- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs +++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs @@ -1111,7 +1111,7 @@ namespace ICSSoft.DataProject IF EXISTS(SELECT a.ID FROM ICSInventoryLot a INNER JOIN ICSInventory b ON a.InvCode=b.InvCode AND a.WorkPoint=b.WorkPoint LEFT JOIN ICSInspection ins ON a.LotNo=ins.LotNo AND a.WorkPoint=ins.WorkPoint - WHERE a.LotNo='{2}' AND a.WorkPoint='{3}' AND (b.InvIQC='1'AND ins.LotNo IS NULL)) + WHERE a.LotNo='{2}' AND a.WorkPoint='{3}' AND (b.InvIQC='1'AND ins.LotNo IS NULL) AND c.TransCode NOT LIKE 'RD%') BEGIN RAISERROR('" + language.GetNameByCode("WMSAPIInfo040") + @"',16,1); RETURN diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs index 0006919..33acec3 100644 --- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs +++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs @@ -833,7 +833,8 @@ namespace ICSSoft.DataProject FROM ICSWareHouseLotInfoLog a INNER JOIN ICSInventoryLotDetail b ON a.LotNo=b.LotNo AND a.WorkPoint=b.WorkPoint INNER JOIN ICSOApplyNegDetail c ON b.TransCode=c.OApplyNegCode AND b.TransSequence=c.Sequence AND b.WorkPoint=c.WorkPoint - WHERE c.SourceDetailID='{0}' AND a.Identification='{1}' AND ERPUpload='0' + Left JOIN ICSOIssue m ON c.SourceDetailID=m.IssueDetailID AND c.WorkPoint=m.WorkPoint + WHERE ISNULL(m.ApplyDetailID,ISNULL(m.PickID, c.SourceDetailID))='{0}' AND a.Identification='{1}' AND ERPUpload='0' --根据原条码退料-备料表 UPDATE a set ERPID='{2}',ERPDetailID='{3}',ERPCode='{4}',ERPSequence='{5}',ERPUpload='1' FROM ICSWareHouseLotInfoLog a @@ -855,7 +856,7 @@ namespace ICSSoft.DataProject LEFT JOIN ICSOOPick x ON m.PickID=x.PickID AND m.WorkPoint=x.WorkPoint LEFT JOIN ICSOutsourcingOrder y ON x.OODetailID=y.OODetailID AND x.WorkPoint=y.WorkPoint LEFT JOIN ICSOApply z ON m.ApplyDetailID=z.ApplyDetailID AND m.WorkPoint=z.WorkPoint - WHERE ISNULL(m.PickID, m.ApplyDetailID)='{0}' AND a.Identification='{1}' AND a.ERPUpload='0' + WHERE ISNULL(m.ApplyDetailID, m.PickID)='{0}' AND a.Identification='{1}' AND a.ERPUpload='0' "; } //委外入库 @@ -897,7 +898,8 @@ namespace ICSSoft.DataProject FROM ICSWareHouseLotInfoLog a INNER JOIN ICSInventoryLotDetail b ON a.LotNo=b.LotNo AND a.WorkPoint=b.WorkPoint INNER JOIN ICSMOApplyNegDetail c ON b.TransCode=c.ApplyNegCode AND b.TransSequence=c.Sequence AND b.WorkPoint=c.WorkPoint - WHERE c.SourceDetailID='{0}' AND a.Identification='{1}' AND ERPUpload='0' + left JOIN ICSMOIssue m ON c.SourceDetailID=m.IssueDetailID AND c.WorkPoint=m.WorkPoint + WHERE ISNULL(m.ApplyDetailID, ISNULL(m.PickID, c.SourceDetailID))='{0}' AND a.Identification='{1}' AND ERPUpload='0' --根据原条码退料-备料表 UPDATE a set ERPID='{2}',ERPDetailID='{3}',ERPCode='{4}',ERPSequence='{5}',ERPUpload='1' FROM ICSWareHouseLotInfoLog a @@ -919,7 +921,7 @@ namespace ICSSoft.DataProject LEFT JOIN ICSMOPick x ON m.PickID=x.PickID AND m.WorkPoint=x.WorkPoint LEFT JOIN ICSMO y ON x.MODetailID=y.MODetailID AND x.WorkPoint=y.WorkPoint LEFT JOIN ICSMOApply z ON m.ApplyDetailID=z.ApplyDetailID AND m.WorkPoint=z.WorkPoint - WHERE ISNULL(m.PickID, m.ApplyDetailID)='{0}' AND a.Identification='{1}' AND a.ERPUpload='0' + WHERE ISNULL(m.ApplyDetailID, m.PickID)='{0}' AND a.Identification='{1}' AND a.ERPUpload='0' "; } //生产入库