Browse Source

提交

master
zhaoxinyu 4 months ago
parent
commit
ba142fa7d9
  1. 20
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs

20
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_CAN_QTY) SE_SA_CAN_QTY\n" +
",SUM(SE_SA_NOT_QTY) SE_SA_NOT_QTY\n" + ",SUM(SE_SA_NOT_QTY) SE_SA_NOT_QTY\n" +
",SUM(ONLY_SE_QTY) ONLY_SE_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" + ",SUM(INVQty) INVQty\n" +
"FROM (\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" + "select temp1.*,isnull(temp3.PartCode,temp2.partCode) partCode,case WHEN ISNULL(TEMP2.InvbillNum,'')<>'' THEN isnull(temp2.Qty,0) ELSE 0 END invQty from (\n" +
@ -1586,12 +1586,18 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
"ELSE 0 END SE_SA_NOT_QTY,\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" + "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" + "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" + "case when ISNULL([10],0)+isnull([20],0)+isnull([100],0)+ISNULL([150],0)-ISNULL([200],0)-ISNULL([800],0)>0 THEN\n" +
"ElSE 0 END ONLY_SE_QTY,\n" + "ISNULL([10],0)+isnull([20],0)+isnull([100],0)+ISNULL([150],0)-ISNULL([200],0)-ISNULL([800],0)\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" + "ELSE 0\n" +
"ISNULL([200],0)+ISNULL([800],0) \n" + "END ONLY_SE_QTY,\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_SA_QTY\n" +
"from (\n" + "from (\n" +
"SELECT LU,PN,BusinessType,Qty,10 Type \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"; $"from {setablename} A WITH(NOLOCK) where BusinessType={(int)p_businessType} AND Qty>0 AND WmsBillNum='0' \n";

Loading…
Cancel
Save