From 6c9190a84b6be4af28174d5d387e317e18b6361c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=86=E6=99=94?= Date: Mon, 12 Jun 2023 13:52:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8B=A3=E6=96=99=E8=BF=87=E6=BB=A4=E5=B7=B2?= =?UTF-8?q?=E5=87=BA=E5=BA=93=E8=A1=8C=EF=BC=8C=E5=B9=B6=E5=8F=AA=E8=AE=A1?= =?UTF-8?q?=E7=AE=97=E5=89=A9=E4=BD=99=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../NFine.Application/WMS/PickMaterialApp.cs | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/WMS-BS/NFine.Application/WMS/PickMaterialApp.cs b/WMS-BS/NFine.Application/WMS/PickMaterialApp.cs index 95a42fa..66c1bb4 100644 --- a/WMS-BS/NFine.Application/WMS/PickMaterialApp.cs +++ b/WMS-BS/NFine.Application/WMS/PickMaterialApp.cs @@ -1643,11 +1643,11 @@ c.Sequence+'~'+a.Sequence as Sequence, if (Type == "2" || Type == "12") { sqls = @"select - a.ApplyCode as Code,a.Sequence, a.InvCode, b.InvName, b.InvStd, b.InvUnit, SUM(ISNULL(a.Quantity, 0)) AS iQuantity, a.WhCode,a.ExtensionID + a.ApplyCode as Code,a.Sequence, a.InvCode, b.InvName, b.InvStd, b.InvUnit, (SUM(ISNULL(a.Quantity, 0))-SUM(ISNULL(a.IssueQuantity, 0))) AS iQuantity, a.WhCode,a.ExtensionID FROM ICSMOApply a LEFT JOIN ICSINVENTORY b ON a.InvCode = b.InvCode AND a.WorkPoint=b.WorkPoint - WHERE a.ApplyCode in ({0}) AND a.WorkPoint = '{1}' + WHERE a.ApplyCode in ({0}) AND a.WorkPoint = '{1}' AND ISNULL(a.Quantity, 0)>ISNULL(a.IssueQuantity, 0) GROUP BY a.ApplyCode,a.InvCode,b.InvName,b.InvStd,b.InvUnit,a.WhCode,a.ExtensionID,a.Sequence"; } if (Type == "3") @@ -1701,12 +1701,12 @@ a.Sequence, b.InvName, b.InvStd, b.InvUnit, - SUM(ISNULL(a.Quantity, 0)) AS iQuantity, + (SUM(ISNULL(a.Quantity, 0))-SUM(ISNULL(a.IssueQuantity,0))) AS iQuantity, a.WhCode,a.ExtensionID FROM ICSOApply a LEFT JOIN ICSINVENTORY b ON a.InvCode = b.InvCode AND a.WorkPoint=b.WorkPoint - WHERE a.ApplyCode in ({0}) AND a.WorkPoint = '{1}' + WHERE a.ApplyCode in ({0}) AND a.WorkPoint = '{1}' AND ISNULL(a.Quantity, 0)>ISNULL(a.IssueQuantity, 0) GROUP BY a.ApplyCode,a.InvCode,b.InvName,b.InvStd,b.InvUnit,a.WhCode,a.ExtensionID,a.Sequence"; #endregion } @@ -1740,13 +1740,13 @@ a.Sequence, b.InvName, b.InvStd, b.InvUnit, - SUM(ISNULL(a.Quantity, 0)) AS iQuantity, + (SUM(ISNULL(a.Quantity, 0))-SUM(ISNULL(a.SDNQuantity, 0))) AS iQuantity, a.WhCode, a.ExtensionID FROM ICSSDN a LEFT JOIN ICSINVENTORY b ON a.InvCode = b.InvCode AND a.WorkPoint=b.WorkPoint - WHERE a.SDNCode in ({0}) AND a.WorkPoint = '{1}' + WHERE a.SDNCode in ({0}) AND a.WorkPoint = '{1}' AND ISNULL(a.Quantity, 0)>ISNULL(a.SDNQuantity, 0) GROUP BY a.SDNCode,a.InvCode,b.InvName,b.InvStd,b.InvUnit,a.WhCode,a.ExtensionID,a.Sequence"; #endregion } @@ -1760,13 +1760,13 @@ a.Sequence, b.InvName, b.InvStd, b.InvUnit, - SUM(ISNULL(a.Quantity, 0)) AS iQuantity, + (SUM(ISNULL(a.Quantity, 0))-SUM(ISNULL(a.OutQuantity, 0))) AS iQuantity, a.WhCode, a.ExtensionID FROM ICSOtherOut a LEFT JOIN ICSINVENTORY b ON a.InvCode = b.InvCode AND a.WorkPoint=b.WorkPoint - WHERE a.OutCode in ({0}) AND a.WorkPoint = '{1}' + WHERE a.OutCode in ({0}) AND a.WorkPoint = '{1}' AND ISNULL(a.Quantity, 0)>ISNULL(a.OutQuantity, 0) GROUP BY a.OutCode,a.InvCode,b.InvName,b.InvStd,b.InvUnit,a.WhCode,a.ExtensionID,a.Sequence"; #endregion } @@ -1800,13 +1800,13 @@ a.Sequence, b.InvName, b.InvStd, b.InvUnit, - SUM(ISNULL(a.Quantity, 0)) AS iQuantity, + (SUM(ISNULL(a.Quantity, 0))-SUM(ISNULL(a.TransferQuantity, 0))) AS iQuantity, a.FromWarehouseCode as WhCode, a.ExtensionID FROM ICSTransfer a LEFT JOIN ICSINVENTORY b ON a.InvCode = b.InvCode AND a.WorkPoint=b.WorkPoint - WHERE a.TransferNO in ({0}) AND a.WorkPoint = '{1}' + WHERE a.TransferNO in ({0}) AND a.WorkPoint = '{1}' AND ISNULL(a.Quantity, 0)>ISNULL(a.TransferQuantity, 0) GROUP BY a.TransferNO,a.InvCode,b.InvName,b.InvStd,b.InvUnit,a.FromWarehouseCode,a.ExtensionID,a.Sequence"; #endregion }