Commit f2874223 authored by ysawant's avatar ysawant

Updated Department Component

dept21.xml
w_dept.sql
d_dept_edit.srd
DeptIC.java


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@206004 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 011d3213
......@@ -109,3 +109,46 @@ values ('w_dept','2','2','M','seq10',null,null,null,null,null,'Y',to_date('17-12
------------------------------------------Added by Yashwant on 23/07/19[End]
------------------------------------------Added by Yashwant on 26/07/19[Start]
delete from OBJ_ACTIONS where OBJ_NAME='dept';
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 ('dept',1,'ibase/resource/objaction/add.svg','Adding New','a','a','A','Add','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 ('dept',2,'ibase/resource/objaction/edit.svg','Editing Existing Record','a','a','E','Edit','1',null,null,'S',null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,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 ('dept',21,'ibase/resource/objaction/Audit-trail.svg','View Audit Trail','audit_trail','1','Q','View Audit','1','1','1','U',null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,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 ('dept',22,'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,null,null,1);
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 ('DEPT_HEAD','W_DEPT','select trim(a.emp_fname)||'' ''||trim(a.emp_mname)||'' ''||trim(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)) like upper(''%?%'') or a.emp_code like upper(''%?%'') ) and length(''?'') >= 3 union all select ''Please enter minimum 3 characters of employee name'' as Name, '' '' as Code from dual where ''?'' is null or length(''?'') < 3',null,'Employees',0,0,to_date('27-05-00','DD-MM-RR'),'SUN ','CLIENT1 ','0',null,':dept_head,:dept_head,:dept_head,:dept_head,:dept_head',2,null,null,null,null,null,null,'2',null,'3','EmpImages','Code','Name','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 ('ITEM_SER','W_DEPT','select descr as description,item_ser as code from itemser order by descr',null,'Item Series',0,0,to_date('15-05-18','DD-MM-RR'),'VAIBHAV ','VAIBHAV ','0',null,null,2,null,null,null,null,null,null,'0',null,null,null,null,null,null,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 ('DEPT_TYPE','W_DEPT','SELECT FLD_VALUE AS TYPE,DESCR AS DESCRIPTION FROM GENCODES WHERE FLD_NAME=''DEPT_TYPE'' AND MOD_NAME=''W_DEPT'' AND CASE WHEN ACTIVE IS NULL THEN ''Y'' ELSE ACTIVE END = ''Y''','Department Type','Department Type',0,0,to_date('17-08-15','DD-MM-RR'),'BASE ','BASE ','1',null,null,null,null,null,null,null,null,1,'2',null,'3','DeptTypeImages','type','Description','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 ('DEPT_CODE__PARENT','W_DEPT','SELECT DEPT_CODE AS Code, DESCR AS Description FROM DEPARTMENT',null,'Department',0,0,to_date('03-02-16','DD-MM-RR'),'BASE ','BASE ',null,null,null,1,null,null,null,null,null,0,'2',null,'3','DeptImages','code','Description','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 ('BU_CODE','W_DEPT','SELECT BU_CODE AS CODE, DESCR AS Description FROM BUSINESS_UNITS',null,'Business Units',0,0,to_date('03-02-16','DD-MM-RR'),'BASE ','BASE ',null,null,null,1,null,null,null,null,null,0,'2',null,'3','BuImages','code','Description','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 ('FUNC_CODE','W_DEPT','SELECT FUNC_CODE AS CODE, DESCR AS Description FROM BUSI_FUNCTIONS',null,'Business functions',0,0,to_date('03-02-16','DD-MM-RR'),'BASE ','BASE ',null,null,null,1,null,null,null,null,null,0,'2',null,'3','FuncImages','code','Description','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 ('EMP_CODE__FUNCHEAD','W_DEPT','select trim(a.emp_fname)||'' ''||trim(a.emp_mname)||'' ''||trim(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)) like upper(''%?%'') or a.emp_code like upper(''%?%'') ) and length(''?'') >= 3 union all select ''Please enter minimum 3 characters of employee name'' as Name, '' '' as Code from dual where ''?'' is null or length(''?'') < 3',null,'Employees',0,0,to_date('03-02-16','DD-MM-RR'),'BASE ','BASE ',null,null,':emp_code__funchead,:emp_code__funchead,:emp_code__funchead,:emp_code__funchead,:emp_code__funchead',2,null,null,null,null,null,0,'2',null,'3','EmpImages','code','name','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 ('DEPT_HEAD_1','W_DEPT','select trim(a.emp_fname)||'' ''||trim(a.emp_mname)||'' ''||trim(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)) like upper(''%?%'') or a.emp_code like upper(''%?%'') ) and length(''?'') >= 3 union all select ''Please enter minimum 3 characters of employee name'' as Name, '' '' as Code from dual where ''?'' is null or length(''?'') < 3',null,'Employees',0,0,to_date('12-06-18','DD-MM-RR'),'BASE ','BASE ',null,null,':dept_head_1,:dept_head_1,:dept_head_1,:dept_head_1,:dept_head_1',2,null,null,null,null,null,null,'2',null,'3','EmpImages','Code','Name','2 ',null,null,null,null,null,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 ('VMDEPTAC01','Invalid Account Code AP','Enter valid Account Code AP.','E','Y',null,null,null,to_date('09-08-16','DD-MM-RR'),'VAIBHAV ','VAIBHAV ',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 ('VMDEPTCC01','Invalid Cost Centre Code AP','Enter valid Cost Centre Code AP.','E','Y',null,null,null,to_date('09-08-16','DD-MM-RR'),'VAIBHAV ','VAIBHAV ',null,null);
------------------------------------------Added by Yashwant on 26/07/19[End]
......@@ -39,7 +39,7 @@
<color>536870912</color>
</Footer>
<Detail>
<height>433</height>
<height>608</height>
<color>536870912</color>
</Detail>
<TableDefinition>
......@@ -276,6 +276,30 @@
<type>string</type>
</argument>
</TableDefinition>
<GroupBox>
<band>Detail</band>
<text>Other</text>
<border>2</border>
<color>0</color>
<x>7</x>
<y>401</y>
<height>81</height>
<width>512</width>
<name>gb_2</name>
<visible>1</visible>
<font>
<face>Times New Roman</face>
<height>-10</height>
<weight>400</weight>
<family>1</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>2</mode>
<color>134217739</color>
</background>
</GroupBox>
<GroupBox>
<band>Detail</band>
<text>Basic</text>
......@@ -283,7 +307,7 @@
<color>0</color>
<x>8</x>
<y>3</y>
<height>425</height>
<height>385</height>
<width>510</width>
<name>gb_1</name>
<visible>1</visible>
......@@ -1831,7 +1855,7 @@
<border>5</border>
<color>255</color>
<x>210</x>
<y>332</y>
<y>333</y>
<height>16</height>
<width>279</width>
<format>[general]</format>
......@@ -1860,58 +1884,20 @@
<color>67108864</color>
</background>
</ColumnObject>
<ColumnObject>
<band>Detail</band>
<id>3</id>
<alignment>0</alignment>
<tabsequence>32766</tabsequence>
<border>5</border>
<color>0</color>
<x>153</x>
<y>354</y>
<height>16</height>
<width>85</width>
<format>[shortdate] [time]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>chg_date</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>0</limit>
<case>any</case>
<focusrectangle>no</focusrectangle>
<autoselect>yes</autoselect>
<autohscroll>yes</autohscroll>
<imemode>0</imemode>
</EditStyle>
<font>
<face>Times New Roman</face>
<height>-10</height>
<weight>400</weight>
<family>1</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>2</mode>
<color>16777215</color>
</background>
</ColumnObject>
<TextObject>
<band>Detail</band>
<alignment>1</alignment>
<text>Change User :</text>
<text>Cost Centre Code AP :</text>
<border>0</border>
<color>0</color>
<x>302</x>
<y>354</y>
<x>18</x>
<y>332</y>
<height>16</height>
<width>98</width>
<width>131</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>chg_user_t</name>
<name>cctr_code__ap_t</name>
<visible>1</visible>
<font>
<face>Times New Roman</face>
......@@ -1928,23 +1914,23 @@
</TextObject>
<ColumnObject>
<band>Detail</band>
<id>4</id>
<id>3</id>
<alignment>0</alignment>
<tabsequence>32766</tabsequence>
<border>5</border>
<color>0</color>
<x>404</x>
<y>354</y>
<x>153</x>
<y>423</y>
<height>16</height>
<width>85</width>
<format>[general]</format>
<format>[shortdate] [time]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>chg_user</name>
<name>chg_date</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>10</limit>
<limit>0</limit>
<case>any</case>
<focusrectangle>no</focusrectangle>
<autoselect>yes</autoselect>
......@@ -1955,7 +1941,7 @@
<face>Times New Roman</face>
<height>-10</height>
<weight>400</weight>
<family>2</family>
<family>1</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
......@@ -1967,17 +1953,17 @@
<TextObject>
<band>Detail</band>
<alignment>1</alignment>
<text>Cost Centre Code AP :</text>
<text>Change Date :</text>
<border>0</border>
<color>0</color>
<x>18</x>
<y>332</y>
<x>26</x>
<y>423</y>
<height>16</height>
<width>131</width>
<width>123</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>cctr_code__ap_t</name>
<name>chg_date_t</name>
<visible>1</visible>
<font>
<face>Times New Roman</face>
......@@ -1995,17 +1981,17 @@
<TextObject>
<band>Detail</band>
<alignment>1</alignment>
<text>Change Date :</text>
<text>Change Terminal :</text>
<border>0</border>
<color>0</color>
<x>26</x>
<y>354</y>
<y>445</y>
<height>16</height>
<width>123</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>chg_date_t</name>
<name>chg_term_t</name>
<visible>1</visible>
<font>
<face>Times New Roman</face>
......@@ -2020,20 +2006,56 @@
<color>80269524</color>
</background>
</TextObject>
<ColumnObject>
<band>Detail</band>
<id>7</id>
<alignment>0</alignment>
<tabsequence>32766</tabsequence>
<border>5</border>
<color>0</color>
<x>153</x>
<y>445</y>
<height>16</height>
<width>85</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>chg_term</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>0</limit>
<case>any</case>
<autoselect>yes</autoselect>
<imemode>0</imemode>
</EditStyle>
<font>
<face>Times New Roman</face>
<height>-10</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>2</mode>
<color>16777215</color>
</background>
</ColumnObject>
<TextObject>
<band>Detail</band>
<alignment>1</alignment>
<text>Change Terminal :</text>
<text>Change User :</text>
<border>0</border>
<color>0</color>
<x>26</x>
<y>376</y>
<x>302</x>
<y>423</y>
<height>16</height>
<width>123</width>
<width>98</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>chg_term_t</name>
<name>chg_user_t</name>
<visible>1</visible>
<font>
<face>Times New Roman</face>
......@@ -2050,25 +2072,27 @@
</TextObject>
<ColumnObject>
<band>Detail</band>
<id>7</id>
<id>4</id>
<alignment>0</alignment>
<tabsequence>32766</tabsequence>
<border>5</border>
<color>0</color>
<x>153</x>
<y>376</y>
<x>404</x>
<y>423</y>
<height>16</height>
<width>85</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>chg_term</name>
<name>chg_user</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>0</limit>
<limit>10</limit>
<case>any</case>
<focusrectangle>no</focusrectangle>
<autoselect>yes</autoselect>
<autohscroll>yes</autohscroll>
<imemode>0</imemode>
</EditStyle>
<font>
......
......@@ -4,7 +4,7 @@ release 9;
datawindow(units=1 timer_interval=0 color=79741120 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=5 color="536870912" )
footer(height=0 color="536870912" )
detail(height=433 color="536870912" )
detail(height=608 color="536870912" )
table(column=(type=char(5) update=yes updatewhereclause=yes key=yes name=dept_code dbname="department.dept_code" )
column=(type=char(10) update=yes updatewhereclause=yes name=dept_head dbname="department.dept_head" )
column=(type=datetime update=yes updatewhereclause=yes name=chg_date dbname="department.chg_date" )
......@@ -39,7 +39,8 @@ table(column=(type=char(5) update=yes updatewhereclause=yes key=yes name=dept_co
column=(type=char(5) update=yes updatewhereclause=yes name=item_ser dbname="department.item_ser" )
column=(type=char(40) updatewhereclause=yes name=itemser_descr dbname="itemser.descr" )
retrieve="PBSELECT( VERSION(400) TABLE(NAME=~"department~" ) TABLE(NAME=~"employee~" ALIAS=~"employee_a~" ) TABLE(NAME=~"accounts~" ALIAS=~"accounts_a~" ) TABLE(NAME=~"costctr~" ALIAS=~"costctr_a~" ) TABLE(NAME=~"accounts~" ALIAS=~"accounts_b~" ) TABLE(NAME=~"costctr~" ALIAS=~"costctr_b~" ) TABLE(NAME=~"employee~" ALIAS=~"employee_b~" ) TABLE(NAME=~"itemser~" ) COLUMN(NAME=~"department.dept_code~") COLUMN(NAME=~"department.dept_head~") COLUMN(NAME=~"department.chg_date~") COLUMN(NAME=~"department.chg_user~") COLUMN(NAME=~"employee_a.emp_fname~") COLUMN(NAME=~"employee_a.emp_lname~") COLUMN(NAME=~"department.chg_term~") COLUMN(NAME=~"department.acct_code~") COLUMN(NAME=~"department.pay_table~") COLUMN(NAME=~"department.cctr_code~") COLUMN(NAME=~"department.descr~") COLUMN(NAME=~"department.sh_descr~") COLUMN(NAME=~"department.acct_code__ap~") COLUMN(NAME=~"department.cctr_code__ap~") COLUMN(NAME=~"accounts_a.descr~") COLUMN(NAME=~"costctr_a.descr~") COLUMN(NAME=~"accounts_b.descr~") COLUMN(NAME=~"costctr_b.descr~") COLUMN(NAME=~"department.status~") COLUMN(NAME=~"department.dept_head_1~") COLUMN(NAME=~"employee_b.emp_fname~") COLUMN(NAME=~"employee_b.emp_lname~") COLUMN(NAME=~"department.dept_type~") COLUMN(NAME=~"department.dept_code__parent~") COLUMN(NAME=~"department.bu_code~") COLUMN(NAME=~"department.func_code~") COLUMN(NAME=~"department.emp_code__funchead~") COMPUTE(NAME=~"FN_GET_DEPT_DESCR(department.dept_code__parent) as parent_dept_descr~") COMPUTE(NAME=~"FN_GET_BUFUNC_DESCR(department.func_code) as func_descr~") COMPUTE(NAME=~"FN_GET_EMP_NAME(department.emp_code__funchead , 'X') as funchead_name~") COMPUTE(NAME=~"FN_GET_BUCODE_DESCR(department.bu_code) as bu_descr~") COLUMN(NAME=~"department.item_ser~") COLUMN(NAME=~"itemser.descr~") JOIN (LEFT=~"department.dept_head~" OP =~"=~"RIGHT=~"employee_a.emp_code~" OUTER1 =~"department.dept_head~" ) JOIN (LEFT=~"department.acct_code__ap~" OP =~"=~"RIGHT=~"accounts_a.acct_code~" OUTER1 =~"department.acct_code__ap~" ) JOIN (LEFT=~"department.cctr_code__ap~" OP =~"=~"RIGHT=~"costctr_a.cctr_code~" OUTER1 =~"department.cctr_code__ap~" ) JOIN (LEFT=~"department.acct_code~" OP =~"=~"RIGHT=~"accounts_b.acct_code~" OUTER1 =~"department.acct_code~" ) JOIN (LEFT=~"department.cctr_code~" OP =~"=~"RIGHT=~"costctr_b.cctr_code~" OUTER1 =~"department.cctr_code~" ) JOIN (LEFT=~"department.dept_head_1~" OP =~"=~"RIGHT=~"employee_b.emp_code~" OUTER1 =~"department.dept_head_1~" ) JOIN (LEFT=~"department.item_ser~" OP =~"=~"RIGHT=~"itemser.item_ser~" OUTER1 =~"department.item_ser~" )WHERE( EXP1 =~"DEPARTMENT.DEPT_CODE~" OP =~"=~" EXP2 =~":mdept~" ) ) ARG(NAME = ~"mdept~" TYPE = string) " update="department" updatewhere=0 updatekeyinplace=no arguments=(("mdept", string)) )
groupbox(band=detail text="Basic"border="2" color="0" x="8" y="3" height="425" width="510" 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="134217739" )
groupbox(band=detail text="Other"border="2" color="0" x="7" y="401" height="81" width="512" name=gb_2 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="134217739" )
groupbox(band=detail text="Basic"border="2" color="0" x="8" y="3" height="385" width="510" 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="134217739" )
text(band=detail alignment="1" text="Department :" border="0" color="0" x="26" y="24" height="16" width="123" html.valueishtml="0" name=dept_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="2" background.color="79741120" )
text(band=detail alignment="1" text="Description :" border="0" color="0" x="26" y="46" height="16" width="123" html.valueishtml="0" name=descr_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" )
text(band=detail alignment="1" text="Short Description :" border="0" color="0" x="32" y="68" height="16" width="117" html.valueishtml="0" name=sh_descr_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" )
......@@ -81,18 +82,18 @@ column(band=detail id=9 alignment="0" tabsequence=130 border="5" color="0" x="15
text(band=detail alignment="1" text="Status. :" border="0" color="0" x="365" y="288" height="16" width="56" html.valueishtml="0" name=status_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=19 alignment="0" tabsequence=140 border="5" color="0" x="426" y="288" height="16" width="61" format="[general]" html.valueishtml="0" name=status visible="1" ddlb.limit=0 ddlb.allowedit=no ddlb.case=upper 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="16777215" )
text(band=detail alignment="1" text="Pay Table No. :" border="0" color="0" x="26" y="288" height="16" width="123" html.valueishtml="0" name=pay_table_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" )
text(band=detail alignment="1" text="Account Code AP :" border="0" color="0" x="35" y="310" height="16" width="114" html.valueishtml="0" name=acct_code_ap_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="80269524" )
text(band=detail alignment="1" text="Account Code AP :" border="0" color="0" x="35" y="310" height="16" width="114" html.valueishtml="0" name=acct_code__ap_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="80269524" )
column(band=detail id=13 alignment="0" tabsequence=150 border="5" color="0" x="153" y="310" height="16" width="72" format="[general]" html.valueishtml="0" name=acct_code__ap visible="1" edit.limit=10 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=15 alignment="0" tabsequence=32766 border="5" color="255" x="231" y="310" height="16" width="258" format="[general]" html.valueishtml="0" name=accounts_descr__ap visible="1" edit.limit=40 edit.case=any 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="67108864" )
column(band=detail id=14 alignment="0" tabsequence=160 border="5" color="0" x="153" y="332" height="16" width="52" format="[general]" html.valueishtml="0" name=cctr_code__ap visible="1" edit.limit=4 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=16 alignment="0" tabsequence=32766 border="5" color="255" x="210" y="332" height="16" width="279" format="[general]" html.valueishtml="0" name=costctr_descr__ap visible="1" edit.limit=40 edit.case=any 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="67108864" )
column(band=detail id=3 alignment="0" tabsequence=32766 border="5" color="0" x="153" y="354" height="16" width="85" format="[shortdate] [time]" html.valueishtml="0" name=chg_date visible="1" edit.limit=0 edit.case=any 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" )
text(band=detail alignment="1" text="Change User :" border="0" color="0" x="302" y="354" height="16" width="98" html.valueishtml="0" name=chg_user_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="80269524" )
column(band=detail id=4 alignment="0" tabsequence=32766 border="5" color="0" x="404" y="354" height="16" width="85" format="[general]" html.valueishtml="0" name=chg_user visible="1" edit.limit=10 edit.case=any 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" )
text(band=detail alignment="1" text="Cost Centre Code AP :" border="0" color="0" x="18" y="332" height="16" width="131" html.valueishtml="0" name=cost_centre_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="2" background.color="80269524" )
text(band=detail alignment="1" text="Change Date :" border="0" color="0" x="26" y="354" height="16" width="123" html.valueishtml="0" name=chg_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="80269524" )
text(band=detail alignment="1" text="Change Terminal :" border="0" color="0" x="26" y="376" height="16" width="123" html.valueishtml="0" name=chg_term_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="80269524" )
column(band=detail id=7 alignment="0" tabsequence=32766 border="5" color="0" x="153" y="376" height="16" width="85" format="[general]" html.valueishtml="0" name=chg_term 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="2" 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="210" y="333" height="16" width="279" format="[general]" html.valueishtml="0" name=costctr_descr__ap visible="1" edit.limit=40 edit.case=any 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="67108864" )
text(band=detail alignment="1" text="Cost Centre Code AP :" border="0" color="0" x="18" y="332" height="16" width="131" html.valueishtml="0" name=cctr_code__ap_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="80269524" )
column(band=detail id=3 alignment="0" tabsequence=32766 border="5" color="0" x="153" y="423" height="16" width="85" format="[shortdate] [time]" html.valueishtml="0" name=chg_date visible="1" edit.limit=0 edit.case=any 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" )
text(band=detail alignment="1" text="Change Date :" border="0" color="0" x="26" y="423" height="16" width="123" html.valueishtml="0" name=chg_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="80269524" )
text(band=detail alignment="1" text="Change Terminal :" border="0" color="0" x="26" y="445" height="16" width="123" html.valueishtml="0" name=chg_term_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="80269524" )
column(band=detail id=7 alignment="0" tabsequence=32766 border="5" color="0" x="153" y="445" height="16" width="85" format="[general]" html.valueishtml="0" name=chg_term 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="2" font.pitch="2" font.charset="0" background.mode="2" background.color="16777215" )
text(band=detail alignment="1" text="Change User :" border="0" color="0" x="302" y="423" height="16" width="98" html.valueishtml="0" name=chg_user_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="80269524" )
column(band=detail id=4 alignment="0" tabsequence=32766 border="5" color="0" x="404" y="423" height="16" width="85" format="[general]" html.valueishtml="0" name=chg_user visible="1" edit.limit=10 edit.case=any 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" )
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 )
......
......@@ -5,7 +5,7 @@ import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
//import javax.ejb.Stateless;
import javax.ejb.Stateless;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
......@@ -13,14 +13,14 @@ import org.w3c.dom.NodeList;
import ibase.utility.CommonConstants;
import ibase.utility.E12GenericUtility;
import ibase.webitm.ejb.ITMDBAccessEJB;
import ibase.webitm.ejb.ValidatorEJB;
import ibase.webitm.ejb.sys.UtilMethods;
import ibase.webitm.utility.ITMException;
//@Stateless
@Stateless
public class DeptIC extends ValidatorEJB implements DeptICRemote, DeptICLocal
{
public String itemChanged() throws RemoteException, ITMException
{
return "";
......@@ -28,12 +28,14 @@ public class DeptIC extends ValidatorEJB implements DeptICRemote, DeptICLocal
public String itemChanged(String xmlString, String xmlString1,
String xmlString2, String objContext, String currentColumn,
String editFlag, String xtraParams) throws RemoteException,ITMException
String editFlag, String xtraParams) throws RemoteException,
ITMException
{
Document dom1 = null;
Document dom = null;
Document dom2 = null;
String valueXmlString = "";
E12GenericUtility genericUtility = new E12GenericUtility();
try
......@@ -52,30 +54,22 @@ public class DeptIC extends ValidatorEJB implements DeptICRemote, DeptICLocal
}
valueXmlString = itemChanged(dom, dom1, dom2, objContext,
currentColumn, editFlag, xtraParams);
}
catch (Exception e)
{
} catch (Exception e) {
System.out.println("Exception :DeptIC :itemChanged(String,String):"+ e.getMessage() + ":");
valueXmlString = genericUtility.createErrorString(e);
e.printStackTrace();
throw new ITMException(e);
}
System.out.println("returning from DeptIC itemChanged");
return valueXmlString;
return (valueXmlString);
}
public String itemChanged(Document dom, Document dom1, Document dom2,
String objContext, String currentColumn, String editFlag,
String xtraParams) throws RemoteException, ITMException
{
//String mcode = " ";
//String mdescr = " ";
//String mdescr1 = " ";
//String err = " ";
String deptCodeParent = " ";
String deptCode = " ";
//String colName = " ";
//colName = currentColumn;
String colName = " ", mcode = " ", mdescr = " ", mdescr1 = " ";
String deptCodeParent = " ", deptCode = " ";
colName = currentColumn;
Connection connectionObject = null;
int currentFormNo = 0;
StringBuffer valueXmlString = null;
......@@ -83,25 +77,6 @@ public class DeptIC extends ValidatorEJB implements DeptICRemote, DeptICLocal
PreparedStatement pstmt = null;
String sql = " ";
// Modified by Yashwant on 24/06/2019.Start
String deptHead="";
String deptHead1="";
String acctCode="";
String cctrCode="";
String acctCodeAp="";
String cctrCodeAp="";
String buCode="";
String funcCode="";
String empCodeFunchead="";
String itemSer="";
String empFname="";
String empLname="";
String descr="";
String buDescr="";
String funcDescr="";
String funcHeadName="";
String itemserDescr="";
// Modified by Yashwant on 24/06/2019.End
E12GenericUtility genericUtility = new E12GenericUtility();
try
{
......@@ -124,25 +99,17 @@ public class DeptIC extends ValidatorEJB implements DeptICRemote, DeptICLocal
valueXmlString.append("<Detail1>\r\n");
if (currentColumn.trim().equals("dept_head"))
{
// Modified by Yashwant on 24/06/2019.Start
deptHead =checkNull(genericUtility.getColumnValue("dept_head", dom));
if(deptHead != null && deptHead.trim().length() > 0)
// Modified by Yashwant on 24/06/2019.End
mcode = genericUtility.getColumnValue("dept_head", dom);
if(mcode !=null && mcode.length()>0)
{
sql = "Select emp_fname, emp_lname from employee where emp_code = ?";
pstmt = connectionObject.prepareStatement(sql);
// Modified by Yashwant on 24/06/2019.Start
pstmt.setString(1, deptHead);
// Modified by Yashwant on 24/06/2019.End
pstmt.setString(1, mcode);
resultSet = pstmt.executeQuery();
if (resultSet.next())
{
// Modified by Yashwant on 24/06/2019.Start
//empFname = resultSet.getString("emp_fname");
//empLname = resultSet.getString("emp_lname");
empFname =checkNull(resultSet.getString("emp_fname"));
empLname = checkNull(resultSet.getString("emp_lname"));
// Modified by Yashwant on 24/06/2019.End
mdescr = resultSet.getString("emp_fname");
mdescr1 = resultSet.getString("emp_lname");
}
if (resultSet != null)
{
......@@ -155,30 +122,22 @@ public class DeptIC extends ValidatorEJB implements DeptICRemote, DeptICLocal
pstmt = null;
}
}
valueXmlString.append("<emp_fname>").append(empFname).append("</emp_fname>\r\n");
valueXmlString.append("<emp_lname>").append(empLname).append("</emp_lname>\r\n");
valueXmlString.append("<emp_fname>").append(mdescr).append("</emp_fname>\r\n");
valueXmlString.append("<emp_lname>").append(mdescr1).append("</emp_lname>\r\n");
}
else if (currentColumn.trim().equals("dept_head_1"))
{
// Modified by Yashwant on 24/06/2019.Start
deptHead1 =checkNull(genericUtility.getColumnValue("dept_head_1", dom));
if(deptHead1 != null && deptHead1.trim().length() > 0)
// Modified by Yashwant on 24/06/2019.End
mcode = genericUtility.getColumnValue("dept_head_1", dom);
if(mcode != null && mcode.length()>0)
{
sql = "Select emp_fname, emp_lname from employee where emp_code = ?";
pstmt = connectionObject.prepareStatement(sql);
// Modified by Yashwant on 24/06/2019.Start
pstmt.setString(1, deptHead1);
// Modified by Yashwant on 24/06/2019.End
pstmt.setString(1, mcode);
resultSet = pstmt.executeQuery();
if (resultSet.next())
{
// Modified by Yashwant on 24/06/2019.Start
//empFname = resultSet.getString("emp_fname");
//empLname = resultSet.getString("emp_lname");
empFname = checkNull(resultSet.getString("emp_fname"));
empLname = checkNull(resultSet.getString("emp_lname"));
// Modified by Yashwant on 24/06/2019.End
mdescr = resultSet.getString("emp_fname");
mdescr1 = resultSet.getString("emp_lname");
}
if (resultSet != null)
{
......@@ -191,28 +150,21 @@ public class DeptIC extends ValidatorEJB implements DeptICRemote, DeptICLocal
pstmt = null;
}
}
valueXmlString.append("<emp_fname_1>").append(empFname).append("</emp_fname_1>\r\n");
valueXmlString.append("<emp_lname_1>").append(empLname).append("</emp_lname_1>\r\n");
valueXmlString.append("<emp_fname_1>").append(mdescr).append("</emp_fname_1>\r\n");
valueXmlString.append("<emp_lname_1>").append(mdescr1).append("</emp_lname_1>\r\n");
}
else if (currentColumn.trim().equals("acct_code"))
{
// Modified by Yashwant on 24/06/2019.Start
acctCode = checkNull(genericUtility.getColumnValue("acct_code", dom));
if(acctCode != null && acctCode.trim().length() > 0)
// Modified by Yashwant on 24/06/2019.End
mcode = genericUtility.getColumnValue("acct_code", dom);
if(mcode != null && mcode.length()>0)
{
sql = "select descr from accounts where acct_code = ?";
pstmt = connectionObject.prepareStatement(sql);
// Modified by Yashwant on 24/06/2019.Start
pstmt.setString(1, acctCode);
// Modified by Yashwant on 24/06/2019.End
pstmt.setString(1, mcode);
resultSet = pstmt.executeQuery();
if (resultSet.next())
{
// Modified by Yashwant on 24/06/2019.Start
//descr = resultSet.getString("descr");
descr =checkNull(resultSet.getString("descr"));
// Modified by Yashwant on 24/06/2019.End
mdescr = resultSet.getString("descr");
}
if (resultSet != null)
{
......@@ -225,29 +177,22 @@ public class DeptIC extends ValidatorEJB implements DeptICRemote, DeptICLocal
pstmt = null;
}
}
valueXmlString.append("<accounts_descr>").append(descr).append("</accounts_descr>\r\n");
valueXmlString.append("<accounts_descr>").append(mdescr).append("</accounts_descr>\r\n");
}
else if (currentColumn.trim().equals("cctr_code"))
{
// Modified by Yashwant on 24/06/2019.Start
cctrCode = checkNull(genericUtility.getColumnValue("cctr_code", dom));
if(cctrCode != null && cctrCode.trim().length() > 0 )
// Modified by Yashwant on 24/06/2019.End
mcode = genericUtility.getColumnValue("cctr_code", dom);
if(mcode != null && mcode.length()>0 )
{
sql = "select descr from costctr where cctr_code = ?";
pstmt = connectionObject.prepareStatement(sql);
// Modified by Yashwant on 24/06/2019.Start
pstmt.setString(1, cctrCode);
// Modified by Yashwant on 24/06/2019.End
pstmt.setString(1, mcode);
resultSet = pstmt.executeQuery();
if (resultSet.next())
{
// Modified by Yashwant on 24/06/2019.Start
//descr = resultSet.getString("descr");
descr = checkNull(resultSet.getString("descr"));
// Modified by Yashwant on 24/06/2019.End
mdescr = resultSet.getString("descr");
}
if (resultSet != null)
{
......@@ -260,29 +205,22 @@ public class DeptIC extends ValidatorEJB implements DeptICRemote, DeptICLocal
pstmt = null;
}
}
valueXmlString.append("<costctr_descr>").append(descr).append("</costctr_descr>\r\n");
valueXmlString.append("<costctr_descr>").append(mdescr).append("</costctr_descr>\r\n");
}
else if (currentColumn.trim().equals("acct_code__ap"))
{
// Modified by Yashwant on 24/06/2019.Start
acctCodeAp = checkNull(genericUtility.getColumnValue("acct_code__ap", dom));
if(acctCodeAp !=null && acctCodeAp.trim().length() > 0)
// Modified by Yashwant on 24/06/2019.End
mcode = genericUtility.getColumnValue("acct_code__ap", dom);
if(mcode !=null && mcode.length()>0)
{
sql = "select descr from accounts where acct_code = ?";
pstmt = connectionObject.prepareStatement(sql);
// Modified by Yashwant on 24/06/2019.Start
pstmt.setString(1, acctCodeAp);
// Modified by Yashwant on 24/06/2019.End
pstmt.setString(1, mcode);
resultSet = pstmt.executeQuery();
if (resultSet.next())
{
// Modified by Yashwant on 24/06/2019.Start
//descr = resultSet.getString("descr");
descr = checkNull(resultSet.getString("descr"));
// Modified by Yashwant on 24/06/2019.End
mdescr = resultSet.getString("descr");
}
if (resultSet != null)
{
......@@ -295,28 +233,21 @@ public class DeptIC extends ValidatorEJB implements DeptICRemote, DeptICLocal
pstmt = null;
}
}
valueXmlString.append("<accounts_descr__ap>").append(descr).append("</accounts_descr__ap>\r\n");
valueXmlString.append("<accounts_descr__ap>").append(mdescr).append("</accounts_descr__ap>\r\n");
}
else if (currentColumn.trim().equals("cctr_code__ap"))
{
// Modified by Yashwant on 24/06/2019.Start
cctrCodeAp = checkNull(genericUtility.getColumnValue("cctr_code__ap", dom));
if(cctrCodeAp!=null && cctrCodeAp.trim().length()>0)
// Modified by Yashwant on 24/06/2019.End
mcode = genericUtility.getColumnValue("cctr_code__ap", dom);
if(mcode!=null && mcode.length()>0)
{
sql = "select descr from costctr where cctr_code = ?";
pstmt = connectionObject.prepareStatement(sql);
// Modified by Yashwant on 24/06/2019.Start
pstmt.setString(1, cctrCodeAp);
// Modified by Yashwant on 24/06/2019.End
pstmt.setString(1, mcode);
resultSet = pstmt.executeQuery();
if (resultSet.next())
{
// Modified by Yashwant on 24/06/2019.Start
//descr = resultSet.getString("descr");
descr = checkNull(resultSet.getString("descr"));
// Modified by Yashwant on 24/06/2019.End
mdescr = resultSet.getString("descr");
}
if (resultSet != null)
{
......@@ -329,16 +260,14 @@ public class DeptIC extends ValidatorEJB implements DeptICRemote, DeptICLocal
pstmt = null;
}
}
valueXmlString.append("<costctr_descr__ap>").append(descr).append("</costctr_descr__ap>\r\n");
valueXmlString.append("<costctr_descr__ap>").append(mdescr).append("</costctr_descr__ap>\r\n");
}
else if (currentColumn.trim().equals("dept_code"))
{
System.out.println("dept_code>>>");
// Modified by Yashwant on 24/06/2019.Start
deptCode =checkNull(genericUtility.getColumnValue("dept_code", dom));
deptCodeParent = checkNull(genericUtility.getColumnValue("dept_code__parent", dom));
// Modified by Yashwant on 24/06/2019.End
deptCode = genericUtility.getColumnValue("dept_code", dom);
deptCodeParent = genericUtility.getColumnValue("dept_code__parent", dom);
if ((deptCode != null && deptCode.trim().length() > 0) && (deptCodeParent == null || deptCodeParent.trim().length() == 0))
{
valueXmlString.append("<dept_code__parent>").append(deptCode).append("</dept_code__parent>\r\n");
......@@ -351,46 +280,36 @@ public class DeptIC extends ValidatorEJB implements DeptICRemote, DeptICLocal
else if (currentColumn.trim().equals("descr"))
{
// Modified by Yashwant on 24/06/2019.Start
deptCode = checkNull(genericUtility.getColumnValue("dept_code", dom));
deptCodeParent = checkNull(genericUtility.getColumnValue("dept_code__parent", dom));
descr = checkNull(genericUtility.getColumnValue("descr", dom));
// Modified by Yashwant on 24/06/2019.End
deptCode = genericUtility.getColumnValue("dept_code", dom);
deptCodeParent = genericUtility.getColumnValue("dept_code__parent", dom);
mdescr = genericUtility.getColumnValue("descr", dom);
if ((deptCode != null && deptCode.trim().length() > 0) && (deptCodeParent != null && deptCodeParent.trim().equalsIgnoreCase(deptCode.trim())))
{
valueXmlString.append("<parent_dept_descr>").append(descr).append("</parent_dept_descr>\r\n");
valueXmlString.append("<parent_dept_descr>").append(mdescr).append("</parent_dept_descr>\r\n");
}
else{
valueXmlString.append("<parent_dept_descr>").append(descr).append("</parent_dept_descr>\r\n");
valueXmlString.append("<parent_dept_descr>").append(mdescr).append("</parent_dept_descr>\r\n");
}
}
else if (currentColumn.trim().equals("dept_code__parent"))
{
// Modified by Yashwant on 24/06/2019.Start
deptCodeParent = checkNull(genericUtility.getColumnValue("dept_code__parent", dom));
deptCodeParent = genericUtility.getColumnValue("dept_code__parent", dom);
mdescr = "";
if (deptCodeParent != null && deptCodeParent.trim().length() > 0)
// Modified by Yashwant on 24/06/2019.End
{
// Modified by Yashwant on 24/06/2019.Start
deptCode =checkNull(genericUtility.getColumnValue("dept_code",dom));
// Modified by Yashwant on 24/06/2019.End
deptCode = genericUtility.getColumnValue("dept_code",dom);
if (!deptCodeParent.trim().equalsIgnoreCase(deptCode.trim()))
{
sql = "select FN_GET_DEPT_DESCR(?) from dual";
pstmt = connectionObject.prepareStatement(sql);
// Modified by Yashwant on 24/06/2019.Start
pstmt.setString(1, deptCodeParent);
// Modified by Yashwant on 24/06/2019.End
resultSet = pstmt.executeQuery();
if (resultSet.next())
{
// Modified by Yashwant on 24/06/2019.Start
//descr = resultSet.getString(1);
descr = checkNull(resultSet.getString(1));
// Modified by Yashwant on 24/06/2019.Start
mdescr = resultSet.getString(1);
}
if (resultSet != null)
{
......@@ -406,35 +325,27 @@ public class DeptIC extends ValidatorEJB implements DeptICRemote, DeptICLocal
}
else
{
// Modified by Yashwant on 24/06/2019.Start
descr = checkNull(genericUtility.getColumnValue("descr", dom));
// Modified by Yashwant on 24/06/2019.End
mdescr = genericUtility.getColumnValue("descr", dom);
}
valueXmlString.append("<parent_dept_descr>").append(descr).append("</parent_dept_descr>\r\n");
valueXmlString.append("<parent_dept_descr>").append(mdescr).append("</parent_dept_descr>\r\n");
}
}
else if (currentColumn.trim().equals("bu_code"))
{
// Modified by Yashwant on 24/06/2019.Start
buCode = checkNull(genericUtility.getColumnValue("bu_code", dom));
System.out.println("mcode bu_code==="+buCode);
if (buCode != null && buCode.trim().length() > 0)
// Modified by Yashwant on 24/06/2019.End
mcode = genericUtility.getColumnValue("bu_code", dom);
mdescr = "";
System.out.println("mcode bu_code==="+mcode);
if (mcode != null && mcode.trim().length() > 0)
{
sql = "select FN_GET_BUCODE_DESCR(?) from dual";
pstmt = connectionObject.prepareStatement(sql);
// Modified by Yashwant on 24/06/2019.Start
pstmt.setString(1, buCode);
// Modified by Yashwant on 24/06/2019.End
pstmt.setString(1, mcode);
resultSet = pstmt.executeQuery();
if (resultSet.next())
{
// Modified by Yashwant on 24/06/2019.Start
//buDescr = resultSet.getString(1);
buDescr = checkNull(resultSet.getString(1));
// Modified by Yashwant on 24/06/2019.End
mdescr = resultSet.getString(1);
}
if (resultSet != null)
{
......@@ -448,29 +359,23 @@ public class DeptIC extends ValidatorEJB implements DeptICRemote, DeptICLocal
}
}
valueXmlString.append("<bu_descr>").append(buDescr).append("</bu_descr>\r\n");
valueXmlString.append("<bu_descr>").append(mdescr).append("</bu_descr>\r\n");
}
else if (currentColumn.trim().equals("func_code"))
{
// Modified by Yashwant on 24/06/2019.Start
funcCode = checkNull(genericUtility.getColumnValue("func_code", dom));
System.out.println("mcode func_code"+funcCode);
// Modified by Yashwant on 24/06/2019.End
if (funcCode != null && funcCode.trim().length() > 0)
mcode = genericUtility.getColumnValue("func_code", dom);
mdescr = "";
System.out.println("mcode func_code"+mcode);
if (mcode != null && mcode.trim().length() > 0)
{
sql = "select FN_GET_BUFUNC_DESCR(?) from dual";
pstmt = connectionObject.prepareStatement(sql);
// Modified by Yashwant on 24/06/2019.Start
pstmt.setString(1, funcCode);
// Modified by Yashwant on 24/06/2019.End
pstmt.setString(1, mcode);
resultSet = pstmt.executeQuery();
if (resultSet.next())
{
// Modified by Yashwant on 24/06/2019.Start
//funcDescr = resultSet.getString(1);
funcDescr =checkNull(resultSet.getString(1));
// Modified by Yashwant on 24/06/2019.End
mdescr = resultSet.getString(1);
}
if (resultSet != null) {
resultSet.close();
......@@ -481,29 +386,23 @@ public class DeptIC extends ValidatorEJB implements DeptICRemote, DeptICLocal
pstmt = null;
}
}
valueXmlString.append("<func_descr>").append(funcDescr).append("</func_descr>\r\n");
valueXmlString.append("<func_descr>").append(mdescr).append("</func_descr>\r\n");
}
else if (currentColumn.trim().equals("emp_code__funchead"))
{
// Modified by Yashwant on 24/06/2019.Start
empCodeFunchead = checkNull(genericUtility.getColumnValue("emp_code__funchead",dom));
System.out.println("mcode emp_code__funchead"+empCodeFunchead);
if (empCodeFunchead != null && empCodeFunchead.trim().length() > 0)
// Modified by Yashwant on 24/06/2019.End
mcode = genericUtility.getColumnValue("emp_code__funchead",dom);
mdescr = "";
System.out.println("mcode emp_code__funchead"+mcode);
if (mcode != null && mcode.trim().length() > 0)
{
sql = "select FN_GET_EMP_NAME(?,'X') from dual";
pstmt = connectionObject.prepareStatement(sql);
// Modified by Yashwant on 24/06/2019.Start
pstmt.setString(1, empCodeFunchead);
// Modified by Yashwant on 24/06/2019.End
pstmt.setString(1, mcode);
resultSet = pstmt.executeQuery();
if (resultSet.next())
{
// Modified by Yashwant on 24/06/2019.Start
//funcHeadName = resultSet.getString(1);
funcHeadName = checkNull(resultSet.getString(1));
// Modified by Yashwant on 24/06/2019.End
mdescr = resultSet.getString(1);
}
if (resultSet != null)
{
......@@ -517,29 +416,24 @@ public class DeptIC extends ValidatorEJB implements DeptICRemote, DeptICLocal
}
}
valueXmlString.append("<funchead_name>").append(funcHeadName).append("</funchead_name>\r\n");
valueXmlString.append("<funchead_name>").append(mdescr).append("</funchead_name>\r\n");
}
else if (currentColumn.trim().equals("item_ser"))
{
// Modified by Yashwant on 24/06/2019.Start
itemSer = checkNull(genericUtility.getColumnValue("item_ser", dom));
System.out.println("mcode item_ser"+itemSer);
if (itemSer != null && itemSer.trim().length() > 0)
// Modified by Yashwant on 24/06/2019.End
mcode = genericUtility.getColumnValue("item_ser", dom);
mdescr = "";
System.out.println("mcode item_ser"+mcode);
if (mcode != null && mcode.trim().length() > 0)
{
sql = "select descr from itemser where item_ser = ?";
pstmt = connectionObject.prepareStatement(sql);
// Modified by Yashwant on 24/06/2019.Start
pstmt.setString(1, itemSer);
// Modified by Yashwant on 24/06/2019.End
pstmt.setString(1, mcode);
resultSet = pstmt.executeQuery();
if (resultSet.next())
{
// Modified by Yashwant on 24/06/2019.Start
//itemserDescr = resultSet.getString("descr");
itemserDescr = checkNull(resultSet.getString("descr"));
// Modified by Yashwant on 24/06/2019.End
mdescr = resultSet.getString("descr");
}
if (resultSet != null)
{
......@@ -552,47 +446,43 @@ public class DeptIC extends ValidatorEJB implements DeptICRemote, DeptICLocal
pstmt = null;
}
}
valueXmlString.append("<itemser_descr>").append(itemserDescr).append("</itemser_descr>\r\n");
valueXmlString.append("<itemser_descr>").append(mdescr).append("</itemser_descr>\r\n");
}
valueXmlString.append("</Detail1>\r\n");
break;
}
valueXmlString.append("</Root>\r\n");
} catch (Exception e) {
}
catch (Exception e)
{
System.out.println("Exception :DeptIC :itemChanged(Document,String):"+ e.getMessage() + ":");
valueXmlString.delete(0, valueXmlString.length());
valueXmlString = valueXmlString.append(genericUtility.createErrorString(e));
e.printStackTrace();
throw new ITMException(e);
}
finally
{
// Modified by Yashwant on 24/06/2019.Start
try
{
if (resultSet != null)
if (connectionObject != null)
{
resultSet.close();
resultSet = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
if (connectionObject != null)
if (resultSet != null)
{
resultSet.close();
resultSet = null;
}
connectionObject.close();
connectionObject = null;
}
}
catch (Exception e)
} catch (Exception e)
{
e.printStackTrace();
throw new ITMException(e);
}
// Modified by Yashwant on 24/06/2019.End
}
System.out.println("\n****ValueXmlString :" + valueXmlString + ":********");
return valueXmlString.toString();
......@@ -606,8 +496,7 @@ public class DeptIC extends ValidatorEJB implements DeptICRemote, DeptICLocal
public String wfValData(String xmlString, String xmlString1,
String xmlString2, String objContext, String editFlag,
String xtraParams) throws RemoteException,
ITMException
{
ITMException {
System.out.println(xmlString);
Document dom = null;
......@@ -616,31 +505,26 @@ public class DeptIC extends ValidatorEJB implements DeptICRemote, DeptICLocal
String errString = null;
E12GenericUtility genericUtility = new E12GenericUtility();
try
{
if (xmlString != null && xmlString.trim().length() != 0)
{
try {
if (xmlString != null && xmlString.trim().length() != 0) {
dom = genericUtility.parseString(xmlString);
System.out.println("Print dom>>>> "+dom);
}
if (xmlString1 != null && xmlString1.trim().length() != 0)
{
if (xmlString1 != null && xmlString1.trim().length() != 0) {
dom1 = genericUtility.parseString(xmlString1);
}
if (xmlString2 != null && xmlString2.trim().length() != 0)
{
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 :DeptIC :wfValData(String xmlString):"+ e.getMessage() + ":");
} catch (Exception e) {
System.out
.println("Exception :DeptIC :wfValData(String xmlString):"
+ e.getMessage() + ":");
errString = genericUtility.createErrorString(e);
e.printStackTrace();
throw new ITMException(e);
}
System.out.println("returning from DeptIC wfvaldata");
return errString;
......@@ -651,9 +535,6 @@ public class DeptIC extends ValidatorEJB implements DeptICRemote, DeptICLocal
String objContext, String editFlag, String xtraParams)
throws RemoteException, ITMException
{
/*boolean checkNextCol = true;
String columnName = "";
String columnValue = "";*/
String userId = "";
String sql = "";
String errString = "";
......@@ -669,40 +550,21 @@ public class DeptIC extends ValidatorEJB implements DeptICRemote, DeptICLocal
int noOfChilds = 0;
int currentFormNo = 0;
int cnt = 0;
//String mVal="";
//String mVal1 = "";
//String mVal2 = "";
String status="";
String mVal = "";
String mVal1 = "";
java.sql.Timestamp mdate1 = null;
//java.sql.Timestamp mdate2 = null;
String deptCodeParent = "";
String deptCode = "";
// Modified by Yashwant on 25/06/2019.Start
String descr="";
String deptHead="";
String deptHead1="";
String acctCode="";
String cctrCode="";
String payTable="";
String buCode="";
String funcCode="";
String itemSer="";
String empCodeFunchead="";
// Modified by Yashwant on 25/06/2019.End
String acctCodeAp = "", cctrCodeAp = "";
E12GenericUtility genericUtility = new E12GenericUtility();
UtilMethods utilmethod = new UtilMethods();
try
{
try {
connectionObject = getConnection();
// Modified by Yashwant on 25/06/2019.Start
userId = checkNull(genericUtility.getValueFromXTRA_PARAMS(xtraParams,"loginCode"));
// Modified by Yashwant on 25/06/2019.End
userId = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"loginCode");
System.out.println("Line no--468");
if(objContext != null && objContext.trim().length() > 0)
{
if(objContext != null && objContext.trim().length() > 0) {
currentFormNo = Integer.parseInt(objContext);
}
parentList = dom.getElementsByTagName("Detail" + currentFormNo);
......@@ -711,10 +573,6 @@ public class DeptIC extends ValidatorEJB implements DeptICRemote, DeptICLocal
noOfChilds = childList.getLength();
System.out.println("noOfChilds--->>>"+noOfChilds);
// Modified by Yashwant on 25/06/2019.Start
ITMDBAccessEJB itmdbAccessEJB=new ITMDBAccessEJB();
// Modified by Yashwant on 25/06/2019.End
for (counter = 0; counter < noOfChilds; counter++)
{
......@@ -723,30 +581,23 @@ public class DeptIC extends ValidatorEJB implements DeptICRemote, DeptICLocal
System.out.println("childNodeName>>>>>"+childNodeName);
System.out.println("childNode>>>>>>"+childNode);
System.out.println("counter>>>"+counter);
switch (currentFormNo)
{
switch (currentFormNo) {
case 1:
if(childNodeName.equals("dept_code"))
{
// Modified by Yashwant on 25/06/2019.Start
deptCode =checkNull(genericUtility.getColumnValue("dept_code", dom));
// Modified by Yashwant on 25/06/2019.End
mVal = genericUtility.getColumnValue("dept_code", dom);
System.out.println("EditFlag--------"+editFlag);
if("A".equalsIgnoreCase(editFlag))
{
// Modified by Yashwant on 25/06/2019.Start
if(deptCode == null || deptCode.trim().length() == 0)
if(mVal == null || mVal.length() == 0)
{
errString = itmdbAccessEJB.getErrorString("dept_code", "VEDEP2", userId, "", connectionObject);
// Modified by Yashwant on 25/06/2019.End
errString = getErrorString("dept_code","VEDEP2", userId);
}
else
{
sql = "select count(*) as cnt from department where dept_code = ?";
pstmt = connectionObject.prepareStatement(sql);
// Modified by Yashwant on 25/06/2019.Start
pstmt.setString(1, deptCode);
// Modified by Yashwant on 25/06/2019.End
pstmt.setString(1, mVal);
resultSet = pstmt.executeQuery();
if(resultSet.next())
{
......@@ -754,9 +605,7 @@ public class DeptIC extends ValidatorEJB implements DeptICRemote, DeptICLocal
}
if(cnt > 0)
{
// Modified by Yashwant on 25/06/2019.Start
itmdbAccessEJB.getErrorString("dept_code", "VMDUPL1", userId, "", connectionObject);
// Modified by Yashwant on 25/06/2019.End
errString = getErrorString("dept_code","VMDUPL1", userId);
}
if (resultSet != null)
{
......@@ -774,27 +623,21 @@ public class DeptIC extends ValidatorEJB implements DeptICRemote, DeptICLocal
else if(childNodeName.equalsIgnoreCase("descr"))
{
System.out.println("line --509");
// Modified by Yashwant on 25/06/2019.Start
descr = checkNull(genericUtility.getColumnValue("descr", dom));
if(descr == null || descr.trim().length() == 0)
mVal = genericUtility.getColumnValue("descr", dom);
if(mVal == null || mVal.length() == 0)
{
itmdbAccessEJB.getErrorString("descr", "VTDESC1", userId, "", connectionObject);
// Modified by Yashwant on 25/06/2019.End
errString = getErrorString("descr", "VTDESC1",userId);
}
}
else if(childNodeName.equalsIgnoreCase("dept_head"))
{
System.out.println("line--515");
// Modified by Yashwant on 25/06/2019.Start
deptHead = checkNull(genericUtility.getColumnValue("dept_head", dom));
if(deptHead != null && deptHead.trim().length() != 0)
// Modified by Yashwant on 25/06/2019.End
mVal = genericUtility.getColumnValue("dept_head", dom);
if(mVal != null && mVal.trim().length() != 0)
{
sql = "select count(*) as cnt from employee where emp_code = ?";
pstmt = connectionObject.prepareStatement(sql);
// Modified by Yashwant on 25/06/2019.Start
pstmt.setString(1, deptHead);
// Modified by Yashwant on 25/06/2019.End
pstmt.setString(1, mVal);
resultSet = pstmt.executeQuery();
if(resultSet.next())
{
......@@ -802,9 +645,7 @@ public class DeptIC extends ValidatorEJB implements DeptICRemote, DeptICLocal
}
if(cnt == 0)
{
// Modified by Yashwant on 25/06/2019.Start
itmdbAccessEJB.getErrorString("dept_head", "VMEMP1", userId, "", connectionObject);
// Modified by Yashwant on 25/06/2019.End
errString = getErrorString("dept_head","VMEMP1", userId);
}
if (resultSet != null)
{
......@@ -821,16 +662,12 @@ public class DeptIC extends ValidatorEJB implements DeptICRemote, DeptICLocal
else if(childNodeName.equalsIgnoreCase("dept_head_1"))
{
System.out.println("line--530");
// Modified by Yashwant on 25/06/2019.Start
deptHead1 = checkNull(genericUtility.getColumnValue("dept_head_1", dom));
if(deptHead1 != null && deptHead1.trim().length() != 0)
// Modified by Yashwant on 25/06/2019.End
mVal = genericUtility.getColumnValue("dept_head_1", dom);
if(mVal != null && mVal.trim().length() != 0)
{
sql = "select count(*) as cnt from employee where emp_code =?";
pstmt = connectionObject.prepareStatement(sql);
// Modified by Yashwant on 25/06/2019.Start
pstmt.setString(1, deptHead1);
// Modified by Yashwant on 25/06/2019.End
pstmt.setString(1, mVal);
resultSet = pstmt.executeQuery();
if(resultSet.next())
{
......@@ -838,9 +675,7 @@ public class DeptIC extends ValidatorEJB implements DeptICRemote, DeptICLocal
}
if(cnt == 0)
{
// Modified by Yashwant on 25/06/2019.Start
itmdbAccessEJB.getErrorString("dept_head_1", "VMDEPTHD01", userId, "", connectionObject);
// Modified by Yashwant on 25/06/2019.End
errString = getErrorString("dept_head_1","VMDEPTHD01", userId);
}
if (resultSet != null)
{
......@@ -857,16 +692,12 @@ public class DeptIC extends ValidatorEJB implements DeptICRemote, DeptICLocal
else if(childNodeName.equalsIgnoreCase("acct_code"))
{
System.out.println("line --545");
// Modified by Yashwant on 25/06/2019.Start
acctCode =checkNull(genericUtility.getColumnValue("acct_code", dom));
if(acctCode != null && acctCode.trim().length() != 0)
// Modified by Yashwant on 25/06/2019.End
mVal = genericUtility.getColumnValue("acct_code", dom);
if(mVal != null && mVal.trim().length()>0)
{
sql = "select count(*) as cnt from accounts where acct_code = ?";
pstmt = connectionObject.prepareStatement(sql);
// Modified by Yashwant on 25/06/2019.Start
pstmt.setString(1, acctCode);
// Modified by Yashwant on 25/06/2019.End
pstmt.setString(1, mVal);
resultSet = pstmt.executeQuery();
if(resultSet.next())
{
......@@ -874,9 +705,7 @@ public class DeptIC extends ValidatorEJB implements DeptICRemote, DeptICLocal
}
if(cnt == 0)
{
// Modified by Yashwant on 25/06/2019.Start
itmdbAccessEJB.getErrorString("acct_code", "VMACCT1", userId, "", connectionObject);
// Modified by Yashwant on 25/06/2019.End
errString = getErrorString("acct_code", "VMACCT1",userId);
}
if (resultSet != null)
{
......@@ -893,16 +722,74 @@ public class DeptIC extends ValidatorEJB implements DeptICRemote, DeptICLocal
else if(childNodeName.equalsIgnoreCase("cctr_code"))
{
System.out.println("line --558");
// Modified by Yashwant on 25/06/2019.Start
cctrCode = checkNull(genericUtility.getColumnValue("cctr_code", dom));
if(cctrCode !=null && cctrCode.trim().length() != 0)
// Modified by Yashwant on 25/06/2019.End
mVal = genericUtility.getColumnValue("cctr_code", dom);
if(mVal !=null && mVal.trim().length() != 0)
{
sql = "select count(*) as cnt from costctr where cctr_code = ?";
pstmt = connectionObject.prepareStatement(sql);
pstmt.setString(1, mVal);
resultSet = pstmt.executeQuery();
if (resultSet.next())
{
cnt = resultSet.getInt("cnt");
}
if (cnt == 0)
{
errString = getErrorString("cctr_code","VMCCTR1", userId);
}
if (resultSet != null)
{
resultSet.close();
resultSet = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
}
}
else if(childNodeName.equalsIgnoreCase("acct_code__ap"))
{
//cnt = 0;
System.out.println(":::::::::acct_code__ap::::::::::");
acctCodeAp = genericUtility.getColumnValue("acct_code__ap", dom);
if(acctCodeAp != null && acctCodeAp.trim().length() > 0)
{
sql = "select count(*) as cnt from accounts where acct_code = ?";
pstmt = connectionObject.prepareStatement(sql);
pstmt.setString(1, acctCodeAp);
resultSet = pstmt.executeQuery();
if(resultSet.next())
{
cnt = resultSet.getInt("cnt");
}
if(cnt == 0)
{
errString = getErrorString("acct_code__ap", "VMDEPTAC01",userId);
}
if (resultSet != null)
{
resultSet.close();
resultSet = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
}
}
else if(childNodeName.equalsIgnoreCase("cctr_code__ap"))
{
//cnt = 0;
System.out.println(":::::::::::cctr_code__ap::::::::::::");
cctrCodeAp = genericUtility.getColumnValue("cctr_code__ap", dom);
if(cctrCodeAp !=null && cctrCodeAp.trim().length() > 0)
{
sql = "select count(*) as cnt from costctr where cctr_code = ?";
pstmt = connectionObject.prepareStatement(sql);
// Modified by Yashwant on 25/06/2019.Start
pstmt.setString(1, cctrCode);
// Modified by Yashwant on 25/06/2019.End
pstmt.setString(1, cctrCodeAp);
resultSet = pstmt.executeQuery();
if (resultSet.next())
{
......@@ -910,9 +797,7 @@ public class DeptIC extends ValidatorEJB implements DeptICRemote, DeptICLocal
}
if (cnt == 0)
{
// Modified by Yashwant on 25/06/2019.Start
itmdbAccessEJB.getErrorString("cctr_code", "VMCCTR1", userId, "", connectionObject);
// Modified by Yashwant on 25/06/2019.End
errString = getErrorString("cctr_code__ap","VMDEPTCC01", userId);
}
if (resultSet != null)
{
......@@ -929,16 +814,12 @@ public class DeptIC extends ValidatorEJB implements DeptICRemote, DeptICLocal
else if(childNodeName.equalsIgnoreCase("pay_table"))
{
System.out.println("573");
// Modified by Yashwant on 25/06/2019.Start
payTable =checkNull(genericUtility.getColumnValue("pay_table", dom));
if(payTable !=null && payTable.trim().length() != 0)
// Modified by Yashwant on 25/06/2019.End
mVal = genericUtility.getColumnValue("pay_table", dom);
if(mVal !=null && mVal.trim().length() != 0)
{
sql = "select count(*) as cnt from paytable where pay_table = ?";
pstmt = connectionObject.prepareStatement(sql);
// Modified by Yashwant on 25/06/2019.Start
pstmt.setString(1, payTable);
// Modified by Yashwant on 25/06/2019.End
pstmt.setString(1, mVal);
resultSet = pstmt.executeQuery();
if(resultSet.next())
{
......@@ -946,9 +827,7 @@ public class DeptIC extends ValidatorEJB implements DeptICRemote, DeptICLocal
}
if(cnt == 0)
{
// Modified by Yashwant on 25/06/2019.Start
itmdbAccessEJB.getErrorString("pay_table", "VMPYTAB2", userId, "", connectionObject);
// Modified by Yashwant on 25/06/2019.End
errString = getErrorString("pay_table","VMPYTAB2", userId);
}
if (resultSet != null)
{
......@@ -965,22 +844,16 @@ public class DeptIC extends ValidatorEJB implements DeptICRemote, DeptICLocal
else if(childNodeName.equalsIgnoreCase("dept_code__parent"))
{
System.out.println("line 589");
// Modified by Yashwant on 25/06/2019.Start
deptCodeParent =checkNull(genericUtility.getColumnValue("dept_code__parent", dom));
deptCodeParent = genericUtility.getColumnValue("dept_code__parent", dom);
cnt = 0;
if(deptCodeParent != null && deptCodeParent.trim().length() > 0)
// Modified by Yashwant on 25/06/2019.End
{
// Modified by Yashwant on 25/06/2019.Start
deptCode =checkNull(genericUtility.getColumnValue("dept_code", dom));
// Modified by Yashwant on 25/06/2019.End
deptCode = genericUtility.getColumnValue("dept_code", dom);
if(!deptCodeParent.trim().equalsIgnoreCase(deptCode))
{
sql = "select count(1) as cnt from department where dept_code = ?";
pstmt = connectionObject.prepareStatement(sql);
// Modified by Yashwant on 25/06/2019.Start
pstmt.setString(1, deptCodeParent);
// Modified by Yashwant on 25/06/2019.End
resultSet = pstmt.executeQuery();
if(resultSet.next())
{
......@@ -988,9 +861,7 @@ public class DeptIC extends ValidatorEJB implements DeptICRemote, DeptICLocal
}
if(cnt == 0)
{
// Modified by Yashwant on 25/06/2019.Start
itmdbAccessEJB.getErrorString("dept_code__parent", "VMDEPTPD01", userId, "", connectionObject);
// Modified by Yashwant on 25/06/2019.End
errString = getErrorString("dept_code__parent", "VMDEPTPD01",userId);
}
if (resultSet != null)
{
......@@ -1009,14 +880,13 @@ public class DeptIC extends ValidatorEJB implements DeptICRemote, DeptICLocal
cnt = 0;
if(CommonConstants.DB_NAME.equalsIgnoreCase("ORACLE"))
{
sql = "select count(1) as cnt from DUAL where ? in "
+ " (select dept_code from department where dept_code <> dept_code__parent "
+ " start with dept_code =? connect by prior dept_code = dept_code__parent) ";
pstmt = connectionObject.prepareStatement(sql);
// Modified by Yashwant on 25/06/2019.Start
pstmt.setString(1, deptCodeParent);
pstmt.setString(2, deptCode);
// Modified by Yashwant on 25/06/2019.End
pstmt.setString(2, mVal);
resultSet = pstmt.executeQuery();
if(resultSet.next())
{
......@@ -1024,9 +894,7 @@ public class DeptIC extends ValidatorEJB implements DeptICRemote, DeptICLocal
}
if(cnt > 0)
{
// Modified by Yashwant on 25/06/2019.Start
itmdbAccessEJB.getErrorString("dept_code__parent", "VMDEPTPD02", userId, "", connectionObject);
// Modified by Yashwant on 25/06/2019.End
errString = getErrorString("dept_code__parent","VMDEPTPD02", userId);
}
if (resultSet != null)
{
......@@ -1040,28 +908,23 @@ public class DeptIC extends ValidatorEJB implements DeptICRemote, DeptICLocal
}
}
}
}
else
{
// Modified by Yashwant on 25/06/2019.Start
itmdbAccessEJB.getErrorString("dept_code__parent", "VMDEPTPD03", userId, "", connectionObject);
// Modified by Yashwant on 25/06/2019.End
errString = getErrorString("dept_code__parent","VMDEPTPD03", userId);
}
}
else if(childNodeName.equalsIgnoreCase("bu_code"))
{
System.out.println("line--639");
// Modified by Yashwant on 25/06/2019.Start
buCode = checkNull(genericUtility.getColumnValue("bu_code", dom));
mVal = genericUtility.getColumnValue("bu_code", dom);
cnt = 0;
if(buCode != null && buCode.trim().length() > 0)
// Modified by Yashwant on 25/06/2019.End
if(mVal != null && mVal.length() > 0)
{
sql = "select count(1) as cnt from business_units where bu_code = ?";
pstmt = connectionObject.prepareStatement(sql);
// Modified by Yashwant on 25/06/2019.Start
pstmt.setString(1, buCode);
// Modified by Yashwant on 25/06/2019.End
pstmt.setString(1, mVal);
resultSet = pstmt.executeQuery();
if (resultSet.next())
{
......@@ -1069,9 +932,7 @@ public class DeptIC extends ValidatorEJB implements DeptICRemote, DeptICLocal
}
if (cnt == 0)
{
// Modified by Yashwant on 25/06/2019.Start
itmdbAccessEJB.getErrorString("bu_code", "VMDEPTBU01", userId, "", connectionObject);
// Modified by Yashwant on 25/06/2019.End
errString = getErrorString("bu_code","VMDEPTBU01", userId);
}
if (resultSet != null)
{
......@@ -1088,17 +949,13 @@ public class DeptIC extends ValidatorEJB implements DeptICRemote, DeptICLocal
else if(childNodeName.equalsIgnoreCase("func_code"))
{
System.out.println("line --662");
// Modified by Yashwant on 25/06/2019.Start
funcCode = checkNull(genericUtility.getColumnValue("func_code", dom));
mVal = genericUtility.getColumnValue("func_code", dom);
cnt = 0;
if(funcCode != null && funcCode.trim().length() > 0)
// Modified by Yashwant on 25/06/2019.End
if(mVal != null && mVal.length() > 0)
{
sql = "select count(1) as cnt from BUSI_FUNCTIONS where func_code = ?";
pstmt = connectionObject.prepareStatement(sql);
// Modified by Yashwant on 25/06/2019.Start
pstmt.setString(1, funcCode);
// Modified by Yashwant on 25/06/2019.End
pstmt.setString(1, mVal);
resultSet = pstmt.executeQuery();
if (resultSet.next())
{
......@@ -1106,9 +963,7 @@ public class DeptIC extends ValidatorEJB implements DeptICRemote, DeptICLocal
}
if(cnt == 0)
{
// Modified by Yashwant on 25/06/2019.Start
itmdbAccessEJB.getErrorString("func_code", "VMDEPTFU01", userId, "", connectionObject);
// Modified by Yashwant on 25/06/2019.End
errString = getErrorString("func_code","VMDEPTFU01", userId);
}
if (resultSet != null)
{
......@@ -1125,21 +980,16 @@ public class DeptIC extends ValidatorEJB implements DeptICRemote, DeptICLocal
else if(childNodeName.equalsIgnoreCase("emp_code__funchead"))
{
System.out.println("line--679");
// Modified by Yashwant on 25/06/2019.Start
empCodeFunchead = checkNull(genericUtility.getColumnValue("emp_code__funchead", dom));
// Modified by Yashwant on 25/06/2019.End
mVal = genericUtility.getColumnValue("emp_code__funchead", dom);
cnt = 0;
status = "";
mVal1 = "";
mdate1 = null;
// Modified by Yashwant on 25/06/2019.Start
if(empCodeFunchead != null && empCodeFunchead.trim().length() > 0)
// Modified by Yashwant on 25/06/2019.End
if(mVal != null && mVal.length() > 0)
{
sql = "select count(1) as cnt from EMPLOYEE where emp_code = ?";
pstmt = connectionObject.prepareStatement(sql);
// Modified by Yashwant on 25/06/2019.Start
pstmt.setString(1, empCodeFunchead);
// Modified by Yashwant on 25/06/2019.End
pstmt.setString(1, mVal);
resultSet = pstmt.executeQuery();
if(resultSet.next())
{
......@@ -1147,45 +997,26 @@ public class DeptIC extends ValidatorEJB implements DeptICRemote, DeptICLocal
}
if(cnt == 0)
{
// Modified by Yashwant on 25/06/2019.Start
itmdbAccessEJB.getErrorString("emp_code__funchead", "VMDEPTFH01", userId, "", connectionObject);
// Modified by Yashwant on 25/06/2019.End
errString = getErrorString("emp_code__funchead", "VMDEPTFH01",userId);
}
else
{
if (resultSet != null)
{
resultSet.close();
resultSet = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
sql = "select status, relieve_date from EMPLOYEE where emp_code = ?";
pstmt = connectionObject.prepareStatement(sql);
// Modified by Yashwant on 25/06/2019.Start
pstmt.setString(1, empCodeFunchead);
// Modified by Yashwant on 25/06/2019.End
pstmt.setString(1, mVal);
resultSet = pstmt.executeQuery();
if(resultSet.next())
{
// Modified by Yashwant on 25/06/2019.Start
//status = resultSet.getString("status");
status = checkNull(resultSet.getString("status"));
// Modified by Yashwant on 25/06/2019.End
mVal1 = resultSet.getString("status");
mdate1 = resultSet.getTimestamp("relieve_date");
}
if(status != null && status.trim().equalsIgnoreCase("S"))
if(mVal1 != null && mVal1.trim().equalsIgnoreCase("S"))
{
//Modified by Yashwant on 25/06/2019.Start
itmdbAccessEJB.getErrorString("emp_code__funchead", "VMDEPTFH02", userId, "", connectionObject);
// Modified by Yashwant on 25/06/2019.End
errString = getErrorString("emp_code__funchead", "VMDEPTFH02",userId);
}
else if(mdate1 != null &&( utilmethod.date(mdate1).equals(utilmethod.today()) || utilmethod.date(mdate1).before(utilmethod.today())))
{
itmdbAccessEJB.getErrorString("emp_code__funchead", "VMDEPTFH03", userId, "", connectionObject);
errString = getErrorString("emp_code__funchead", "VMDEPTFH03",userId);
System.out.println("relieve_date line 835>>>>"+mdate1);
}
if (resultSet != null)
......@@ -1215,17 +1046,13 @@ public class DeptIC extends ValidatorEJB implements DeptICRemote, DeptICLocal
else if(childNodeName.equalsIgnoreCase("item_ser"))
{
System.out.println("line--723");
// Modified by Yashwant on 25/06/2019.Start
itemSer = checkNull(genericUtility.getColumnValue("item_ser", dom));
if(itemSer != null && itemSer.trim().length()>0)
// Modified by Yashwant on 25/06/2019.End
mVal = genericUtility.getColumnValue("item_ser", dom);
if(mVal != null && mVal.length()>0)
{
cnt = 0;
sql = "select count(1) as cnt from itemser where item_ser = ?";
pstmt = connectionObject.prepareStatement(sql);
// Modified by Yashwant on 25/06/2019.Start
pstmt.setString(1,itemSer);
// Modified by Yashwant on 25/06/2019.End
pstmt.setString(1,mVal);
resultSet = pstmt.executeQuery();
if (resultSet.next())
{
......@@ -1233,9 +1060,7 @@ public class DeptIC extends ValidatorEJB implements DeptICRemote, DeptICLocal
}
if(cnt == 0)
{
// Modified by Yashwant on 25/06/2019.Start
itmdbAccessEJB.getErrorString("item_ser", "VMDEPTIS01", userId, "", connectionObject);
// Modified by Yashwant on 25/06/2019.End
errString = getErrorString("item_ser", "VMDEPTIS01",userId);
}
if (resultSet != null)
{
......@@ -1251,53 +1076,37 @@ public class DeptIC extends ValidatorEJB implements DeptICRemote, DeptICLocal
}
}
}
}
catch (Exception e)
} catch (Exception e)
{
System.out.println("Exception :DeptIC :wfValData(Document,String):"+ e.getMessage() + ":");
e.printStackTrace();
throw new ITMException(e);
}
finally
}finally
{
// Modified by Yashwant on 25/06/2019.Start
try
{
if (resultSet != null)
if (connectionObject != null)
{
if (resultSet != null) {
resultSet.close();
resultSet = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
if (connectionObject != null)
{
connectionObject.close();
connectionObject = null;
}
// Modified by Yashwant on 25/06/2019.End
}
catch (Exception e)
{
e.printStackTrace();
throw new ITMException(e);
}
}
return errString;
}
// Modified by Yashwant on 25/06/2019.Start
//checkNull method added
private String checkNull(String input)
{
if(input==null)
{
input="";
}
return input;
}
// Modified by Yashwant on 25/06/2019.End
}
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