Commit dbb2ca5d authored by pdas's avatar pdas

Changes made in sql where unconfirmed despatch quantity should not be...

Changes made in sql where unconfirmed despatch quantity should not be considered for supreme in DespatchPrs


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@99135 ce508802-f39f-4f6c-b175-0d175dae99d5
parent eaf611b0
......@@ -195,15 +195,18 @@ public class DespatchPrs extends ValidatorEJB implements DespatchPrsLocal, Despa
currkey=itemCode.trim()+"@"+sordNo.trim()+"@"+lineNoSord.trim()+"@"+locCode.trim()+"@"+lotNo.trim()+"@"+lotSl.trim()+"@"+expLev.trim();
System.out.println("currkey---["+currkey + "]");
sql="SELECT SUM(QUANTITY) FROM DESPATCHDET "
+"WHERE SORD_NO = ? "
+"AND LINE_NO__SORD = ? "
+"AND EXP_LEV = ? "
+"AND ITEM_CODE__ORD = ? "
+"AND ITEM_CODE = ? "
+"AND LOT_NO = ? "
+"AND LOT_SL = ? "
+"AND LOC_CODE = ? AND DESP_ID<>? ";
sql="SELECT SUM(QUANTITY)," +
" FROM DESPATCHDET B,DESPATCH A "
+" WHERE B.SORD_NO = ? " +
" AND A.DESP_ID = B.DESP_ID "
+" AND B.LINE_NO__SORD = ? "
+" AND B.EXP_LEV = ? "
+" AND B.ITEM_CODE__ORD = ? "
+" AND B.ITEM_CODE = ? "
+" AND B.LOT_NO = ? "
+" AND B.LOT_SL = ? "
+" AND B.LOC_CODE = ? AND B.DESP_ID<>?"
+" AND(CASE WHEN A.CONFIRMED IS NULL THEN 'N' ElSE A.CONFIRMED END)='N'" ;
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,sordNo);
pstmt.setString(2,lineNoSord);
......
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