Commit f9fc1937 authored by ysawant's avatar ysawant

*Changes done in ShiftPattern component

w_shift_pattern.sql
ShiftPattern.java


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@207583 ce508802-f39f-4f6c-b175-0d175dae99d5
parent a03470aa
......@@ -126,3 +126,24 @@ update itm2menu set icon_path = 'Shift-Pattern.png', CLOSE_ICON = 'Shift-Pattern
--------------------------------------------------------------Added by Yashwant on 03-09-2019[End]
--------------------------------------------------------------Added by Yashwant on 18-09-2019[Start]
delete from GENMST where MOD_NAME='W_SHIFT_PATTERN';
update Messages set MSG_STR='Pattern Code Already Exist !' where MSG_NO='VTPCCAN1';
update obj_forms set disp_metadata='
<html>
<span style="white-space: normal !important; word-break: break-word; ">
Pattern Code :<b>({pattern_code})</b> , Site Code : <b>({site_code})</b>
<br/> Start Date :<b> {start_date}</b> , Shift Pattern :<b>({shift_pattern})</b> ,
No of Days :<b>({no_of_days})</b>, <br/> Shift on holiday :<b> {gen_shift_hol}</b>
</html>' where WIN_NAME='w_shift_pattern';
update itm2menu set ICON_PATH = 'shift-pattern.png', CLOSE_ICON = 'shift-patternwht.png' where win_name = 'w_shift_pattern';
--------------------------------------------------------------Added by Yashwant on 18-09-2019[Start]
......@@ -156,6 +156,32 @@ public class ShiftPattern extends ValidatorEJB implements ShiftPatternLocal,Shif
{
errString=itmDBAccess.getErrorString("shift_pattern", "VTPCCANT", userId,"", conn);
}
else
{
count = 0;
sql = "select count(*) as count from SHIFT_PATTERN where PATTERN_CODE = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, patternCode);
rs = pstmt.executeQuery();
if (rs.next())
{
count = rs.getInt("count");
}
if (rs != null)
{
rs.close();
rs = null;
}
if (pstmt != null)
{
pstmt.close();
pstmt = null;
}
if (count > 0 && !"E".equalsIgnoreCase(editFlag))
{
errString=itmDBAccess.getErrorString("shift_pattern", "VTPCCAN1", userId,"", conn);
}
}
}
//Added by Yashwant on 23/08/19 [End]
if (childNodeName.equals("shift_pattern"))
......
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