Commit c969b2f8 authored by vvengurlekar's avatar vvengurlekar

WorkorderIssConf.java - added throw clause in catch and qc_reqd condition corrected


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@195735 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 2f6d6e3d
...@@ -316,7 +316,9 @@ public class WorkorderIssConf extends ActionHandlerEJB implements WorkorderIssCo ...@@ -316,7 +316,9 @@ public class WorkorderIssConf extends ActionHandlerEJB implements WorkorderIssCo
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null ; pstmt = null ;
if(qcReqd ==null && qcReqd.trim().length() ==0) //Added by Varsha V on For correcting condition on 14-01-19
//if(qcReqd ==null && qcReqd.trim().length() ==0)
if(qcReqd ==null || qcReqd.trim().length() ==0)
{ {
sql ="select case when qc_reqd is null then 'N' else qc_reqd end " sql ="select case when qc_reqd is null then 'N' else qc_reqd end "
+" from item where item_code ='"+itemCode+"' " ; +" from item where item_code ='"+itemCode+"' " ;
...@@ -344,7 +346,9 @@ public class WorkorderIssConf extends ActionHandlerEJB implements WorkorderIssCo ...@@ -344,7 +346,9 @@ public class WorkorderIssConf extends ActionHandlerEJB implements WorkorderIssCo
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null ; pstmt = null ;
if(autoReqc ==null && autoReqc.trim().length() ==0) //Added by Varsha V on For correcting condition on 14-01-19
//if(autoReqc ==null && autoReqc.trim().length() ==0)
if(autoReqc ==null || autoReqc.trim().length() ==0)
{ {
sql ="select case when auto_reqc is null then 'Y' else auto_reqc end " sql ="select case when auto_reqc is null then 'Y' else auto_reqc end "
+" from item where item_code ='"+itemCode+"' " ; +" from item where item_code ='"+itemCode+"' " ;
...@@ -690,6 +694,7 @@ public class WorkorderIssConf extends ActionHandlerEJB implements WorkorderIssCo ...@@ -690,6 +694,7 @@ public class WorkorderIssConf extends ActionHandlerEJB implements WorkorderIssCo
StockUpdate stkUpd = new StockUpdate(); StockUpdate stkUpd = new StockUpdate();
errString = stkUpd.updateStock(stkUpdMap,xtraParams,conn); errString = stkUpd.updateStock(stkUpdMap,xtraParams,conn);
stkUpd =null; stkUpd =null;
System.out.println("Errorstring in updateStock:::["+errString+"]");
if(errString != null && errString.indexOf("Error") != -1 ) if(errString != null && errString.indexOf("Error") != -1 )
{ {
return errString; return errString;
...@@ -734,6 +739,7 @@ public class WorkorderIssConf extends ActionHandlerEJB implements WorkorderIssCo ...@@ -734,6 +739,7 @@ public class WorkorderIssConf extends ActionHandlerEJB implements WorkorderIssCo
pstmtDet = null; pstmtDet = null;
String empCodeAprv = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"loginEmpCode"); String empCodeAprv = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"loginEmpCode");
//Added by manoj dtd 10/04/2015 if loginEmpCode is not in xtraParams //Added by manoj dtd 10/04/2015 if loginEmpCode is not in xtraParams
System.out.println("empCodeAprv::::["+empCodeAprv+"]");
if (empCodeAprv == null || empCodeAprv.trim().length() == 0) if (empCodeAprv == null || empCodeAprv.trim().length() == 0)
{ {
sql = "select emp_code from users where code = ?"; sql = "select emp_code from users where code = ?";
...@@ -770,6 +776,7 @@ public class WorkorderIssConf extends ActionHandlerEJB implements WorkorderIssCo ...@@ -770,6 +776,7 @@ public class WorkorderIssConf extends ActionHandlerEJB implements WorkorderIssCo
{ {
tranSer = "W-ISS"; tranSer = "W-ISS";
} }
System.out.println("errString ::::["+errString+"]");
if ( errString == null || errString.trim().length() == 0 ) if ( errString == null || errString.trim().length() == 0 )
{ {
InvAcct invAcct = new InvAcct(); InvAcct invAcct = new InvAcct();
...@@ -796,6 +803,8 @@ public class WorkorderIssConf extends ActionHandlerEJB implements WorkorderIssCo ...@@ -796,6 +803,8 @@ public class WorkorderIssConf extends ActionHandlerEJB implements WorkorderIssCo
} }
catch(Exception e) catch(Exception e)
{ {
e.printStackTrace();
System.out.println("Exception in catch:::"+e);
if( localConnection ) if( localConnection )
{ {
try { try {
...@@ -805,9 +814,10 @@ public class WorkorderIssConf extends ActionHandlerEJB implements WorkorderIssCo ...@@ -805,9 +814,10 @@ public class WorkorderIssConf extends ActionHandlerEJB implements WorkorderIssCo
e1.printStackTrace(); e1.printStackTrace();
} }
} }
e.printStackTrace();
errString = "VTCONFERR"; errString = "VTCONFERR";
//throw new ITMException(e); //Added By Varsha V on 14-01-19 to throw exception
throw new ITMException(e);
} }
finally finally
{ {
......
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