Commit e999b0cf authored by rtelang's avatar rtelang

EmployeeServicePrdAmdIC.java

Changes done to check if user enters invalid employee code then system not allow to enter  and show error message.



git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@203524 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 440c7200
...@@ -236,7 +236,7 @@ public class EmployeeServicePrdAmdIC extends ValidatorEJB implements EmployeeSer ...@@ -236,7 +236,7 @@ public class EmployeeServicePrdAmdIC extends ValidatorEJB implements EmployeeSer
//{ //{
//Modified by Rohini R. on [05/07/2019][End] //Modified by Rohini R. on [05/07/2019][End]
//Modified by Anjali R. on [08/07/2019][Start]
String tranId = ""; String tranId = "";
tranId = checkNull(genericUtility.getColumnValue("tran_id", dom)); tranId = checkNull(genericUtility.getColumnValue("tran_id", dom));
if(tranId == null || tranId.trim().length() == 0) if(tranId == null || tranId.trim().length() == 0)
...@@ -1065,7 +1065,7 @@ public class EmployeeServicePrdAmdIC extends ValidatorEJB implements EmployeeSer ...@@ -1065,7 +1065,7 @@ public class EmployeeServicePrdAmdIC extends ValidatorEJB implements EmployeeSer
Calendar cal = null; Calendar cal = null;
//Mdified by Sarita S. on [28/06/2019][Start] //Mdified by Sarita S. on [28/06/2019][Start]
//SimpleDateFormat format = new SimpleDateFormat("dd/MM/yyyy"); //SimpleDateFormat format = new SimpleDateFormat("dd/MM/yyyy");
System.out.println("birthDate==["+birthDate+""); System.out.println("birthDate==["+birthDate+"]");
SimpleDateFormat format = new SimpleDateFormat(genericUtility.getDBDateFormat()); SimpleDateFormat format = new SimpleDateFormat(genericUtility.getDBDateFormat());
SimpleDateFormat format1 = new SimpleDateFormat(genericUtility.getApplDateFormat()); SimpleDateFormat format1 = new SimpleDateFormat(genericUtility.getApplDateFormat());
//Mdified by Sarita S. on [28/06/2019][End] //Mdified by Sarita S. on [28/06/2019][End]
...@@ -1075,7 +1075,10 @@ public class EmployeeServicePrdAmdIC extends ValidatorEJB implements EmployeeSer ...@@ -1075,7 +1075,10 @@ public class EmployeeServicePrdAmdIC extends ValidatorEJB implements EmployeeSer
if(isVarValNull) if(isVarValNull)
{ {
cal = Calendar.getInstance(); cal = Calendar.getInstance();
if(retDtO != null ) //Modified by Anjali R. on [16/07/2019][Start]
//if(retDtO != null )
if(retDtO != null && retDtO.trim().length() > 0 )
//Modified by Anjali R. on [16/07/2019][End]
{ {
//Commented and Added by sarita as value comes from dom needs to format as applicationDateformat on 28 JUNE 2019 [START] //Commented and Added by sarita as value comes from dom needs to format as applicationDateformat on 28 JUNE 2019 [START]
//retierDateOld = (Date) format.parse(retDtO); //retierDateOld = (Date) format.parse(retDtO);
...@@ -1087,11 +1090,16 @@ public class EmployeeServicePrdAmdIC extends ValidatorEJB implements EmployeeSer ...@@ -1087,11 +1090,16 @@ public class EmployeeServicePrdAmdIC extends ValidatorEJB implements EmployeeSer
} }
else else
{ {
//Modified by Anjali R. on [16/07/2019][Start]
if(birthDate != null )
{
//Modified by Anjali R. on [16/07/2019][End]
format.set2DigitYearStart(format.parse(birthDate.toString()));//Mdified by Sarita S. on [28/06/2019][Start] format.set2DigitYearStart(format.parse(birthDate.toString()));//Mdified by Sarita S. on [28/06/2019][Start]
retierDateOld = (Date) format.parse(birthDate.toString()); retierDateOld = (Date) format.parse(birthDate.toString());
cal.setTime(retierDateOld); cal.setTime(retierDateOld);
cal.add(Calendar.MONTH, retAgeNew); cal.add(Calendar.MONTH, retAgeNew);
} }
}
Date RetDate = cal.getTime(); Date RetDate = cal.getTime();
RetDateDT = new Timestamp(RetDate.getTime()); RetDateDT = new Timestamp(RetDate.getTime());
dateAf = getCurrdateAppFormat(RetDateDT); dateAf = getCurrdateAppFormat(RetDateDT);
...@@ -1103,7 +1111,10 @@ public class EmployeeServicePrdAmdIC extends ValidatorEJB implements EmployeeSer ...@@ -1103,7 +1111,10 @@ public class EmployeeServicePrdAmdIC extends ValidatorEJB implements EmployeeSer
if(isVarValNull) if(isVarValNull)
{ {
cal = Calendar.getInstance(); cal = Calendar.getInstance();
if(retDtO != null) //Modified by Anjali R. on [16/07/2019][Start]
//if(retDtO != null)
if(retDtO != null && retDtO.trim().length() > 0 )
//Modified by Anjali R. on [16/07/2019][End]
{ {
//Commented and Added by sarita as value comes from dom needs to format as applicationDateformat on 28 JUNE 2019 [START] //Commented and Added by sarita as value comes from dom needs to format as applicationDateformat on 28 JUNE 2019 [START]
//retierDateOld = (Date) format.parse(retDtO); //retierDateOld = (Date) format.parse(retDtO);
...@@ -1115,11 +1126,16 @@ public class EmployeeServicePrdAmdIC extends ValidatorEJB implements EmployeeSer ...@@ -1115,11 +1126,16 @@ public class EmployeeServicePrdAmdIC extends ValidatorEJB implements EmployeeSer
} }
else else
{ {
//Modified by Anjali R. on [16/07/2019][Start]
if(birthDate != null )
{
//Modified by Anjali R. on [16/07/2019][End]
format.set2DigitYearStart(format1.parse(birthDate.toString()));//Mdified by Sarita S. on [28/06/2019][Start] format.set2DigitYearStart(format1.parse(birthDate.toString()));//Mdified by Sarita S. on [28/06/2019][Start]
retierDateOld = (Date) format.parse(birthDate.toString()); retierDateOld = (Date) format.parse(birthDate.toString());
cal.setTime(retierDateOld); cal.setTime(retierDateOld);
cal.add(Calendar.MONTH, retAgeNew); cal.add(Calendar.MONTH, retAgeNew);
} }
}
Date RetDate = cal.getTime(); Date RetDate = cal.getTime();
RetDateDT = new Timestamp(RetDate.getTime()); RetDateDT = new Timestamp(RetDate.getTime());
dateAf = getCurrdateAppFormat(RetDateDT); dateAf = getCurrdateAppFormat(RetDateDT);
......
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