Commit 4e6393f2 authored by cpatil's avatar cpatil

added cpatil on 16/05/16 for ... if alloc and dealloc qty is same then update deallocated flag as Y


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@101643 ce508802-f39f-4f6c-b175-0d175dae99d5
parent c6fd3533
...@@ -118,10 +118,10 @@ public class WoIssPartialPrc extends ProcessEJB implements WoIssPartialPrcLocal, ...@@ -118,10 +118,10 @@ public class WoIssPartialPrc extends ProcessEJB implements WoIssPartialPrcLocal,
parentNodeListLength = parentNodeList.getLength(); parentNodeListLength = parentNodeList.getLength();
System.out.println("parentNodeListLength------------------->"+parentNodeListLength); System.out.println("parentNodeListLength------------------->"+parentNodeListLength);
batchQuantityStr = checkNull(genericUtility.getColumnValue("quantity", headerDom)); batchQuantityStr = checkNull(genericUtility.getColumnValue("quantity", headerDom));
worder = checkNull(genericUtility.getColumnValue("work_order", headerDom)); worder = checkNull(genericUtility.getColumnValue("work_order", headerDom)).trim();
deptCode = checkNull(genericUtility.getColumnValue("dept_code", headerDom)); deptCode = checkNull(genericUtility.getColumnValue("dept_code", headerDom));
operationStr = checkNull(genericUtility.getColumnValue("operation", headerDom)); operationStr = checkNull(genericUtility.getColumnValue("operation", headerDom));
System.out.println("@@@@@@@@@ worder["+worder+"]batchQuantityStr["+batchQuantityStr+"]deptCode["+deptCode+"]operationStr["+operationStr+"]");
if(worder == null || worder.trim().length() <= 0) if(worder == null || worder.trim().length() <= 0)
{ {
System.out.println("worder:: is null "+ worder); System.out.println("worder:: is null "+ worder);
...@@ -850,6 +850,58 @@ public class WoIssPartialPrc extends ProcessEJB implements WoIssPartialPrcLocal, ...@@ -850,6 +850,58 @@ public class WoIssPartialPrc extends ProcessEJB implements WoIssPartialPrcLocal,
int cnt=pstmt1.executeUpdate(); int cnt=pstmt1.executeUpdate();
System.out.println("Count after PSTM is:- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%["+cnt+"]"); System.out.println("Count after PSTM is:- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%["+cnt+"]");
pstmt1.close();pstmt1=null; pstmt1.close();pstmt1=null;
//added cpatil on 16/05/16 for ... if alloc and dealloc qty is same then update deallocated flag as Y start..........
double allocQtyDet=0.0,deAllocQtyDet=0.0;
sql = " select alloc_qty,dealloc_qty from inv_alloc_det "
+ " where tran_id in (select tran_id from inv_allocate where work_order = ? )"
+ " and item_code = ? and lot_sl= ? "
+ " and lot_no = ? and site_code= ? and loc_code = ? "
+ " and exp_lev = ? and line_no = ? ";
pstmt1 = conn.prepareStatement(sql);
pstmt1.setString(1,worder);
pstmt1.setString(2,itemCodeInv);
pstmt1.setString(3,lotSlInv);
pstmt1.setString(4,lotNoInv);
pstmt1.setString(5,siteCode);
pstmt1.setString(6,locCode);
pstmt1.setString(7,expLev);
pstmt1.setString(8,lineNoInvAllocDet);
rs1 = pstmt1.executeQuery();
if(rs1.next())
{
allocQtyDet = rs1.getDouble("alloc_qty");
deAllocQtyDet = rs1.getDouble("dealloc_qty");
}
rs1.close();rs1=null;
pstmt1.close();pstmt1=null;
System.out.println("@@@@@@@@ allocQtyDet["+allocQtyDet+"]deAllocQtyDet["+deAllocQtyDet+"]");
if( allocQtyDet == deAllocQtyDet )
{
sql = " update inv_alloc_det set DEALLOCATED = 'Y' where "
+ " tran_id in (select tran_id from inv_allocate where work_order = ? )"
+ " and item_code = ? and lot_sl= ? and lot_no = ? and site_code= ? and loc_code = ? "
+ " and exp_lev = ? and line_no = ? ";
pstmt1 = conn.prepareStatement(sql);
pstmt1.setString(1,worder);
pstmt1.setString(2,itemCodeInv);
pstmt1.setString(3,lotSlInv);
pstmt1.setString(4,lotNoInv);
pstmt1.setString(5,siteCode);
pstmt1.setString(6,locCode);
pstmt1.setString(7,expLev);
pstmt1.setString(8,lineNoInvAllocDet);
int cnt2=pstmt1.executeUpdate();
System.out.println("Count2 after PSTM is:- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%["+cnt2+"]");
pstmt1.close();pstmt1=null;
}
//added cpatil on 16/05/16 for ... if alloc and dealloc qty is same then update deallocated flag as Y end..........
} }
rs2.close(); rs2.close();
rs2=null; rs2=null;
......
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