Commit 1308aa76 authored by caluka's avatar caluka

change get data sql as per manoharan sir instruction


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@96799 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 0198c1fe
......@@ -369,17 +369,28 @@ public class InvHoldRelGen extends ProcessEJB implements InvHoldRelGenLocal, Inv
System.out.println("lockType :"+lockType);
System.out.println("refIdFrom["+refIdFrom+"]:::::::refIdTo["+refIdTo+"]");
//ih.lock_code ,ihd.lot_no,ihd.lot_sl,ihd.remarks ADDED BY RITESH
getDataSql= " select ihd.tran_id,ihd.line_no,ihd.line_no_sl," +
" case when ihd.hold_status is null then 'H' else ihd.hold_status end as hold_status ," +
" ihd.item_code,ihd.loc_code,ihd.site_code,ihd.status_date,ihd.reas_code,ihd.sch_rel_date," +
" ih.ref_ser,ih.ref_id,ih.ref_no, ih.confirmed, ih.lock_code ,ihd.lot_no,ihd.lot_sl,ihd.remarks " +
// getDataSql= " select ihd.tran_id,ihd.line_no,ihd.line_no_sl," +
// " case when ihd.hold_status is null then 'H' else ihd.hold_status end as hold_status ," +
// " ihd.item_code,ihd.loc_code,ihd.site_code,ihd.status_date,ihd.reas_code,ihd.sch_rel_date," +
// " ih.ref_ser,ih.ref_id,ih.ref_no, ih.confirmed, ih.lock_code ,ihd.lot_no,ihd.lot_sl,ihd.remarks " +
// " from inv_hold_det ihd,inv_hold ih , inv_lock il where ( ihd.tran_id = ih.tran_id ) and (ih.lock_code=il.lock_code) " +
// " and ( ihd.tran_id >= ? and ihd.tran_id <= ? ) and ( ih.lock_code >= ? and ih.lock_code <= ? )" +
// " and ( ihd.sch_rel_date between ? and ? ) and ihd.hold_status <> 'R' "
// // +" and ( ihd.lot_no >= '"+lotNoFrom+"' and ihd.lot_no <= '"+lotNoTo+"' ) and ih.confirmed='Y' " //Added by Manoj dtd 15/04/2014 to retrieve data based on entered lot No range
// +" and (( ihd.lot_no >= '"+lotNoFrom+"' and ihd.lot_no <= '"+lotNoTo+"' ) OR ihd.lot_no IS NULL) and ih.confirmed='Y' " //change by chandrashekar on 30-10-2014
// + " and nvl((select count(1) from inv_hold_rel_det r where r.tran_id__hold = ihd.tran_id and r.line_no__hold = ihd.line_no ),0) = 0 "+subSql; // 14/04/14 manoharan this condition added
getDataSql= " select ihd.tran_id,ihd.line_no,ihd.line_no_sl, " +
"case when ihd.hold_status is null then 'H' else ihd.hold_status end as hold_status ," +
"ihd.item_code,ihd.loc_code,ihd.site_code,ihd.status_date,ihd.reas_code,ihd.sch_rel_date," +
" ih.ref_ser,ih.ref_id,ih.ref_no, ih.confirmed,ih.lock_code ,ihd.lot_no,ihd.lot_sl,ihd.remarks " +
" from inv_hold_det ihd,inv_hold ih , inv_lock il where ( ihd.tran_id = ih.tran_id ) and (ih.lock_code=il.lock_code) " +
" and ( ihd.tran_id >= ? and ihd.tran_id <= ? ) and ( ih.lock_code >= ? and ih.lock_code <= ? )" +
" and ( ihd.sch_rel_date between ? and ? ) and ihd.hold_status <> 'R' "
// +" and ( ihd.lot_no >= '"+lotNoFrom+"' and ihd.lot_no <= '"+lotNoTo+"' ) and ih.confirmed='Y' " //Added by Manoj dtd 15/04/2014 to retrieve data based on entered lot No range
+" and (( ihd.lot_no >= '"+lotNoFrom+"' and ihd.lot_no <= '"+lotNoTo+"' ) OR ihd.lot_no IS NULL) and ih.confirmed='Y' " //change by chandrashekar on 30-10-2014
+ " and nvl((select count(1) from inv_hold_rel_det r where r.tran_id__hold = ihd.tran_id and r.line_no__hold = ihd.line_no ),0) = 0 "+subSql; // 14/04/14 manoharan this condition added
" and ( ihd.tran_id >= ? and ihd.tran_id <= ? )and ( ih.lock_code >= ? and ih.lock_code <= ? )" +
" and ( ihd.sch_rel_date between ? and ? ) and ihd.hold_status <> 'R' "+
" and (select count(1) from inv_hold_rel_trace t " +
" where t.ref_no = ihd.tran_id and t.lot_no >= '"+lotNoFrom+"' and t.lot_no <= '"+lotNoTo+"' ) > 0 " // 12/11/14 manoharan filter lot from trace
+ " and ih.confirmed='Y' "
+ " and nvl((select count(1) from inv_hold_rel_det r where r.tran_id__hold = ihd.tran_id and r.line_no__hold = ihd.line_no ),0) = 0 "+subSql; // 14/04/14 manoharan
//and ( ihd.lock_code between ? and ? )
if(refIdFrom != 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