Commit cf85e078 authored by dpingle's avatar dpingle

* updated src, srd, xml and sql file of cadre mthad component.

cadre_mthad21.xml
w_cadre_mthad.sql
d_cadre_mthad_edit.srd
CadreMthadIC.java


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@215741 ce508802-f39f-4f6c-b175-0d175dae99d5
parent a9e85abf
...@@ -119,8 +119,6 @@ Insert into OBJ_ITEMCHANGE (OBJ_NAME,FORM_NO,FIELD_NAME,MANDATORY) values ('cadr ...@@ -119,8 +119,6 @@ Insert into OBJ_ITEMCHANGE (OBJ_NAME,FORM_NO,FIELD_NAME,MANDATORY) values ('cadr
update itm2menu set ICON_PATH='CadrewiseMonthlyPaystructure.png' , CLOSE_ICON='CadrewiseMonthlyPaystructurewht.png' where WIN_NAME='w_cadre_mthad'; update itm2menu set ICON_PATH='CadrewiseMonthlyPaystructure.png' , CLOSE_ICON='CadrewiseMonthlyPaystructurewht.png' where WIN_NAME='w_cadre_mthad';
Insert into POPHELP (FIELD_NAME,MOD_NAME,SQL_STR,DW_OBJECT,MSG_TITLE,WIDTH,HEIGHT,CHG_DATE,CHG_USER,CHG_TERM,DIST_OPT,FILTER_STRING,SQL_INPUT,DEFAULT_COL,POP_ALIGN,QUERY_MODE,PAGE_CONTEXT,POPHELP_COLS,POPHELP_SOURCE,MULTI_OPT,HELP_OPTION,POPUP_XSL_NAME,AUTO_FILL_LEN,THUMB_OBJ,THUMB_IMAGE_COL,THUMB_ALT_COL,AUTO_MIN_LENGTH,OBJ_NAME__DS,DATA_MODEL_NAME,VALIDATE_DATA,ITEM_CHANGE,MSG_NO,FILTER_EXPR,LAYOUT) values ('MONTH_CODE','W_CADRE_MTHAD','SELECT DISTINCT(MONTH_CODE) FROM CADRE_MTHAD ','Month Code','Month Code',0,0,to_date('20-05-13','DD-MM-RR'),'VENKAT ','BASE ','1',null,null,null,null,null,null,null,null,null,'2',null,'3',null,null,null,'2 ',null,null,null,null,null,null,null); Insert into POPHELP (FIELD_NAME,MOD_NAME,SQL_STR,DW_OBJECT,MSG_TITLE,WIDTH,HEIGHT,CHG_DATE,CHG_USER,CHG_TERM,DIST_OPT,FILTER_STRING,SQL_INPUT,DEFAULT_COL,POP_ALIGN,QUERY_MODE,PAGE_CONTEXT,POPHELP_COLS,POPHELP_SOURCE,MULTI_OPT,HELP_OPTION,POPUP_XSL_NAME,AUTO_FILL_LEN,THUMB_OBJ,THUMB_IMAGE_COL,THUMB_ALT_COL,AUTO_MIN_LENGTH,OBJ_NAME__DS,DATA_MODEL_NAME,VALIDATE_DATA,ITEM_CHANGE,MSG_NO,FILTER_EXPR,LAYOUT) values ('MONTH_CODE','W_CADRE_MTHAD','SELECT DISTINCT(MONTH_CODE) FROM CADRE_MTHAD ','Month Code','Month Code',0,0,to_date('20-05-13','DD-MM-RR'),'VENKAT ','BASE ','1',null,null,null,null,null,null,null,null,null,'2',null,'3',null,null,null,'2 ',null,null,null,null,null,null,null);
Insert into POPHELP (FIELD_NAME,MOD_NAME,SQL_STR,DW_OBJECT,MSG_TITLE,WIDTH,HEIGHT,CHG_DATE,CHG_USER,CHG_TERM,DIST_OPT,FILTER_STRING,SQL_INPUT,DEFAULT_COL,POP_ALIGN,QUERY_MODE,PAGE_CONTEXT,POPHELP_COLS,POPHELP_SOURCE,MULTI_OPT,HELP_OPTION,POPUP_XSL_NAME,AUTO_FILL_LEN,THUMB_OBJ,THUMB_IMAGE_COL,THUMB_ALT_COL,AUTO_MIN_LENGTH,OBJ_NAME__DS,DATA_MODEL_NAME,VALIDATE_DATA,ITEM_CHANGE,MSG_NO,FILTER_EXPR,LAYOUT) values ('PAY_TABLE','W_CADRE_MTHAD','SELECT PAY_TABLE, DESCR FROM PAYTABLE',null,'Pay Table No',0,0,to_date('27-05-00','DD-MM-RR'),'SUN ','CLIENT1 ','0',null,null,null,null,null,null,null,null,null,'2',null,'3','EmpImages','PAY_TABLE','DESCR','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 ('PAY_TABLE','W_CADRE_MTHAD','SELECT PAY_TABLE, DESCR FROM PAYTABLE',null,'Pay Table No',0,0,to_date('27-05-00','DD-MM-RR'),'SUN ','CLIENT1 ','0',null,null,null,null,null,null,null,null,null,'2',null,'3','EmpImages','PAY_TABLE','DESCR','2 ',null,null,null,null,null,null,null);
...@@ -212,5 +210,25 @@ Insert into OBJ_ACTIONS (OBJ_NAME,LINE_NO,IMAGE,DESCRIPTION,SERVICE_CODE,INTERAC ...@@ -212,5 +210,25 @@ Insert into OBJ_ACTIONS (OBJ_NAME,LINE_NO,IMAGE,DESCRIPTION,SERVICE_CODE,INTERAC
---------------------------------------------------- Dipesh[07/01/2020]End ---------------------------------------------------- Dipesh[07/01/2020]End
---------------------------------------------------- Dipesh[27/01/2020]Start
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 ('MTHCODNULL','Empty Month code!!','Month code cannot be null','E','Y',null,null,null,to_date('18-03-06','DD-MM-RR'),'TSD ','TSD ',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 ('MTHINVAILD','Invaild Month code!!','Month code cannot be Greater than 12.','E','Y',null,null,null,to_date('18-03-06','DD-MM-RR'),'TSD ','TSD ',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 ('PAYINVAILD','Invaild Pay table!!','Pay table No not present in master. ','E','Y',null,null,null,to_date('18-03-06','DD-MM-RR'),'TSD ','TSD ',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 ('PAYTBLNULL','Empty Pay table!!','Pay table can not be null','E','Y',null,null,null,to_date('18-03-06','DD-MM-RR'),'TSD ','TSD ',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 ('CADCODNULL','Empty cadre code!!','cadre code cannot be null','E','Y',null,null,null,to_date('18-03-06','DD-MM-RR'),'TSD ','TSD ',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 ('CADINVAILD','Invaild cadre code!!','cadre code No not present in master.','E','Y',null,null,null,to_date('18-03-06','DD-MM-RR'),'TSD ','TSD ',null,null);
---------------------------------------------------- Dipesh[27/01/2020]End
...@@ -387,7 +387,7 @@ ...@@ -387,7 +387,7 @@
<tag>Allowance / Deduction Amount.</tag> <tag>Allowance / Deduction Amount.</tag>
<visible>1</visible> <visible>1</visible>
<EditStyle style="edit"> <EditStyle style="edit">
<limit>13</limit> <limit>12</limit>
<case>any</case> <case>any</case>
<format>#######0.00</format> <format>#######0.00</format>
<focusrectangle>no</focusrectangle> <focusrectangle>no</focusrectangle>
...@@ -455,7 +455,7 @@ ...@@ -455,7 +455,7 @@
<tag>Minimum basic salary for allowance / deduction.</tag> <tag>Minimum basic salary for allowance / deduction.</tag>
<visible>1</visible> <visible>1</visible>
<EditStyle style="edit"> <EditStyle style="edit">
<limit>13</limit> <limit>12</limit>
<case>any</case> <case>any</case>
<format>#######0.00</format> <format>#######0.00</format>
<focusrectangle>no</focusrectangle> <focusrectangle>no</focusrectangle>
...@@ -523,7 +523,7 @@ ...@@ -523,7 +523,7 @@
<tag>Minimum allowance / deduction amount.</tag> <tag>Minimum allowance / deduction amount.</tag>
<visible>1</visible> <visible>1</visible>
<EditStyle style="edit"> <EditStyle style="edit">
<limit>13</limit> <limit>12</limit>
<case>any</case> <case>any</case>
<format>#######0.00</format> <format>#######0.00</format>
<focusrectangle>no</focusrectangle> <focusrectangle>no</focusrectangle>
...@@ -763,7 +763,7 @@ ...@@ -763,7 +763,7 @@
<tag>Maximum basic salary for allowance / deduction</tag> <tag>Maximum basic salary for allowance / deduction</tag>
<visible>1</visible> <visible>1</visible>
<EditStyle style="edit"> <EditStyle style="edit">
<limit>13</limit> <limit>12</limit>
<case>any</case> <case>any</case>
<format>#######0.00</format> <format>#######0.00</format>
<focusrectangle>no</focusrectangle> <focusrectangle>no</focusrectangle>
...@@ -791,7 +791,7 @@ ...@@ -791,7 +791,7 @@
<tabsequence>90</tabsequence> <tabsequence>90</tabsequence>
<border>5</border> <border>5</border>
<color>0</color> <color>0</color>
<x>402</x> <x>401</x>
<y>139</y> <y>139</y>
<height>16</height> <height>16</height>
<width>94</width> <width>94</width>
...@@ -803,7 +803,7 @@ ...@@ -803,7 +803,7 @@
<tag>Maximum allowance / deduction amount.</tag> <tag>Maximum allowance / deduction amount.</tag>
<visible>1</visible> <visible>1</visible>
<EditStyle style="edit"> <EditStyle style="edit">
<limit>13</limit> <limit>12</limit>
<case>any</case> <case>any</case>
<format>#######0.00</format> <format>#######0.00</format>
<focusrectangle>no</focusrectangle> <focusrectangle>no</focusrectangle>
......
...@@ -87,6 +87,7 @@ public class CadreMthadIC extends ValidatorEJB implements CadreMthadLocal, Cadre ...@@ -87,6 +87,7 @@ public class CadreMthadIC extends ValidatorEJB implements CadreMthadLocal, Cadre
int noOfChilds = 0; int noOfChilds = 0;
int counter; int counter;
int cnt = 0; int cnt = 0;
int monthCodeInt = 0;
double amount = 0.0; double amount = 0.0;
double minBasic = 0.0; double minBasic = 0.0;
double maxBasic = 0.0; double maxBasic = 0.0;
...@@ -299,6 +300,115 @@ public class CadreMthadIC extends ValidatorEJB implements CadreMthadLocal, Cadre ...@@ -299,6 +300,115 @@ public class CadreMthadIC extends ValidatorEJB implements CadreMthadLocal, Cadre
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
} }
} }
else if ("cadre_code".equalsIgnoreCase(childNodeName))
{
cadreCode = checkNull(genericUtility.getColumnValue("cadre_code", dom));
if (cadreCode == null || cadreCode.trim().length() == 0)
{
errList.add("CADCODNULL");
errFields.add(childNodeName.toLowerCase());
}
else
{
sql = "select count(*) as cnt from cadre where cadre_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, cadreCode);
rs = pstmt.executeQuery();
if (rs.next())
{
cnt = rs.getInt("cnt");
}
if (rs != null)
{
rs.close();
rs = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(cnt == 0)
{
errList.add("CADINVAILD");
errFields.add(childNodeName.toLowerCase());
}
}
}
else if ("pay_table".equalsIgnoreCase(childNodeName))
{
payTable = checkNull(genericUtility.getColumnValue("pay_table", dom));
if (payTable == null || payTable.trim().length() == 0)
{
errList.add("PAYTBLNULL");
errFields.add(childNodeName.toLowerCase());
}
else
{
sql = "select count(*) as cnt from Paytable where pay_table = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, payTable);
rs = pstmt.executeQuery();
if (rs.next())
{
cnt = rs.getInt("cnt");
}
if (rs != null)
{
rs.close();
rs = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(cnt == 0)
{
errList.add("PAYINVAILD");
errFields.add(childNodeName.toLowerCase());
}
}
}
else if ("month_code".equalsIgnoreCase(childNodeName))
{
monthCode = checkNull(genericUtility.getColumnValue("month_code", dom));
System.out.println("monthCode:::"+monthCode);
if (monthCode == null || monthCode.trim().length() == 0)
{
errList.add("MTHCODNULL");
errFields.add(childNodeName.toLowerCase());
}
else
{
System.out.println("inside else:::"+monthCode);
if(monthCode != null && monthCode.trim().length() > 0)
{
try
{
monthCodeInt = Integer.parseInt(monthCode);
if(monthCodeInt > 12)
{
errList.add("MTHINVAILD");
errFields.add(childNodeName.toLowerCase());
}
}
catch(Exception e)
{
errList.add("MTHINVAILD");
errFields.add(childNodeName.toLowerCase());
}
}
}
}
} }
break; break;
} }
......
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