Browse Source

保质期管理

master
lixh 2 years ago
parent
commit
53fbad6f78
  1. 5
      ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs

5
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

Loading…
Cancel
Save