Commit 4f16b907 authored by cpatil's avatar cpatil

*** empty log message ***


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@91780 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 5eb31a4a
......@@ -62,9 +62,10 @@ public class InvHoldRelGen extends ProcessEJB implements InvHoldRelGenLocal, Inv
}
return rtrStr;
}//END OF GETDATA(1)
public String blanknull(String s)
{
if(s==null)
if( s==null )
return " ";
else
return s;
......@@ -115,9 +116,20 @@ public class InvHoldRelGen extends ProcessEJB implements InvHoldRelGenLocal, Inv
refIdTo = genericUtility.getColumnValue("ref_id__to",headerDom);
autoConfirmed = genericUtility.getColumnValue("auto_confirmed",headerDom);
SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getApplDateFormat());
schRelDateFrom= Timestamp.valueOf(genericUtility.getValidDateString(schRelDateFromstr, genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat()) + " 00:00:00.0");
schRelDateTo= Timestamp.valueOf(genericUtility.getValidDateString(schRelDateTostr, genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat()) + " 00:00:00.0");
//SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getApplDateFormat());
System.out.println("schRelDateFromstr : ["+schRelDateFromstr+"]:::schRelDateTostr:["+schRelDateTostr+"]");
if(schRelDateFromstr != null)
{
System.out.println("schRelDateFromstr : ["+schRelDateFromstr);
schRelDateFrom= Timestamp.valueOf(genericUtility.getValidDateString(schRelDateFromstr, genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat()) + " 00:00:00.0");
}
if(schRelDateTostr != null)
{
System.out.println(" :::schRelDateTostr:["+schRelDateTostr+"]");
schRelDateTo= Timestamp.valueOf(genericUtility.getValidDateString(schRelDateTostr, genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat()) + " 00:00:00.0");
}
System.out.println("schRelDateFrom : ["+schRelDateFrom+"]:::schRelDateTo:["+schRelDateTo+"]");
System.out.println("tranIdFrom=>"+tranIdFrom);
System.out.println("tranIdTo=>"+tranIdTo);
......@@ -189,7 +201,7 @@ public class InvHoldRelGen extends ProcessEJB implements InvHoldRelGenLocal, Inv
{
if(schRelDateFrom.after(schRelDateTo))
{
errString = itmDBAccessEJB.getErrorString("","SCDTFRINV","","",conn);
errString = itmDBAccessEJB.getErrorString("","SCDTTOINV","","",conn);
return errString;
}
}
......@@ -208,7 +220,7 @@ public class InvHoldRelGen extends ProcessEJB implements InvHoldRelGenLocal, Inv
{
if(schRelDateTo.before(schRelDateFrom))
{
errString = itmDBAccessEJB.getErrorString("","SCDTTOINV","","",conn);
errString = itmDBAccessEJB.getErrorString("","SCDATETOINV","","",conn);
return errString;
}
}
......@@ -217,7 +229,7 @@ public class InvHoldRelGen extends ProcessEJB implements InvHoldRelGenLocal, Inv
if ( refIdFrom == null )
{
refIdFrom="0";
//refIdFrom="0";
//System.out.println("ref id from is Null...");
//errString = itmDBAccessEJB.getErrorString("","VMRFIDFRNU","","",conn);
//return errString;
......@@ -247,7 +259,7 @@ public class InvHoldRelGen extends ProcessEJB implements InvHoldRelGenLocal, Inv
if ( refIdTo == null )
{
refIdTo="0";
//refIdTo="ZZ";
//System.out.println("ref id to is Null...");
//errString = itmDBAccessEJB.getErrorString("","VMRFIDTONU","","",conn);
//return errString;
......@@ -281,13 +293,17 @@ public class InvHoldRelGen extends ProcessEJB implements InvHoldRelGenLocal, Inv
return errString;
}
*/
System.out.println("refIdFrom["+refIdFrom+"]:::::::refIdTo["+refIdTo+"]");
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_id,ih.confirmed from inv_hold_det ihd,inv_hold ih where ( ihd.tran_id = ih.tran_id )" +
" and ( ihd.tran_id >= ? and ihd.tran_id <= ? ) and ( ihd.sch_rel_date between ? and ? )" +
" and (ih.ref_id >= ? and ih.ref_id <= ? ) ";
" and ( ihd.tran_id >= ? and ihd.tran_id <= ? ) and ( ihd.sch_rel_date between ? and ? )";
if(refIdFrom != null && refIdTo != null)
{
getDataSql = getDataSql + " and (ih.ref_id >= ? and ih.ref_id <= ? ) ";
}
System.out.println("Sql Fired :::::"+getDataSql.trim().length());
if (getDataSql.trim().length()>0)
{
......@@ -297,8 +313,12 @@ public class InvHoldRelGen extends ProcessEJB implements InvHoldRelGenLocal, Inv
pstmt.setString(2,tranIdTo);
pstmt.setTimestamp(3,schRelDateFrom);
pstmt.setTimestamp(4,schRelDateTo);
pstmt.setString(5,refIdFrom);
pstmt.setString(6,refIdTo);
if(refIdFrom != null && refIdTo != null)
{
pstmt.setString(5,refIdFrom);
pstmt.setString(6,refIdTo);
}
System.out.println("QUERY IS IN PROCESS..........");
rs1 = pstmt.executeQuery();
......@@ -464,7 +484,7 @@ public class InvHoldRelGen extends ProcessEJB implements InvHoldRelGenLocal, Inv
catch (Exception e)
{
System.out.println("Exception :InvHoldRelGenEJB :process(String xmlString, String xmlString2, String windowName, String xtraParams):" + e.getMessage() + ":");
System.out.println("Exception : InvHoldRelGenEJB :process(String xmlString, String xmlString2, String windowName, String xtraParams):" + e.getMessage() + ":");
retStr = e.getMessage();
e.printStackTrace();
throw new ITMException(e);
......
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