From 5d4fcb4e897328a12f15e6b619124f5ef7b4efe4 Mon Sep 17 00:00:00 2001 From: zhaoxinyu <89237069@qq.com> Date: Thu, 11 Jul 2024 09:36:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Entities/BQ/VmiAppService.cs | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 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 94985ccc..6e25f3d9 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 @@ -1562,7 +1562,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ ",SUM(ONLY_SA_QTY) ONLY_SA_QTY\n" + ",SUM(INVQty) INVQty\n" + "FROM (\n" + - "select temp1.*,temp3.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" + "select LU,PN,\n" + "ISNULL([10],0) BSEQty,\n" + "ISNULL([20],0) BRETQty,\n" + @@ -1674,7 +1674,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ "SUM(qty)\n" + "FOR Type IN ([10],[20],[100],[150],[200],[800])\n" + ") AS piv\n" + - $") temp1 left join (select LU,PN,InvbillNum,Qty from {satablename} WITH(NOLOCK) where BusinessType={(int)p_businessType}"; + $") temp1 left join (select LU,PN,PartCode,InvbillNum,Qty from {satablename} WITH(NOLOCK) where BusinessType={(int)p_businessType}"; if (!string.IsNullOrEmpty(sabegin)) { @@ -1701,19 +1701,19 @@ namespace Win.Sfs.SettleAccount.Entities.BQ { REC_SHIP_SUM shipReceiveSum = new REC_SHIP_SUM(); shipReceiveSum.LU = reader.GetString(0); - shipReceiveSum.PartCode = ""; + shipReceiveSum.PartCode = reader.IsDBNull(1) ? string.Empty : reader.GetString(1); shipReceiveSum.BusinessType = p_businessType.ToString(); - shipReceiveSum.BSEQty = reader.GetDecimal(1).ToString(); - shipReceiveSum.BRETQty = reader.GetDecimal(2).ToString(); - shipReceiveSum.SEQTY = reader.GetDecimal(3).ToString(); - shipReceiveSum.RETQty = reader.GetDecimal(4).ToString(); - shipReceiveSum.CANQty = reader.GetDecimal(5).ToString(); - shipReceiveSum.NOTQty = reader.GetDecimal(6).ToString(); - shipReceiveSum.SE_SA_CAN_QTY = reader.GetDecimal(7).ToString(); - shipReceiveSum.SE_SA_NOT_QTY = reader.GetDecimal(8).ToString(); - shipReceiveSum.ONLY_SE_QTY = reader.GetDecimal(9).ToString(); - shipReceiveSum.ONLY_SA_QTY = reader.GetDecimal(10).ToString(); - shipReceiveSum.INVQty = reader.GetDecimal(11).ToString(); + shipReceiveSum.BSEQty = reader.GetDecimal(2).ToString(); + shipReceiveSum.BRETQty = reader.GetDecimal(3).ToString(); + shipReceiveSum.SEQTY = reader.GetDecimal(4).ToString(); + shipReceiveSum.RETQty = reader.GetDecimal(5).ToString(); + shipReceiveSum.CANQty = reader.GetDecimal(6).ToString(); + shipReceiveSum.NOTQty = reader.GetDecimal(7).ToString(); + shipReceiveSum.SE_SA_CAN_QTY = reader.GetDecimal(8).ToString(); + shipReceiveSum.SE_SA_NOT_QTY = reader.GetDecimal(9).ToString(); + shipReceiveSum.ONLY_SE_QTY = reader.GetDecimal(10).ToString(); + shipReceiveSum.ONLY_SA_QTY = reader.GetDecimal(11).ToString(); + shipReceiveSum.INVQty = reader.GetDecimal(12).ToString(); ls.Add(shipReceiveSum); // result += reader.GetString(0) + "," + reader.GetInt64(1) + "," + reader.GetInt64(2) + "," + reader.GetInt64(3) + "," + reader.GetInt64(4) + "," + reader.GetInt64(5) + "," + reader.GetInt64(6) + "," + reader.GetInt64(7) + "," + reader.GetInt64(8) + "," + reader.GetInt64(9) + "," + reader.GetInt64(10) + "," + reader.GetInt64(11) + "," + reader.GetInt64(12) + "," + reader.GetInt64(13) + "," + reader.GetInt64(14) + "\n"; }