Browse Source

调整拣料推荐条码接口

master
lilili 2 years ago
parent
commit
aadf0c1ea7
  1. 20
      WMS-BS/NFine.Application/WMS/PickMaterialApp.cs

20
WMS-BS/NFine.Application/WMS/PickMaterialApp.cs

@ -812,12 +812,12 @@ where a.IssueCode='{0}' and a.WorkPoint='{1}'";
c.InvCode, c.InvCode,
c.InvName, c.InvName,
c.InvStd, c.InvStd,
c.InvUnit,
c.InvUnit,
FLOOR(c.iQuantity) AS iQuantity, FLOOR(c.iQuantity) AS iQuantity,
d.WarehouseCode, d.WarehouseCode,
d.LocationCode, d.LocationCode,
d.LotNO,
FLOOR(ISNULL(d.Quantity, 0)) AS QTY,
m.LotNO,
(case when m.LotNo is null then 0 else FLOOR(ISNULL(d.Quantity, 0)) end) AS QTY,
CONVERT(varchar(100),d.MTIME, 23) MTIME, CONVERT(varchar(100),d.MTIME, 23) MTIME,
FLOOR(f.QTYTotal) QTYTotal INTO #temp FLOOR(f.QTYTotal) QTYTotal INTO #temp
FROM FROM
@ -830,6 +830,7 @@ c.InvUnit,
DECLARE @ItemCode VARCHAR(50), DECLARE @ItemCode VARCHAR(50),
@QTY DECIMAL(18,3), @QTY DECIMAL(18,3),
@ItemCodeCurrent VARCHAR(50), @ItemCodeCurrent VARCHAR(50),
@Lotno VARCHAR(50),
@QTYCurrent DECIMAL(18,3), @QTYCurrent DECIMAL(18,3),
@iQuantityCurrent DECIMAL(18,3), @iQuantityCurrent DECIMAL(18,3),
@CanDelete BIT, @CanDelete BIT,
@ -839,10 +840,11 @@ SET @Row = @@rowcount
SET @rowCurrent=1 SET @rowCurrent=1
SET @CanDelete=0 SET @CanDelete=0
SET @ItemCode='' SET @ItemCode=''
SET @Lotno = ''
WHILE @rowCurrent<=@Row WHILE @rowCurrent<=@Row
BEGIN BEGIN
SELECT @ItemCodeCurrent=InvCode,@QTYCurrent=QTY,@iQuantityCurrent=iQuantity FROM #temp WHERE rowNo=@rowCurrent
SELECT @ItemCodeCurrent=InvCode,@QTYCurrent=QTY,@iQuantityCurrent=iQuantity,@Lotno = Lotno FROM #temp WHERE rowNo=@rowCurrent
PRINT(@rowCurrent) PRINT(@rowCurrent)
IF @ItemCode<>@ItemCodeCurrent IF @ItemCode<>@ItemCodeCurrent
@ -860,7 +862,7 @@ PRINT(@rowCurrent)
END END
SET @QTY += @QTYCurrent SET @QTY += @QTYCurrent
IF @QTY>=@iQuantityCurrent
IF @LotNo is null or @QTY>=@iQuantityCurrent
BEGIN BEGIN
SET @CanDelete=1 SET @CanDelete=1
END END
@ -882,7 +884,7 @@ DROP TABLE #temp
b.InvStd, b.InvStd,
SUM(ISNULL(a.Quantity, 0)) AS iQuantity, SUM(ISNULL(a.Quantity, 0)) AS iQuantity,
a.WhCode, a.WhCode,
b.InvUnit,
b.InvUnit,
a.ExtensionID a.ExtensionID
FROM FROM
ICSMOPick a ICSMOPick a
@ -919,7 +921,7 @@ b.InvUnit,
a.InvCode, a.InvCode,
b.InvName, b.InvName,
b.InvStd, b.InvStd,
b.InvUnit,
b.InvUnit,
SUM(ISNULL(a.Quantity, 0)) AS iQuantity, SUM(ISNULL(a.Quantity, 0)) AS iQuantity,
a.WhCode, a.WhCode,
a.ExtensionID a.ExtensionID
@ -1015,10 +1017,10 @@ a.ExtensionID
a.InvCode, a.InvCode,
b.InvName, b.InvName,
b.InvStd, b.InvStd,
b.InvUnit,
b.InvUnit,
SUM(ISNULL(a.Quantity, 0)) AS iQuantity, SUM(ISNULL(a.Quantity, 0)) AS iQuantity,
a.WhCode, a.WhCode,
a.ExtensionID
a.ExtensionID
FROM FROM
ICSOtherOut a ICSOtherOut a
LEFT JOIN ICSINVENTORY b ON a.InvCode = b.InvCode AND a.WorkPoint=b.WorkPoint LEFT JOIN ICSINVENTORY b ON a.InvCode = b.InvCode AND a.WorkPoint=b.WorkPoint

Loading…
Cancel
Save