Commit 8b5bb60f authored by cpatil's avatar cpatil

modify code for set status as C


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@98583 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 16a7f8a9
...@@ -895,8 +895,46 @@ QCTransferConfLocal, QCTransferConfRemote ...@@ -895,8 +895,46 @@ QCTransferConfLocal, QCTransferConfRemote
System.out.println("@@@ convertedNoArt["+convertedNoArt+"]convertedNetWeight["+convertedNetWeight+"]"); System.out.println("@@@ convertedNoArt["+convertedNoArt+"]convertedNetWeight["+convertedNetWeight+"]");
if ( qcQty > qty ) double remainingQcOrderQty=0.0, QcTransferQty=0.0;
// added by cpatil on 22/09/15 for update qc order status as 'C' when full transfer done
/*sql = " Select quantity from qc_order Where qorder_no = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,qorderNo);
rs = pstmt.executeQuery();
if(rs.next())
{
TotalQcOrderQty = rs.getDouble(1);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;*/
//sql = " Select sum(quantity) from qc_transfer Where qorder_no = ? ";
sql = " Select quantity__o,quantity from qc_transfer Where tran_id = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,tranId);
rs = pstmt.executeQuery();
if(rs.next())
{
remainingQcOrderQty = rs.getDouble(1);
QcTransferQty = rs.getDouble(1);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
System.out.println("@@@ remainingQcOrderQty["+remainingQcOrderQty+"]QcTransferQty["+QcTransferQty+"]");
//if ( qcQty != qty )
if ( remainingQcOrderQty != QcTransferQty )
{ {
subSQLCloseQC = "";
}
sql = " Update qc_order set quantity = (quantity - ? ) " + subSQLCloseQC+ sql = " Update qc_order set quantity = (quantity - ? ) " + subSQLCloseQC+
" , net_weight = ( net_weight - ? ) , no_art = ( no_art - ? ) " + // modify by cpatil on 09/04/14 " , net_weight = ( net_weight - ? ) , no_art = ( no_art - ? ) " + // modify by cpatil on 09/04/14
" where qorder_no = ? "; " where qorder_no = ? ";
...@@ -908,6 +946,7 @@ QCTransferConfLocal, QCTransferConfRemote ...@@ -908,6 +946,7 @@ QCTransferConfLocal, QCTransferConfRemote
updCnt = pstmt.executeUpdate(); updCnt = pstmt.executeUpdate();
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
/*
} }
else else
{ {
...@@ -922,7 +961,9 @@ QCTransferConfLocal, QCTransferConfRemote ...@@ -922,7 +961,9 @@ QCTransferConfLocal, QCTransferConfRemote
updCnt = pstmt.executeUpdate(); updCnt = pstmt.executeUpdate();
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
} //end if }
*/
//end if
} }
if (updCnt == 0) // get_sqlcode() <> 0 then if (updCnt == 0) // get_sqlcode() <> 0 then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment