Commit e9259814 authored by msharma's avatar msharma

Remove Campaign no. condition and make common for all cases


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@98203 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 40f1c0d3
...@@ -548,9 +548,7 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr ...@@ -548,9 +548,7 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr
retTabSepStrBuff.append("<allocated_qty>").append("<![CDATA[" + df.format(allocatedQty) +"]]>").append("</allocated_qty>"); retTabSepStrBuff.append("<allocated_qty>").append("<![CDATA[" + df.format(allocatedQty) +"]]>").append("</allocated_qty>");
retTabSepStrBuff.append("<remarks>").append("<![CDATA[" + remarks +"]]>").append("</remarks>"); retTabSepStrBuff.append("<remarks>").append("<![CDATA[" + remarks +"]]>").append("</remarks>");
reasCode = disCommon .getDisparams("999999","DEFAULT_REAS_CODE",conn);
retTabSepStrBuff.append("<reas_code>").append("<![CDATA[" + checkNull(reasCode) +"]]>").append("</reas_code>"); retTabSepStrBuff.append("<reas_code>").append("<![CDATA[" + checkNull(reasCode) +"]]>").append("</reas_code>");
retTabSepStrBuff.append("<loc_code>").append("<![CDATA[" + rs.getString("loc_code") +"]]>").append("</loc_code>"); retTabSepStrBuff.append("<loc_code>").append("<![CDATA[" + rs.getString("loc_code") +"]]>").append("</loc_code>");
...@@ -1334,9 +1332,9 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr ...@@ -1334,9 +1332,9 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr
} }
xmlBuff.append("<REF_SER__FOR><![CDATA[" + "W-ORD" +"]]></REF_SER__FOR>"); xmlBuff.append("<REF_SER__FOR><![CDATA[" + "W-ORD" +"]]></REF_SER__FOR>");
// 02/07/15 Manoharan // 02/07/15 Manoharan
if (reasCode == null || "null".equals(reasCode) || reasCode.trim().length() == 0) if (reasCode == null || "null".equals(reasCode))
{ {
reasCode = disCommon .getDisparams("999999","DEFAULT_REAS_CODE",connOne); reasCode = "";
} }
// end 02/07/15 Manoharan // end 02/07/15 Manoharan
xmlBuff.append("<reas_code><![CDATA[" + reasCode+" ]]></reas_code>"); xmlBuff.append("<reas_code><![CDATA[" + reasCode+" ]]></reas_code>");
...@@ -1401,7 +1399,7 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr ...@@ -1401,7 +1399,7 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr
" and loc_code in(select loc_code from location where inv_stat = ? ) and site_code = ? and item_code= ? ";*/ " and loc_code in(select loc_code from location where inv_stat = ? ) and site_code = ? and item_code= ? ";*/
//sql changed by sagar on 28/04/15. //sql changed by sagar on 28/04/15.
sql = "select tran_id,line_no,item_code,lot_no,lot_sl,loc_code, quantity "+ sql = "select tran_id,line_no,item_code,lot_no,lot_sl,loc_code, quantity,exp_lev "+
" from inv_alloc_det where tran_id IN (SELECT TRAN_ID FROM INV_ALLOCATE "+ " from inv_alloc_det where tran_id IN (SELECT TRAN_ID FROM INV_ALLOCATE "+
" WHERE WORK_ORDER IN (SELECT WORK_ORDER FROM WORKORDER WHERE CAMPGN_NO = ? AND STATUS = 'R')) "+ " WHERE WORK_ORDER IN (SELECT WORK_ORDER FROM WORKORDER WHERE CAMPGN_NO = ? AND STATUS = 'R')) "+
" and loc_code in(select loc_code from location where inv_stat = ? ) and site_code = ? and item_code= ? " " and loc_code in(select loc_code from location where inv_stat = ? ) and site_code = ? and item_code= ? "
...@@ -1431,6 +1429,8 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr ...@@ -1431,6 +1429,8 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr
hashMap.put("chg_win","W_STOCK_TRANSFER_MULTI"); hashMap.put("chg_win","W_STOCK_TRANSFER_MULTI");
hashMap.put("chg_user", GenericUtility.getInstance().getValueFromXTRA_PARAMS(xtraParams, "loginCode")); hashMap.put("chg_user", GenericUtility.getInstance().getValueFromXTRA_PARAMS(xtraParams, "loginCode"));
hashMap.put("chg_term", GenericUtility.getInstance().getValueFromXTRA_PARAMS(xtraParams, "termId")); hashMap.put("chg_term", GenericUtility.getInstance().getValueFromXTRA_PARAMS(xtraParams, "termId"));
hashMap.put("loc_code__fr",rs.getString("loc_code"));
hashMap.put("exp_lev",rs.getString("exp_lev"));
System.out.println("Calling DistStkUpdEJB....."+ddlg); System.out.println("Calling DistStkUpdEJB....."+ddlg);
if (distStkUpd.updAllocTrace(hashMap, connOne) > 0) if (distStkUpd.updAllocTrace(hashMap, connOne) > 0)
{ {
...@@ -1465,6 +1465,8 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr ...@@ -1465,6 +1465,8 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr
hashMap.put("chg_win","W_STOCK_TRANSFER_MULTI"); hashMap.put("chg_win","W_STOCK_TRANSFER_MULTI");
hashMap.put("chg_user", GenericUtility.getInstance().getValueFromXTRA_PARAMS(xtraParams, "loginCode")); hashMap.put("chg_user", GenericUtility.getInstance().getValueFromXTRA_PARAMS(xtraParams, "loginCode"));
hashMap.put("chg_term", GenericUtility.getInstance().getValueFromXTRA_PARAMS(xtraParams, "termId")); hashMap.put("chg_term", GenericUtility.getInstance().getValueFromXTRA_PARAMS(xtraParams, "termId"));
hashMap.put("loc_code__fr",locCodeFr);
hashMap.put("exp_lev",explev);
//Calling DistStkUpdEJB //Calling DistStkUpdEJB
System.out.println("Calling DistStkUpdEJB....."); System.out.println("Calling DistStkUpdEJB.....");
...@@ -1527,267 +1529,200 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr ...@@ -1527,267 +1529,200 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr
} }
} }
// code for by cpatil for supreme on 16/04/15 for multiple issue start // code for by cpatil for supreme on 16/04/15 for multiple issue start
// Changed by Manoj dtd 06/07/2015 Remove Campaign no. condition and make common for all cases
System.out.println("Remove Campaign no. condition and make common for all cases");
System.out.println("@@@cpatil::campNo["+campNo+"]tranId["+tranId+"]lineno["+lineno+"]siteCode["+siteCode+"]itemCode["+itemCode+"]lotno["+lotno+"]lotsl["+lotsl+"]allocQty["+allocQty+"]reasCode["+reasCode+"]locCodeFr["+locCodeFr+"]explev["+explev+"]locCodeTo["+locCodeTo+"]worder["+worder+"]tranIdInvAlloc["+tranIdInvAlloc+"]actualPropQty["+actualPropQty+"]actualQty["+actualQty+"]batchQuantity["+batchQuantity+"]"); System.out.println("@@@cpatil::campNo["+campNo+"]tranId["+tranId+"]lineno["+lineno+"]siteCode["+siteCode+"]itemCode["+itemCode+"]lotno["+lotno+"]lotsl["+lotsl+"]allocQty["+allocQty+"]reasCode["+reasCode+"]locCodeFr["+locCodeFr+"]explev["+explev+"]locCodeTo["+locCodeTo+"]worder["+worder+"]tranIdInvAlloc["+tranIdInvAlloc+"]actualPropQty["+actualPropQty+"]actualQty["+actualQty+"]batchQuantity["+batchQuantity+"]");
for(int i=0;i<hashMapList.size();i++)
boolean campFlag= false;
if(campNo != null && campNo.trim().length() > 0)
{
System.out.println("Campain no found:-["+campNo+"] Directily moving to [locationTo]");
campFlag = true;
sql = " update inv_alloc_det set loc_code = ? where tran_id in ("
+ " SELECT TRAN_ID FROM INV_ALLOCATE WHERE WORK_ORDER IN ("
+ "SELECT WORK_ORDER FROM WORKORDER WHERE CAMPGN_NO = ? ))"
+ " and item_code = ? and lot_no = ? and lot_sl = ? and loc_code = ? and site_code = ? ";
pstmt = connOne.prepareStatement(sql);
pstmt.setString(1,locCodeTo);
pstmt.setString(2,campNo);
pstmt.setString(3,itemCode);
pstmt.setString(4,lotno);
pstmt.setString(5,lotsl);
pstmt.setString(6,locCodeFr);
pstmt.setString(7,siteCode);
pstmt.executeUpdate();
if(pstmt != null)
pstmt.close();
pstmt = null;
}
else if(campFlag == false)
{
int count = 0,recIn=0 ;
sql = " select count(*) from inv_alloc_det where tran_id = ? and item_code = ? and lot_no = ? "
+ "and lot_sl = ? and loc_code = ? and site_code = ? ";
pstmt = connOne.prepareStatement(sql);
pstmt.setString(1,tranId);
pstmt.setString(2,itemCode);
pstmt.setString(3,lotno);
pstmt.setString(4,lotsl);
pstmt.setString(5,locCodeTo);
pstmt.setString(6,siteCode);
rs = pstmt.executeQuery();
if ( rs.next() )
{
count = rs.getInt(1);
}
if(rs != null)
rs.close();
rs = null;
if(pstmt != null)
pstmt.close();
pstmt = null;
String deAllocated="N";
if( batchQuantity == totWoQty)
{
deAllocated="Y";
}
if(count == 0)
{ {
hashMap=(HashMap) hashMapList.get(i);
if( batchQuantity == totWoQty) tranId=(String) hashMap.get("ref_id");
{ siteCode=(String) hashMap.get("site_code");
sql = " update inv_alloc_det set loc_code = ? where tran_id = ? and item_code = ? and lot_no = ? and lot_sl = ? and loc_code = ? and site_code = ? "; itemCode=(String) hashMap.get("item_code");
pstmt = connOne.prepareStatement(sql); lotno=(String) hashMap.get("lot_no");
pstmt.setString(1,locCodeTo); lotsl=(String) hashMap.get("lot_sl");
pstmt.setString(2,tranId); locCodeFr=(String) hashMap.get("loc_code__fr");
pstmt.setString(3,itemCode); explev=(String) hashMap.get("exp_lev");
pstmt.setString(4,lotno); int count = 0,recIn=0 ;
pstmt.setString(5,lotsl); sql = " select count(*) from inv_alloc_det where tran_id = ? and item_code = ? and lot_no = ? "
pstmt.setString(6,locCodeFr); + "and lot_sl = ? and loc_code = ? and site_code = ? and exp_lev=? ";
pstmt.setString(7,siteCode);
pstmt.executeUpdate();
if(pstmt != null)
pstmt.close();
pstmt = null;
}else
{
int maxlineNo = 0;
sql = " select max(line_no) as max_line_no from inv_alloc_det where tran_id = ? ";
pstmt = connOne.prepareStatement(sql); pstmt = connOne.prepareStatement(sql);
pstmt.setString(1,tranId); pstmt.setString(1,tranId);
pstmt.setString(2,itemCode);
pstmt.setString(3,lotno);
pstmt.setString(4,lotsl);
pstmt.setString(5,locCodeTo);
pstmt.setString(6,siteCode);
pstmt.setString(7,explev);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if ( rs.next() ) if ( rs.next() )
{ {
maxlineNo = rs.getInt(1); count = rs.getInt(1);
} }
System.out.println("maxlineNo::"+maxlineNo);
if(rs != null) if(rs != null)
rs.close(); rs.close();
rs = null; rs = null;
if(pstmt != null) if(pstmt != null)
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
String deAllocated="N";
sql="update inv_alloc_det set quantity=quantity-?,alloc_qty=alloc_qty-?,DEALLOC_QTY=DEALLOC_QTY+? " if( (batchQuantity == totWoQty) || campflag1)
+ "where tran_id=? and site_code=? and item_code=? and lot_no=? and lot_sl=? and loc_code=?" {
+ " AND EXP_LEV=?"; // VALLABH KADAM add [EXP_LEV] 21/MAY/15 deAllocated="Y";
pstmt = connOne.prepareStatement(sql); }
pstmt.setDouble(1,actualPropQty); if(count == 0)
pstmt.setDouble(2,actualPropQty); {
pstmt.setDouble(3,actualPropQty);
pstmt.setString(4,tranId); if( (batchQuantity == totWoQty) || campflag1)
pstmt.setString(5,siteCode); {
pstmt.setString(6,itemCode); sql = " update inv_alloc_det set loc_code = ? where tran_id = ? and item_code = ? and lot_no = ? and lot_sl = ? and loc_code = ? and site_code = ? and exp_lev=?";
pstmt.setString(7,lotno); pstmt = connOne.prepareStatement(sql);
pstmt.setString(8,lotsl); pstmt.setString(1,locCodeTo);
pstmt.setString(9,locCodeFr); pstmt.setString(2,tranId);
pstmt.setString(10,explev);// VALLABH KADAM add [EXP_LEV] 21/MAY/15 pstmt.setString(3,itemCode);
pstmt.executeUpdate(); pstmt.setString(4,lotno);
if(pstmt != null) pstmt.setString(5,lotsl);
pstmt.close(); pstmt.setString(6,locCodeFr);
pstmt = null; pstmt.setString(7,siteCode);
pstmt.setString(8,explev);
sql = " Insert into inv_alloc_det(TRAN_ID,LINE_NO,SITE_CODE,ITEM_CODE,LOT_NO,LOT_SL,QUANTITY,REMARKS,REAS_CODE," pstmt.executeUpdate();
+ "LOC_CODE,EXP_LEV,ALLOC_QTY)" + if(pstmt != null)
" values (?,?,?,?,?,?,?,?,?,?,?,?)"; pstmt.close();
pstmt = connOne.prepareStatement(sql); pstmt = null;
pstmt.setString(1,tranId); }else
pstmt.setInt(2,maxlineNo+1); {
pstmt.setString(3,siteCode);
pstmt.setString(4,itemCode); int maxlineNo = 0;
pstmt.setString(5,lotno); sql = " select max(line_no) as max_line_no from inv_alloc_det where tran_id = ? ";
pstmt.setString(6,lotsl); pstmt = connOne.prepareStatement(sql);
pstmt.setDouble(7,actualPropQty); pstmt.setString(1,tranId);
pstmt.setString(8,remarks); rs = pstmt.executeQuery();
pstmt.setString(9,reasCode); if ( rs.next() )
pstmt.setString(10,locCodeTo); {
pstmt.setString(11,explev); maxlineNo = rs.getInt(1);
pstmt.setDouble(12,actualPropQty); }
pstmt.executeUpdate(); System.out.println("maxlineNo::"+maxlineNo);
if(pstmt != null) if(rs != null)
pstmt.close(); rs.close();
pstmt = null; rs = null;
/*sql = " update inv_alloc_det set quantity = ? where tran_id = ? and item_code = ? and lot_no = ? and lot_sl = ? and loc_code = ? and site_code = ? "; if(pstmt != null)
System.out.println(" SQL::update"+sql); pstmt.close();
pstmt = connOne.prepareStatement(sql); pstmt = null;
pstmt.setDouble(1,(actualQty - actualPropQty));
pstmt.setString(2,tranId); sql="update inv_alloc_det set quantity=quantity-?,alloc_qty=alloc_qty-?,DEALLOC_QTY=DEALLOC_QTY+? "
pstmt.setString(3,itemCode); + "where tran_id=? and site_code=? and item_code=? and lot_no=? and lot_sl=? and loc_code=?"
pstmt.setString(4,lotno); + " AND EXP_LEV=?"; // VALLABH KADAM add [EXP_LEV] 21/MAY/15
pstmt.setString(5,lotsl); pstmt = connOne.prepareStatement(sql);
pstmt.setString(6,locCodeFr); pstmt.setDouble(1,actualPropQty);
pstmt.setString(7,siteCode); pstmt.setDouble(2,actualPropQty);
pstmt.executeUpdate(); pstmt.setDouble(3,actualPropQty);
if(pstmt != null) pstmt.setString(4,tranId);
pstmt.close(); pstmt.setString(5,siteCode);
pstmt = null;*/ pstmt.setString(6,itemCode);
} pstmt.setString(7,lotno);
} pstmt.setString(8,lotsl);
else pstmt.setString(9,locCodeFr);
{ pstmt.setString(10,explev);// VALLABH KADAM add [EXP_LEV] 21/MAY/15
// comment and modify below by cpatil on 16/04/15 pstmt.executeUpdate();
/*sql = " update inv_alloc_det set quantity = ? where tran_id = ? and item_code = ? and lot_no = ? and lot_sl = ? and loc_code = ? and site_code = ? "; if(pstmt != null)
System.out.println(" SQL::update"+sql); pstmt.close();
pstmt = connOne.prepareStatement(sql); pstmt = null;
pstmt.setDouble(1,(actualQty - actualPropQty));
pstmt.setString(2,tranId); sql = " Insert into inv_alloc_det(TRAN_ID,LINE_NO,SITE_CODE,ITEM_CODE,LOT_NO,LOT_SL,QUANTITY,REMARKS,REAS_CODE,"
pstmt.setString(3,itemCode); + "LOC_CODE,EXP_LEV,ALLOC_QTY)" +
pstmt.setString(4,lotno); " values (?,?,?,?,?,?,?,?,?,?,?,?)";
pstmt.setString(5,lotsl); pstmt = connOne.prepareStatement(sql);
pstmt.setString(6,locCodeFr); pstmt.setString(1,tranId);
pstmt.setString(7,siteCode); pstmt.setInt(2,maxlineNo+1);
pstmt.executeUpdate(); pstmt.setString(3,siteCode);
if(pstmt != null) pstmt.setString(4,itemCode);
pstmt.close(); pstmt.setString(5,lotno);
pstmt = null;*/ pstmt.setString(6,lotsl);
pstmt.setDouble(7,actualPropQty);
sql = " update inv_alloc_det set quantity = quantity-? ,alloc_qty=alloc_qty-? , " + pstmt.setString(8,remarks);
" DEALLOC_QTY = DEALLOC_QTY+? , DEALLOCATED = '"+deAllocated+"' " + pstmt.setString(9,reasCode);
" where tran_id = ? and item_code = ? and lot_no = ? and lot_sl = ? and loc_code = ? and site_code = ? " pstmt.setString(10,locCodeTo);
+ "AND EXP_LEV=?";//VALLABH KADAM add [EXP_LEV] 21/MAY/15 pstmt.setString(11,explev);
System.out.println(" SQL::update"+sql); pstmt.setDouble(12,actualPropQty);
pstmt = connOne.prepareStatement(sql); pstmt.executeUpdate();
pstmt.setDouble(1,actualPropQty); if(pstmt != null)
pstmt.setDouble(2,actualPropQty); pstmt.close();
pstmt.setDouble(3,actualPropQty); pstmt = null;
pstmt.setString(4,tranId); /*sql = " update inv_alloc_det set quantity = ? where tran_id = ? and item_code = ? and lot_no = ? and lot_sl = ? and loc_code = ? and site_code = ? ";
pstmt.setString(5,itemCode); System.out.println(" SQL::update"+sql);
pstmt.setString(6,lotno); pstmt = connOne.prepareStatement(sql);
pstmt.setString(7,lotsl); pstmt.setDouble(1,(actualQty - actualPropQty));
pstmt.setString(8,locCodeFr); pstmt.setString(2,tranId);
pstmt.setString(9,siteCode); pstmt.setString(3,itemCode);
pstmt.setString(10,explev);// VALLABH KADAM add [EXP_LEV] 21/MAY/15 pstmt.setString(4,lotno);
pstmt.executeUpdate(); pstmt.setString(5,lotsl);
if(pstmt != null) pstmt.setString(6,locCodeFr);
pstmt.close(); pstmt.setString(7,siteCode);
pstmt = null; pstmt.executeUpdate();
if(pstmt != null)
sql = " update inv_alloc_det set quantity = quantity+? , alloc_qty = alloc_qty+? " + pstmt.close();
" where tran_id = ? and item_code = ? and lot_no = ? and lot_sl = ? and loc_code = ? and site_code = ? " pstmt = null;*/
+ "AND EXP_LEV=?";//VALLABH KADAM add [EXP_LEV] 21/MAY/15 }
}
else
{
// comment and modify below by cpatil on 16/04/15
/*sql = " update inv_alloc_det set quantity = ? where tran_id = ? and item_code = ? and lot_no = ? and lot_sl = ? and loc_code = ? and site_code = ? ";
System.out.println(" SQL::update"+sql);
pstmt = connOne.prepareStatement(sql); pstmt = connOne.prepareStatement(sql);
pstmt.setDouble(1,(actualPropQty)); pstmt.setDouble(1,(actualQty - actualPropQty));
pstmt.setDouble(2,(actualPropQty)); pstmt.setString(2,tranId);
pstmt.setString(3,tranId); pstmt.setString(3,itemCode);
pstmt.setString(4,itemCode); pstmt.setString(4,lotno);
pstmt.setString(5,lotno); pstmt.setString(5,lotsl);
pstmt.setString(6,lotsl); pstmt.setString(6,locCodeFr);
pstmt.setString(7,locCodeTo); pstmt.setString(7,siteCode);
pstmt.setString(8,siteCode);
pstmt.setString(9,explev);// VALLABH KADAM add [EXP_LEV] 21/MAY/15
pstmt.executeUpdate(); pstmt.executeUpdate();
if(pstmt != null) if(pstmt != null)
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;*/
/*double lcToqty=0.0;
sql = " select quantity from inv_alloc_det where tran_id = ? and item_code = ? and lot_no = ? and lot_sl = ? and loc_code = ? and site_code = ? "; sql = " update inv_alloc_det set quantity = quantity-? ,alloc_qty=alloc_qty-? , " +
pstmt = connOne.prepareStatement(sql); " DEALLOC_QTY = DEALLOC_QTY+? , DEALLOCATED = '"+deAllocated+"' " +
pstmt.setString(1,tranId); " where tran_id = ? and item_code = ? and lot_no = ? and lot_sl = ? and loc_code = ? and site_code = ? "
pstmt.setString(2,itemCode); + "AND EXP_LEV=?";//VALLABH KADAM add [EXP_LEV] 21/MAY/15
pstmt.setString(3,lotno); System.out.println(" SQL::update"+sql);
pstmt.setString(4,lotsl); pstmt = connOne.prepareStatement(sql);
pstmt.setString(5,locCodeTo); pstmt.setDouble(1,actualPropQty);
pstmt.setString(6,siteCode); pstmt.setDouble(2,actualPropQty);
rs = pstmt.executeQuery(); pstmt.setDouble(3,actualPropQty);
if ( rs.next() ) pstmt.setString(4,tranId);
{ pstmt.setString(5,itemCode);
lcToqty = rs.getDouble(1); pstmt.setString(6,lotno);
} pstmt.setString(7,lotsl);
if(rs != null) pstmt.setString(8,locCodeFr);
rs.close(); pstmt.setString(9,siteCode);
rs = null; pstmt.setString(10,explev);// VALLABH KADAM add [EXP_LEV] 21/MAY/15
if(pstmt != null) pstmt.executeUpdate();
pstmt.close(); if(pstmt != null)
pstmt = null;*/ pstmt.close();
pstmt = null;
// comment and modify below by cpatil on 16/04/15
/*sql = "update inv_alloc_det set quantity = ? ,ISSUE_QTY = ? where tran_id = ? and item_code = ? and lot_no = ? and lot_sl = ? and loc_code = ? and site_code = ? "; sql = " update inv_alloc_det set quantity = quantity+? , alloc_qty = alloc_qty+? " +
" where tran_id = ? and item_code = ? and lot_no = ? and lot_sl = ? and loc_code = ? and site_code = ? "
pstmt = connOne.prepareStatement(sql); + "AND EXP_LEV=?";//VALLABH KADAM add [EXP_LEV] 21/MAY/15
pstmt.setDouble(1,(lcToqty + actualPropQty)); pstmt = connOne.prepareStatement(sql);
pstmt.setDouble(2,(lcToqty + actualPropQty)); pstmt.setDouble(1,(actualPropQty));
pstmt.setString(3,tranId); pstmt.setDouble(2,(actualPropQty));
pstmt.setString(4,itemCode); pstmt.setString(3,tranId);
pstmt.setString(5,lotno); pstmt.setString(4,itemCode);
pstmt.setString(6,lotsl); pstmt.setString(5,lotno);
pstmt.setString(7,locCodeTo); pstmt.setString(6,lotsl);
pstmt.setString(8,siteCode); pstmt.setString(7,locCodeTo);
pstmt.executeUpdate(); pstmt.setString(8,siteCode);
if(pstmt != null) pstmt.setString(9,explev);// VALLABH KADAM add [EXP_LEV] 21/MAY/15
pstmt.close(); pstmt.executeUpdate();
pstmt = null;*/ if(pstmt != null)
pstmt.close();
/*Commented by manoj dtd 20/05/2015 pstmt = null;
sql = " update inv_alloc_det set quantity = ? , alloc_qty = ? " +
" where tran_id = ? and item_code = ? and lot_no = ? and lot_sl = ? and loc_code = ? and site_code = ? ";
pstmt = connOne.prepareStatement(sql);
pstmt.setDouble(1,(lcToqty + actualPropQty));
pstmt.setDouble(2,(lcToqty + actualPropQty));
pstmt.setString(3,tranId);
pstmt.setString(4,itemCode);
pstmt.setString(5,lotno);
pstmt.setString(6,lotsl);
pstmt.setString(7,locCodeTo);
pstmt.setString(8,siteCode);
pstmt.executeUpdate();
if(pstmt != null)
pstmt.close();
pstmt = null;*/
} }
} }
// code for by cpatil for supreme on 16/04/15 for multiple issue end // code for by cpatil for supreme on 16/04/15 for multiple issue end
......
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