Commit ced78be9 authored by dpingle's avatar dpingle

* updated component and sql file on [12/11/19]

w_leavebal.sql
leaveBalIC.java


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@211850 ce508802-f39f-4f6c-b175-0d175dae99d5
parent e80b8ed7
......@@ -202,6 +202,9 @@ update messages set MSG_DESCR='Effective Date cannot be greater the Upto date.'
update ITM2MENU set ICON_PATH='LeaveBalance.png' ,OPEN_ICON='LeaveBalancewht.png' where win_name='w_leavebal';
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 ('INVLVDATA4','Already existed!!','Already Existed Employee Code in leavebal table','E','Y',null,null,null,to_date('24-03-06','DD-MM-RR'),'BASE ','01BASE215 ',null,null);
----------------------------------------------------- Dipesh[11/11/19]End
......
......@@ -159,6 +159,7 @@ public class leaveBalIC extends ValidatorEJB implements leaveBalRemote,leaveBalL
uptoDateStr = checkNull(genericUtility.getColumnValue("upto_date", dom));
uptoDate = uptoDateStr!= null && uptoDateStr.length() > 0 ? sdf.parse(uptoDateStr) : uptoDate;
empCode = checkNull(genericUtility.getColumnValue("emp_code", dom));
lveCode = checkNull(genericUtility.getColumnValue("lve_code", dom));
sql = "select work_site as ls_site from employee where emp_code = ?";
pstmt = conn.prepareStatement(sql);
......@@ -185,6 +186,34 @@ public class leaveBalIC extends ValidatorEJB implements leaveBalRemote,leaveBalL
errList.add(lsErrorCode);
errFields.add(childNodeName.toLowerCase());
}
else
{
sql = "select count(*) as cnt from leavebal where emp_code = ? and lve_code= ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, empCode);
pstmt.setString(2, lveCode);
rs = pstmt.executeQuery();
if (rs.next())
{
cnt = rs.getInt("cnt");
}
if (rs != null)
{
rs.close();
rs = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(cnt > 0 && !"E".equalsIgnoreCase(editFlag))
{
errList.add("INVLVDATA4");
errFields.add(childNodeName.toLowerCase());
}
}
}
else if ("lve_code".equalsIgnoreCase(childNodeName))
{
......
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