zhouhongjun 5 months ago
parent
commit
fa6ccc7ac5
  1. 28
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs

28
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(ONLY_SA_QTY) ONLY_SA_QTY\n" +
",SUM(INVQty) INVQty\n" + ",SUM(INVQty) INVQty\n" +
"FROM (\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" + "select LU,PN,\n" +
"ISNULL([10],0) BSEQty,\n" + "ISNULL([10],0) BSEQty,\n" +
"ISNULL([20],0) BRETQty,\n" + "ISNULL([20],0) BRETQty,\n" +
@ -1674,7 +1674,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
"SUM(qty)\n" + "SUM(qty)\n" +
"FOR Type IN ([10],[20],[100],[150],[200],[800])\n" + "FOR Type IN ([10],[20],[100],[150],[200],[800])\n" +
") AS piv\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)) if (!string.IsNullOrEmpty(sabegin))
{ {
@ -1701,19 +1701,19 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
{ {
REC_SHIP_SUM shipReceiveSum = new REC_SHIP_SUM(); REC_SHIP_SUM shipReceiveSum = new REC_SHIP_SUM();
shipReceiveSum.LU = reader.GetString(0); shipReceiveSum.LU = reader.GetString(0);
shipReceiveSum.PartCode = ""; shipReceiveSum.PartCode = reader.IsDBNull(1) ? string.Empty : reader.GetString(1);
shipReceiveSum.BusinessType = p_businessType.ToString(); shipReceiveSum.BusinessType = p_businessType.ToString();
shipReceiveSum.BSEQty = reader.GetDecimal(1).ToString(); shipReceiveSum.BSEQty = reader.GetDecimal(2).ToString();
shipReceiveSum.BRETQty = reader.GetDecimal(2).ToString(); shipReceiveSum.BRETQty = reader.GetDecimal(3).ToString();
shipReceiveSum.SEQTY = reader.GetDecimal(3).ToString(); shipReceiveSum.SEQTY = reader.GetDecimal(4).ToString();
shipReceiveSum.RETQty = reader.GetDecimal(4).ToString(); shipReceiveSum.RETQty = reader.GetDecimal(5).ToString();
shipReceiveSum.CANQty = reader.GetDecimal(5).ToString(); shipReceiveSum.CANQty = reader.GetDecimal(6).ToString();
shipReceiveSum.NOTQty = reader.GetDecimal(6).ToString(); shipReceiveSum.NOTQty = reader.GetDecimal(7).ToString();
shipReceiveSum.SE_SA_CAN_QTY = reader.GetDecimal(7).ToString(); shipReceiveSum.SE_SA_CAN_QTY = reader.GetDecimal(8).ToString();
shipReceiveSum.SE_SA_NOT_QTY = reader.GetDecimal(8).ToString(); shipReceiveSum.SE_SA_NOT_QTY = reader.GetDecimal(9).ToString();
shipReceiveSum.ONLY_SE_QTY = reader.GetDecimal(9).ToString(); shipReceiveSum.ONLY_SE_QTY = reader.GetDecimal(10).ToString();
shipReceiveSum.ONLY_SA_QTY = reader.GetDecimal(10).ToString(); shipReceiveSum.ONLY_SA_QTY = reader.GetDecimal(11).ToString();
shipReceiveSum.INVQty = reader.GetDecimal(11).ToString(); shipReceiveSum.INVQty = reader.GetDecimal(12).ToString();
ls.Add(shipReceiveSum); 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"; // 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";
} }

Loading…
Cancel
Save