Commit 1ef60a6b authored by vvengurlekar's avatar vvengurlekar

DistOrderRcpConf.java - made changes to check error type


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@183311 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 4ac23c71
...@@ -233,7 +233,7 @@ public class DistOrderRcpConf extends ActionHandlerEJB implements DistOrderRcpCo ...@@ -233,7 +233,7 @@ public class DistOrderRcpConf extends ActionHandlerEJB implements DistOrderRcpCo
String locCodeIss1 = ""; String locCodeIss1 = "";
String lotNoIss =""; String lotNoIss ="";
String lotSlIss =""; String lotSlIss ="";
String msgType= "";
int llCnt=0; int llCnt=0;
String confirmed="",confPasswd="",lsPwdVerified="",sql1="",lsLedgPostConf="",loginEmpCode="",saleOrder="",lineNoSord="",itemCodeOrd="",expLev=""; String confirmed="",confPasswd="",lsPwdVerified="",sql1="",lsLedgPostConf="",loginEmpCode="",saleOrder="",lineNoSord="",itemCodeOrd="",expLev="";
double ldQty=0.00,ldBalQty=0.00,qtytoballocated=0.00,qtyAlloc=0.00,lcAllocatedqty=0.00; double ldQty=0.00,ldBalQty=0.00,qtytoballocated=0.00,qtyAlloc=0.00,lcAllocatedqty=0.00;
...@@ -394,10 +394,19 @@ public class DistOrderRcpConf extends ActionHandlerEJB implements DistOrderRcpCo ...@@ -394,10 +394,19 @@ public class DistOrderRcpConf extends ActionHandlerEJB implements DistOrderRcpCo
pstmt.close();pstmt=null; pstmt.close();pstmt=null;
System.out.println("@V@ llCnt 374:- ["+llCnt+"]"); System.out.println("@V@ llCnt 374:- ["+llCnt+"]");
if(!"Y".equalsIgnoreCase(qcReqd) && llCnt>0) if(!"Y".equalsIgnoreCase(qcReqd) && llCnt>0)
{
//Commented by Varsha V and added below code for checking msgType
//errString = itmDBAccessEJB.getErrorString("","VTQCREQD","BASE","",conn);
// errString;
msgType = checkNull(errorType(conn,"VTQCREQD"));
if(msgType.trim().length()==0 || msgType.trim().equalsIgnoreCase("E"))
{ {
errString = itmDBAccessEJB.getErrorString("","VTQCREQD","BASE","",conn); errString = itmDBAccessEJB.getErrorString("","VTQCREQD","BASE","",conn);
return errString; return errString;
} }
//Ended by Varsha V and added below code for checking msgType
}
sql="select (case when ledg_post_conf is null then 'N' else ledg_post_conf end) as lsLedgPostConf from transetup where tran_window = 'w_dist_receipt'"; sql="select (case when ledg_post_conf is null then 'N' else ledg_post_conf end) as lsLedgPostConf from transetup where tran_window = 'w_dist_receipt'";
pstmt=conn.prepareStatement(sql); pstmt=conn.prepareStatement(sql);
...@@ -3714,6 +3723,69 @@ private String getCurrdateAppFormat() ...@@ -3714,6 +3723,69 @@ private String getCurrdateAppFormat()
System.out.println("Exception::" + e.getMessage()); System.out.println("Exception::" + e.getMessage());
} }
} }
//Added by varsha v to get error type
private String errorType(Connection conn, String errorCode) throws ITMException
{
String msgType = "";
PreparedStatement pstmt = null;
ResultSet rs = null;
try
{
String sql = "SELECT MSG_TYPE FROM MESSAGES WHERE MSG_NO = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, errorCode);
rs = pstmt.executeQuery();
if (rs.next())
{
msgType = rs.getString("MSG_TYPE");
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
}
catch (Exception ex)
{
ex.printStackTrace();
throw new ITMException(ex);
}
finally
{
try
{
if (rs != null)
{
rs.close();
rs = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
}
catch (Exception e)
{
e.printStackTrace();
throw new ITMException(e);
}
}
return msgType;
}
private String checkNull( String inputVal )
{
if ( inputVal == null )
{
inputVal = "";
}
else
{
inputVal = inputVal;
}
return inputVal;
}
//Ended by varsha v to get error type
} }
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