Commit 3252eb99 authored by rtelang's avatar rtelang

emp_master21.xml

emp_personal_info21.xml
d_emp_master21.srd
d_emp_personal_info21.srd
EmployeeEJB.java
EmpPersonalInfo.java
-Changes done related to date format.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@207552 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 9f458ccc
...@@ -9296,17 +9296,16 @@ ...@@ -9296,17 +9296,16 @@
<y>1532</y> <y>1532</y>
<height>15</height> <height>15</height>
<width>90</width> <width>90</width>
<format>[shortdate] [time]</format> <format>[general]</format>
<html> <html>
<valueishtml>0</valueishtml> <valueishtml>0</valueishtml>
</html> </html>
<name>retirement_date</name> <name>retirement_date</name>
<visible>1</visible> <visible>1</visible>
<EditStyle style="edit"> <EditStyle style="editmask">
<limit>0</limit> <mask>dd/mm/yy</mask>
<case>any</case>
<autoselect>yes</autoselect>
<imemode>0</imemode> <imemode>0</imemode>
<focusrectangle>no</focusrectangle>
</EditStyle> </EditStyle>
<font> <font>
<face>Times New Roman</face> <face>Times New Roman</face>
......
...@@ -415,7 +415,7 @@ text(band=detail alignment="1" text="Probation Period :" border="0" color="0" x= ...@@ -415,7 +415,7 @@ text(band=detail alignment="1" text="Probation Period :" border="0" color="0" x=
text(band=detail alignment="1" text="Payment Site :" border="0" color="0" x="255" y="1211" height="16" width="206" html.valueishtml="0" name=payment_site_t visible="1" font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" ) text(band=detail alignment="1" text="Payment Site :" border="0" color="0" x="255" y="1211" height="16" width="206" html.valueishtml="0" name=payment_site_t visible="1" font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=detail alignment="1" text="Confirmed :" border="0" color="0" x="283" y="1291" height="16" width="205" html.valueishtml="0" name=t_6 visible="1" 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" ) text(band=detail alignment="1" text="Confirmed :" border="0" color="0" x="283" y="1291" height="16" width="205" html.valueishtml="0" name=t_6 visible="1" 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=168 alignment="0" tabsequence=1030 border="5" color="255" x="154" y="1513" height="15" width="90" format="[general]" html.valueishtml="0" name=retirement_age visible="1" edit.limit=0 edit.case=any edit.autoselect=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="67108864" ) column(band=detail id=168 alignment="0" tabsequence=1030 border="5" color="255" x="154" y="1513" height="15" width="90" format="[general]" html.valueishtml="0" name=retirement_age visible="1" edit.limit=0 edit.case=any edit.autoselect=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="67108864" )
column(band=detail id=169 alignment="0" tabsequence=1040 border="5" color="255" x="154" y="1532" height="15" width="90" format="[shortdate] [time]" html.valueishtml="0" name=retirement_date visible="1" edit.limit=0 edit.case=any edit.autoselect=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="67108864" ) column(band=detail id=169 alignment="0" tabsequence=1040 border="5" color="255" x="154" y="1532" height="15" width="90" format="[general]" html.valueishtml="0" name=retirement_date visible="1" editmask.mask="dd/mm/yy" 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="67108864" )
groupbox(band=detail text="Payroll"border="2" color="0" x="8" y="1574" height="361" width="571" name=gb_4 visible="1" font.face="Liberation Sans" font.height="-12" font.weight="700" font.family="2" font.pitch="2" font.charset="0" font.underline="1" background.mode="1" background.color="553648127" ) groupbox(band=detail text="Payroll"border="2" color="0" x="8" y="1574" height="361" width="571" name=gb_4 visible="1" font.face="Liberation Sans" font.height="-12" font.weight="700" font.family="2" font.pitch="2" font.charset="0" font.underline="1" background.mode="1" background.color="553648127" )
text(band=detail alignment="1" text="Mode of Pay :" border="0" color="0" x="59" y="1609" height="16" width="92" html.valueishtml="0" name=pay_mode_t visible="1" font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" ) text(band=detail alignment="1" text="Mode of Pay :" border="0" color="0" x="59" y="1609" height="16" width="92" html.valueishtml="0" name=pay_mode_t visible="1" font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=detail alignment="1" text="Basic Per Month :" border="0" color="0" x="40" y="1630" height="16" width="111" html.valueishtml="0" name=basic_t visible="1" font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" ) text(band=detail alignment="1" text="Basic Per Month :" border="0" color="0" x="40" y="1630" height="16" width="111" html.valueishtml="0" name=basic_t visible="1" font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
......
...@@ -12,6 +12,8 @@ import java.util.ArrayList; ...@@ -12,6 +12,8 @@ import java.util.ArrayList;
import java.util.Calendar; import java.util.Calendar;
import java.util.Date; import java.util.Date;
import javax.ejb.Stateless;
import org.w3c.dom.Document; import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap; import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node; import org.w3c.dom.Node;
...@@ -24,10 +26,13 @@ import ibase.webitm.ejb.sys.UtilMethods; ...@@ -24,10 +26,13 @@ import ibase.webitm.ejb.sys.UtilMethods;
import ibase.webitm.utility.ITMException; import ibase.webitm.utility.ITMException;
//Modified By Dipesh on[19/07/2019][Start] //Modified By Dipesh on[19/07/2019][Start]
//@Stateless @Stateless
//Modified By Dipesh on[19/07/2019][End] //Modified By Dipesh on[19/07/2019][End]
public class EmpPersonalInfo extends ValidatorEJB implements EmpPersonalInfoLocal ,EmpPersonalInfoRemote public class EmpPersonalInfo extends ValidatorEJB implements EmpPersonalInfoLocal ,EmpPersonalInfoRemote
{ {
//Modified by Rohini T on [14/09/19][Start]
E12GenericUtility genericUtility = new E12GenericUtility();
//Modified by Rohini T on [14/09/19][End]
public String itemChanged(String xmlString, String xmlString1,String xmlString2, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException,ITMException public String itemChanged(String xmlString, String xmlString1,String xmlString2, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException,ITMException
{ {
Document dom = null; Document dom = null;
...@@ -182,6 +187,7 @@ public class EmpPersonalInfo extends ValidatorEJB implements EmpPersonalInfoLoca ...@@ -182,6 +187,7 @@ public class EmpPersonalInfo extends ValidatorEJB implements EmpPersonalInfoLoca
//Modified by Rohini T on 11/March/2019[Req ID:A17DSUN006 ][START] //Modified by Rohini T on 11/March/2019[Req ID:A17DSUN006 ][START]
//Added by Dipesh on[19/07/2019][Start] //Added by Dipesh on[19/07/2019][Start]
//revNo = genericUtility.getColumnValue("revision_no", dom); //revNo = genericUtility.getColumnValue("revision_no", dom);
System.out.println("Inside itm_defaultedit...");
revNo = checkNull(genericUtility.getColumnValue("revision_no", dom)); revNo = checkNull(genericUtility.getColumnValue("revision_no", dom));
empCode = checkNull(genericUtility.getColumnValue("emp_code",dom)); empCode = checkNull(genericUtility.getColumnValue("emp_code",dom));
//Added by Dipesh on[19/07/2019][End] //Added by Dipesh on[19/07/2019][End]
...@@ -201,6 +207,7 @@ public class EmpPersonalInfo extends ValidatorEJB implements EmpPersonalInfoLoca ...@@ -201,6 +207,7 @@ public class EmpPersonalInfo extends ValidatorEJB implements EmpPersonalInfoLoca
revisionNo = 0; revisionNo = 0;
} }
revisionNo = revisionNo+1; revisionNo = revisionNo+1;
System.out.println("revisionNo....."+revisionNo);
//Modified by Rohini T on 13/March/2019[Req ID: A17DSUN006][END] //Modified by Rohini T on 13/March/2019[Req ID: A17DSUN006][END]
valueXmlString.append("<revision_no><![CDATA[").append(revisionNo).append("]]></revision_no>\r\n"); valueXmlString.append("<revision_no><![CDATA[").append(revisionNo).append("]]></revision_no>\r\n");
} }
...@@ -599,7 +606,7 @@ public class EmpPersonalInfo extends ValidatorEJB implements EmpPersonalInfoLoca ...@@ -599,7 +606,7 @@ public class EmpPersonalInfo extends ValidatorEJB implements EmpPersonalInfoLoca
{ {
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
} }
try try
{ {
retAge = Integer.parseInt(retirementAge); retAge = Integer.parseInt(retirementAge);
...@@ -617,9 +624,11 @@ public class EmpPersonalInfo extends ValidatorEJB implements EmpPersonalInfoLoca ...@@ -617,9 +624,11 @@ public class EmpPersonalInfo extends ValidatorEJB implements EmpPersonalInfoLoca
SimpleDateFormat sdf1 = new SimpleDateFormat(genericUtility.getDBDateFormat()); SimpleDateFormat sdf1 = new SimpleDateFormat(genericUtility.getDBDateFormat());
currentDate = java.sql.Timestamp.valueOf(sdf1.format(today) + " 00:00:00.000"); currentDate = java.sql.Timestamp.valueOf(sdf1.format(today) + " 00:00:00.000");
retirementVarvalue=checkNull(admCommon.getAdmEnv(siteCode, cadreCode, gradeCode, "RETIREMENT_CALC_DBF",currentDate, conn)); retirementVarvalue=checkNull(admCommon.getAdmEnv(siteCode, cadreCode, gradeCode, "RETIREMENT_CALC_DBF",currentDate, conn));
System.out.println("retirementVarvalue>>>"+retirementVarvalue);
if("NULLFOUND".equalsIgnoreCase(retirementVarvalue)) if("NULLFOUND".equalsIgnoreCase(retirementVarvalue))
{ {
retirementVarvalue = admCommon.getEnv("999999", "RETIREMENT_CALC_DBF", conn); retirementVarvalue = admCommon.getEnv("999999", "RETIREMENT_CALC_DBF", conn);
System.out.println("retirementVarvalue>>>@@@"+retirementVarvalue);
if("NULLFOUND".equalsIgnoreCase(retirementVarvalue) || retirementVarvalue == null || retirementVarvalue.trim().length() == 0) if("NULLFOUND".equalsIgnoreCase(retirementVarvalue) || retirementVarvalue == null || retirementVarvalue.trim().length() == 0)
{ {
retirementVarvalue=""; retirementVarvalue="";
...@@ -629,6 +638,7 @@ public class EmpPersonalInfo extends ValidatorEJB implements EmpPersonalInfoLoca ...@@ -629,6 +638,7 @@ public class EmpPersonalInfo extends ValidatorEJB implements EmpPersonalInfoLoca
retirementVarvalue=""; retirementVarvalue="";
} }
} }
System.out.println("retirementVarvalue>>>!!!!"+retirementVarvalue);
if(retirementVarvalue != null && retirementVarvalue.trim().length() > 0) if(retirementVarvalue != null && retirementVarvalue.trim().length() > 0)
{ {
sql = "SELECT "+retirementVarvalue+"(?,?,?)as retDate FROM DUAL"; sql = "SELECT "+retirementVarvalue+"(?,?,?)as retDate FROM DUAL";
...@@ -654,9 +664,16 @@ public class EmpPersonalInfo extends ValidatorEJB implements EmpPersonalInfoLoca ...@@ -654,9 +664,16 @@ public class EmpPersonalInfo extends ValidatorEJB implements EmpPersonalInfoLoca
} }
if(retirementDate == null) if(retirementDate == null)
{ {
retirementDate=utilmethod.AddMonths(birthDateDT, retAge); System.out.println("Inside AddMonths calculation");
retirementDate = utilmethod.AddMonths(birthDateDT, retAge);
System.out.println("retirementDate===["+retirementDate+"]");
} }
retDateStr = sdf.format(new Date(retirementDate.getTime())); //Modified by Rohini T on [14/09/19][Start]
//retDateStr = sdf.format(new Date(retirementDate.getTime()));
retDateStr = getCurrdateAppFormat(retirementDate);
System.out.println("retDateStr:::::"+retDateStr);
//Modified by Rohini T on [14/09/19][End]
System.out.println("retDateStr::::"+retDateStr);
//valueXmlString.append("<retirement_age>").append("<![CDATA[" + retireAge + "]]>").append("</retirement_age>"); //valueXmlString.append("<retirement_age>").append("<![CDATA[" + retireAge + "]]>").append("</retirement_age>");
valueXmlString.append("<retirement_date>").append("<![CDATA[" + retDateStr + "]]>").append("</retirement_date>"); valueXmlString.append("<retirement_date>").append("<![CDATA[" + retDateStr + "]]>").append("</retirement_date>");
} }
...@@ -1190,4 +1207,23 @@ public class EmpPersonalInfo extends ValidatorEJB implements EmpPersonalInfoLoca ...@@ -1190,4 +1207,23 @@ public class EmpPersonalInfo extends ValidatorEJB implements EmpPersonalInfoLoca
System.out.println("Returning Value From getEnv() :: "+retValue); System.out.println("Returning Value From getEnv() :: "+retValue);
return retValue; return retValue;
} }
//Modified by Rohini T on [14/09/19][Start]
private String getCurrdateAppFormat(java.sql.Timestamp inputDate) throws ITMException
{
String retDate ="";
System.out.println("Comming Date[In DB Format] :::"+inputDate.toString());
try
{
retDate = genericUtility.getValidDateString(inputDate.toString(), genericUtility.getDBDateFormat(), genericUtility.getApplDateFormat());
}
catch(Exception e)
{
e.printStackTrace();
throw new ITMException(e);
}
System.out.println("Retturning Date :::"+retDate);
return (retDate);
}
//Modified by Rohini T on [14/09/19][End]
} }
\ No newline at end of file
...@@ -27,6 +27,8 @@ import java.util.Calendar; ...@@ -27,6 +27,8 @@ import java.util.Calendar;
import java.util.Date; import java.util.Date;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
import javax.ejb.Stateless;
//import javax.ejb.Stateless; //import javax.ejb.Stateless;
import org.w3c.dom.CDATASection; import org.w3c.dom.CDATASection;
...@@ -46,7 +48,7 @@ import ibase.webitm.ejb.sys.UtilMethods; ...@@ -46,7 +48,7 @@ import ibase.webitm.ejb.sys.UtilMethods;
//import com.sun.org.apache.xalan.internal.xsltc.compiler.Pattern; //import com.sun.org.apache.xalan.internal.xsltc.compiler.Pattern;
//@Stateless @Stateless
public class EmployeeEJB extends ValidatorEJB implements EmployeeEJBLocal,EmployeeEJBRemote public class EmployeeEJB extends ValidatorEJB implements EmployeeEJBLocal,EmployeeEJBRemote
{ {
...@@ -6804,9 +6806,11 @@ public class EmployeeEJB extends ValidatorEJB implements EmployeeEJBLocal,Employ ...@@ -6804,9 +6806,11 @@ public class EmployeeEJB extends ValidatorEJB implements EmployeeEJBLocal,Employ
SimpleDateFormat sdf1 = new SimpleDateFormat(genericUtility.getDBDateFormat()); SimpleDateFormat sdf1 = new SimpleDateFormat(genericUtility.getDBDateFormat());
currentDate = java.sql.Timestamp.valueOf(sdf1.format(today) + " 00:00:00.000"); currentDate = java.sql.Timestamp.valueOf(sdf1.format(today) + " 00:00:00.000");
retirementVarvalue=checkNull(admCommon.getAdmEnv(siteCode, cadreCode, gradeCode, "RETIREMENT_CALC_DBF",currentDate, conn)); retirementVarvalue=checkNull(admCommon.getAdmEnv(siteCode, cadreCode, gradeCode, "RETIREMENT_CALC_DBF",currentDate, conn));
System.out.println("retirementVarvalue>>>"+retirementVarvalue);
if("NULLFOUND".equalsIgnoreCase(retirementVarvalue)) if("NULLFOUND".equalsIgnoreCase(retirementVarvalue))
{ {
retirementVarvalue = admCommon.getEnv("999999", "RETIREMENT_CALC_DBF", conn); retirementVarvalue = admCommon.getEnv("999999", "RETIREMENT_CALC_DBF", conn);
System.out.println("retirementVarvalue>>>@@@"+retirementVarvalue);
//Modified by Rohini T on [21/08/19][Start] //Modified by Rohini T on [21/08/19][Start]
//if(retirementVarvalue.equalsIgnoreCase("NULLFOUND") || retirementVarvalue == null || retirementVarvalue.trim().length() == 0) //if(retirementVarvalue.equalsIgnoreCase("NULLFOUND") || retirementVarvalue == null || retirementVarvalue.trim().length() == 0)
if("NULLFOUND".equalsIgnoreCase(retirementVarvalue) || retirementVarvalue == null || retirementVarvalue.trim().length() == 0) if("NULLFOUND".equalsIgnoreCase(retirementVarvalue) || retirementVarvalue == null || retirementVarvalue.trim().length() == 0)
...@@ -6819,6 +6823,7 @@ public class EmployeeEJB extends ValidatorEJB implements EmployeeEJBLocal,Employ ...@@ -6819,6 +6823,7 @@ public class EmployeeEJB extends ValidatorEJB implements EmployeeEJBLocal,Employ
retirementVarvalue=""; retirementVarvalue="";
} }
} }
System.out.println("retirementVarvalue>>>!!!!"+retirementVarvalue);
if(retirementVarvalue != null && retirementVarvalue.trim().length() > 0) if(retirementVarvalue != null && retirementVarvalue.trim().length() > 0)
{ {
sql = "SELECT "+retirementVarvalue+"(?,?,?)as retDate FROM DUAL"; sql = "SELECT "+retirementVarvalue+"(?,?,?)as retDate FROM DUAL";
...@@ -6846,7 +6851,11 @@ public class EmployeeEJB extends ValidatorEJB implements EmployeeEJBLocal,Employ ...@@ -6846,7 +6851,11 @@ public class EmployeeEJB extends ValidatorEJB implements EmployeeEJBLocal,Employ
{ {
retirementDate=utilmethod.AddMonths(birthDate, retAge); retirementDate=utilmethod.AddMonths(birthDate, retAge);
} }
retDateStr = sdf.format(new Date(retirementDate.getTime())); //Modified by Rohini T on [14/09/19][Start]
retDateStr = getCurrdateAppFormat(retirementDate);
System.out.println("retDateStr:::::"+retDateStr);
//retDateStr = sdf.format(new Date(retirementDate.getTime()));
//Modified by Rohini T on [14/09/19][End]
//valueXmlString.append("<bank_name>").append("<![CDATA["+ rs.getString("BANK_NAME") +"]]>").append("</bank_name>"); //valueXmlString.append("<bank_name>").append("<![CDATA["+ rs.getString("BANK_NAME") +"]]>").append("</bank_name>");
} }
catch (Exception e) catch (Exception e)
......
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