Commit 48d7975a authored by mjadhav's avatar mjadhav

add relese hold tran id in trace validation


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@96011 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 6cfe538d
......@@ -188,7 +188,7 @@ public String wfValData(String xmlString, String xmlString1,String xmlString2, S
public String wfValData(Document dom, Document dom1,Document dom2, String objContext, String editFlag, String xtraParams) throws RemoteException,ITMException
{
String errString="";
String tranIdFrom="",tranIdTo="",schRelDateFromstr="", schRelDateTostr="",refIdFrom="",refIdTo="",lockCodeFrom="",lockCodeTo="",lotNoFrom="",lotNoTo="";
String tranIdFrom="",tranIdTo="",schRelDateFromstr="", schRelDateTostr="",refIdFrom="",refIdTo="",lockCodeFrom="",lockCodeTo="",lotNoFrom="",lotNoTo="",sql="";
Timestamp schRelDateFrom=null,schRelDateTo=null;
String errCode = "";
String errorType = "";
......@@ -198,11 +198,11 @@ public String wfValData(Document dom, Document dom1,Document dom2, String objCon
String userId="";
ConnDriver connDriver = new ConnDriver();
Connection conn = null;
PreparedStatement pstmt = null,pstmt1=null ;
PreparedStatement pstmt = null,pstmt1=null,pstmt2=null ;
ResultSet rs = null,rs1=null;
String getDataSql="";
int i=7;
String unconfInvHolddet="",unconfInvReldet="";
String unconfInvHolddet="",unconfInvReldet="",releaseTranId="",releaseLineNo="";
String confirmed="";
ITMDBAccessEJB itmDBAccessEJB = new ITMDBAccessEJB();
String invHoldId="";
......@@ -416,28 +416,39 @@ public String wfValData(Document dom, Document dom1,Document dom2, String objCon
{
invHoldId=rs.getString("tran_id");
invHoldLine=rs.getString("line_no");
pstmt1=conn.prepareStatement("select count(1) from inv_hold_rel where tran_id in( select tran_id from inv_hold_rel_det where tran_id__hold=? and line_no__hold=?) and confirmed='N' ");
System.out.println("invHoldId ::"+invHoldId);
System.out.println("invHoldLine ::"+invHoldLine);
//pstmt1=conn.prepareStatement("select count(1) from inv_hold_rel where tran_id in( select tran_id from inv_hold_rel_det where tran_id__hold=? and line_no__hold=?) and confirmed='N' ");
sql="select ihr.tran_id,ihrd.line_no from inv_hold_rel ihr ,inv_hold_rel_det ihrd where " +
" ihr.tran_id=ihrd.tran_id and " +
" ihr.tran_id in( select tran_id from inv_hold_rel_det where tran_id__hold=? and line_no__hold=?)" +
" and ihr.confirmed='N'";
pstmt1=conn.prepareStatement(sql);
pstmt1.setString(1,invHoldId);
pstmt1.setString(2,invHoldLine);
rs1=pstmt1.executeQuery();
if(rs1.next())
{
if(rs1.getDouble(1)>0)
{
//unconfInvReldet+=rs.getString("lot_no")+",";
releaseTranId=rs1.getString(1);
releaseLineNo=rs1.getString(2);
System.out.println("releaseTranId ::"+releaseTranId);
System.out.println("releaseLineNo ::"+releaseLineNo);
//changed by mahendra dated 1-Aug-2014
unconfInvRelCnt++;
System.out.println("unconfInvRelCnt!!!!!!! "+unconfInvRelCnt);
if(unconfInvRelCnt <= 5)
{
unconfInvReldet+= "Tran Id :"+rs.getString("tran_id")+" Line No :"+rs.getString("line_no")+" Lot No:"+rs.getString("lot_no")+"\n ";
//unconfInvReldet+= "Tran Id :"+rs.getString("tran_id")+" Line No :"+rs.getString("line_no")+" Lot No:"+rs.getString("lot_no")+"\n ";
unconfInvReldet+= "Tran Id :"+releaseTranId +" Line No :"+releaseLineNo+" Lot No:"+rs.getString("lot_no")+"\n ";
}
if(unconfInvRelCnt == 6)
{
unconfInvReldet+= "more....";
}
}
}
rs1.close();
rs1=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