Commit eadc12a5 authored by dpingle's avatar dpingle

* changes done in leave balance on [04/09/19]

w_leavebal.sql
leaveBalIC.java


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@206744 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 751f7c9b
...@@ -141,3 +141,22 @@ values ('INVLVDATA3','Invalid Date !','Data Already existed in Employee, Eff Dat ...@@ -141,3 +141,22 @@ values ('INVLVDATA3','Invalid Date !','Data Already existed in Employee, Eff Dat
----------------------------------------------------- Dipesh [31/08/2019] End ----------------------------------------------------- Dipesh [31/08/2019] End
----------------------------------------------------- Dipesh [04/09/2019] Start
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_LEAVEBAL','select a.emp_fname||'' ''||a.emp_mname||'' ''||a.emp_lname as Name, a.emp_code as Code from employee a
where a.relieve_date is null and UPPER(trim(a.emp_fname)||'' ''||trim(a.emp_mname)||'' ''||trim(a.emp_lname)|| '' '' ||(a.emp_code))
like UPPER(TRIM(''%?%'')) and length(trim(''?'')) >= 3
union all select ''Please enter minimum 3 characters of employee name '' as Name, '' '' as Code from dual where ''?'' is null or length(trim(''?'')) < 3',null,'Employee',0,0,to_date('27-05-00','DD-MM-RR'),'SUN ','CLIENT1 ','0',null,'0:emp_code,0:emp_code,0:emp_code,0:emp_code',2,null,null,null,null,null,null,'2',null,'3',null,null,null,'2 ',null,null,null,null,null,null,null);
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
('LVE_CODE','W_LEAVEBAL','SELECT LVE_CODE, DESCR FROM LEAVES',null,'Leave Code',0,0,to_date('27-05-00','DD-MM-RR'),'SUN ','CLIENT1 ','0',null,null,null,null,null,null,null,null,null,'2',null,'3',null,null,null,'2 ',null,null,null,null,null,null,null);
----------------------------------------------------- Dipesh [04/09/2019] End
...@@ -99,7 +99,7 @@ public class leaveBalIC extends ValidatorEJB implements leaveBalRemote,leaveBalL ...@@ -99,7 +99,7 @@ public class leaveBalIC extends ValidatorEJB implements leaveBalRemote,leaveBalL
int cnt = 0; int cnt = 0;
Date expDate = null; Date expDate = null;
Date uptoDate = null; Date uptoDate = null;
java.sql.Timestamp effectiveDate = null , upToDate = null;
E12GenericUtility genericUtility = null; E12GenericUtility genericUtility = null;
errStringXml = new StringBuffer("<?xml version=\"1.0\"?>\r\n<Root><Errors>"); errStringXml = new StringBuffer("<?xml version=\"1.0\"?>\r\n<Root><Errors>");
ArrayList<String> errList = new ArrayList<String>(); ArrayList<String> errList = new ArrayList<String>();
...@@ -284,10 +284,20 @@ public class leaveBalIC extends ValidatorEJB implements leaveBalRemote,leaveBalL ...@@ -284,10 +284,20 @@ public class leaveBalIC extends ValidatorEJB implements leaveBalRemote,leaveBalL
} }
} }
cnt = 0 ; cnt = 0 ;
if(expDateStr != null && expDateStr.trim().length() > 0)
{
effectiveDate = java.sql.Timestamp.valueOf(genericUtility.getValidDateTimeString(expDateStr,genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat()));
}
if(uptoDateStr != null && uptoDateStr.trim().length() > 0)
{
upToDate = java.sql.Timestamp.valueOf(genericUtility.getValidDateTimeString(uptoDateStr,genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat()));
}
sql="select count(*) as cnt from leavebal where exp_date=? and upto_date= ? and lve_code= ? and emp_code= ?"; sql="select count(*) as cnt from leavebal where exp_date=? and upto_date= ? and lve_code= ? and emp_code= ?";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, expDateStr); pstmt.setTimestamp(1, effectiveDate);
pstmt.setString(2, uptoDateStr); pstmt.setTimestamp(2, upToDate);
pstmt.setString(3, lveCode); pstmt.setString(3, lveCode);
pstmt.setString(4, empCode); pstmt.setString(4, empCode);
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