Commit f31de5d0 authored by ysawant's avatar ysawant

Added new migrated component of LeaveOpenBalance

w_leave_open_balance.sql
d_lve_bal_proce.srd
d_lve_open_bal.srd
LeaveOpenBalanceIC.java
LeaveOpenBalanceICLocal.java
LeaveOpenBalanceICRemote.java
LeaveOpenBalancePrc.java
LeaveOpenBalancePrcLocal.java
LeaveOpenBalancePrcRemote.java



git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@205525 ce508802-f39f-4f6c-b175-0d175dae99d5
parent a0c6f0c8
----------------------------------------------------- TRANSETUP
Insert into TRANSETUP (TRAN_WINDOW,SAVE_FLAG,VAL_FLAG,KEY_FLAG,KEY_STRING,UDF_1,UDF_2,UDF_3,UDF_4,UDF_5,REPEATE_ADD,CHG_DATE,CHG_USER,CHG_TERM,EDI_OPTION,SITE_ACC_COL,CONFIRM_COL,CONFIRM_VAL,REPEAT_ADD_DET,REPEATADDDET,LOAD_MODE,AUTO_CONFIRM,LEDG_POST_CONF,CHG_DATE_ON_CONF,TRAN_ID_COL,MAIL_OPTION,CONFIRM_MODE,GARBAGE_OPT,VAL_FLAG_EDI,VERIFY_PASSWORD,CUST_ACC_COL,SALES_PERS_ACC_COL,SUPP_ACC_COL,ITEM_SER_ACC_CODE,EMP_ACC_COL,ITEM_SER_ACC_COL,WORKFLOW_OPT,TABLE_NAME,APPLICATION,TABLE_DESC,TRAN_DATE_COL,TRAN_ID__FROM,TRAN_ID__TO,TABLE_NAME_DET1,TABLE_NAME_DET2,TABLE_NAME_DET3,MULTITIRE_OPT,REF_SER,VIEW_MODE,TAX_FORMS,SIGN_STATUS,USER_TRAN_WINDOW,CUSTOM_PREVIEW_OBJ,IGNOREERRLIST_ONLOAD,CHILDDATA_ARGOPT,EDIT_TMPLT,WRKFLW_INIT,EDITTAX,FORMAL_ARGS,AUDIT_TRAIL_OPT,EDIT_OPT,CACHE_OPT,OPTIMIZE_MODE,EDIT_EXPR,RATE_COL,QTY_COL,EDIT_EXPR_INP,RCP_CACHE_STATUS,PRINT_CONTROL,TRANSFER_MODE,PROFILE_ID__RES,TRAN_COMPL_MSG,PERIOD_OPTION,WRKFLW_PRIORITY,EXEC_TYPE,DISP_META_DATA,ALLOW_ATTACH,START_FORM,ISATTACHMENT,HEADER_FORM_NO,CONFIRM_DATE_COL,CONFIRM_BY_COL,MSG_ONSAVE,WF_STATUS,RESTART_FORM,CMS_PATH,BROW_DATA_DEF,DEF_VIEW,VIEW_OPTS,ISGWTINITIATED,DEFAULT_DATA_ROW,IN_WF_VAL,IN_WF_COL,CANCEL_VAL,CANCEL_COL,THUMB_ALT_COL,THUMB_IMAGE_COL,THUMB_OBJ,ATTACH_COUNT_MIN,FUNCTION_TYPE,COMPL_ACTION,DEFAULT_EDITOR,MSG_NO,OBJ_TYPE,STATUS_COL,ENABLE_EDITOR,OFFLINE_OPT,CLOSE_COL,CLOSE_VAL) values ('w_leave_open_balance','2','2','M','seq10',null,null,null,null,null,'N',to_date('16-02-15','DD-MM-RR'),'BASE ','BASE ','0',null,null,null,'N','N',null,null,null,null,null,'0','0',null,null,null,null,null,null,null,null,null,'0',null,'ADM',null,null,null,null,null,null,null,'0',null,'F',null,null,null,null,null,null,null,null,null,null,'0',null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,'Y',null,null,null,null,null,null,null,null,null,null,null,null,null,null,'compact',null,'C',null,null,null,null,null);
----------------------------------------------------- OBJ_FORMS
Insert into OBJ_FORMS (WIN_NAME,TITLE,OBJ_BROW_NAME,OBJ_EDIT_NAME,CROSS_UPDATE_EXPR,EXPR_FLD_INFO,TARGET_FLD_INFO,EXPR_COMMENT,FORM_NO,SCR_FLAG,AUTO_ACCEPT_SCAN,SCAN_FLAG,SCAN_METADATA,PROPERTY_INFO,SCAN_DELIMITER,COLUMN_ON_SAVE,AFTER_SAVE,EXT_SETUP,EXT_METADATA,EXT_COM,AUTO_ACCEPT_WEIGHDATA,FORM_TYPE,DISP_METADATA,PARENT_KEY_COL,QTY_COL,RATE_COL,ASSISTED_MODE,STORAGE_KEY_METADATA,SELECTION_MODE,DEFAULT_VIEW,AUTO_ADDON_ENTRY,DUPLICATE_ADD,DEFAULT_ROW_CNT,FREEZE_COL_POS,IS_MANDATORY,TRAN_ID_COL,SELECTION_OPT,KEY_INFO,THUMB_OBJ,THUMB_IMAGE_COL,THUMB_ALT_COL,FORM_NAME,FORM_ICON,FORM_VIEW_OPTS,X_COLUMN,Y_COLUMN,ACTION_ARG) values ('w_leave_open_balance','Leave Carry Forward','d_lve_open_bal','d_lve_open_bal',null,null,null,null,'1','F',null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,'DetailForm.png',null,null,null,null);
------------------------------------------------------ ITM2MENU
Insert into ITM2MENU (APPLICATION,LEVEL_1,LEVEL_2,LEVEL_3,LEVEL_4,LEVEL_5,WIN_NAME,DESCR,COMMENTS,MENU_PATH,ICON_PATH,CLOSE_ICON,OPEN_ICON,OBJ_TYPE,CHG_DATE,CHG_TERM,CHG_USER,MOB_DEPLOY,DEFAULT_STATE,DEF_ACTION,MOB_DEPLY,ENT_TYPES)
values ('ADP',4,12,5,0,0,'w_leave_open_balance','Leave Carry Forward','Leave carry forward','ADP.4.12.5.0.0','process.png',null,null,'P',null,null,null,'B',null,null,'B','0 ');
----------------------------------------------------- OBJ_ACTIONS
Insert into OBJ_ACTIONS (OBJ_NAME,LINE_NO,IMAGE,DESCRIPTION,SERVICE_CODE,INTERACTIVE,RIGHTS_CHAR,TITLE,FORM_NO,SERVICE_HANDLER,PLACEMENT,ACTION_TYPE,TRAN_TYPE,CHG_DATE,CHG_TERM,CHG_USER,IS_CONFIRMATION_REQ,SEP_DUTY_OPT,RE_AUTH_OPT,SHOW_IN_PANEL,PAGE_CONTEXT,TYPE,ACTION_ARG,SWIPE_POSITION,MULTI_ROW_OPT,ACTION_ID,DEF_NODATA,IN_PROC_INTRUPT,ESTIMATED_TIME,ACTION_GROUP,DISPLAY_OPT,DISPLAY_MODE,SHOW_CONFIRM,REC_SPECIFIC) values ('leave_open_balance',8,'ibase/resource/objaction/copyTransaction.svg','Adding New','a','a','A','Copy Transaction','1',null,null,'S',null,null,null,null,null,null,null,null,null,null,null,null,'0',null,null,null,null,null,null,'1',null,null);
Insert into OBJ_ACTIONS (OBJ_NAME,LINE_NO,IMAGE,DESCRIPTION,SERVICE_CODE,INTERACTIVE,RIGHTS_CHAR,TITLE,FORM_NO,SERVICE_HANDLER,PLACEMENT,ACTION_TYPE,TRAN_TYPE,CHG_DATE,CHG_TERM,CHG_USER,IS_CONFIRMATION_REQ,SEP_DUTY_OPT,RE_AUTH_OPT,SHOW_IN_PANEL,PAGE_CONTEXT,TYPE,ACTION_ARG,SWIPE_POSITION,MULTI_ROW_OPT,ACTION_ID,DEF_NODATA,IN_PROC_INTRUPT,ESTIMATED_TIME,ACTION_GROUP,DISPLAY_OPT,DISPLAY_MODE,SHOW_CONFIRM,REC_SPECIFIC) values ('leave_open_balance',11,null,'Action to process data','process','a','P','Process','1',null,null,'S',null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,'2',null,null);
Insert into OBJ_ACTIONS (OBJ_NAME,LINE_NO,IMAGE,DESCRIPTION,SERVICE_CODE,INTERACTIVE,RIGHTS_CHAR,TITLE,FORM_NO,SERVICE_HANDLER,PLACEMENT,ACTION_TYPE,TRAN_TYPE,CHG_DATE,CHG_TERM,CHG_USER,IS_CONFIRMATION_REQ,SEP_DUTY_OPT,RE_AUTH_OPT,SHOW_IN_PANEL,PAGE_CONTEXT,TYPE,ACTION_ARG,SWIPE_POSITION,MULTI_ROW_OPT,ACTION_ID,DEF_NODATA,IN_PROC_INTRUPT,ESTIMATED_TIME,ACTION_GROUP,DISPLAY_OPT,DISPLAY_MODE,SHOW_CONFIRM,REC_SPECIFIC) values ('leave_open_balance',39,'ibase/resource/objaction/exprtExl.svg','Export To Excel','a','a','B','Export2XLS','1',null,null,'S',null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,'2',null,1);
Insert into OBJ_ACTIONS (OBJ_NAME,LINE_NO,IMAGE,DESCRIPTION,SERVICE_CODE,INTERACTIVE,RIGHTS_CHAR,TITLE,FORM_NO,SERVICE_HANDLER,PLACEMENT,ACTION_TYPE,TRAN_TYPE,CHG_DATE,CHG_TERM,CHG_USER,IS_CONFIRMATION_REQ,SEP_DUTY_OPT,RE_AUTH_OPT,SHOW_IN_PANEL,PAGE_CONTEXT,TYPE,ACTION_ARG,SWIPE_POSITION,MULTI_ROW_OPT,ACTION_ID,DEF_NODATA,IN_PROC_INTRUPT,ESTIMATED_TIME,ACTION_GROUP,DISPLAY_OPT,DISPLAY_MODE,SHOW_CONFIRM,REC_SPECIFIC) values ('leave_open_balance',40,'ibase/resource/objaction/Audit-trail.svg','View Audit Trail','audit_trail','1','X','Audit Trail','1','1','1','U',null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,'2',null,null);
Insert into OBJ_ACTIONS (OBJ_NAME,LINE_NO,IMAGE,DESCRIPTION,SERVICE_CODE,INTERACTIVE,RIGHTS_CHAR,TITLE,FORM_NO,SERVICE_HANDLER,PLACEMENT,ACTION_TYPE,TRAN_TYPE,CHG_DATE,CHG_TERM,CHG_USER,IS_CONFIRMATION_REQ,SEP_DUTY_OPT,RE_AUTH_OPT,SHOW_IN_PANEL,PAGE_CONTEXT,TYPE,ACTION_ARG,SWIPE_POSITION,MULTI_ROW_OPT,ACTION_ID,DEF_NODATA,IN_PROC_INTRUPT,ESTIMATED_TIME,ACTION_GROUP,DISPLAY_OPT,DISPLAY_MODE,SHOW_CONFIRM,REC_SPECIFIC) values ('leave_open_balance',41,'ibase/resource/objaction/add.svg','Adding New','a','a','A','Add','2',null,null,'S',null,null,null,null,null,null,null,null,null,null,null,null,'0',null,null,null,null,null,null,'4',null,null);
Insert into OBJ_ACTIONS (OBJ_NAME,LINE_NO,IMAGE,DESCRIPTION,SERVICE_CODE,INTERACTIVE,RIGHTS_CHAR,TITLE,FORM_NO,SERVICE_HANDLER,PLACEMENT,ACTION_TYPE,TRAN_TYPE,CHG_DATE,CHG_TERM,CHG_USER,IS_CONFIRMATION_REQ,SEP_DUTY_OPT,RE_AUTH_OPT,SHOW_IN_PANEL,PAGE_CONTEXT,TYPE,ACTION_ARG,SWIPE_POSITION,MULTI_ROW_OPT,ACTION_ID,DEF_NODATA,IN_PROC_INTRUPT,ESTIMATED_TIME,ACTION_GROUP,DISPLAY_OPT,DISPLAY_MODE,SHOW_CONFIRM,REC_SPECIFIC) values ('leave_open_balance',42,'ibase/resource/objaction/edit.svg','Editing Existing Record','a','a','E','Edit','2',null,null,'S',null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,'4','000',null);
Insert into OBJ_ACTIONS (OBJ_NAME,LINE_NO,IMAGE,DESCRIPTION,SERVICE_CODE,INTERACTIVE,RIGHTS_CHAR,TITLE,FORM_NO,SERVICE_HANDLER,PLACEMENT,ACTION_TYPE,TRAN_TYPE,CHG_DATE,CHG_TERM,CHG_USER,IS_CONFIRMATION_REQ,SEP_DUTY_OPT,RE_AUTH_OPT,SHOW_IN_PANEL,PAGE_CONTEXT,TYPE,ACTION_ARG,SWIPE_POSITION,MULTI_ROW_OPT,ACTION_ID,DEF_NODATA,IN_PROC_INTRUPT,ESTIMATED_TIME,ACTION_GROUP,DISPLAY_OPT,DISPLAY_MODE,SHOW_CONFIRM,REC_SPECIFIC) values ('leave_open_balance',43,'ibase/resource/objaction/email.svg','Email Template','a','a','R','Email','2','6',null,'U',null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,'4',null,null);
----------------------------------------------------- SYSTEM_EVENTS
Insert into SYSTEM_EVENTS (OBJ_NAME,EVENT_CODE,EVENT_CONTEXT,SERVICE_CODE,METHOD_RULE,CHG_DATE,CHG_USER,CHG_TERM,RESULT_HANDLE,OVERWRITE_CORE,COMP_TYPE,COMP_NAME,COMM_FORMAT) values ('leave_open_balance','post_validate','1','post_gen_val',null,to_date('2007-12-04','RRRR-MM-DD'),'system','system','2','0','EJB','GenValidate',null);
Insert into SYSTEM_EVENTS (OBJ_NAME,EVENT_CODE,EVENT_CONTEXT,SERVICE_CODE,METHOD_RULE,CHG_DATE,CHG_USER,CHG_TERM,RESULT_HANDLE,OVERWRITE_CORE,COMP_TYPE,COMP_NAME,COMM_FORMAT) values ('leave_open_balance','post_item_change','1','poic_adm_default_1',null,to_date('2007-12-04','RRRR-MM-DD'),'BASE','BASE','2','0','WSR','nvo_bo_leave_open_balance',null);
Insert into SYSTEM_EVENTS (OBJ_NAME,EVENT_CODE,EVENT_CONTEXT,SERVICE_CODE,METHOD_RULE,CHG_DATE,CHG_USER,CHG_TERM,RESULT_HANDLE,OVERWRITE_CORE,COMP_TYPE,COMP_NAME,COMM_FORMAT) values ('leave_open_balance','pre_validate','1','prv_adm_default_1',null,to_date('2007-12-04','RRRR-MM-DD'),'BASE','BASE','2','0','WSR','nvo_bo_leave_open_balance',null);
Insert into SYSTEM_EVENTS (OBJ_NAME,EVENT_CODE,EVENT_CONTEXT,SERVICE_CODE,METHOD_RULE,CHG_DATE,CHG_USER,CHG_TERM,RESULT_HANDLE,OVERWRITE_CORE,COMP_TYPE,COMP_NAME,COMM_FORMAT) values ('leave_open_balance','process','1','pr_adm_default_2',null,to_date('2007-12-04','RRRR-MM-DD'),'Base','Base','2','0','WSR','nvo_bo_leave_open_balance',null);
update SYSTEM_EVENTS set SERVICE_CODE='poic_default_ejb',COMP_TYPE='JB', COMP_NAME='ibase.webitm.ejb.adm.LeaveOpenBalanceIC' where OBJ_NAME ='leave_open_balance' and EVENT_CODE='post_item_change';
update SYSTEM_EVENTS set SERVICE_CODE='prv_default_ejb',COMP_TYPE='JB', COMP_NAME='ibase.webitm.ejb.adm.LeaveOpenBalanceIC' where OBJ_NAME ='leave_open_balance' and EVENT_CODE='pre_validate';
update SYSTEM_EVENTS set SERVICE_CODE='prc_leave_open_balance',COMP_TYPE='JB',COMP_NAME='ibase.webitm.ejb.adm.LeaveOpenBalancePrc' where OBJ_NAME='leave_open_balance' and EVENT_CODE='process';
---------------------------------------------------- SYSTEM_EVENT_SERVICES
Insert into SYSTEM_EVENT_SERVICES (SERVICE_CODE,SERVICE_DESCR,SERVICE_URI,SERVICE_PROVIDER,METHOD_NAME,RETURN_VALUE,RETURN_TYPE,RETURN_DESCR,RETURN_XFRM,CHG_DATE,CHG_USER,CHG_TERM,SERVICE_NAMESPACE,RES_ELEM,SOAP_ACTION) values ('poic_default_ejb','itemchanged','http://localhost:9090/axis/services/ValidatorService',null,'itemChanged','String','S',null,null,to_date('22-03-19','DD-MM-RR'),'BASE ','BASE',null,null,null);
Insert into SYSTEM_EVENT_SERVICES (SERVICE_CODE,SERVICE_DESCR,SERVICE_URI,SERVICE_PROVIDER,METHOD_NAME,RETURN_VALUE,RETURN_TYPE,RETURN_DESCR,RETURN_XFRM,CHG_DATE,CHG_USER,CHG_TERM,SERVICE_NAMESPACE,RES_ELEM,SOAP_ACTION) values ('post_gen_val','validation','http://localhost:9090/axis/services/ValidatorService','BASE iformation','wfValData','String','S',null,null,to_date('21-05-16','DD-MM-RR'),'BASE ','VAIBHAV',null,null,null);
Insert into SYSTEM_EVENT_SERVICES (SERVICE_CODE,SERVICE_DESCR,SERVICE_URI,SERVICE_PROVIDER,METHOD_NAME,RETURN_VALUE,RETURN_TYPE,RETURN_DESCR,RETURN_XFRM,CHG_DATE,CHG_USER,CHG_TERM,SERVICE_NAMESPACE,RES_ELEM,SOAP_ACTION) values ('prv_default_ejb','prv_default_ejb','http://localhost:9090/axis/services/ValidatorService',null,'wfValData','String','S',null,null,to_date('22-03-19','DD-MM-RR'),'BASE ','BASE',null,null,null);
Insert into SYSTEM_EVENT_SERVICES (SERVICE_CODE,SERVICE_DESCR,SERVICE_URI,SERVICE_PROVIDER,METHOD_NAME,RETURN_VALUE,RETURN_TYPE,RETURN_DESCR,RETURN_XFRM,CHG_DATE,CHG_USER,CHG_TERM,SERVICE_NAMESPACE,RES_ELEM,SOAP_ACTION)
values ('prc_leave_open_balance','process','http://localhost:8080/axis/services/ProcessService','BASE','process',null,'S',null,null,to_date('31-08-06','DD-MM-RR'),'Vanita ','Base206 ',null,null,null);
---------------------------------------------------- SYSTEM_SERVICE_ARGS
Insert into SYSTEM_SERVICE_ARGS (SERVICE_CODE,LINE_NO,ARG_NAME,ARG_MODE,DESCR,ARG_TYPE,ARG_XFRM,CHG_DATE,CHG_USER,CHG_TERM,ARG_VALUE) values ('poic_default_ejb',1,'COMPONENT_TYPE','I',null,'S',null,null,null,null,'JB');
Insert into SYSTEM_SERVICE_ARGS (SERVICE_CODE,LINE_NO,ARG_NAME,ARG_MODE,DESCR,ARG_TYPE,ARG_XFRM,CHG_DATE,CHG_USER,CHG_TERM,ARG_VALUE) values ('poic_default_ejb',2,'COMPONENT_NAME','I',null,'S',null,null,null,null,'ibase.webitm.ejb.adm.AttendanceWorkBal');
Insert into SYSTEM_SERVICE_ARGS (SERVICE_CODE,LINE_NO,ARG_NAME,ARG_MODE,DESCR,ARG_TYPE,ARG_XFRM,CHG_DATE,CHG_USER,CHG_TERM,ARG_VALUE) values ('poic_default_ejb',3,'XML_DATA','I',null,'S',null,null,null,null,null);
Insert into SYSTEM_SERVICE_ARGS (SERVICE_CODE,LINE_NO,ARG_NAME,ARG_MODE,DESCR,ARG_TYPE,ARG_XFRM,CHG_DATE,CHG_USER,CHG_TERM,ARG_VALUE) values ('poic_default_ejb',4,'XML_DATA_1','I',null,'S',null,null,null,null,null);
Insert into SYSTEM_SERVICE_ARGS (SERVICE_CODE,LINE_NO,ARG_NAME,ARG_MODE,DESCR,ARG_TYPE,ARG_XFRM,CHG_DATE,CHG_USER,CHG_TERM,ARG_VALUE) values ('poic_default_ejb',5,'XML_DATA_ALL','I',null,'S',null,null,null,null,null);
Insert into SYSTEM_SERVICE_ARGS (SERVICE_CODE,LINE_NO,ARG_NAME,ARG_MODE,DESCR,ARG_TYPE,ARG_XFRM,CHG_DATE,CHG_USER,CHG_TERM,ARG_VALUE) values ('poic_default_ejb',6,'OBJ_CONTEXT','I',null,'S',null,null,null,null,null);
Insert into SYSTEM_SERVICE_ARGS (SERVICE_CODE,LINE_NO,ARG_NAME,ARG_MODE,DESCR,ARG_TYPE,ARG_XFRM,CHG_DATE,CHG_USER,CHG_TERM,ARG_VALUE) values ('poic_default_ejb',7,'FOCUSED_COLUMN','I',null,'S',null,null,null,null,null);
Insert into SYSTEM_SERVICE_ARGS (SERVICE_CODE,LINE_NO,ARG_NAME,ARG_MODE,DESCR,ARG_TYPE,ARG_XFRM,CHG_DATE,CHG_USER,CHG_TERM,ARG_VALUE) values ('poic_default_ejb',8,'EDIT_FLAG','I',null,'S',null,null,null,null,null);
Insert into SYSTEM_SERVICE_ARGS (SERVICE_CODE,LINE_NO,ARG_NAME,ARG_MODE,DESCR,ARG_TYPE,ARG_XFRM,CHG_DATE,CHG_USER,CHG_TERM,ARG_VALUE) values ('poic_default_ejb',9,'XTRA_PARAMS','I',null,'S',null,null,null,null,null);
Insert into SYSTEM_SERVICE_ARGS (SERVICE_CODE,LINE_NO,ARG_NAME,ARG_MODE,DESCR,ARG_TYPE,ARG_XFRM,CHG_DATE,CHG_USER,CHG_TERM,ARG_VALUE) values ('prv_default_ejb',1,'COMPONENT_TYPE','I',null,'S',null,to_date('01-06-12','DD-MM-RR'),'Manohar ','Manohar','JB');
Insert into SYSTEM_SERVICE_ARGS (SERVICE_CODE,LINE_NO,ARG_NAME,ARG_MODE,DESCR,ARG_TYPE,ARG_XFRM,CHG_DATE,CHG_USER,CHG_TERM,ARG_VALUE) values ('prv_default_ejb',2,'COMPONENT_NAME','I',null,'S',null,to_date('01-06-12','DD-MM-RR'),'Manohar ','Manohar','ibase.webitm.ejb.adm.AttendanceWorkBal');
Insert into SYSTEM_SERVICE_ARGS (SERVICE_CODE,LINE_NO,ARG_NAME,ARG_MODE,DESCR,ARG_TYPE,ARG_XFRM,CHG_DATE,CHG_USER,CHG_TERM,ARG_VALUE) values ('prv_default_ejb',3,'XML_DATA','I',null,'S',null,to_date('01-06-12','DD-MM-RR'),'Manohar ','Manohar',null);
Insert into SYSTEM_SERVICE_ARGS (SERVICE_CODE,LINE_NO,ARG_NAME,ARG_MODE,DESCR,ARG_TYPE,ARG_XFRM,CHG_DATE,CHG_USER,CHG_TERM,ARG_VALUE) values ('prv_default_ejb',4,'XML_DATA_1','I',null,'S',null,to_date('01-06-12','DD-MM-RR'),'Manohar ','Manohar',null);
Insert into SYSTEM_SERVICE_ARGS (SERVICE_CODE,LINE_NO,ARG_NAME,ARG_MODE,DESCR,ARG_TYPE,ARG_XFRM,CHG_DATE,CHG_USER,CHG_TERM,ARG_VALUE) values ('prv_default_ejb',5,'XML_DATA_ALL','I',null,'S',null,to_date('01-06-12','DD-MM-RR'),'Manohar ','Manohar',null);
Insert into SYSTEM_SERVICE_ARGS (SERVICE_CODE,LINE_NO,ARG_NAME,ARG_MODE,DESCR,ARG_TYPE,ARG_XFRM,CHG_DATE,CHG_USER,CHG_TERM,ARG_VALUE) values ('prv_default_ejb',6,'OBJ_CONTEXT','I',null,'S',null,to_date('01-06-12','DD-MM-RR'),'Manohar ','Manohar',null);
Insert into SYSTEM_SERVICE_ARGS (SERVICE_CODE,LINE_NO,ARG_NAME,ARG_MODE,DESCR,ARG_TYPE,ARG_XFRM,CHG_DATE,CHG_USER,CHG_TERM,ARG_VALUE) values ('prv_default_ejb',7,'EDIT_FLAG','I',null,'S',null,to_date('01-06-12','DD-MM-RR'),'Manohar ','Manohar',null);
Insert into SYSTEM_SERVICE_ARGS (SERVICE_CODE,LINE_NO,ARG_NAME,ARG_MODE,DESCR,ARG_TYPE,ARG_XFRM,CHG_DATE,CHG_USER,CHG_TERM,ARG_VALUE) values ('prv_default_ejb',8,'XTRA_PARAMS','I',null,'S',null,to_date('01-06-12','DD-MM-RR'),'Manohar ','Manohar',null);
Insert into SYSTEM_SERVICE_ARGS (SERVICE_CODE,LINE_NO,ARG_NAME,ARG_MODE,DESCR,ARG_TYPE,ARG_XFRM,CHG_DATE,CHG_USER,CHG_TERM,ARG_VALUE) values ('prc_leave_open_balance',1,'COMPONENT_TYPE','I','Component Type','C.String',null,to_date('16-05-08','DD-MM-RR'),'jaimin ','BASE207','JB');
Insert into SYSTEM_SERVICE_ARGS (SERVICE_CODE,LINE_NO,ARG_NAME,ARG_MODE,DESCR,ARG_TYPE,ARG_XFRM,CHG_DATE,CHG_USER,CHG_TERM,ARG_VALUE) values ('prc_leave_open_balance',2,'COMPONENT_NAME','I','Component Name','S',null,to_date('16-05-08','DD-MM-RR'),'jaimin ','BASE207','ibase.webitm.ejb.adm.LeaveOpenBalancePrc');
Insert into SYSTEM_SERVICE_ARGS (SERVICE_CODE,LINE_NO,ARG_NAME,ARG_MODE,DESCR,ARG_TYPE,ARG_XFRM,CHG_DATE,CHG_USER,CHG_TERM,ARG_VALUE) values ('prc_leave_open_balance',3,'XML_DATA_1','I','XML data of form no 1','S',null,to_date('16-05-08','DD-MM-RR'),'jaimin ','BASE207',null);
Insert into SYSTEM_SERVICE_ARGS (SERVICE_CODE,LINE_NO,ARG_NAME,ARG_MODE,DESCR,ARG_TYPE,ARG_XFRM,CHG_DATE,CHG_USER,CHG_TERM,ARG_VALUE) values ('prc_leave_open_balance',4,'XML_DATA__ALL','I','XML data of form no 1','S',null,to_date('16-05-08','DD-MM-RR'),'jaimin ','BASE207',null);
Insert into SYSTEM_SERVICE_ARGS (SERVICE_CODE,LINE_NO,ARG_NAME,ARG_MODE,DESCR,ARG_TYPE,ARG_XFRM,CHG_DATE,CHG_USER,CHG_TERM,ARG_VALUE) values ('prc_leave_open_balance',5,'WINDOW_NAME','I','Object Context','S',null,to_date('16-05-08','DD-MM-RR'),'jaimin ','BASE207','w_leave_open_balance');
Insert into SYSTEM_SERVICE_ARGS (SERVICE_CODE,LINE_NO,ARG_NAME,ARG_MODE,DESCR,ARG_TYPE,ARG_XFRM,CHG_DATE,CHG_USER,CHG_TERM,ARG_VALUE) values ('prc_leave_open_balance',6,'XTRA_PARAMS','I','Extra Arguments','S',null,to_date('16-05-08','DD-MM-RR'),'jaimin ','BASE207',null);
----------------------------------------------------- OBJ_ITEMCHANGE
Insert into OBJ_ITEMCHANGE (OBJ_NAME,FORM_NO,FIELD_NAME,MANDATORY) values ('leave_open_balance','1','dept_code__fr','Y');
Insert into OBJ_ITEMCHANGE (OBJ_NAME,FORM_NO,FIELD_NAME,MANDATORY) values ('leave_open_balance','1','dept_code__to','Y');
Insert into OBJ_ITEMCHANGE (OBJ_NAME,FORM_NO,FIELD_NAME,MANDATORY) values ('leave_open_balance','1','emp_code__fr','Y');
Insert into OBJ_ITEMCHANGE (OBJ_NAME,FORM_NO,FIELD_NAME,MANDATORY) values ('leave_open_balance','1','emp_code__to','Y');
Insert into OBJ_ITEMCHANGE (OBJ_NAME,FORM_NO,FIELD_NAME,MANDATORY) values ('leave_open_balance','1','itm_default','Y');
Insert into OBJ_ITEMCHANGE (OBJ_NAME,FORM_NO,FIELD_NAME,MANDATORY) values ('leave_open_balance','1','leave_type__fr','Y');
Insert into OBJ_ITEMCHANGE (OBJ_NAME,FORM_NO,FIELD_NAME,MANDATORY) values ('leave_open_balance','1','leave_type__to','Y');
Insert into OBJ_ITEMCHANGE (OBJ_NAME,FORM_NO,FIELD_NAME,MANDATORY) values ('leave_open_balance','1','proc_group__fr','Y');
Insert into OBJ_ITEMCHANGE (OBJ_NAME,FORM_NO,FIELD_NAME,MANDATORY) values ('leave_open_balance','1','proc_group__to','Y');
Insert into OBJ_ITEMCHANGE (OBJ_NAME,FORM_NO,FIELD_NAME,MANDATORY) values ('leave_open_balance','1','site_code__fr','Y');
Insert into OBJ_ITEMCHANGE (OBJ_NAME,FORM_NO,FIELD_NAME,MANDATORY) values ('leave_open_balance','1','site_code__to','Y');
------------------------------------------------------ MESSAGES
Insert into MESSAGES (MSG_NO,MSG_STR,MSG_DESCR,MSG_TYPE,MSG_OPT,MSG_TIME,ALARM,ERR_SOURCE,CHG_DATE,CHG_USER,CHG_TERM,OVERRIDE_INPUT,MAIL_OPTION) values ('VEDAT2 ','Invalid date, empty!','Date cannot be empty. Please enter valid date.','E','Y',null,null,null,to_date('1999-10-22','RRRR-MM-DD'),'SUN ','RITESH ',null,null);
Insert into MESSAGES (MSG_NO,MSG_STR,MSG_DESCR,MSG_TYPE,MSG_OPT,MSG_TIME,ALARM,ERR_SOURCE,CHG_DATE,CHG_USER,CHG_TERM,OVERRIDE_INPUT,MAIL_OPTION) values ('VTNOREC1 ','No records found','No records found for processing','E',null,0,null,null,to_date('2000-09-25','RRRR-MM-DD'),'CNF ','TARUN DESA ',null,null);
Insert into MESSAGES (MSG_NO,MSG_STR,MSG_DESCR,MSG_TYPE,MSG_OPT,MSG_TIME,ALARM,ERR_SOURCE,CHG_DATE,CHG_USER,CHG_TERM,OVERRIDE_INPUT,MAIL_OPTION) values ('DS000NR ','Incorrect rows to update','Update could not fetch correct no. of rows to be updated','E','Y',null,null,null,to_date('2000-04-06','RRRR-MM-DD'),'SUN ','CON_1',null,null);
Insert into MESSAGES (MSG_NO,MSG_STR,MSG_DESCR,MSG_TYPE,MSG_OPT,MSG_TIME,ALARM,ERR_SOURCE,CHG_DATE,CHG_USER,CHG_TERM,OVERRIDE_INPUT,MAIL_OPTION) values ('VTSEQ ','Invalid auto gen. logic','The logic for the autogeneration of transaction numbers for this option is not defined','E','Y',null,null,null,to_date('1999-10-22','RRRR-MM-DD'),'SUN','RITESH',null,null);
Insert into MESSAGES (MSG_NO,MSG_STR,MSG_DESCR,MSG_TYPE,MSG_OPT,MSG_TIME,ALARM,ERR_SOURCE,CHG_DATE,CHG_USER,CHG_TERM,OVERRIDE_INPUT,MAIL_OPTION) values ('VTTRANID ','Invalid Tranid !','Unable to generate tran id','E',null,null,null,null,to_date('2000-07-06','RRRR-MM-DD'),'BASE ','SUN_ITM ',null,null);
Insert into MESSAGES (MSG_NO,MSG_STR,MSG_DESCR,MSG_TYPE,MSG_OPT,MSG_TIME,ALARM,ERR_SOURCE,CHG_DATE,CHG_USER,CHG_TERM,OVERRIDE_INPUT,MAIL_OPTION) values ('DS000 ','Database Exception','Database Error','E','Y',0,null,null,to_date('2006-03-23','RRRR-MM-DD'),'SEJAL ','SEJAL ',null,null);
$PBExportHeader$d_lve_bal_proce.srd
release 9;
datawindow(units=0 timer_interval=0 color=79741120 processing=0 HTMLDW=no print.printername="" print.documentname="" print.orientation = 0 print.margin.left = 110 print.margin.right = 110 print.margin.top = 96 print.margin.bottom = 96 print.paper.source = 0 print.paper.size = 0 print.canusedefaultprinter=yes print.prompt=no print.buttons=no print.preview.buttons=no print.cliptext=no print.overrideprintjob=no print.collate=yes hidegrayline=no )
header(height=136 color="536870912" )
summary(height=0 color="536870912" )
footer(height=0 color="536870912" )
detail(height=72 color="536870912" )
table(column=(type=char(10) updatewhereclause=yes name=emp_code dbname="leavebal.emp_code" )
column=(type=char(5) updatewhereclause=yes name=lve_code dbname="leavebal.lve_code" )
column=(type=number updatewhereclause=yes name=csum_bal dbname="csum_bal" )
retrieve="PBSELECT( VERSION(400) TABLE(NAME=~"leavebal~" ) TABLE(NAME=~"employee~" ) COLUMN(NAME=~"leavebal.emp_code~") COLUMN(NAME=~"leavebal.lve_code~") COMPUTE(NAME=~"sum(bal_days) as csum_bal~") JOIN (LEFT=~"leavebal.emp_code~" OP =~"=~"RIGHT=~"employee.emp_code~" )WHERE( EXP1 =~"( leavebal.emp_code~" OP =~">=~" EXP2 =~":as_emp_code_fr )~" LOGIC =~"and~" ) WHERE( EXP1 =~"( leavebal.emp_code~" OP =~"<=~" EXP2 =~":as_emp_code_to )~" LOGIC =~"and~" ) WHERE( EXP1 =~"( ( leavebal.lve_code~" OP =~">=~" EXP2 =~":as_leave_type_fr )~" LOGIC =~"and~" ) WHERE( EXP1 =~"( leavebal.lve_code~" OP =~"<=~" EXP2 =~":as_leave_type_to )~" LOGIC =~"and~" ) WHERE( EXP1 =~"( leavebal.upto_date~" OP =~"<~" EXP2 =~":ad_proc_date )~" LOGIC =~"and~" ) WHERE( EXP1 =~"( leavebal.exp_date~" OP =~">~" EXP2 =~":ad_proc_date )~" LOGIC =~"and~" ) WHERE( EXP1 =~"( employee.work_site~" OP =~">=~" EXP2 =~":as_site_fr )~" LOGIC =~"and~" ) WHERE( EXP1 =~"( employee.work_site~" OP =~"<=~" EXP2 =~":as_site_to )~" LOGIC =~"and~" ) WHERE( EXP1 =~"( employee.dept_code~" OP =~">=~" EXP2 =~":dept_code_fr)~" LOGIC =~"and~" ) WHERE( EXP1 =~"( employee.dept_code~" OP =~"<=~" EXP2 =~":dept_code_to ) ~" LOGIC =~"and~" ) WHERE( EXP1 =~"(employee.proc_group~" OP =~">=~" EXP2 =~":as_proc_group__fr)~" LOGIC =~"And~" ) WHERE( EXP1 =~"(employee.proc_group~" OP =~"<=~" EXP2 =~":as_proc_group__to))~" ) GROUP(NAME=~"leavebal.emp_code~") GROUP(NAME=~"leavebal.lve_code~")) ARG(NAME = ~"as_leave_type_fr~" TYPE = string) ARG(NAME = ~"as_leave_type_to~" TYPE = string) ARG(NAME = ~"as_emp_code_fr~" TYPE = string) ARG(NAME = ~"as_emp_code_to~" TYPE = string) ARG(NAME = ~"as_site_fr~" TYPE = string) ARG(NAME = ~"as_site_to~" TYPE = string) ARG(NAME = ~"ad_proc_date~" TYPE = date) ARG(NAME = ~"dept_code_fr~" TYPE = string) ARG(NAME = ~"dept_code_to~" TYPE = string) ARG(NAME = ~"as_proc_group__fr~" TYPE = string) ARG(NAME = ~"as_proc_group__to~" TYPE = string) " arguments=(("as_leave_type_fr", string),("as_leave_type_to", string),("as_emp_code_fr", string),("as_emp_code_to", string),("as_site_fr", string),("as_site_to", string),("ad_proc_date", date),("dept_code_fr", string),("dept_code_to", string),("as_proc_group__fr", string),("as_proc_group__to", string)) )
text(band=header alignment="2" text="Emp Code" border="5" color="0" x="55" y="4" height="64" width="320" html.valueishtml="0" name=leavebal_emp_code_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=header alignment="2" text="Leave Code" border="5" color="0" x="384" y="4" height="64" width="302" html.valueishtml="0" name=leavebal_lve_code_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=header alignment="2" text="Balance" border="5" color="0" x="695" y="4" height="64" width="375" html.valueishtml="0" name=t_1 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="553648127" )
column(band=detail id=1 alignment="0" tabsequence=32766 border="0" color="0" x="55" y="4" height="64" width="320" format="[general]" html.valueishtml="0" name=emp_code visible="1" edit.limit=10 edit.case=any 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="1" background.color="536870912" )
column(band=detail id=2 alignment="0" tabsequence=32766 border="0" color="0" x="384" y="4" height="64" width="302" format="[general]" html.valueishtml="0" name=lve_code visible="1" edit.limit=5 edit.case=any 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="1" background.color="536870912" )
column(band=detail id=3 alignment="0" tabsequence=32766 border="0" color="0" x="695" y="4" height="64" width="370" format="0.00" html.valueishtml="0" name=csum_bal 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="1" background.color="553648127" )
htmltable(border="1" )
htmlgen(clientevents="1" clientvalidation="1" clientcomputedfields="1" clientformatting="0" clientscriptable="0" generatejavascript="1" encodeselflinkargs="1" netscapelayers="0" )
export.xml(headgroups="1" includewhitespace="0" metadatatype=0 savemetadata=0 )
import.xml()
export.pdf(method=0 distill.custompostscript="0" xslfop.print="0" )
\ No newline at end of file
$PBExportHeader$d_lve_open_bal.srd
release 9;
datawindow(units=1 timer_interval=0 color=67108864 processing=0 HTMLDW=no print.printername="" print.documentname="" print.orientation = 0 print.margin.left = 24 print.margin.right = 24 print.margin.top = 24 print.margin.bottom = 24 print.paper.source = 0 print.paper.size = 0 print.canusedefaultprinter=yes print.prompt=no print.buttons=no print.preview.buttons=no print.cliptext=no print.overrideprintjob=no print.collate=yes hidegrayline=no )
summary(height=1 color="536870912" )
footer(height=0 color="536870912" )
detail(height=319 color="536870912" )
table(column=(type=char(10) updatewhereclause=no name=emp_code__fr dbname="EMP_CODE__FR" )
column=(type=char(10) updatewhereclause=no name=emp_code__to dbname="EMP_CODE__TO" )
column=(type=char(6) updatewhereclause=no name=prd_code__fr dbname="PRD_CODE__FR" )
column=(type=char(6) updatewhereclause=no name=prd_code__to dbname="PRD_CODE__TO" )
column=(type=char(5) updatewhereclause=no name=site_code__fr dbname="SITE_CODE__FR" )
column=(type=char(5) updatewhereclause=no name=site_code__to dbname="SITE_CODE__TO" )
column=(type=datetime updatewhereclause=no name=proc_date dbname="proc_date" )
column=(type=char(5) updatewhereclause=no name=leave_type__fr dbname="leave_type_fr" )
column=(type=char(5) updatewhereclause=no name=leave_type__to dbname="leave_type_to" )
column=(type=char(10) updatewhereclause=no name=dept_code__fr dbname="dept_code_fr" )
column=(type=char(10) updatewhereclause=no name=dept_code__to dbname="dept_code_to" )
column=(type=char(45) updatewhereclause=no name=fr_emp_name dbname="fr_emp_name" )
column=(type=char(45) updatewhereclause=no name=to_emp_name dbname="to_emp_name" )
column=(type=char(40) updatewhereclause=no name=dept_descr__fr dbname="dept_descr__fr" )
column=(type=char(40) updatewhereclause=no name=dept_descr__to dbname="dept_descr__to" )
column=(type=char(60) updatewhereclause=no name=fr_site_descr dbname="fr_site_descr" )
column=(type=char(60) updatewhereclause=no name=to_site_descr dbname="to_site_descr" )
column=(type=char(40) updatewhereclause=no name=fr_lve_desc dbname="fr_lve_desc" )
column=(type=char(40) updatewhereclause=no name=to_lve_desc dbname="to_lve_desc" )
column=(type=char(5) updatewhereclause=no name=proc_group__fr dbname="proc_group__fr" )
column=(type=char(5) updatewhereclause=no name=proc_group__to dbname="proc_group__to" )
column=(type=char(60) updatewhereclause=no name=fr_proc_desc dbname="fr_proc_desc" )
column=(type=char(60) updatewhereclause=no name=to_proc_desc dbname="to_proc_desc" )
column=(type=char(1) updatewhereclause=no name=resign_emp dbname="resign_emp" initial="N" values="Yes Y/No N/" )
)
groupbox(band=detail text="Basic"border="2" color="0" x="5" y="6" height="306" width="533" name=gb_1 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="67108864" )
text(band=detail alignment="1" text="Employee to :" border="0" color="0" x="27" y="77" height="16" width="112" html.valueishtml="0" name=emp_code__to_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="2" background.color="79741120" )
column(band=detail id=2 alignment="0" tabsequence=40 border="5" color="0" x="145" y="77" height="16" width="81" format="[general]" html.valueishtml="0" name=emp_code__to 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="16777215" )
column(band=detail id=13 alignment="0" tabsequence=32766 border="5" color="255" x="233" y="77" height="16" width="276" format="[general]" html.valueishtml="0" name=to_emp_name 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" )
text(band=detail alignment="1" text="Carryforward Date :" border="0" color="0" x="27" y="27" height="16" width="112" html.valueishtml="0" name=proc_date_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="2" background.color="79741120" )
column(band=detail id=7 alignment="0" tabsequence=10 border="5" color="0" x="145" y="27" height="16" width="81" format="dd/mm/yy" html.valueishtml="0" name=proc_date visible="1" edit.name="datetime" 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="16777215" )
text(band=detail alignment="1" text="Consider Resigned Employee :" border="0" color="33554432" x="239" y="27" height="16" width="187" html.valueishtml="0" name=resign_emp_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="2" background.color="67108864" )
column(band=detail id=24 alignment="0" tabsequence=20 border="5" color="33554432" x="432" y="27" height="16" width="77" format="[general]" html.valueishtml="0" name=resign_emp 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="1073741824" )
text(band=detail alignment="1" text="Employee from :" border="0" color="0" x="27" y="52" height="16" width="112" html.valueishtml="0" name=emp_code__fr_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="2" background.color="79741120" )
column(band=detail id=1 alignment="0" tabsequence=30 border="5" color="0" x="145" y="52" height="16" width="81" format="[general]" html.valueishtml="0" name=emp_code__fr 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="16777215" )
column(band=detail id=12 alignment="0" tabsequence=32766 border="5" color="255" x="233" y="52" height="16" width="276" format="[general]" html.valueishtml="0" name=fr_emp_name 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" )
text(band=detail alignment="1" text="Department from :" border="0" color="0" x="27" y="102" height="16" width="112" html.valueishtml="0" name=dept_code__fr_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="2" background.color="79741120" )
column(band=detail id=10 alignment="0" tabsequence=50 border="5" color="0" x="145" y="102" height="16" width="81" format="[general]" html.valueishtml="0" name=dept_code__fr visible="1" edit.limit=5 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="2" font.pitch="2" font.charset="0" background.mode="2" background.color="16777215" )
column(band=detail id=14 alignment="0" tabsequence=32766 border="5" color="255" x="233" y="102" height="16" width="276" format="[general]" html.valueishtml="0" name=dept_descr__fr 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" )
text(band=detail alignment="1" text="Department to :" border="0" color="0" x="27" y="127" height="16" width="112" html.valueishtml="0" name=dept_code__to_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="2" background.color="79741120" )
column(band=detail id=11 alignment="0" tabsequence=60 border="5" color="0" x="145" y="127" height="16" width="81" format="[general]" html.valueishtml="0" name=dept_code__to visible="1" edit.limit=5 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="2" font.pitch="2" font.charset="0" background.mode="2" background.color="16777215" )
column(band=detail id=15 alignment="0" tabsequence=32766 border="5" color="255" x="233" y="127" height="16" width="276" format="[general]" html.valueishtml="0" name=dept_descr__to 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" )
text(band=detail alignment="1" text="Site from :" border="0" color="0" x="27" y="152" height="16" width="112" html.valueishtml="0" name=site_code__fr_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="2" background.color="79741120" )
column(band=detail id=5 alignment="0" tabsequence=70 border="5" color="0" x="145" y="152" height="16" width="81" format="[general]" html.valueishtml="0" name=site_code__fr visible="1" edit.limit=5 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="16777215" )
column(band=detail id=16 alignment="0" tabsequence=32766 border="5" color="255" x="233" y="152" height="16" width="276" format="[general]" html.valueishtml="0" name=fr_site_descr 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" )
text(band=detail alignment="1" text="Site to :" border="0" color="0" x="27" y="177" height="16" width="112" html.valueishtml="0" name=site_code__to_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="2" background.color="79741120" )
column(band=detail id=6 alignment="0" tabsequence=80 border="5" color="0" x="145" y="177" height="16" width="81" format="[general]" html.valueishtml="0" name=site_code__to visible="1" edit.limit=5 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="16777215" )
column(band=detail id=17 alignment="0" tabsequence=32766 border="5" color="255" x="233" y="177" height="16" width="276" format="[general]" html.valueishtml="0" name=to_site_descr 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" )
text(band=detail alignment="1" text="Leave from :" border="0" color="0" x="27" y="202" height="16" width="112" html.valueishtml="0" name=leave_type__fr_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="2" background.color="79741120" )
column(band=detail id=8 alignment="0" tabsequence=90 border="5" color="0" x="145" y="202" height="16" width="81" format="[general]" html.valueishtml="0" name=leave_type__fr visible="1" edit.limit=5 edit.case=upper edit.focusrectangle=no 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="16777215" )
column(band=detail id=18 alignment="0" tabsequence=32766 border="5" color="255" x="233" y="202" height="16" width="276" format="[general]" html.valueishtml="0" name=fr_lve_desc 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" )
text(band=detail alignment="1" text="Leave to :" border="0" color="0" x="27" y="227" height="16" width="112" html.valueishtml="0" name=leave_type__to_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="2" background.color="79741120" )
column(band=detail id=9 alignment="0" tabsequence=100 border="5" color="0" x="145" y="227" height="16" width="81" format="[general]" html.valueishtml="0" name=leave_type__to visible="1" edit.limit=5 edit.case=upper edit.focusrectangle=no 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="16777215" )
column(band=detail id=19 alignment="0" tabsequence=32766 border="5" color="255" x="233" y="227" height="16" width="276" format="[general]" html.valueishtml="0" name=to_lve_desc 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" )
text(band=detail alignment="1" text="Proc. Group from :" border="0" color="0" x="27" y="252" height="16" width="112" html.valueishtml="0" name=proc_group__fr_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="2" background.color="79741120" )
column(band=detail id=20 alignment="0" tabsequence=110 border="5" color="0" x="145" y="252" height="16" width="81" format="[general]" html.valueishtml="0" name=proc_group__fr visible="1" edit.limit=5 edit.case=upper edit.focusrectangle=no 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="16777215" )
column(band=detail id=22 alignment="0" tabsequence=32766 border="5" color="255" x="233" y="252" height="16" width="276" format="[general]" html.valueishtml="0" name=fr_proc_desc visible="1" edit.limit=0 edit.case=any edit.focusrectangle=no edit.autoselect=no 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" )
text(band=detail alignment="1" text="Proc. Group to :" border="0" color="0" x="27" y="277" height="16" width="112" html.valueishtml="0" name=proc_group__to_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="2" background.color="79741120" )
column(band=detail id=21 alignment="0" tabsequence=120 border="5" color="33554432" x="145" y="277" height="16" width="81" format="[general]" html.valueishtml="0" name=proc_group__to visible="1" edit.limit=5 edit.case=upper edit.focusrectangle=no 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="16777215" )
column(band=detail id=23 alignment="0" tabsequence=32766 border="5" color="255" x="233" y="277" height="16" width="276" format="[general]" html.valueishtml="0" name=to_proc_desc 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" )
htmltable(border="1" )
htmlgen(clientevents="1" clientvalidation="1" clientcomputedfields="1" clientformatting="0" clientscriptable="0" generatejavascript="1" encodeselflinkargs="1" netscapelayers="0" )
export.xml(headgroups="1" includewhitespace="0" metadatatype=0 savemetadata=0 )
import.xml()
export.pdf(method=0 distill.custompostscript="0" xslfop.print="0" )
\ No newline at end of file
package ibase.webitm.ejb.adm;
import java.rmi.RemoteException;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import ibase.utility.E12GenericUtility;
import ibase.webitm.ejb.ITMDBAccessEJB;
import ibase.webitm.ejb.ValidatorEJB;
import ibase.webitm.utility.ITMException;
public class LeaveOpenBalanceIC extends ValidatorEJB implements LeaveOpenBalanceICLocal,LeaveOpenBalanceICRemote
{
public String itemChanged(String xmlString, String xmlString1, String xmlString2, String objContext,
String currentColumn, String editFlag, String xtraParams) throws RemoteException, ITMException
{
Document dom1 = null;
Document dom = null;
Document dom2 = null;
String valueXmlString = "";
E12GenericUtility genericUtility = null;
try
{
genericUtility = new E12GenericUtility();
if (xmlString != null && xmlString.trim().length() != 0)
{
dom = genericUtility.parseString(xmlString);
}
if (xmlString1 != null && xmlString1.trim().length() != 0)
{
dom1 = genericUtility.parseString(xmlString1);
}
if (xmlString2 != null && xmlString2.trim().length() != 0)
{
dom2 = genericUtility.parseString(xmlString2);
}
valueXmlString = itemChanged(dom, dom1, dom2, objContext, currentColumn, editFlag, xtraParams);
}
catch (Exception e)
{
System.out.println("Exception :LeaveOpenBalanceIC :itemChanged(String,String):" + e.getMessage() + ":");
valueXmlString = genericUtility.createErrorString(e);
e.printStackTrace();
throw new ITMException(e);
}
System.out.println("returning from LeaveOpenBalanceIC itemChanged");
return valueXmlString;
}
public String itemChanged(Document dom , Document dom1, Document dom2, String objContext, String currentColumn,
String editFlag, String xtraParams) throws RemoteException, ITMException
{
PreparedStatement pstmt = null;
ResultSet rs = null;
Connection conn = null;
StringBuffer valueXmlString = null;
int currentFormNo = 0;
E12GenericUtility genericUtility = null;
String sql = "";
String userId="";
String loginSite="";
int mLevel = 0;
String prdCode = "";
String todaydate = "";
String lsDescr = "";
String empCodeFr="";
String empFname="";
String empLname="";
String modStr="";
String empCodeTo="";
String deptCodeFr="";
String deptCodeTo="";
String siteCodeFr="";
String siteCodeTo="";
String lveTypeFr="";
String lveTypeTo="";
String procGroupFr="";
String procGroupTo="";
try
{
genericUtility = new E12GenericUtility();
SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getApplDateFormat());
System.out.println("currentFormNo...." + currentFormNo);
conn = getConnection();
if (objContext != null && objContext.trim().length() > 0)
{
currentFormNo = Integer.parseInt(objContext);
}
valueXmlString = new StringBuffer("<?xml version=\"1.0\"?>\r\n<Root>\r\n<Header>\r\n<editFlag>");
valueXmlString.append(editFlag).append("</editFlag>\r\n</Header>\r\n");
System.out.println("current form no: " + currentFormNo);
userId = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginCode");
loginSite=genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginSiteCode");
//select usr_lev into :mlevl from users where code = :userid;
sql="select usr_lev from users where code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, userId);
rs = pstmt.executeQuery();
if (rs.next())
{
mLevel = rs.getInt("usr_lev");
}
if (rs != null)
{
rs.close();
rs = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
switch (currentFormNo)
{
case 1:
{
valueXmlString.append("<Detail1>\r\n");
if ("itm_default".equalsIgnoreCase(currentColumn))
{
System.out.println(":::::::::::Inside itm_default:::::::::::::::");
//select prd_code into :mprd from parameter;
sql="select prd_code from parameter";
pstmt = conn.prepareStatement(sql);
rs = pstmt.executeQuery();
if (rs.next())
{
prdCode = checkNull(rs.getString("prd_code"));
}
if (rs != null)
{
rs.close();
rs = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
todaydate=sdf.format(new java.util.Date());
valueXmlString.append("<proc_date><![CDATA[").append(todaydate).append("]]></proc_date>\r\n");
if(loginSite != null && loginSite.trim().length() > 0)
{
valueXmlString.append("<site_code__fr><![CDATA[").append(loginSite).append("]]></site_code__fr>\r\n");
valueXmlString.append("<site_code__to><![CDATA[").append(loginSite).append("]]></site_code__to>\r\n");
//select descr into :ls_descr from site where site_code = :login_site ;
sql="select descr from site where site_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, loginSite);
rs = pstmt.executeQuery();
if (rs.next())
{
lsDescr = checkNull(rs.getString("descr"));
}
if (rs != null)
{
rs.close();
rs = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
valueXmlString.append("<fr_site_descr><![CDATA[").append(lsDescr).append("]]></fr_site_descr>\r\n");
valueXmlString.append("<to_site_descr><![CDATA[").append(lsDescr).append("]]></to_site_descr>\r\n");
if(mLevel > 1)
{
valueXmlString.append("<site_code__fr protect=\"1\"><![CDATA[").append(loginSite).append("]]></site_code__fr>\r\n");
valueXmlString.append("<site_code__to protect=\"1\"><![CDATA[").append(loginSite).append("]]></site_code__to>\r\n");
}
valueXmlString.append("<resign_emp><![CDATA[").append("N").append("]]></resign_emp>\r\n");
}
}
if ("emp_code__fr".equalsIgnoreCase(currentColumn))
{
System.out.println(":::::::::::Inside emp_code__fr:::::::::::::::");
empCodeFr=checkNull(genericUtility.getColumnValue("emp_code__fr", dom));
//select emp_fname, emp_lname into :msetval, :msetval1 & from employee where emp_code = :mgetval;
sql="select emp_fname, emp_lname from employee where emp_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, empCodeFr);
rs = pstmt.executeQuery();
if (rs.next())
{
empFname = checkNull(rs.getString("emp_fname"));
empLname = checkNull(rs.getString("emp_lname"));
}
if (rs != null)
{
rs.close();
rs = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
modStr = empFname+" "+empLname;
valueXmlString.append("<fr_emp_name><![CDATA[").append(modStr).append("]]></fr_emp_name>\r\n");
}
if ("emp_code__to".equalsIgnoreCase(currentColumn))
{
System.out.println(":::::::::::Inside emp_code__to:::::::::::::::");
empCodeTo=checkNull(genericUtility.getColumnValue("emp_code__to", dom));
//select emp_fname, emp_lname into :msetval, :msetval1 & from employee where emp_code = :mgetval;
sql="select emp_fname, emp_lname from employee where emp_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, empCodeTo);
rs = pstmt.executeQuery();
if (rs.next())
{
empFname = checkNull(rs.getString("emp_fname"));
empLname = checkNull(rs.getString("emp_lname"));
}
if (rs != null)
{
rs.close();
rs = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
modStr = empFname+" "+empLname;
valueXmlString.append("<to_emp_name><![CDATA[").append(modStr).append("]]></to_emp_name>\r\n");
}
if ("dept_code__fr".equalsIgnoreCase(currentColumn))
{
System.out.println(":::::::::::Inside dept_code__fr:::::::::::::::");
deptCodeFr=checkNull(genericUtility.getColumnValue("dept_code__fr", dom));
//select descr into :msetval & from department where dept_code = :mgetval;
sql="select descr from department where dept_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, deptCodeFr);
rs = pstmt.executeQuery();
if (rs.next())
{
lsDescr = checkNull(rs.getString("descr"));
}
if (rs != null)
{
rs.close();
rs = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
valueXmlString.append("<dept_descr__fr><![CDATA[").append(lsDescr).append("]]></dept_descr__fr>\r\n");
}
if ("dept_code__to".equalsIgnoreCase(currentColumn))
{
System.out.println(":::::::::::Inside dept_code__to:::::::::::::::");
deptCodeTo=checkNull(genericUtility.getColumnValue("dept_code__to", dom));
//select descr into :msetval & from department where dept_code = :mgetval;
sql="select descr from department where dept_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, deptCodeTo);
rs = pstmt.executeQuery();
if (rs.next())
{
lsDescr = checkNull(rs.getString("descr"));
}
if (rs != null)
{
rs.close();
rs = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
valueXmlString.append("<dept_descr__to><![CDATA[").append(lsDescr).append("]]></dept_descr__to>\r\n");
}
if ("site_code__fr".equalsIgnoreCase(currentColumn))
{
System.out.println(":::::::::::Inside site_code__fr:::::::::::::::");
siteCodeFr=checkNull(genericUtility.getColumnValue("site_code__fr", dom));
//select descr into :msetval from site where site_code = :mgetval;
sql="select descr from site where site_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, siteCodeFr);
rs = pstmt.executeQuery();
if (rs.next())
{
lsDescr = checkNull(rs.getString("descr"));
}
if (rs != null)
{
rs.close();
rs = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
valueXmlString.append("<fr_site_descr><![CDATA[").append(lsDescr).append("]]></fr_site_descr>\r\n");
}
if ("site_code__to".equalsIgnoreCase(currentColumn))
{
System.out.println(":::::::::::Inside site_code__to:::::::::::::::");
siteCodeTo=checkNull(genericUtility.getColumnValue("site_code__to", dom));
//select descr into :msetval from site where site_code = :mgetval;
sql="select descr from site where site_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, siteCodeTo);
rs = pstmt.executeQuery();
if (rs.next())
{
lsDescr = checkNull(rs.getString("descr"));
}
if (rs != null)
{
rs.close();
rs = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
valueXmlString.append("<to_site_descr><![CDATA[").append(lsDescr).append("]]></to_site_descr>\r\n");
}
if ("leave_type__fr".equalsIgnoreCase(currentColumn))
{
System.out.println(":::::::::::Inside lve_code__fr:::::::::::::::");
lveTypeFr=checkNull(genericUtility.getColumnValue("leave_type__fr", dom));
//select descr into :msetval from leaves where lve_code = :mgetval;
sql="select descr from leaves where lve_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, lveTypeFr);
rs = pstmt.executeQuery();
if (rs.next())
{
lsDescr = checkNull(rs.getString("descr"));
}
if (rs != null)
{
rs.close();
rs = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
valueXmlString.append("<fr_lve_desc><![CDATA[").append(lsDescr).append("]]></fr_lve_desc>\r\n");
}
if ("leave_type__to".equalsIgnoreCase(currentColumn))
{
System.out.println(":::::::::::Inside lve_code__to:::::::::::::::");
lveTypeTo=checkNull(genericUtility.getColumnValue("leave_type__to", dom));
//select descr into :msetval from leaves where lve_code = :mgetval;
sql="select descr from leaves where lve_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, lveTypeTo);
rs = pstmt.executeQuery();
if (rs.next())
{
lsDescr = checkNull(rs.getString("descr"));
}
if (rs != null)
{
rs.close();
rs = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
valueXmlString.append("<to_lve_desc><![CDATA[").append(lsDescr).append("]]></to_lve_desc>\r\n");
}
if ("proc_group__fr".equalsIgnoreCase(currentColumn))
{
System.out.println(":::::::::::Inside proc_group__fr:::::::::::::::");
procGroupFr=checkNull(genericUtility.getColumnValue("proc_group__fr", dom));
//select descr into :msetval from gencodes where fld_name = 'PROC_GROUP' and fld_value = :mgetval;
sql="select descr from gencodes where fld_name = 'PROC_GROUP' and fld_value = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, procGroupFr);
rs = pstmt.executeQuery();
if (rs.next())
{
lsDescr = checkNull(rs.getString("descr"));
}
if (rs != null)
{
rs.close();
rs = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
valueXmlString.append("<fr_proc_desc><![CDATA[").append(lsDescr).append("]]></fr_proc_desc>\r\n");
}
if ("proc_group__to".equalsIgnoreCase(currentColumn))
{
System.out.println(":::::::::::Inside proc_group__to:::::::::::::::");
procGroupTo=checkNull(genericUtility.getColumnValue("proc_group__to", dom));
//select descr into :msetval from gencodes where fld_name = 'PROC_GROUP' and fld_value = :mgetval;
sql="select descr from gencodes where fld_name = 'PROC_GROUP' and fld_value = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, procGroupTo);
rs = pstmt.executeQuery();
if (rs.next())
{
lsDescr = checkNull(rs.getString("descr"));
}
if (rs != null)
{
rs.close();
rs = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
valueXmlString.append("<to_proc_desc><![CDATA[").append(lsDescr).append("]]></to_proc_desc>\r\n");
}
}
valueXmlString.append("</Detail1>");
break;
}
valueXmlString.append("</Root>");
}
catch (Exception e)
{
e.printStackTrace();
System.out.println("Exception :LeaveOpenBalanceIC [itemChanged(String xmlString)] : ==>\n" + e.getMessage());
throw new ITMException(e);
}
finally
{
try
{
if (conn != null)
{
if (rs != null)
{
rs.close();
rs = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
conn.close();
conn = null;
}
}
catch (Exception e)
{
System.out.println("Exception ::" + e);
e.printStackTrace();
throw new ITMException(e);
}
}
return valueXmlString.toString();
}
public String wfValData(String xmlString, String xmlString1, String xmlString2, String objContext, String editFlag,
String xtraParams) throws RemoteException, ITMException
{
System.out.println("xmlString::::::::::::"+xmlString);
Document dom = null;
Document dom1 = null;
Document dom2 = null;
String errString = "";
E12GenericUtility genericUtility = null;
try
{
genericUtility = new E12GenericUtility();
if (xmlString != null && xmlString.trim().length() != 0)
{
dom = genericUtility.parseString(xmlString);
System.out.println("Print dom>>>> " + dom);
}
if (xmlString1 != null && xmlString1.trim().length() != 0)
{
dom1 = genericUtility.parseString(xmlString1);
}
if (xmlString2 != null && xmlString2.trim().length() != 0)
{
dom2 = genericUtility.parseString(xmlString2);
}
errString = wfValData(dom, dom1, dom2, objContext, editFlag, xtraParams);
System.out.println("ErrString :" + errString);
}
catch (Exception e)
{
System.out.println("Exception :LeaveOpenBalanceIC :wfValData(String xmlString):" + e.getMessage() + ":");
errString = genericUtility.createErrorString(e);
e.printStackTrace();
throw new ITMException(e);
}
System.out.println("returning from LeaveOpenBalanceIC wfvaldata");
return errString;
}
public String wfValData(Document dom, Document dom1, Document dom2, String objContext, String editFlag,
String xtraParams) throws RemoteException, ITMException
{
PreparedStatement pstmt = null;
ResultSet rs = null;
String childNodeName = null;
StringBuffer errStringXml = null;
ITMDBAccessEJB itmDbAcess = null;
Connection conn = null;
int currentFormNo = 0;
NodeList parentList = null;
NodeList childList = null;
Node parentNode = null;
Node childNode = null;
int noOfChilds = 0;
String errString="";
String userId="";
String procDate="";
ArrayList<String> errList = new ArrayList<String>();
ArrayList<String> errFields = new ArrayList<String>();
String errorType="";
errStringXml = new StringBuffer("<?xml version=\"1.0\"?>\r\n<Root><Errors>");
E12GenericUtility genericUtility = null;
try
{
genericUtility = new E12GenericUtility();
itmDbAcess = new ITMDBAccessEJB();
conn = getConnection();
userId = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginCode");
if (objContext != null && objContext.trim().length() > 0)
{
currentFormNo = Integer.parseInt(objContext);
}
parentList = dom.getElementsByTagName("Detail" + currentFormNo);
parentNode = parentList.item(0);
childList = parentNode.getChildNodes();
noOfChilds = childList.getLength();
System.out.println("noOfChilds--->>>" + noOfChilds);
switch (currentFormNo)
{
case 1:
NodeList parentNodeList = dom.getElementsByTagName("Detail1");
parentNode = parentNodeList.item(0);
NodeList childNodeList = parentNode.getChildNodes();
int childNodeListLength = childNodeList.getLength();
System.out.println("child Node List Length::::::" + childNodeListLength);
for (int ctr = 0; ctr < childNodeListLength; ctr++)
{
childNode = childNodeList.item(ctr);
System.out.println("childNode" + childNode);
if (childNode.getNodeType() != Node.ELEMENT_NODE)
{
continue;
}
childNodeName = childNode.getNodeName();
System.out.println("childNodeName.editFlag." + childNodeName + "" + editFlag);
System.out.println("@V@ Edit flag :- [" + editFlag + "");
if("proc_date".equalsIgnoreCase(childNodeName))
{
procDate = genericUtility.getColumnValue("proc_date", dom);
if(procDate == null)
{
errList.add("VEDAT2");
errFields.add(childNodeName.toLowerCase());
errorType = errorType(conn, "VEDAT2");
if(errorType.equalsIgnoreCase("E"))
{
break;
}
}
}
}
if (errList != null && errList.size() > 0)
{
System.out.println("errList==[" + errList + "]");
int errListSize = errList.size();
System.out.println("errListSize:::::::[" + errListSize + "]");
System.out.println("in error::::::::::");
for (int i = 0; i < errListSize; i++)
{
System.out.println("in error For:::::::::::::::");
String errCode = (String) errList.get(i);
String errFldName = (String) errFields.get(i);
System.out.println("errCode .........." + errCode);
errString = itmDbAcess.getErrorString(errFldName, errCode, userId, "", conn);
System.out.println("errString is : ::::>>>> " + errString);
String msgType = errorType(conn, errCode);
if (errString.length() > 0)
{
String bifurErrString = errString.substring(errString.indexOf("<Errors>") + 8,errString.indexOf("<trace>"));
bifurErrString = bifurErrString + errString.substring(errString.indexOf("</trace>") + 8,errString.indexOf("</Errors>"));
errStringXml.append(bifurErrString);
System.out.println("errStringXml .........." + errStringXml);
errString = "";
}
if (msgType.equalsIgnoreCase("E"))
{
break;
}
}
errList.clear();
errFields.clear();
errStringXml.append("</Errors></Root>\r\n");
}
else
{
errStringXml = new StringBuffer("");
}
System.out.println("errStringXml.toString()---2= "+errStringXml.toString());
}
}
catch (Exception e)
{
e.printStackTrace();
throw new ITMException(e);
}
finally
{
try
{
if (rs != null)
{
rs.close();
rs = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
if (conn != null)
{
conn.close();
conn = null;
}
}
catch (Exception e)
{
System.out.println("Exception ::" + e);
e.printStackTrace();
throw new ITMException(e);
}
}
//errString = errStringXml.toString();
return errString;
}
private String errorType(Connection conn, String errorCode) throws ITMException
{
String msgType = "";
PreparedStatement pstmt = null;
ResultSet rs = null;
try
{
if (conn == null)
{
System.out.println("Connection is null");
} else
{
System.out.println("Connection is not null");
}
String sql = " SELECT MSG_TYPE FROM MESSAGES WHERE MSG_NO = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, errorCode);
rs = pstmt.executeQuery();
if (rs.next())
{
msgType = rs.getString("MSG_TYPE");
}
if (rs != null)
{
rs.close();
rs = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
}
catch (Exception ex)
{
ex.printStackTrace();
throw new ITMException(ex);
}
finally
{
try
{
if (rs != null)
{
rs.close();
rs = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
}
catch (Exception e)
{
e.printStackTrace();
throw new ITMException(e);
}
}
return msgType;
}
private String checkNull(String input)
{
if (input == null)
{
input = "";
}
return input;
}
}
package ibase.webitm.ejb.adm;
import java.rmi.RemoteException;
import org.w3c.dom.Document;
import ibase.webitm.ejb.ValidatorLocal;
import ibase.webitm.utility.ITMException;
public interface LeaveOpenBalanceICLocal extends ValidatorLocal
{
public String itemChanged(String xmlString, String xmlString1, String xmlString2, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException,ITMException;
public String itemChanged(Document dom, Document dom1,Document dom2, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException,ITMException;
public String wfValData(String xmlString, String xmlString1,String xmlString2, String objContext, String editFlag,String xtraParams) throws RemoteException,ITMException ;
public String wfValData(Document dom, Document dom1, Document dom2,String objContext, String editFlag, String xtraParams)throws RemoteException, ITMException;
}
package ibase.webitm.ejb.adm;
import java.rmi.RemoteException;
import org.w3c.dom.Document;
import ibase.webitm.ejb.ValidatorRemote;
import ibase.webitm.utility.ITMException;
public interface LeaveOpenBalanceICRemote extends ValidatorRemote
{
public String itemChanged(String xmlString, String xmlString1, String xmlString2, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException,ITMException;
public String itemChanged(Document dom, Document dom1,Document dom2, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException,ITMException;
public String wfValData(String xmlString, String xmlString1,String xmlString2, String objContext, String editFlag,String xtraParams) throws RemoteException,ITMException ;
public String wfValData(Document dom, Document dom1, Document dom2,String objContext, String editFlag, String xtraParams)throws RemoteException, ITMException;
}
package ibase.webitm.ejb.adm;
import java.rmi.RemoteException;
import java.sql.Connection;
import java.sql.Date;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.Timestamp;
import java.util.HashMap;
import java.util.Map;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import ibase.utility.CommonConstants;
import ibase.utility.E12GenericUtility;
import ibase.webitm.bean.adm.LogWriterDatabase;
import ibase.webitm.ejb.ITMDBAccessEJB;
import ibase.webitm.ejb.ProcessEJB;
import ibase.webitm.ejb.adm.adv.LeaveEncashmentConfirmation;
import ibase.webitm.ejb.sys.UtilMethods;
import ibase.webitm.utility.ITMException;
import ibase.webitm.utility.TransIDGenerator;
public class LeaveOpenBalancePrc extends ProcessEJB implements LeaveOpenBalancePrcLocal,LeaveEncasePrcRemote
{
E12GenericUtility genericUtility= new E12GenericUtility();
AdmCommon admCommon = new AdmCommon();
ITMDBAccessEJB itmDBAccessEJB = new ITMDBAccessEJB();
UtilMethods utilMethod = new UtilMethods();
LeaveEncashmentConfirmation LeaveConf = new LeaveEncashmentConfirmation();
public String process(String xmlString, String xmlString2, String windowName, String xtraParams) throws RemoteException, ITMException
{
Document detailDom = null;
Document headerDom = null;
String retStr = "";
Connection conn = null;
Connection logConn = null;
try
{
conn = getConnection();
logConn = getConnection();
System.out.println("Conn ["+conn+"]");
System.out.println("logConn ["+logConn+"]");
if (xmlString != null && xmlString.trim().length() > 0)
{
headerDom = genericUtility.parseString(xmlString);
System.out.println("headerDom ["+headerDom+"]");
}
if (xmlString2 != null && xmlString2.trim().length() > 0)
{
detailDom = genericUtility.parseString(xmlString2);
System.out.println("detailDom ["+detailDom+"]");
}
retStr = process(headerDom, detailDom, windowName, xtraParams, conn,logConn);
System.out.println("Process for LeaveOpenBalancePrc :::: " + retStr);
}
catch (Exception e)
{
System.out.println("Exception :LeaveOpenBalancePrc :process(String xmlString, String xmlString2, String windowName, String xtraParams):"
+ e.getMessage() + ":");
e.printStackTrace();
throw new ITMException(e);
}
finally
{
try
{
if(conn != null)
{
conn.close();
conn = null;
}
if(logConn != null)
{
logConn.close();
logConn = null;
}
}
catch (Exception e)
{
e.printStackTrace();
throw new ITMException(e);
}
}
return retStr;
}
public String process(Document headerDom, Document detailDom, String windowName, String xtraParams, Connection conn, Connection logConn) throws RemoteException, ITMException
{
//LogWriterDatabase logWriter = new LogWriterDatabase();
HRLogWriter logWriter = new HRLogWriter();
ResultSet rs = null, rs1 = null, rs2 = null, rs3 = null ,rs4 = null;
PreparedStatement pstmt = null, pstmt1 = null, pstmt2 = null,pstmt3 = null,pstmt4 = null,pstmt5 = null,pstmt6 = null,pstmt7 = null;
String sql = "",sql1 = "" ,sql2 = "",sql3 = "",sql4="",sql5 = "",sql6 = "",sql7 = "";
String errString = "";
String empCodeFr = "";
String empCodeTo = "";
String siteCodeFr = "";
String siteCodeTo = "";
String leaveTypeFr = "";
String leaveTypeTo = "";
String deptCodeFr = "";
String deptCodeTo = "";
String procGroupFr ="";
String procGroupTo = "";
String lsProcResEmp = "";
String procDate ="";
String keyString = "";
String tranId = "";
String userId = "";
String termId = "";
Timestamp ldRelieveDate=null;
Timestamp frDate = null;
Timestamp ldProcess = null;
Date ldProc = null;
Timestamp ldEffDate = null;
Timestamp ldUptoDate = null;
Map dwDataMap = null;
Map dataMap = null;
int rowCnt = 0;
Map rowMap = null;
int llRowCnt = 0;
String lsEmpCode = "";
String lsLveCode = "";
double lcPrevBal = 0.0;
int cnt = 0;
String errCode = "";
String lsLogText = "";
String lsEmpSite = "";
String lsWorkSite = "";
String xmlValues = "";
String objName = "", currentProcess = "", processId = "", activity = "", fileNameStartWith = "";
String jobId = "", loginSite = "";
try
{
System.out.println("::::::::::::Inside Process::::::::::::");
userId = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginCode");
termId = checkNull(genericUtility.getValueFromXTRA_PARAMS(xtraParams, "termId"));
loginSite = checkNull(genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginSiteCode"));
objName = getObjNameFromDom(headerDom, "objName");
logWriter.setCurrentProcess("LeaveOpenBalance");
logWriter.setActivity("LeaveOpenBalance");
logWriter.setProcessId("LeaveOpenBalance");
logWriter.setFileNameStartWith("");
currentProcess = logWriter.getCurrentProcess();
activity = logWriter.getActivity();
processId = logWriter.getProcessId();
fileNameStartWith = logWriter.getFileNameStartWith();
logWriter.initializeHRLogWriter(objName, jobId, userId, termId, activity, fileNameStartWith, loginSite, logConn);
int liRet = logWriter.getLogWriterFlag();
if(liRet == -1)
{
return errString;
}
logWriter.gbfErrWrite("", "", "", "Processing Started" , "I", logConn);
empCodeFr = checkNull(genericUtility.getColumnValue("emp_code__fr", headerDom));
empCodeTo = checkNull(genericUtility.getColumnValue("emp_code__to", headerDom));
if((empCodeFr.trim()) == null)
{
empCodeFr = "0";
}
if((empCodeTo.trim()) == null)
{
empCodeTo = "z";
}
deptCodeFr = checkNull(genericUtility.getColumnValue("dept_code__fr", headerDom));
deptCodeTo = checkNull(genericUtility.getColumnValue("dept_code__to", headerDom));
if((deptCodeFr.trim()) == null)
{
deptCodeFr = "0";
}
if((deptCodeTo.trim()) == null)
{
deptCodeTo = "ZZ";
}
siteCodeFr = checkNull(genericUtility.getColumnValue("site_code__fr", headerDom));
siteCodeTo = checkNull(genericUtility.getColumnValue("site_code__to", headerDom));
if((siteCodeFr.trim()) == null)
{
siteCodeFr = "0";
}
if((siteCodeTo.trim()) == null)
{
siteCodeTo = "z";
}
leaveTypeFr = checkNull(genericUtility.getColumnValue("leave_type__fr", headerDom));
leaveTypeTo = checkNull(genericUtility.getColumnValue("leave_type__to", headerDom));
if((leaveTypeFr.trim()) == null)
{
leaveTypeFr = "0";
}
if((leaveTypeTo.trim()) == null)
{
leaveTypeTo = "z";
}
procDate = checkNull(genericUtility.getColumnValue("proc_date", headerDom));
ldProcess = Timestamp.valueOf(genericUtility.getValidDateString(procDate, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0");
procGroupFr = checkNull(genericUtility.getColumnValue("proc_group__fr", headerDom));
procGroupTo = checkNull(genericUtility.getColumnValue("proc_group__to", headerDom));
if((procGroupFr.trim()) == null)
{
procGroupFr = "0";
}
if((procGroupTo.trim()) == null)
{
procGroupTo = "ZZ";
}
lsProcResEmp = checkNull(genericUtility.getColumnValue("resign_emp", headerDom));
dataMap = new HashMap<>();
sql="SELECT LEAVEBAL.EMP_CODE,LEAVEBAL.LVE_CODE,sum(bal_days) as csum_bal"+
" FROM LEAVEBAL,EMPLOYEE "+
"WHERE (LEAVEBAL.EMP_CODE = EMPLOYEE.EMP_CODE ) and"+
" ( leavebal.emp_code >= ? ) AND"+
" ( leavebal.emp_code <= ? ) AND"+
" ( ( leavebal.lve_code >= ? ) AND"+
" ( leavebal.lve_code <= ? ) AND"+
" ( leavebal.upto_date < ? ) AND"+
" ( leavebal.exp_date > ? ) AND"+
" ( employee.work_site >= ? ) AND"+
" ( employee.work_site <= ? ) AND"+
" ( employee.dept_code >= ? ) AND"+
" ( employee.dept_code <= ? ) AND"+
" ( employee.proc_group >= ? ) AND"+
" ( employee.proc_group <= ? ) )"+
" GROUP BY LEAVEBAL.EMP_CODE,LEAVEBAL.LVE_CODE ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,empCodeFr);
pstmt.setString(2,empCodeTo);
pstmt.setString(3,leaveTypeFr);
pstmt.setString(4,leaveTypeTo);
pstmt.setTimestamp(5,ldProcess);
pstmt.setTimestamp(6,ldProcess);
pstmt.setString(7,siteCodeFr);
pstmt.setString(8,siteCodeTo);
pstmt.setString(9,deptCodeFr);
pstmt.setString(10,deptCodeTo);
pstmt.setString(11,procGroupFr);
pstmt.setString(12,procGroupTo);
rs = pstmt.executeQuery();
while(rs.next())
{
rowCnt++;
dwDataMap = new HashMap<>();
dwDataMap.put("EMP_CODE", checkNull(rs.getString("EMP_CODE")));
dwDataMap.put("LVE_CODE", checkNull(rs.getString("LVE_CODE")));
dwDataMap.put("csum_bal", ((Double) rs.getDouble("csum_bal")).doubleValue());
dataMap.put(rowCnt, dwDataMap);
dwDataMap = null;
}
if (rs != null)
{
rs.close();
rs = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
llRowCnt = dataMap.size();
if(llRowCnt == 0)
{
errString = itmDBAccessEJB.getErrorString("","VTNOREC1", userId, "", conn);
lsLogText = "VTNOREC1";
logWriter.gbfErrWrite("", "", "", lsLogText, "E", logConn);
gbfReleaseLogWriter(headerDom, logWriter, logConn);
return errString;
}
System.out.println("ldProcess ===> "+ldProcess);
sql1 = "select relieve_date, emp_site, work_site from employee where emp_code = ?";
pstmt1 = conn.prepareStatement(sql1);
sql2 = "select case when ddf_get_lvecf( ? , ? , ? , ? , ? ) is null then 0"+
" else ddf_get_lvecf( ? , ? , ? , ? , ? ) end"+
" as lc_prev_bal from dual";
pstmt2 = conn.prepareStatement(sql2);
sql3 = "select eff_date, upto_date from leavebal" +
" where emp_code = ? and lve_code = ?" +
" and ? between eff_date and upto_date";
pstmt3 = conn.prepareStatement(sql3);
sql4="select key_string from transetup where upper(tran_window) = 'LVE_CRY_FWD'";
pstmt4 = conn.prepareStatement(sql4);
sql5 = "delete from emplve_trace where emp_code = ? and lve_code = ?"+
" and eff_date = ? and upto_date = ? and use_flag = 'F'";
pstmt5 = conn.prepareStatement(sql5);
sql6="insert into emplve_trace (tran_id , emp_code, lve_date_fr, lve_date_to, lve_code," +
"eff_date, upto_date, lves_alloc, use_flag, chg_date, chg_user, chg_term)" +
" values( ? , ? , ? , ? , ? , ? , ? , ? , 'F' , ? , ? , ? )";
pstmt6 = conn.prepareStatement(sql6);
sql7="update leavebal set prev_bal = ? where emp_code = ? and lve_code = ?"+
" and ? between eff_date and upto_date";
pstmt7 = conn.prepareStatement(sql7);
for(int i = 1; i <= llRowCnt; i++)
{
rowMap = (Map) dataMap.get(i);
System.out.println("Data inside rowMap = "+rowMap);
lcPrevBal = ((Double) rowMap.get("csum_bal")).doubleValue();
lsEmpCode = (String) rowMap.get("emp_code");
lsLveCode = (String) rowMap.get("lve_code");
ldProc = utilMethod.date(ldProcess);
System.out.println("lcPrevBal = "+lcPrevBal+"\nlsEmpCode = "+lsEmpCode+"\nlsLveCode = "+lsLveCode+"\nldProc = "+ldProc);
pstmt1.setString(1,lsEmpCode);
rs1 = pstmt1.executeQuery();
if (rs1.next())
{
ldRelieveDate = rs1.getTimestamp("relieve_date");
lsEmpSite = checkNull(rs1.getString("emp_site"));
lsWorkSite = checkNull(rs1.getString("work_site"));
}
else
{
rs1.close();
pstmt1.clearParameters();
errString = itmDBAccessEJB.getErrorString("","DS000NR", userId, "", conn);
lsLogText = "DS000NR";
logWriter.gbfErrWrite("", lsEmpCode, "", lsLogText, "E", 2, logConn);
conn.rollback();
continue;
}
rs1.close();
pstmt1.clearParameters();
if(ldRelieveDate != null)
{
if("N".equalsIgnoreCase(lsProcResEmp))
{
continue;
}
}
pstmt2.setString(1,lsEmpCode);
pstmt2.setTimestamp(2, ldProcess);
pstmt2.setTimestamp(3, ldProcess);
pstmt2.setTimestamp(4, ldProcess);
pstmt2.setString(5,lsLveCode);
pstmt2.setString(6,lsEmpCode);
pstmt2.setTimestamp(7, ldProcess);
pstmt2.setTimestamp(8, ldProcess);
pstmt2.setTimestamp(9, ldProcess);
pstmt2.setString(10,lsLveCode);
rs2 = pstmt2.executeQuery();
if (rs2.next())
{
lcPrevBal = rs2.getDouble("lc_prev_bal");
}
else
{
rs2.close();
pstmt2.clearParameters();
lcPrevBal = 0;
errString = itmDBAccessEJB.getErrorString("","VTLVEEMP", userId, "", conn);
lsLogText = "VTLVEEMP";
logWriter.gbfErrWrite("", lsEmpCode, "", lsLogText, "E", 2, logConn);
conn.rollback();
continue;
}
rs2.close();
pstmt2.clearParameters();
//
frDate = utilMethod.dateTime(utilMethod.today());
Timestamp ldProcTs = new Timestamp(ldProc.getTime());
System.out.println("ldProcTs = "+ldProcTs);
pstmt3.setString(1,lsEmpCode);
pstmt3.setString(2,lsLveCode);
pstmt3.setTimestamp(3,ldProcTs);
rs3 = pstmt3.executeQuery();
if (rs3.next())
{
ldEffDate = rs3.getTimestamp("eff_date");
ldUptoDate = rs3.getTimestamp("upto_date");
}
rs3.close();
pstmt3.clearParameters();
//
rs4 = pstmt4.executeQuery();
if (rs4.next())
{
keyString = checkNull(rs4.getString("key_string"));
}
else
{
rs4.close();
pstmt4.clearParameters();
errCode = "VTSEQ";
lsLogText = "VTSEQ";
logWriter.gbfErrWrite("", lsEmpCode, "", lsLogText, "E", 2, logConn);
conn.rollback();
break;
}
rs4.close();
pstmt4.clearParameters();
xmlValues = "<?xml version=\"1.0\" encoding=\"utf-8\"?><Root>";
xmlValues = xmlValues + "<Header></Header>";
xmlValues = xmlValues + "<Detail1>";
xmlValues = xmlValues + "<tran_id></tran_id>";
xmlValues = xmlValues + "<eff_date>" + frDate + "</eff_date>";
xmlValues = xmlValues + "<tran_date>" + frDate + "</tran_date>";
xmlValues = xmlValues + "<site_code>" + lsEmpSite + "</site_code>";
xmlValues = xmlValues + "<work_site>" + lsWorkSite + "</work_site>";
xmlValues = xmlValues + "</Detail1></Root>";
System.out.println("xmlValues :[" + xmlValues + "]");
TransIDGenerator tg = new TransIDGenerator(xmlValues, "BASE", CommonConstants.DB_NAME);
tranId = tg.generateTranSeqID("E-LVE", "tran_id", keyString, conn);
tg = null;
System.out.println("Generated Tran ID ::[" + tranId + "]");
if ("ERROR".equalsIgnoreCase(tranId) || tranId == null || tranId.trim().length() == 0)
{
errString = itmDBAccessEJB.getErrorString("", "VTTRANID", userId, "", conn);
logWriter.gbfErrWrite("", lsEmpCode, "", "VTTRANID", "E", 2, logConn);
conn.rollback();
return errString;
//break;
}
//
pstmt5.setString(1,lsEmpCode);
pstmt5.setString(2,lsLveCode);
pstmt5.setTimestamp(3,ldEffDate);
pstmt5.setTimestamp(4,ldUptoDate);
pstmt5 = conn.prepareStatement(sql5);
cnt = pstmt5.executeUpdate();
pstmt5.clearParameters();
if(cnt < 0)
{
errCode = "DS000";
errString = itmDBAccessEJB.getErrorString("", errCode, userId, "", conn);
logWriter.gbfErrWrite("", lsEmpCode, "", "DS000" , "E", 2, logConn);
conn.rollback();
break;
}
//
pstmt6.setString(1,tranId);
pstmt6.setString(2,lsEmpCode);
pstmt6.setTimestamp(3,frDate);
pstmt6.setTimestamp(4,frDate);
pstmt6.setString(5,lsLveCode);
pstmt6.setTimestamp(6,ldEffDate);
pstmt6.setTimestamp(7,ldUptoDate);
pstmt6.setDouble(8,lcPrevBal);
pstmt6.setTimestamp(9,frDate);
pstmt6.setString(10,userId);
pstmt6.setString(11,termId);
pstmt6 = conn.prepareStatement(sql6);
cnt = pstmt6.executeUpdate();
pstmt6.clearParameters();
if(cnt < 0)
{
errCode = "DS000";
errString = itmDBAccessEJB.getErrorString("", errCode, userId, "", conn);
logWriter.gbfErrWrite("", lsEmpCode, "", "DS000" , "E", 2, logConn);
conn.rollback();
break;
}
//
pstmt7.setDouble(1,lcPrevBal);
pstmt7.setString(2,lsEmpCode);
pstmt7.setString(3,lsLveCode);
pstmt7.setTimestamp(3,ldProcTs);
pstmt7 = conn.prepareStatement(sql7);
cnt = pstmt7.executeUpdate();
if(cnt == 1)
{
conn.commit();
}
if(cnt != 1)
{
errCode = "DS000NR";
errString = itmDBAccessEJB.getErrorString("", errCode, userId, "", conn);
logWriter.gbfErrWrite("", lsEmpCode, "", "DS000NR" , "E", 2, logConn);
conn.rollback();
break;
}
}
}
catch (Exception e)
{
System.out.println("Exception :LeaveOpenBalancePrc :process(String xmlString, String xmlString2, String xtraParams):"
+ e.getMessage() + ":");
e.printStackTrace();
throw new ITMException(e);
}
finally
{
try
{
if (rs != null)
{
rs.close();
rs = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
}
catch (Exception e)
{
errString = e.getMessage();
e.printStackTrace();
throw new ITMException(e);
}
}
return errString;
}
public LogWriterDatabase gbfErrWrite(String prdCode, String empCode, String type, String errCode, String severity,LogWriterDatabase logWriter, Connection logConn) throws RemoteException, ITMException
{
System.out.println("Inside admCommon gbfErrWrite method with 5 parameters....");
String lsStr = "";
String lsErr = "";
String lsErrcode = "";
String errString = "";
String userId = logWriter.getUserId();
try
{
if(prdCode != null && prdCode.trim().length() > 0)
{
lsErr = lsErr + " Prd: " + prdCode;
}
if(empCode != null && empCode.trim().length() > 0)
{
lsErr = lsErr + " Emp :" + empCode + " - ";
}
if(type != null && type.trim().length() > 0)
{
lsErr = lsErr + " Leave Type : " + type + " - ";
}
if(errCode != null && errCode.trim().length() > 0)
{
lsStr = errCode;
lsErrcode = admCommon.getToken(lsStr, "~t");
}
logWriter.setStatusDetail(lsErr + logWriter.getCurrentProcess() + " " + lsStr);
logWriter.setErrorCode(lsErrcode);
logWriter.setStatusType(severity);
if(lsErrcode != null && lsErrcode.trim().length() > 0)
{
errString = itmDBAccessEJB.getErrorString("", "VBFILEOPEN", userId, "", logConn);
logWriter.setlogWriterFlag(-1);
}
else
{
logWriter.setlogWriterFlag(1);
}
}
catch (Exception e)
{
e.printStackTrace();
throw new ITMException(e);
}
return logWriter;
}
public LogWriterDatabase gbfErrWrite(String prdCode, String empCode, String type, String errCode, String severity, int aiNo,LogWriterDatabase logWriter, Connection logConn) throws RemoteException, ITMException
{
System.out.println("Inside admCommon gbfErrWrite method with 6 parameters....");
try
{
logWriter.setTotalRows(logWriter.getTotalRows() + 1);
if(aiNo == 1)
{
logWriter.setRowsProcessed(logWriter.getRowsProcessed() + 1);
logWriter = gbfErrWrite(prdCode, empCode, type, errCode, severity,logWriter,logConn);
}
else if(aiNo == 2)
{
logWriter.setRowsRejected(logWriter.getRowsRejected() + 1);
logWriter = gbfErrWrite(prdCode, empCode, type, errCode, severity,logWriter,logConn);
}
else if(aiNo == 3)
{
logWriter.setRowsIgnored(logWriter.getRowsIgnored() + 1);
logWriter = gbfErrWrite(prdCode, empCode, type, errCode, severity,logWriter,logConn);
}
}
catch(Exception e)
{
e.printStackTrace();
throw new ITMException(e);
}
return logWriter;
}
public int gbfReleaseLogWriter(Document headerDom, HRLogWriter logWriter, Connection logConn) throws ITMException
{
int liRet = 1;
String lsLogStr ="";
try
{
lsLogStr = "Total Employees: "+ String.valueOf(logWriter.getRowsProcessed()+logWriter.getRowsRejected()).trim() + "Processed: " + String.valueOf(logWriter.getRowsProcessed()).trim() + "Rejected: " + String.valueOf(logWriter.getRowsRejected()).trim();
logWriter.gbfErrWrite("", "", "", lsLogStr, "I",logConn);
lsLogStr = "Processing Over";
logWriter.gbfErrWrite("", "", "", lsLogStr, "I",logConn);
}
catch (Exception e)
{
e.printStackTrace();
throw new ITMException(e);
}
return liRet;
}
private String getObjNameFromDom(Document dom, String attribute) throws RemoteException, ITMException
{
String objName = "";
try
{
NodeList detailList = null;
Node currDetail = null;
int detailListLength = 0;
detailList = dom.getElementsByTagName("Detail1");
detailListLength = detailList.getLength();
for (int ctr = 0; ctr < detailListLength; ctr++)
{
currDetail = detailList.item(ctr);
objName = currDetail.getAttributes().getNamedItem(attribute).getNodeValue();
}
}
catch (Exception e)
{
e.printStackTrace();
}
return objName;
}
private String checkNull(String input)
{
if (input == null)
{
input = "";
}
return input;
}
}
package ibase.webitm.ejb.adm;
import java.rmi.RemoteException;
import ibase.webitm.ejb.ProcessLocal;
import ibase.webitm.utility.ITMException;
public interface LeaveOpenBalancePrcLocal extends ProcessLocal
{
public String process() throws RemoteException,ITMException;
public String process(String xmlString, String xmlString2, String windowName, String xtraParams) throws RemoteException, ITMException;
}
package ibase.webitm.ejb.adm;
import java.rmi.RemoteException;
import ibase.webitm.ejb.ProcessRemote;
import ibase.webitm.utility.ITMException;
public interface LeaveOpenBalancePrcRemote extends ProcessRemote
{
public String process() throws RemoteException,ITMException;
public String process(String xmlString, String xmlString2, String windowName, String xtraParams) throws RemoteException, ITMException;
}
\ No newline at end of file
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