Commit b61ba0a5 authored by ysawant's avatar ysawant

*Added updated metadata , srd and components of Employee details change[15-01-2020]

emp_det_chg21.xml
d_emp_det_chg_edit.srd
EmpDetChg.java


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@215149 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 2d4d680e
......@@ -10812,7 +10812,7 @@
<y>793</y>
<height>16</height>
<width>68</width>
<format>dd/mm/yyyy</format>
<format>dd/mm/yy</format>
<html>
<valueishtml>0</valueishtml>
</html>
......
......@@ -504,7 +504,7 @@ column(band=detail id=8 alignment="0" tabsequence=32766 border="5" color="255" x
column(band=detail id=66 alignment="0" tabsequence=200 border="5" color="0" x="508" y="769" height="16" width="55" format="[general]" html.valueishtml="0" name=sex visible="1" ddlb.limit=0 ddlb.allowedit=no ddlb.case=any ddlb.imemode=0 font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="1090519039" )
column(band=detail id=15 alignment="0" tabsequence=32766 border="5" color="255" x="166" y="793" height="16" width="60" format="dd/mm/yyyy" html.valueishtml="0" name=birth_date_o visible="1" editmask.mask="dd/mm/yyyy" editmask.imemode=0 editmask.focusrectangle=no font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="79741120" )
column(band=detail id=63 alignment="0" tabsequence=190 border="5" color="0" x="233" y="769" height="16" width="58" format="[general]" html.valueishtml="0" name=name_prefix visible="1" ddlb.limit=0 ddlb.allowedit=yes ddlb.case=any ddlb.imemode=0 font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="1090519039" )
column(band=detail id=70 alignment="0" tabsequence=210 border="5" color="0" x="233" y="793" height="16" width="68" format="dd/mm/yyyy" html.valueishtml="0" name=birth_date visible="1" editmask.mask="dd/mm/yyyy" editmask.imemode=0 editmask.focusrectangle=no font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="1090519039" )
column(band=detail id=70 alignment="0" tabsequence=210 border="5" color="0" x="233" y="793" height="16" width="68" format="dd/mm/yy" html.valueishtml="0" name=birth_date visible="1" editmask.mask="dd/mm/yyyy" editmask.imemode=0 editmask.focusrectangle=no font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="1090519039" )
column(band=detail id=71 alignment="0" tabsequence=220 border="5" color="0" x="508" y="793" height="16" width="55" format="[general]" html.valueishtml="0" name=blood_grp visible="1" ddlb.limit=0 ddlb.allowedit=no ddlb.case=any ddlb.imemode=0 font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="1090519039" )
column(band=detail id=100 alignment="0" tabsequence=240 border="5" color="0" x="482" y="817" height="16" width="81" format="[general]" html.valueishtml="0" name=hobby2 visible="1" edit.limit=10 edit.case=upper edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes edit.imemode=0 font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="1090519039" )
column(band=detail id=102 alignment="0" tabsequence=260 border="5" color="0" x="482" y="841" height="16" width="81" format="[general]" html.valueishtml="0" name=hobby4 visible="1" edit.limit=10 edit.case=upper edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes edit.imemode=0 font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="1090519039" )
......
......@@ -160,24 +160,31 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
String userId = "";
String loginSiteCode = "";
String loginEmpCode = "";
String roleProfile = "";
String roleProfDescr = "";
HashMap empDetMap = new HashMap();
//Added By Poonam B[09-01-2020][Changes done as per Nvo component][START]
/*int i = 0;
String lsCode1 = "";
String lsCode2 = "";
String lsCode3 = "";*/
//Added By Poonam B[09-01-2020][Changes done as per Nvo component][END]
try
{
System.out.println("xtraParams -->"+xtraParams);
genericUtility = new E12GenericUtility();
utilMethod = new UtilMethods();
SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getApplDateFormat());
todayDate = utilMethod.date(utilMethod.today());
System.out.println("TodayDate ==>"+todayDate);
todayDate = utilMethod.today();
ldToday = sdf.format(todayDate);
System.out.println("Value of ldToday == "+ldToday);
userId = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginCode");
loginSiteCode=genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginSiteCode");
loginEmpCode = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginEmpCode");
System.out.println("currentFormNo...." + currentFormNo);
conn = getConnection();
if (objContext != null && objContext.trim().length() > 0)
......@@ -207,7 +214,7 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
System.out.println("::::Inside itm_defaultedit:::");
lsKeyval = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "tran_id");
sql="select status, emp_code from employee_det_change where tran_id = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, lsKeyval);
......@@ -272,7 +279,7 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
cnt = 0;
cnt1 = 0;
sql="select sum(case when status_type is null or status_type <> 'P' then 0 else 1 end) as cnt,"+
"sum(case when status_type is null or status_type <> 'C' then 0 else 1 end) as cnt1"+
"from emp_statuschg where emp_code = ? and status_type in ('P','C')" +
......@@ -334,9 +341,9 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
System.out.println(":::::::::::Inside emp_code:::::::::::::::");
lsEmpCode=checkNull(genericUtility.getColumnValue("emp_code", dom));
//Modified by Yashwant on 05-11-19[Start][Calling admCommon method to get employee information]
/*sql=" select contact_code,emp_fname,emp_mname,emp_lname,name_prefix,"+
"emp_type,designation,dept_code,grade,cadre,"+
"report_to,sex,nationality,citizen,state_code__domicile, "+
......@@ -497,10 +504,10 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
pstmt.close();
pstmt = null;
}*/
empDetMap = admCommon.fetchEmpMstInfo(lsEmpCode, todayDate, loginSiteCode, userId, -1, loginEmpCode, "", conn);
System.out.println("empDetMap -->"+empDetMap);
if(empDetMap != null && empDetMap.size() > 0)
{
lsContactCode = (String) empDetMap.get("CONTACT_CODE");
......@@ -513,7 +520,7 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
lsDeptCode = (String) empDetMap.get("DEPT_CODE");
lsGrade = (String) empDetMap.get("GRADE");
lsCadre = (String) empDetMap.get("CADRE");
lsReportTo = (String) empDetMap.get("REPORT_TO");
lsSex = (String) empDetMap.get("SEX");
lsNationality = (String) empDetMap.get("NATIONALITY");
......@@ -524,7 +531,7 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
lsBirthDate = (Timestamp) empDetMap.get("BIRTH_DATE");
lsBloodGrp = (String) empDetMap.get("BLOOD_GRP");
lsContactPers = (String) empDetMap.get("CONTACT_PERS");
lsReligion = (String) empDetMap.get("RELIGION");
lsJoinedAs = (String) empDetMap.get("JOINED_AS");
lsDateJoin = (Timestamp) empDetMap.get("DATE_JOIN");
......@@ -535,7 +542,7 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
lsPayType = (String) empDetMap.get("PAY_TYPE");
lsPayMode = (String) empDetMap.get("PAY_MODE");
lsBankCode = (String) empDetMap.get("BANK_CODE");
lsBankAcct = (String) empDetMap.get("BANK_ACCT");
lsStanCode = (String) empDetMap.get("STAN_CODE");
lsDdPayableBank = (String) empDetMap.get("DD_PAYABLE_BANK");
......@@ -546,7 +553,7 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
lsItNo = (String) empDetMap.get("IT_NO");
lsGross = (int) empDetMap.get("GROSS");
lsHobby1 = (String) empDetMap.get("HOBBY1");
lsHobby2 = (String) empDetMap.get("HOBBY2");
lsHobby3 = (String) empDetMap.get("HOBBY3");
lsHobby4 = (String) empDetMap.get("HOBBY4");
......@@ -557,7 +564,7 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
lsNoticePrd = (int) empDetMap.get("NOTICE_PRD");
lsEmpCodeLink = (String) empDetMap.get("EMP_CODE__LINK");
lAcctCodeSal = (String) empDetMap.get("ACCT_CODE__SAL");
lsCctrCodeSal = (String) empDetMap.get("CCTR_CODE__SAL");
lsalterCode = (String) empDetMap.get("ALTER_CODE");
lsWithHeld = (String) empDetMap.get("WITH_HELD");
......@@ -568,7 +575,7 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
lsContactAdd3 = (String) empDetMap.get("CONTACT_ADD3");
lsContactCity = (String) empDetMap.get("CONTACT_CITY");
lsContactState = (String) empDetMap.get("CONTACT_STATE");
lsContactTel = (String) empDetMap.get("CONTACT_TEL");
lsContactPin = (String) empDetMap.get("CONTACT_PIN");
lsProbation = (String) empDetMap.get("PROBATION");
......@@ -579,7 +586,7 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
lsWorkSite = (String) empDetMap.get("WORK_SITE");
lsReportToAdmin = (String) empDetMap.get("REPORT_TO__ADMIN");
lsFuncGroup = (String) empDetMap.get("FUNC_GROUP");
lsMaidenName = (String) empDetMap.get("MAIDEN_NAME");
lsBirthPlace = (String) empDetMap.get("BIRTH_PLACE");
lsResiPermitNo = (String) empDetMap.get("RESI_PERMIT_NO");
......@@ -590,7 +597,7 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
lsShiftIndex = (int) empDetMap.get("SHIFT_INDEX");
lsEmpClass = (String) empDetMap.get("EMP_CLASS");
lsOccupationCode = (String) empDetMap.get("OCCUPATION_CODE");
lsPosCode = (String) empDetMap.get("POS_CODE");
lsEsiDispensary = (String) empDetMap.get("ESI_DISPENSARY");
lsEmpCodeHod = (String) empDetMap.get("EMP_CODE__HOD");
......@@ -601,7 +608,7 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
lsUserId = (String) empDetMap.get("USER_ID");
lsExtNo = (String) empDetMap.get("EXT_NO");
lsAadharCardNo = (String) empDetMap.get("AADHAR_CARD_NO");
lsElectionCardNo = (String) empDetMap.get("ELECTION_CARD_NO");
lsDrivLicNo = (String) empDetMap.get("DRIV_LIC_NO");
lsDrivLicValidUpto = (Timestamp) empDetMap.get("DRIV_LIC_VALID_UPTO");
......@@ -612,7 +619,7 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
lsInsiderTradingOpt = (String) empDetMap.get("INSIDER_TRADING_OPT");
lsIfsc = (String) empDetMap.get("IFSC");
lsEmpCodeFunchead = (String) empDetMap.get("EMP_CODE__FUNCHEAD");
lsBuCode = (String) empDetMap.get("BU_CODE");
lsMotherTongue = (String) empDetMap.get("MOTHER_TONGUE");
lsCastCategory = (String) empDetMap.get("CAST_CATEGORY");
......@@ -622,9 +629,38 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
lsEmpFnameLong = (String) empDetMap.get("EMP_FNAME_LONG");
lsEmpMnameLong = (String) empDetMap.get("EMP_MNAME_LONG");
lsEmpLnameLong = (String) empDetMap.get("EMP_LNAME_LONG");
roleProfile = (String) empDetMap.get("ROLE_PROFILES");
}
//Modified by Yashwant on 05-11-19[End][Calling admCommon method to get employee information]
//Added by Yashwant on 11-11-19[START][To fetch role profile from employee master]
sql = "select FN_GET_ROLEPROF_DESCR(?) as roleDesr from dual";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,roleProfile);
rs = pstmt.executeQuery();
if(rs.next())
{
roleProfDescr = checkNull(rs.getString("roleDesr"));
}
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
valueXmlString.append("<role_profiles__o ><![CDATA[").append(roleProfile).append("]]></role_profiles__o>\r\n");
valueXmlString.append("<role_profiles_descr_o ><![CDATA[").append(roleProfDescr).append("]]></role_profiles_descr_o>\r\n");
valueXmlString.append("<role_profiles ><![CDATA[").append(roleProfile).append("]]></role_profiles>\r\n");
valueXmlString.append("<role_profiles_descr ><![CDATA[").append(roleProfDescr).append("]]></role_profiles_descr>\r\n");
//Added by Yashwant on 11-11-19[END][To fetch role profile from employee master]
sql="select descr from department where dept_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, lsDeptCode);
......@@ -643,13 +679,14 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
pstmt.close();
pstmt = null;
}
System.out.println("lsEligibleOt -->"+lsEligibleOt);
if(lsEligibleOt == null || lsEligibleOt.trim().length() == 0)
{
lsEligibleOt = "N";
}
valueXmlString.append("<emp_code ><![CDATA[").append(lsEmpCode).append("]]></emp_code>\r\n");
valueXmlString.append("<eligible_ot__o ><![CDATA[").append(lsEligibleOt).append("]]></eligible_ot__o>\r\n");
valueXmlString.append("<eligible_ot ><![CDATA[").append(lsEligibleOt).append("]]></eligible_ot>\r\n");
valueXmlString.append("<stan_code__hq_o ><![CDATA[").append(lsStanCodeHq).append("]]></stan_code__hq_o>\r\n");
......@@ -771,7 +808,7 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
valueXmlString.append("<maiden_name__o ><![CDATA[").append(lsMaidenName).append("]]></maiden_name__o>\r\n");
valueXmlString.append("<birth_place__o ><![CDATA[").append(lsBirthPlace).append("]]></birth_place__o>\r\n");
valueXmlString.append("<resi_permit_no__o ><![CDATA[").append(lsResiPermitNo).append("]]></resi_permit_no__o>\r\n");
if(lsResiPermitUpto != null)
{
lsResiPermitUptoStr = sdf.format(lsResiPermitUpto);
......@@ -788,7 +825,7 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
valueXmlString.append("<shift_index__o ><![CDATA[").append(lsShiftIndex).append("]]></shift_index__o>\r\n");
valueXmlString.append("<emp_class__o ><![CDATA[").append(lsEmpClass).append("]]></emp_class__o>\r\n");
valueXmlString.append("<occupation_code__o ><![CDATA[").append(lsOccupationCode).append("]]></occupation_code__o>\r\n");
valueXmlString.append("<emp_fname ><![CDATA[").append(lsempFname).append("]]></emp_fname>\r\n");
valueXmlString.append("<emp_mname ><![CDATA[").append(lsempMname).append("]]></emp_mname>\r\n");
valueXmlString.append("<emp_lname ><![CDATA[").append(lsempLname).append("]]></emp_lname>\r\n");
......@@ -871,7 +908,7 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
{
valueXmlString.append("<training_prd ><![CDATA[").append(0).append("]]></training_prd>\r\n");
}
mPrd=checkNull(genericUtility.getColumnValue("probation_prd", dom));
System.out.println("probPrd -->"+mPrd);
if(mPrd == null || mPrd.trim().length() == 0)
......@@ -885,7 +922,7 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
{
valueXmlString.append("<shift_rot><![CDATA[").append("N").append("]]></shift_rot>\r\n");
}
ldvar = checkNull(genericUtility.getColumnValue("date_join", dom));
System.out.println("ldvar -->"+ldvar);
if(ldvar == null)
......@@ -924,7 +961,7 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
countConf = 0;
countProb = 0;
sql="select sum(case when status_type is null or status_type <> 'P' then 0 else 1 end) as li_count_prob ,"+
"sum(case when status_type is null or status_type <> 'C' then 0 else 1 end) as li_count_conf"+
" from emp_statuschg"+
......@@ -949,10 +986,10 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
pstmt.close();
pstmt = null;
}
System.out.println("countConf -->"+countConf);
System.out.println("countProb -->"+countProb);
if(countConf > 0)
{
valueXmlString.append("<probation_prd protect=\"1\"><![CDATA[").append(lsProbationPrd).append("]]></probation_prd>\r\n");
......@@ -1035,7 +1072,7 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
valueXmlString.append("<election_card_no ><![CDATA[").append(lsElectionCardNo).append("]]></election_card_no>\r\n");
valueXmlString.append("<driv_lic_no_o ><![CDATA[").append(lsDrivLicNo).append("]]></driv_lic_no_o>\r\n");
valueXmlString.append("<driv_lic_no ><![CDATA[").append(lsDrivLicNo).append("]]></driv_lic_no>\r\n");
if(lsDrivLicValidUpto != null)
{
lsDrivLicValidUptoStr = sdf.format(lsDrivLicValidUpto);
......@@ -1056,7 +1093,7 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
valueXmlString.append("<ifsc_o ><![CDATA[").append(lsIfsc).append("]]></ifsc_o>\r\n");
valueXmlString.append("<ifsc ><![CDATA[").append(lsIfsc).append("]]></ifsc>\r\n");
sql="select emp_code__head, descr, FN_GET_EMP_NAME(business_units.emp_code__head,'X1') as buhead_name"+
" from business_units where bu_code = ?";
pstmt = conn.prepareStatement(sql);
......@@ -1078,7 +1115,7 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
pstmt.close();
pstmt = null;
}
valueXmlString.append("<emp_code__funchead_o ><![CDATA[").append(lsEmpCodeFunchead).append("]]></emp_code__funchead_o>\r\n");
valueXmlString.append("<emp_code__funchead ><![CDATA[").append(lsEmpCodeFunchead).append("]]></emp_code__funchead>\r\n");
valueXmlString.append("<funchead_o_name ><![CDATA[").append(funcheadName).append("]]></funchead_o_name>\r\n");
......@@ -1156,13 +1193,13 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
{
lsTrainPrd = Integer.parseInt(trainingPrdStr);
}
probationPrdStr = checkNull(genericUtility.getColumnValue("probation_prd", dom));
if(probationPrdStr != null && probationPrdStr.trim().length() > 0)
{
lsProbPrd= Integer.parseInt(probationPrdStr);
}
dateJoin = checkNull(genericUtility.getColumnValue("date_join", dom));
System.out.println("training_prd dateJoin -->"+dateJoin);
......@@ -1170,7 +1207,7 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
{
ldDate = Timestamp.valueOf(genericUtility.getValidDateString(dateJoin, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0");
}
System.out.println("training_prd ldDate -->"+ldDate);
if(ldDate != null)
{
......@@ -1183,13 +1220,13 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
ldDate1 = utilmethod.AddMonths(ldDate,lsTrainPrd );
}
}
if(ldDate1 != null)
{
ldToday = sdf.format(ldDate1);
valueXmlString.append("<probation_date ><![CDATA[").append(ldToday).append("]]></probation_date>\r\n");
}
if(lsTrainPrd == 0)
{
lsProbationFlag = "Y";
......@@ -1216,19 +1253,19 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
{
ldDate1 = utilmethod.AddMonths(ldDate1,lsProbPrd );
}
if(ldDate1 != null)
{
ldToday = sdf.format(ldDate1);
valueXmlString.append("<date_conf ><![CDATA[").append(ldToday).append("]]></date_conf>\r\n");
}
}
if ("probation_prd".equalsIgnoreCase(currentColumn))
{
System.out.println(":::::::::::Inside probation_prd:::::::::::::::");
lsEmpCode = checkNull(genericUtility.getColumnValue("emp_code", dom));
lsProbationFlag = checkNull(genericUtility.getColumnValue("probation", dom));
......@@ -1239,13 +1276,13 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
{
lsTrainPrd = Integer.parseInt(trainingPrdStr);
}
probationPrdStr = checkInt(genericUtility.getColumnValue("probation_prd", dom));
if(probationPrdStr != null && probationPrdStr.trim().length() > 0)
{
lsProbPrd= Integer.parseInt(probationPrdStr);
}
probationDate = checkNull(genericUtility.getColumnValue("probation_date", dom));
System.out.println("probationDate=["+probationDate+"]");
......@@ -1253,9 +1290,9 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
System.out.println("applDatefrmt=["+applDatefrmt+"]");
String dbDatefrmt = genericUtility.getDBDateFormat();
System.out.println("dbDatefrmt=["+dbDatefrmt+"]");
java.util.Date probDate = sdf.parse(probationDate);
if(lsProbPrd == 0)
{
ldDate1 = probDate;
......@@ -1291,7 +1328,7 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
System.out.println(":::::::::::Inside pos_code:::::::::::::::");
lsEmpCode = checkNull(genericUtility.getColumnValue("emp_code", dom));
lsPosCode = checkNull(genericUtility.getColumnValue("pos_code", dom));
sql = "select dept_code from employee where emp_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, lsEmpCode);
......@@ -1314,7 +1351,7 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
System.out.println("lsEmpCode -->"+lsEmpCode);
System.out.println("lsDeptCode -->"+lsDeptCode);
System.out.println("lsPosCode -->"+lsPosCode);
sql="select fn_get_pos_descr( ? , ? , ? ) as ls_descr from dual";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, lsEmpCode);
......@@ -1337,13 +1374,13 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
}
valueXmlString.append("<pos_code_descr ><![CDATA[").append(lsDescr).append("]]></pos_code_descr>\r\n");
}
if(currentColumn.trim().equalsIgnoreCase("parent_dept__n"))
if("parent_dept__n".equalsIgnoreCase(currentColumn))
{
System.out.println(":::::::::::Inside parent_dept__n:::::::::::::::");
lsParentDept = checkNull(genericUtility.getColumnValue("parent_dept__n", dom));
lsParentDeptDescr = "";
sql = "select FN_GET_DEPT_DESCR(?) as parent_dept_descr from dual";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,lsParentDept);
......@@ -1370,7 +1407,7 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
System.out.println(":::::::::::Inside func_group__n:::::::::::::::");
lsFuncGroup = checkNull(genericUtility.getColumnValue("func_group__n", dom));
lsFuncGroupDescr = "";
sql = "select FN_GET_BUFUNC_DESCR(?) as func_group_descr from dual";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,lsFuncGroup);
......@@ -1397,7 +1434,7 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
System.out.println(":::::::::::Inside work_loc_code__n:::::::::::::::");
lsWorkLocCode = checkNull(genericUtility.getColumnValue("work_loc_code__n", dom));
lsWorkLocDescr = "";
sql = "select FN_GET_WORKLOC_DESCR(?) as work_loc_descr from dual";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,lsWorkLocCode);
......@@ -1455,7 +1492,7 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
{
System.out.println(":::::::::::Inside emp_code__funchead:::::::::::::::");
lsEmpCodeFunchead = checkNull(genericUtility.getColumnValue("emp_code__funchead", dom));
sql = "select FN_GET_EMP_NAME(?, 'X1') as funchead_name from dual";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,lsEmpCodeFunchead);
......@@ -1481,13 +1518,13 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
{
System.out.println(":::::::::::Inside bu_code:::::::::::::::");
lsBuCode = checkNull(genericUtility.getColumnValue("bu_code", dom));
System.out.println("lsBuCode -->"+lsBuCode);
lsEmpCodeBuhead = "";
lsBuheadName = "";
sql= "select descr, emp_code__head,FN_GET_EMP_NAME(? , 'X1') as buhead_name from business_units where bu_code = ?";
sql= "select descr, emp_code__head,FN_GET_EMP_NAME( emp_code__head , 'X1') as buhead_name from business_units where bu_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, lsEmpCodeBuhead);
pstmt.setString(2, lsBuCode);
pstmt.setString(1, lsBuCode);
rs = pstmt.executeQuery();
if (rs.next())
{
......@@ -1505,9 +1542,10 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
pstmt.close();
pstmt = null;
}
valueXmlString.append("<bu_code_descr ><![CDATA[").append(lsBuCodeDescr).append("]]></bu_code_descr>\r\n");
valueXmlString.append("<emp_code__buhead ><![CDATA[").append(lsEmpCodeBuhead).append("]]></emp_code__buhead>\r\n");
valueXmlString.append("<ls_buhead_name ><![CDATA[").append(lsBuheadName).append("]]></ls_buhead_name>\r\n");
valueXmlString.append("<buhead_name ><![CDATA[").append(lsBuheadName).append("]]></buhead_name>\r\n");
}
if ("mother_tongue".equalsIgnoreCase(currentColumn))
......@@ -1557,6 +1595,7 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
valueXmlString.append("<religion ><![CDATA[").append(lsReligion).append("]]></religion>\r\n");
}
}
if(("emp_fname_long".equalsIgnoreCase(currentColumn)) || ("emp_mname_long".equalsIgnoreCase(currentColumn)) || ("emp_lname_long".equalsIgnoreCase(currentColumn)))
{
System.out.println(":::::::::::Inside emp_fname_long:::::::::::::::");
......@@ -1569,6 +1608,63 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
lsEmpMnameLong = utilmethod.left(lsEmpMnameLong,15);
valueXmlString.append("<ls_emp_fname_long ><![CDATA[").append(lsEmpMnameLong).append("]]></ls_emp_fname_long>\r\n");
}
//Added by Yashwant on 11-11-19[START][Added itemchange for Role Profile]
if("role_profiles".equalsIgnoreCase(currentColumn))
{
System.out.println(":::::::::::Inside role_profile:::::::::::");
roleProfile = checkNull(genericUtility.getColumnValue("role_profiles", dom));
/*
//Added By Poonam B[09-01-2020][Changes done as per Nvo component][START]
lsCode2 = roleProfile;
System.out.println("lsCode2 -->"+lsCode2);
do
{
lsCode1 = admCommon.getToken(lsCode2, ",");
System.out.println("lsCode1 -->"+lsCode1);
if(lsCode1 != null && lsCode1.trim().length() > 0)
{
i = i + 1;
if( i > 1 )
{
lsCode3 = lsCode3 + ",";
}
lsCode3 = lsCode3 + lsCode1.trim();
System.out.println("lsCode3 -->"+lsCode3);
}
}while(lsCode2 != null && lsCode2.trim().length() > 0);
roleProfile = lsCode3;
System.out.println("roleProfile -->"+roleProfile);
valueXmlString.append("<role_profiles><![CDATA[").append(roleProfile).append("]]></role_profiles>\r\n");
//Added By Poonam B[09-01-2020][Changes done as per Nvo component][END]
*/
sql = "select fn_get_roleprof_descr (?) as descr from dual";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,roleProfile);
rs = pstmt.executeQuery();
if(rs.next())
{
roleProfDescr = checkNull(rs.getString("descr"));
}
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
System.out.println("roleProfDescr -->"+roleProfDescr);
valueXmlString.append("<role_profiles_descr><![CDATA[").append(roleProfDescr).append("]]></role_profiles_descr>\r\n");
}
//Added by Yashwant on 11-11-19[END][Added itemchange for Role Profile]
}
valueXmlString.append("</Detail1>");
break;
......@@ -1658,6 +1754,10 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
{
PreparedStatement pstmt = null;
ResultSet rs = null;
String sql = "";
PreparedStatement pstmt1 = null;
ResultSet rs1 = null;
String sql1 = "";
String childNodeName = null;
StringBuffer errStringXml = null;
ITMDBAccessEJB itmDbAcess = null;
......@@ -1670,7 +1770,6 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
int noOfChilds = 0;
int cnt = 0;
String errString="";
String sql = "";
String empCode="";
String lsSite="";
String empLname="";
......@@ -1723,8 +1822,12 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
String loginSiteCode = "";
String loginEmpCode = "";
String errCode = "";
String roleProfiles = "";
String[] roleProfilesList;
//String mval1 = "";
String actStatus = "";
Timestamp ldRelieveDate =null;
Timestamp ldDate=null;
String dateJoin="";
Timestamp mDate1=null;
......@@ -1744,11 +1847,11 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
conn = getConnection();
AdmCommon admCommon = new AdmCommon();
//UtilMethods utilMethods = new UtilMethods();
/*SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getApplDateFormat());
todayDate = sdf.format(new java.util.Date());
System.out.println("todayDate::: "+ todayDate);*/
todayDate = utilMethod.date(utilMethod.today());
System.out.println("TodayDate ==>"+todayDate);
......@@ -1794,7 +1897,7 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
System.out.println("::::validation of emp_code::::");
empCode = checkNull(genericUtility.getColumnValue("emp_code", dom));
/*sql=" select count(*) as cnt from employee where emp_code = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, empCode);
......@@ -1824,10 +1927,10 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
break;
}
}*/
errCode = checkNull(admCommon.chkHRMSiteAccess(empCode, todayDate, loginSiteCode, userId, -1, loginEmpCode, "w_emp_add_chg", conn));
System.out.println("errString val -->"+errCode);
if(errCode != null && errCode.trim().length() > 0)
{
errList.add(errCode);
......@@ -1838,7 +1941,7 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
break;
}
}
else
{
if("A".equalsIgnoreCase(editFlag))
......@@ -2052,7 +2155,7 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
else
{
System.out.println("::: If CNT = 1 :::");
sql=" select status from employee where emp_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, reportTo);
......@@ -2105,7 +2208,7 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
cnt = 0;
nationality=checkNull(genericUtility.getColumnValue("nationality", dom));
sql=" select count(*) as cnt from country where count_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, nationality);
......@@ -2196,12 +2299,12 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
if("acct_code__sal".equalsIgnoreCase(childNodeName))
{
System.out.println("::::validation of acct_code__sal::::");
acctCodeSal=checkNull(genericUtility.getColumnValue("acct_code__sal", dom));
if(acctCodeSal.trim().length() != 0)
{
cnt = 0;
sql="select count(*) as cnt from accounts where acct_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, acctCodeSal);
......@@ -2232,7 +2335,7 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
}
}
}
if("cctr_code__sal".equalsIgnoreCase(childNodeName))
{
System.out.println("::::validation of cctr_code__sal::::");
......@@ -2241,7 +2344,7 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
cctrCodeSal=checkNull(genericUtility.getColumnValue("cctr_code__sal", dom));
lsCctr=admCommon.getEnv("999999", "CCTR_YESNO", conn);
System.out.println("lsCctr -->"+lsCctr);
if("NULLFOUND".equalsIgnoreCase(lsCctr))
{
errList.add("VSENVAR1");
......@@ -2484,7 +2587,7 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
workShift=checkNull(genericUtility.getColumnValue("work_shift", dom));
empCode=checkNull(genericUtility.getColumnValue("emp_code", dom));
System.out.println("workShift -->"+workShift);
if(workShift != null && workShift.trim().length() > 0)
......@@ -2508,7 +2611,7 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
pstmt = null;
}
System.out.println("lsWorksite -->"+lsWorksite);
cnt = 0;
sql="select count(*) as cnt from workshft where shift = ? and site_code = ? ";
pstmt = conn.prepareStatement(sql);
......@@ -2669,16 +2772,21 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
{
mDate1= Timestamp.valueOf(genericUtility.getValidDateString(dateJoin, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0");
}
if(ldDate.before(mDate1))
if(ldDate != null && mDate1 != null)
{
errList.add("VTGRADATE");
errFields.add(childNodeName.toLowerCase());
errorType = errorType(conn, "VTGRADATE");
if(errorType.equalsIgnoreCase("E"))
if(ldDate.before(mDate1))
{
break;
errList.add("VTGRADATE");
errFields.add(childNodeName.toLowerCase());
errorType = errorType(conn, "VTGRADATE");
if(errorType.equalsIgnoreCase("E"))
{
break;
}
}
}
}
if("pos_code".equalsIgnoreCase(childNodeName))
{
......@@ -2717,11 +2825,11 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
{
System.out.println("::::validation of emp_code__hod::::");
lsempCodeHod=checkNull(genericUtility.getColumnValue("emp_code__hod", dom));
lsempCodeHod = checkNull(genericUtility.getColumnValue("emp_code__hod", dom));
if(lsempCodeHod != null && lsempCodeHod.trim().length() > 0)
{
ldRelieveDate = null;
sql="select relieve_date from employee where emp_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, lsempCodeHod); //que
......@@ -2770,7 +2878,7 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
if(lsStanCodeHq != null && lsStanCodeHq.trim().length() != 0)
{
cnt = 0;
sql="Select count(*) as cnt from station where stan_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, lsStanCodeHq);
......@@ -2884,7 +2992,7 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
{
workLocCodeN = null;
}
if(workLocCodeN != null && workLocCodeN.trim().length() > 0)
{
sql="select count(1) as cnt from WORK_LOCATIONS where work_loc_code = ?";
......@@ -2918,7 +3026,7 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
else
{
cnt = 0;
sql="select count(1) as cnt from WORK_LOCATIONS where work_loc_code = ?" +
" and case when active is null then 'Y' else active end = 'Y'";
pstmt = conn.prepareStatement(sql);
......@@ -2951,14 +3059,13 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
}
}
}
if("handicap_category".equalsIgnoreCase(childNodeName))
{
System.out.println("::::validation of handicap_category::::");
handicapCategory=checkNull(genericUtility.getColumnValue("handicap_category", dom));
cnt = 0;
if(handicapCategory != null && handicapCategory.trim().length() > 0)
{
......@@ -2999,12 +3106,12 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
System.out.println("::::validation of notice_prd::::");
noticePrdStr = checkNull(genericUtility.getColumnValue("notice_prd", dom));
if(noticePrdStr != null && noticePrdStr.trim().length() > 0)
{
noticePrd = Integer.parseInt(noticePrdStr);
}
if(noticePrdStr == null || noticePrdStr.trim().length() == 0)
{
errList.add("VMEMPDCH01");
......@@ -3032,12 +3139,12 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
System.out.println("::::validation of training_prd::::");
trainingPrdStr= checkNull(genericUtility.getColumnValue("training_prd", dom));
if(trainingPrdStr != null && trainingPrdStr.trim().length() > 0)
{
trainingPrd = Integer.parseInt(trainingPrdStr);
}
if(trainingPrdStr == null || trainingPrdStr.trim().length() == 0)
{
errList.add("VMEMPDCH03");
......@@ -3065,12 +3172,12 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
System.out.println("::::validation of probation_prd::::");
probationPrdStr = checkNull(genericUtility.getColumnValue("probation_prd", dom));
if(probationPrdStr != null && probationPrdStr.trim().length() > 0)
{
probationPrd = Integer.parseInt(probationPrdStr);
}
if(probationPrdStr == null || probationPrdStr.trim().length() == 0)
{
errList.add("VMEMPDCH05");
......@@ -3096,14 +3203,14 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
if("gross".equalsIgnoreCase(childNodeName))
{
System.out.println("::::validation of gross::::");
grossStr = checkNull(genericUtility.getColumnValue("gross", dom));
if(grossStr != null && grossStr.trim().length() > 0)
{
gross = Double.parseDouble(grossStr);
}
if(grossStr == null || grossStr.trim().length() == 0)
{
errList.add("VMEMPDCH07");
......@@ -3131,12 +3238,12 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
System.out.println("::::validation of tot_exp::::");
totExpStr=checkNull(genericUtility.getColumnValue("tot_exp", dom));
if(totExpStr != null && totExpStr.trim().length() > 0)
{
totExp = Integer.parseInt(totExpStr);
}
if(totExpStr == null || totExpStr.trim().length() == 0)
{
errList.add("VMEMPDCH09");
......@@ -3243,7 +3350,7 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
if("bu_code".equalsIgnoreCase(childNodeName))
{
System.out.println("::::validation of bu_code::::");
buCode=checkNull(genericUtility.getColumnValue("bu_code", dom));
cnt = 0;
if(buCode != null && buCode.trim().length() > 0)
......@@ -3397,6 +3504,235 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
}
}
}
//Added by Yashwant on 11-11-19[START][Added validation for Role Profile]
if("role_profiles".equalsIgnoreCase(childNodeName))
{
System.out.println("::::validation of role_profiles::::");
roleProfiles = checkNull(genericUtility.getColumnValue("role_profiles", dom));
buCode = checkNull(genericUtility.getColumnValue("bu_code", dom));
if(roleProfiles != null && roleProfiles.trim().length() > 0)
{
roleProfilesList = roleProfiles.split(",");
sql = "select case when act_status is null then 'Y' else act_status end as mval2 from role_profile where role_profile = ? ";
pstmt = conn.prepareStatement(sql);
sql1 = "select case when act_status is null then 'Y' else act_status end as mval2 from bu_role_profile where bu_code = ? and role_profile = ?";
pstmt1 = conn.prepareStatement(sql1);
for(int i = 0; i < roleProfilesList.length; i++)
{
pstmt.setString( 1, roleProfilesList[i] );
rs = pstmt.executeQuery();
pstmt.clearParameters();
if(rs.next())
{
actStatus = rs.getString("mval2");
System.out.println("roleProfile actStatus -->"+actStatus);
}
else
{
errList.add("VMROLPRF01");
errFields.add(childNodeName.toLowerCase());
errorType = errorType(conn, "VMROLPRF01");
if(errorType.equalsIgnoreCase("E"))
{
break;
}
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
if (rs != null)
{
rs.close();
rs = null;
}
if("N".equalsIgnoreCase(actStatus))
{
errList.add("VMROLPRF02");
errFields.add(childNodeName.toLowerCase());
errorType = errorType(conn, "VMROLPRF02");
if(errorType.equalsIgnoreCase("E"))
{
break;
}
}
else if(buCode != null && buCode.trim().length() > 0)
{
actStatus = "";
pstmt1.setString( 1, buCode );
pstmt1.setString( 2, roleProfilesList[i] );
rs1 = pstmt1.executeQuery();
pstmt1.clearParameters();
if(rs1.next())
{
actStatus = rs1.getString("mval2");
System.out.println("Bu Role Profile actStatus -->"+actStatus);
}
else
{
errList.add("VMBUROLE01");
errFields.add(childNodeName.toLowerCase());
errorType = errorType(conn, "VMBUROLE01");
if(errorType.equalsIgnoreCase("E"))
{
break;
}
}
if (pstmt1 != null)
{
pstmt1.close();
pstmt1 = null;
}
if (rs1 != null)
{
rs1.close();
rs1 = null;
}
if("N".equalsIgnoreCase(actStatus))
{
errList.add("VMBUROLE02");
errFields.add(childNodeName.toLowerCase());
errorType = errorType(conn, "VMBUROLE02");
if(errorType.equalsIgnoreCase("E"))
{
break;
}
}
}
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
if (rs != null)
{
rs.close();
rs = null;
}
}
//Modified By Poonam b[09-01-2020][Changes done as per Nvo component][Start]
/*
if(roleProfiles != null && roleProfiles.trim().length() > 0)
{
do
{
mval1 = admCommon.getToken(roleProfiles, ",");
if(mval1.length() == 0)
{
continue;
}
cnt = 0;
System.out.println("mval1 -->"+mval1);
//select case when act_status is null then 'Y' else act_status end into :mval2 from role_profile where role_profile = :mval1;
sql = "select case when act_status is null then 'Y' else act_status end as mval2 from role_profile where role_profile = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString( 1, mval1);
rs = pstmt.executeQuery();
pstmt.clearParameters();
if(rs.next())
{
actStatus = rs.getString("mval2");
System.out.println("actStatus (1) -->"+actStatus);
}
else
{
errList.add("VMROLPRF01");
errFields.add(childNodeName.toLowerCase());
errorType = errorType(conn, "VMROLPRF01");
if(errorType.equalsIgnoreCase("E"))
{
break;
}
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
if (rs != null)
{
rs.close();
rs = null;
}
if("N".equalsIgnoreCase(actStatus))
{
errList.add("VMROLPRF02");
errFields.add(childNodeName.toLowerCase());
errorType = errorType(conn, "VMROLPRF02");
if(errorType.equalsIgnoreCase("E"))
{
break;
}
}
else if(buCode != null && buCode.trim().length() > 0)
{
cnt = 0;
actStatus = "";
//select case when act_status is null then 'Y' else act_status end into :mval2 from bu_role_profile where bu_code = :ls_bu_code and role_profile = :mval1;
sql = "select case when act_status is null then 'Y' else act_status end as mval2 from bu_role_profile where bu_code = ? and role_profile = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString( 1, buCode );
pstmt.setString( 2, mval1 );
rs = pstmt.executeQuery();
pstmt.clearParameters();
if(rs.next())
{
actStatus = rs.getString("mval2");
System.out.println("actStatus (2) -->"+actStatus);
}
else
{
errList.add("VMBUROLE01");
errFields.add(childNodeName.toLowerCase());
errorType = errorType(conn, "VMBUROLE01");
if(errorType.equalsIgnoreCase("E"))
{
break;
}
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
if (rs != null)
{
rs.close();
rs = null;
}
if("N".equalsIgnoreCase(actStatus))
{
errList.add("VMBUROLE02");
errFields.add(childNodeName.toLowerCase());
errorType = errorType(conn, "VMBUROLE02");
if(errorType.equalsIgnoreCase("E"))
{
break;
}
}
}
}while(roleProfiles.trim().length() > 0);
}
//Modified By Poonam b[09-01-2020][Changes done as per Nvo component][End]
*/
}
//Added by Yashwant on 11-11-19[END][Added validation for Role Profile]
}
if (errList != null && errList.size() > 0)
......@@ -3586,9 +3922,7 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
}
return errString;
}
private String errorType(Connection conn, String errorCode) throws ITMException
{
......@@ -3661,7 +3995,7 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
{
input = "";
}
return input;
return input.trim();
}
private String checkInt(String value)
......@@ -3672,7 +4006,5 @@ public class EmpDetChg extends ValidatorEJB implements EmpDetChgLocal,EmpDetChgR
}
return value;
}
}
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