Commit f006a319 authored by dpingle's avatar dpingle

* updated component [01/11/19]

emp_mthad21.xml
w_emp_mthad.sql
d_emp_mthad_edit.srd
EmpMthadIC.java
EmployeewiseMonthlyPaystructure.png
EmployeewiseMonthlyPaystructurewht.png


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@210899 ce508802-f39f-4f6c-b175-0d175dae99d5
parent ea74beef
...@@ -140,3 +140,34 @@ update TRANSETUP set THUMB_ALT_COL = 'emp_fname', THUMB_IMAGE_COL= 'emp_code', T ...@@ -140,3 +140,34 @@ update TRANSETUP set THUMB_ALT_COL = 'emp_fname', THUMB_IMAGE_COL= 'emp_code', T
update POPHELP set THUMB_ALT_COL = 'descr', THUMB_IMAGE_COL= 'ad_code', THUMB_OBJ = 'AdCodeImages' where FIELD_NAME='AD_CODE' AND MOD_NAME = 'W_EMP_MTHAD'; update POPHELP set THUMB_ALT_COL = 'descr', THUMB_IMAGE_COL= 'ad_code', THUMB_OBJ = 'AdCodeImages' where FIELD_NAME='AD_CODE' AND MOD_NAME = 'W_EMP_MTHAD';
------------------------------------------------------[18/10/19]End ------------------------------------------------------[18/10/19]End
------------------------------------------------------[01/11/19]Start
update obj_actions set IMAGE='ibase/resource/objaction/add.svg', DISPLAY_MODE=0 where OBJ_NAME='emp_mthad' and LINE_NO=1;
update obj_actions set IMAGE='ibase/resource/objaction/edit.svg', DISPLAY_MODE=0 where OBJ_NAME='emp_mthad' and LINE_NO=2;
update obj_actions set IMAGE='ibase/resource/objaction/exprtExl.svg',DESCRIPTION='Export To Excel',SERVICE_CODE='a',INTERACTIVE='a',RIGHTS_CHAR='B',TITLE='Export2XLS',ACTION_TYPE='S', DISPLAY_MODE=1 where OBJ_NAME='emp_mthad' and LINE_NO=22;
update obj_actions set IMAGE='ibase/resource/objaction/Audit-trail.svg', RIGHTS_CHAR='Q', TITLE='Audit Trail', SHOW_IN_PANEL=1, DISPLAY_MODE=1 where OBJ_NAME='emp_mthad' and LINE_NO=21;
update itm2menu set ICON_PATH='EmployeewiseMonthlyPaystructure.png' , CLOSE_ICON='EmployeewiseMonthlyPaystructurewht.png' where WIN_NAME='w_emp_mthad';
Insert into POPHELP (FIELD_NAME,MOD_NAME,SQL_STR,DW_OBJECT,MSG_TITLE,WIDTH,HEIGHT,CHG_DATE,CHG_USER,CHG_TERM,DIST_OPT,FILTER_STRING,SQL_INPUT,DEFAULT_COL,POP_ALIGN,QUERY_MODE,PAGE_CONTEXT,POPHELP_COLS,POPHELP_SOURCE,MULTI_OPT,HELP_OPTION,POPUP_XSL_NAME,AUTO_FILL_LEN,THUMB_OBJ,THUMB_IMAGE_COL,THUMB_ALT_COL,AUTO_MIN_LENGTH,OBJ_NAME__DS,DATA_MODEL_NAME,VALIDATE_DATA,ITEM_CHANGE,MSG_NO,FILTER_EXPR,LAYOUT) values ('EMP_CODE','W_EMP_MTHAD','select a.emp_code as Code, a.emp_fname||'' ''||a.emp_mname||'' ''||a.emp_lname as Name
from employee a where a.relieve_date is null',null,'Employee Code',0,0,to_date('16-10-18','DD-MM-RR'),'BASE ','BASE ','0',null,null,0,null,null,null,null,null,null,'2',null,'3',null,null,null,'2 ',null,null,null,null,null,null,null);
UPDATE POPHELP SET WIDTH = NULL, HEIGHT=NULL , DIST_OPT=1 WHERE FIELD_NAME='EMP_CODE' AND MOD_NAME='W_EMP_MTHAD';
------------------------------------------------------[01/11/19]End
...@@ -178,7 +178,7 @@ public class EmpMthadIC extends ValidatorEJB implements EmpMthadLocal,EmpMthadRe ...@@ -178,7 +178,7 @@ public class EmpMthadIC extends ValidatorEJB implements EmpMthadLocal,EmpMthadRe
errList.add("VMADC1"); errList.add("VMADC1");
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
} }
else else
{ {
sql="select type as mtype from allwdedn where ad_code=?"; sql="select type as mtype from allwdedn where ad_code=?";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
...@@ -204,7 +204,37 @@ public class EmpMthadIC extends ValidatorEJB implements EmpMthadLocal,EmpMthadRe ...@@ -204,7 +204,37 @@ public class EmpMthadIC extends ValidatorEJB implements EmpMthadLocal,EmpMthadRe
errList.add("VMAD2"); errList.add("VMAD2");
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
} }
else
{
sql = "select count(*) as cnt from employee_mthad where ad_code = ? and emp_code=? ";//and month_code= ? and pay_table = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, adCode);
pstmt.setString(2, empCode);
rs = pstmt.executeQuery();
if (rs.next())
{
cnt = rs.getInt("cnt");
}
if (rs != null)
{
rs.close();
rs = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(cnt > 0 && !"E".equalsIgnoreCase(editFlag))
{
errList.add("VMADC4");
errFields.add(childNodeName.toLowerCase());
}
}
} }
} }
else if ("eff_date".equalsIgnoreCase(childNodeName)) else if ("eff_date".equalsIgnoreCase(childNodeName))
{ {
...@@ -368,7 +398,7 @@ public class EmpMthadIC extends ValidatorEJB implements EmpMthadLocal,EmpMthadRe ...@@ -368,7 +398,7 @@ public class EmpMthadIC extends ValidatorEJB implements EmpMthadLocal,EmpMthadRe
{ {
effDateStr = checkNull(genericUtility.getColumnValue("eff_date",dom)); effDateStr = checkNull(genericUtility.getColumnValue("eff_date",dom));
Date effDate = null; Date effDate = null;
effDate = effDateStr!=null ? sdf.parse(effDateStr) : effDate; effDate = effDateStr!=null && effDateStr.length() > 0 ? sdf.parse(effDateStr) : effDate;
lsVarValue = admCommon.gbfEmp(empCode, effDate, lsSite, userId, conn); lsVarValue = admCommon.gbfEmp(empCode, effDate, lsSite, userId, conn);
} }
} }
...@@ -545,13 +575,13 @@ public class EmpMthadIC extends ValidatorEJB implements EmpMthadLocal,EmpMthadRe ...@@ -545,13 +575,13 @@ public class EmpMthadIC extends ValidatorEJB implements EmpMthadLocal,EmpMthadRe
String mdescr = ""; String mdescr = "";
String lsProp = ""; String lsProp = "";
String lsVarValue = ""; String lsVarValue = "";
String lsVarValues = ""; String expDateStr = "";
String paySite = ""; String paySite = "";
AdmCommon admCommon = new AdmCommon(); AdmCommon admCommon = new AdmCommon();
// Modified By Sana s on 25/07/2019 [start] // Modified By Sana s on 25/07/2019 [start]
String effDateStr=""; String effDateStr="";
Timestamp joinDate = null, effDate = null; Timestamp joinDate = null;
String empName = ""; String empName = "";
String todayDate =""; String todayDate ="";
Timestamp todayTm= null; Timestamp todayTm= null;
...@@ -564,7 +594,7 @@ public class EmpMthadIC extends ValidatorEJB implements EmpMthadLocal,EmpMthadRe ...@@ -564,7 +594,7 @@ public class EmpMthadIC extends ValidatorEJB implements EmpMthadLocal,EmpMthadRe
{ {
genericUtility = new E12GenericUtility(); genericUtility = new E12GenericUtility();
sdf = new SimpleDateFormat(genericUtility.getApplDateFormat());///////////////// sdf = new SimpleDateFormat(genericUtility.getApplDateFormat());
System.out.println("currentFormNo...." + currentFormNo); System.out.println("currentFormNo...." + currentFormNo);
conn = getConnection(); conn = getConnection();
if (objContext != null && objContext.trim().length() > 0) if (objContext != null && objContext.trim().length() > 0)
...@@ -642,24 +672,29 @@ public class EmpMthadIC extends ValidatorEJB implements EmpMthadLocal,EmpMthadRe ...@@ -642,24 +672,29 @@ public class EmpMthadIC extends ValidatorEJB implements EmpMthadLocal,EmpMthadRe
//paySite = checkNull(genericUtility.getColumnValue("pay_site", dom)); //paySite = checkNull(genericUtility.getColumnValue("pay_site", dom));
valueXmlString.append("<pay_site ><![CDATA[").append(paySite).append("]]></pay_site>\r\n"); valueXmlString.append("<pay_site ><![CDATA[").append(paySite).append("]]></pay_site>\r\n");
lsVarValue = admCommon.getEnv("999999", "AD_EFFDATE", conn); effDateStr = admCommon.getEnv("999999", "AD_EFFDATE", conn);
System.out.println("lsVarValue==["+lsVarValue+"]"); System.out.println("effDateStr==["+effDateStr+"]");
System.out.println("genericUtility.getApplDateFormat()==["+genericUtility.getApplDateFormat()+"]");
//Modify by Varsha V on 30-07-19 for formating payparm date expDateStr = admCommon.getEnv("999999", "AD_EXPDATE", conn);
//lsVarValue = genericUtility.getValidDateString(lsVarValue, genericUtility.getApplDateFormat()); System.out.println("expDateStr==["+expDateStr+"]");
lsVarValue = genericUtility.getValidDateString(lsVarValue,"dd-MM-yy", genericUtility.getApplDateFormat());
System.out.println("lsVarValue==after["+lsVarValue+"]"); sdf = new SimpleDateFormat("dd-MM-yy");
Date effDate = sdf.parse(effDateStr);
System.out.println("effDate:::"+effDate);
Date expDate = sdf.parse(expDateStr);
System.out.println("expDate:::"+expDate);
lsVarValues = admCommon.getEnv("999999", "AD_EXPDATE", conn); sdf = new SimpleDateFormat("dd/MM/yy");
//Modify by Varsha V on 30-07-19 for formating payparm date effDateStr = sdf.format(effDate);
//lsVarValues = genericUtility.getValidDateString(lsVarValues, genericUtility.getApplDateFormat()); System.out.println("effDateStr:::"+effDateStr);
lsVarValues = genericUtility.getValidDateString(lsVarValues,"dd-MM-yy", genericUtility.getApplDateFormat());
valueXmlString.append("<eff_date ><![CDATA[").append(lsVarValue).append("]]></eff_date>\r\n"); expDateStr = sdf.format(expDate);
valueXmlString.append("<exp_date ><![CDATA[").append(lsVarValues).append("]]></exp_date>\r\n"); System.out.println("expDateStr:::"+expDateStr);
valueXmlString.append("<eff_date ><![CDATA[").append(effDateStr).append("]]></eff_date>\r\n");
valueXmlString.append("<exp_date ><![CDATA[").append(expDateStr).append("]]></exp_date>\r\n");
//////////////
// Modified by Sana S on 25/07/2019 [Shifted outside from bellow if condition to set employee name].Start // Modified by Sana S on 25/07/2019 [Shifted outside from bellow if condition to set employee name].Start
valueXmlString.append("<emp_name>").append("<![CDATA["+empName+"]]>").append("</emp_name>"); valueXmlString.append("<emp_name>").append("<![CDATA["+empName+"]]>").append("</emp_name>");
...@@ -676,7 +711,7 @@ public class EmpMthadIC extends ValidatorEJB implements EmpMthadLocal,EmpMthadRe ...@@ -676,7 +711,7 @@ public class EmpMthadIC extends ValidatorEJB implements EmpMthadLocal,EmpMthadRe
sql = "select count(*) as count from employee_ad where emp_code = ? and eff_date > ?"; sql = "select count(*) as count from employee_ad where emp_code = ? and eff_date > ?";
pstmt= conn.prepareStatement(sql); pstmt= conn.prepareStatement(sql);
pstmt.setString(1,empCode); pstmt.setString(1,empCode);
pstmt.setTimestamp(2,joinDate); pstmt.setTimestamp(2, joinDate);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
......
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