From 53fbad6f78e0d48d5ae2686cebbaf575f6758a63 Mon Sep 17 00:00:00 2001 From: lixh Date: Thu, 21 Jul 2022 16:22:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=9D=E8=B4=A8=E6=9C=9F=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs index 4420f18..c0fbe98 100644 --- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs +++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs @@ -4130,13 +4130,12 @@ namespace ICSSoft.DataProject { try { - //根据Sys_SRM_Items.F_Description备注列维护的提前天数,比如维护的是1,最早条码是2022.5.16,现在扫描2022.5.17的条码也能出库,扫描2022.5.18的条码不能直接出,需要校验以下逻辑 string sql = @"DECLARE @CountNO INT,@Days INT,@CurrentDays INT - SELECT @CountNO=EffectiveEnable,@Days=EffectiveDays,@CurrentDays=DATEDIFF(DAY, c.InDate, GETDATE()) FROM ICSInventory a + SELECT @CountNO=EffectiveEnable,@Days=EffectiveDays,@CurrentDays=DATEDIFF(DAY, GETDATE(), b.ExpirationDate) FROM ICSInventory a INNER JOIN ICSInventoryLot b ON a.InvCode=b.InvCode AND a.WorkPoint=b.WorkPoint INNER JOIN ICSWareHouseLotInfo c ON b.LotNO=c.LotNO AND b.WorkPoint=c.WorkPoint WHERE b.LotNO='{0}' AND b.WorkPoint='{1}' - IF @CountNO='1' AND @CurrentDays>@Days + IF @CountNO='1' AND @CurrentDays<0 BEGIN SELECT TOP 1 CASE a.F_ItemCode WHEN 'Effective01' THEN '1' WHEN 'Effective02' THEN '2' ELSE '3' END AS Type FROM Sys_SRM_ItemsDetail a