Commit 17ced8c5 authored by msharma's avatar msharma

set from user if loginEmpCode is not in xtraParams


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@97802 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 273661ad
...@@ -658,7 +658,21 @@ public class WorkorderIssConf extends ActionHandlerEJB implements WorkorderIssCo ...@@ -658,7 +658,21 @@ public class WorkorderIssConf extends ActionHandlerEJB implements WorkorderIssCo
pstmtDet.close(); pstmtDet.close();
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
if (empCodeAprv == null || empCodeAprv.trim().length() == 0)
{
sql = "select emp_code from users where code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, userId);
rs = pstmt.executeQuery();
if(rs.next())
{
empCodeAprv = rs.getString( "emp_code" );
System.out.println("useres employee code"+empCodeAprv);
}
rs.close();rs = null;
pstmt.close();pstmt = null;
}
sql =" update "+hdrTable+" set emp_code__aprv ='"+empCodeAprv+"' ,confirmed ='Y', chg_term ='"+userId+"', tran_date =?,conf_date=? " sql =" update "+hdrTable+" set emp_code__aprv ='"+empCodeAprv+"' ,confirmed ='Y', chg_term ='"+userId+"', tran_date =?,conf_date=? "
+" where tran_id ='"+tranID+"' "; +" where tran_id ='"+tranID+"' ";
pstmt = conn.prepareStatement(sql); //conf_date pstmt = conn.prepareStatement(sql); //conf_date
......
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