Commit fc844c30 authored by cpatil's avatar cpatil

merge code given by manoj sir...modified in supreme urse


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@98459 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 3c05ebe2
...@@ -651,9 +651,9 @@ public class WoIssPartialPrc extends ProcessEJB implements WoIssPartialPrcLocal, ...@@ -651,9 +651,9 @@ public class WoIssPartialPrc extends ProcessEJB implements WoIssPartialPrcLocal,
propReqQty = Double.parseDouble(df.format(propReqQty)); propReqQty = Double.parseDouble(df.format(propReqQty));
System.out.println("@@@@@@1 propReqQty for the item--->["+propReqQty+"]"); System.out.println("@@@@@@1 propReqQty for the item--->["+propReqQty+"]");
//Uncommented by Manoj dtd 12/08/2015 to use issue qty from workorder_issdet
//issueQtyDiff = quantityInv - issuedQty ; //comment this condition on 09/03/15 issueQtyDiff = quantityInv - issuedQty ; //comment this condition on 09/03/15
issueQtyDiff = quantityInv - issueQtyInv ; //issueQtyDiff = quantityInv - issueQtyInv ;//Commented by Manoj dtd 12/08/2015 to use issue qty from workorder_issdet
issueQtyDiff = Double.parseDouble(df.format(issueQtyDiff)); issueQtyDiff = Double.parseDouble(df.format(issueQtyDiff));
...@@ -686,7 +686,9 @@ public class WoIssPartialPrc extends ProcessEJB implements WoIssPartialPrcLocal, ...@@ -686,7 +686,9 @@ public class WoIssPartialPrc extends ProcessEJB implements WoIssPartialPrcLocal,
// end by cpatil on 01/06/15 for iss_varience // end by cpatil on 01/06/15 for iss_varience
if( propReqQty > issueQtyDiff ) if( propReqQty > issueQtyDiff )
{ {
propReqQty = propReqQty - ( propReqQty - issueQtyDiff ) ; //propReqQty = propReqQty - ( propReqQty - issueQtyDiff ) ; Commented by manoj dtd 12/08/2015
propReqQty =issueQtyDiff;
} }
System.out.println("@@@@@@@@@@@ propReqQty["+propReqQty+"]issueQtyDiff["+issueQtyDiff+"]"); System.out.println("@@@@@@@@@@@ propReqQty["+propReqQty+"]issueQtyDiff["+issueQtyDiff+"]");
......
...@@ -343,46 +343,6 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr ...@@ -343,46 +343,6 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr
// pstmt1 = null; // pstmt1 = null;
// } // }
if(worder != null && worder.trim().length() > 0)
{
sql = "select SUM(quantity) from stock_transfer_det where tran_id in (select tran_id from stock_transfer " +
" where ref_id__for = ?) and item_code = ? and lot_no__fr = ? ";
pstmt1 = conn.prepareStatement(sql);
pstmt1.setString(1, worder);
pstmt1.setString(2, rs.getString("item_code"));
pstmt1.setString(3, rs.getString("lot_no"));
rs1 = pstmt1.executeQuery();
if ( rs1.next() )
{
allocatedQty = rs1.getDouble(1);
}
if(rs1 != null)
rs1.close();
rs1 = null;
if(pstmt1 != null)
pstmt1.close();
pstmt1 = null;
}
if(campNo != null && campNo.trim().length() > 0)
{
sql = "select SUM(quantity) from stock_transfer_det where tran_id in (select tran_id from stock_transfer " +
" where ref_id__for in ( select work_order from workorder where CAMPGN_NO = ?)) and item_code = ? and lot_no__fr = ? ";
pstmt1 = conn.prepareStatement(sql);
pstmt1.setString(1, campNo);
pstmt1.setString(2, rs.getString("item_code"));
pstmt1.setString(3, rs.getString("lot_no"));
rs1 = pstmt1.executeQuery();
if ( rs1.next() )
{
allocatedQty = rs1.getDouble(1);
}
if(rs1 != null)
rs1.close();
rs1 = null;
if(pstmt1 != null)
pstmt1.close();
pstmt1 = null;
}
if(worder != null && worder.trim().length() > 0) if(worder != null && worder.trim().length() > 0)
{ {
sql = " select site_code,remarks,reas_code,potency_adj,line_no,exp_lev " + sql = " select site_code,remarks,reas_code,potency_adj,line_no,exp_lev " +
...@@ -444,7 +404,54 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr ...@@ -444,7 +404,54 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr
pstmt1.close(); pstmt1.close();
pstmt1 = null; pstmt1 = null;
} }
if(worder != null && worder.trim().length() > 0)
{
sql = "select SUM(quantity) from stock_transfer_det where tran_id in (select tran_id from stock_transfer " +
" where ref_id__for = ? and site_code=? ) and item_code = ? and lot_no__fr = ? ";
pstmt1 = conn.prepareStatement(sql);
pstmt1.setString(1, worder);
pstmt1.setString(2, siteCode);
pstmt1.setString(3, rs.getString("item_code"));
pstmt1.setString(4, rs.getString("lot_no"));
rs1 = pstmt1.executeQuery();
if ( rs1.next() )
{
allocatedQty = rs1.getDouble(1);
}
if(rs1 != null)
rs1.close();
rs1 = null;
if(pstmt1 != null)
pstmt1.close();
pstmt1 = null;
}
if(campNo != null && campNo.trim().length() > 0)
{
//sql = "select SUM(quantity) from stock_transfer_det where tran_id in (select tran_id from stock_transfer " +
// " where ref_id__for in ( select work_order from workorder where CAMPGN_NO = ?)) and item_code = ? and lot_no__fr = ? ";//Commented by manoj dtd 12/08/2015
// " where ref_id__for = ?) and item_code = ? and lot_no__fr = ? ";
sql = "select SUM(b.quantity) from stock_transfer a,stock_transfer_det b where "+
" a.tran_id=b.tran_id and a.site_code=? and a.ref_id__for=? and b.item_code=? and b.lot_no__fr=?";
pstmt1 = conn.prepareStatement(sql);
pstmt1.setString(1, siteCode);
pstmt1.setString(2, campNo);
pstmt1.setString(3, rs.getString("item_code"));
pstmt1.setString(4, rs.getString("lot_no"));
rs1 = pstmt1.executeQuery();
if ( rs1.next() )
{
allocatedQty = rs1.getDouble(1);
}
if(rs1 != null)
rs1.close();
rs1 = null;
if(pstmt1 != null)
pstmt1.close();
pstmt1 = null;
}
if(quantity > 0) if(quantity > 0)
{ {
...@@ -1329,7 +1336,7 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr ...@@ -1329,7 +1336,7 @@ public class WoTransferPrc extends ProcessEJB implements WoTransferPrcLocal,WoTr
xmlBuff.append("<emp_code__aprv><![CDATA["+ empCode +"]]></emp_code__aprv>"); xmlBuff.append("<emp_code__aprv><![CDATA["+ empCode +"]]></emp_code__aprv>");
if(worder == null || worder.trim().length() == 0) if(worder == null || worder.trim().length() == 0)
{ {
xmlBuff.append("<ref_id__for><![CDATA[]]></ref_id__for>"); xmlBuff.append("<ref_id__for><![CDATA["+campNo+"]]></ref_id__for>");
}else }else
{ {
xmlBuff.append("<ref_id__for><![CDATA["+worder+"]]></ref_id__for>"); xmlBuff.append("<ref_id__for><![CDATA["+worder+"]]></ref_id__for>");
......
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