@ -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) p artCode,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 ( 1 0 ) . ToString ( ) ;
shipReceiveSum . INVQty = reader . GetDecimal ( 1 1 ) . 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 ( 1 0 ) . ToString ( ) ;
shipReceiveSum . ONLY_SA_QTY = reader . GetDecimal ( 1 1 ) . ToString ( ) ;
shipReceiveSum . INVQty = reader . GetDecimal ( 1 2 ) . 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";
}