From ba142fa7d9e74a514328d445e5366ad115ae1819 Mon Sep 17 00:00:00 2001 From: zhaoxinyu <89237069@qq.com> Date: Mon, 5 Aug 2024 14:28:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Entities/BQ/VmiAppService.cs | 24 ++++++++++++------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs index 7b6cb1ad..32aa4f94 100644 --- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs +++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs @@ -1567,7 +1567,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ ",SUM(SE_SA_CAN_QTY) SE_SA_CAN_QTY\n" + ",SUM(SE_SA_NOT_QTY) SE_SA_NOT_QTY\n" + ",SUM(ONLY_SE_QTY) ONLY_SE_QTY\n" + - ",SUM(ONLY_SA_QTY) ONLY_SA_QTY\n" + + ",-SUM(ONLY_SA_QTY) ONLY_SA_QTY\n" + ",SUM(INVQty) INVQty\n" + "FROM (\n" + "select temp1.*,isnull(temp3.PartCode,temp2.partCode) partCode,case WHEN ISNULL(TEMP2.InvbillNum,'')<>'' THEN isnull(temp2.Qty,0) ELSE 0 END invQty from (\n" + @@ -1579,19 +1579,25 @@ namespace Win.Sfs.SettleAccount.Entities.BQ "isnull([200],0) CANQty,\n" + "isnull([800],0) NOTQty,\n" + "case when ISNULL([10],0)+isnull([20],0)+isnull([100],0)+ISNULL([150],0)-ISNULL([200],0)=0 then ISNULL([10],0)+isnull([20],0)+isnull([100],0)+ISNULL([150],0)\n" + - "when ISNULL([10], 0) + isnull([20], 0) + isnull([100], 0) + ISNULL([150], 0) - ISNULL([200], 0) = ISNULL([10], 0) + isnull([20], 0) + isnull([100], 0) + ISNULL([150], 0) then 0\n"+ + "when ISNULL([10], 0) + isnull([20], 0) + isnull([100], 0) + ISNULL([150], 0) - ISNULL([200], 0) = ISNULL([10], 0) + isnull([20], 0) + isnull([100], 0) + ISNULL([150], 0) then 0\n" + "ELSE 0 END SE_SA_CAN_QTY,\n" + "case when ISNULL([10],0)+isnull([20],0)+isnull([100],0)+ISNULL([150],0)-ISNULL([800],0)=0 then ISNULL([10],0)+isnull([20],0)+isnull([100],0)+ISNULL([150],0)\n" + - "when ISNULL([10], 0) + isnull([20], 0) + isnull([100], 0) + ISNULL([150], 0) - ISNULL([800], 0) = ISNULL([10], 0) + isnull([20], 0) + isnull([100], 0) + ISNULL([150], 0) then 0\n"+ + "when ISNULL([10], 0) + isnull([20], 0) + isnull([100], 0) + ISNULL([150], 0) - ISNULL([800], 0) = ISNULL([10], 0) + isnull([20], 0) + isnull([100], 0) + ISNULL([150], 0) then 0\n" + "ELSE 0 END SE_SA_NOT_QTY,\n" + "case when ISNULL([10],0)+isnull([20],0)+isnull([100],0)+ISNULL([150],0)-ISNULL([200],0)-ISNULL([800],0)>0 then ISNULL([100],0)\n" + "ElSE 0 END SE_SA_DIFF_QTY,\n" + - "case when ISNULL([10],0)+isnull([20],0)+isnull([100],0)+ISNULL([150],0)-ISNULL([200],0)-ISNULL([800],0)=ISNULL([10],0)+isnull([20],0)+isnull([100],0)+ISNULL([150],0) then \n" + - "ISNULL([10],0)+isnull([20],0)+isnull([100],0)+ISNULL([150],0)\n" + - "ElSE 0 END ONLY_SE_QTY,\n" + - "case when ISNULL([10],0)+isnull([20],0)+isnull([100],0)+ISNULL([150],0)-ISNULL([200],0)-ISNULL([800],0)=-ISNULL([200],0)-ISNULL([800],0) then \n" + - "ISNULL([200],0)+ISNULL([800],0) \n" + - "ElSE 0 END ONLY_SA_QTY \n" + + + "case when ISNULL([10],0)+isnull([20],0)+isnull([100],0)+ISNULL([150],0)-ISNULL([200],0)-ISNULL([800],0)>0 THEN\n" + + "ISNULL([10],0)+isnull([20],0)+isnull([100],0)+ISNULL([150],0)-ISNULL([200],0)-ISNULL([800],0)\n" + + "ELSE 0\n" + + "END ONLY_SE_QTY,\n" + + "case when ISNULL([10],0)+isnull([20],0)+isnull([100],0)+ISNULL([150],0)-ISNULL([200],0)-ISNULL([800],0)<0 THEN\n" + + "ISNULL([10],0)+isnull([20],0)+isnull([100],0)+ISNULL([150],0)-ISNULL([200],0)-ISNULL([800],0)\n" + + "ELSE 0\n" + + "END ONLY_SA_QTY\n" + + + + "from (\n" + "SELECT LU,PN,BusinessType,Qty,10 Type \n" + $"from {setablename} A WITH(NOLOCK) where BusinessType={(int)p_businessType} AND Qty>0 AND WmsBillNum='0' \n";