Commit 633f006d authored by dpingle's avatar dpingle

* change done in src file of ShiftChange

shift_chg11.xml
shift_chg12.xml
w_shift_chg.sql
ShiftChangeIc.java
ShiftChangePrc.java
d_shift_chg11.srd
d_shift_chg12.srd


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@215393 ce508802-f39f-4f6c-b175-0d175dae99d5
parent d4b20207
...@@ -74,14 +74,38 @@ ...@@ -74,14 +74,38 @@
<dbname>to_dt</dbname> <dbname>to_dt</dbname>
</table_column> </table_column>
</TableDefinition> </TableDefinition>
<GroupBox>
<band>Detail</band>
<text>Basic</text>
<border>2</border>
<color>33554432</color>
<x>5</x>
<y>4</y>
<height>100</height>
<width>522</width>
<name>gb_1</name>
<visible>1</visible>
<font>
<face>Arial</face>
<height>-11</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>1</mode>
<color>553648127</color>
</background>
</GroupBox>
<TextObject> <TextObject>
<band>Detail</band> <band>Detail</band>
<alignment>1</alignment> <alignment>1</alignment>
<text>Employee :</text> <text>Employee :</text>
<border>0</border> <border>0</border>
<color>0</color> <color>0</color>
<x>6</x> <x>13</x>
<y>8</y> <y>28</y>
<height>16</height> <height>16</height>
<width>88</width> <width>88</width>
<html> <html>
...@@ -108,8 +132,8 @@ ...@@ -108,8 +132,8 @@
<text>Date From :</text> <text>Date From :</text>
<border>0</border> <border>0</border>
<color>0</color> <color>0</color>
<x>6</x> <x>13</x>
<y>41</y> <y>61</y>
<height>16</height> <height>16</height>
<width>88</width> <width>88</width>
<html> <html>
...@@ -136,8 +160,8 @@ ...@@ -136,8 +160,8 @@
<text>Date To :</text> <text>Date To :</text>
<border>0</border> <border>0</border>
<color>0</color> <color>0</color>
<x>335</x> <x>342</x>
<y>41</y> <y>61</y>
<height>16</height> <height>16</height>
<width>88</width> <width>88</width>
<html> <html>
...@@ -165,8 +189,8 @@ ...@@ -165,8 +189,8 @@
<tabsequence>32766</tabsequence> <tabsequence>32766</tabsequence>
<border>5</border> <border>5</border>
<color>255</color> <color>255</color>
<x>100</x> <x>107</x>
<y>9</y> <y>29</y>
<height>16</height> <height>16</height>
<width>85</width> <width>85</width>
<format>[general]</format> <format>[general]</format>
...@@ -202,8 +226,8 @@ ...@@ -202,8 +226,8 @@
<tabsequence>32766</tabsequence> <tabsequence>32766</tabsequence>
<border>5</border> <border>5</border>
<color>255</color> <color>255</color>
<x>191</x> <x>198</x>
<y>9</y> <y>29</y>
<height>16</height> <height>16</height>
<width>323</width> <width>323</width>
<format>[general]</format> <format>[general]</format>
...@@ -239,8 +263,8 @@ ...@@ -239,8 +263,8 @@
<tabsequence>32766</tabsequence> <tabsequence>32766</tabsequence>
<border>5</border> <border>5</border>
<color>255</color> <color>255</color>
<x>100</x> <x>106</x>
<y>41</y> <y>61</y>
<height>16</height> <height>16</height>
<width>85</width> <width>85</width>
<format>[shortdate] [time]</format> <format>[shortdate] [time]</format>
...@@ -274,8 +298,8 @@ ...@@ -274,8 +298,8 @@
<tabsequence>32766</tabsequence> <tabsequence>32766</tabsequence>
<border>5</border> <border>5</border>
<color>255</color> <color>255</color>
<x>429</x> <x>436</x>
<y>41</y> <y>61</y>
<height>16</height> <height>16</height>
<width>85</width> <width>85</width>
<format>[shortdate] [time]</format> <format>[shortdate] [time]</format>
......
$PBExportHeader$d_shift_chg11.srd
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=0 color="536870912" )
footer(height=3 color="536870912" )
detail(height=241 color="536870912" )
table(column=(type=char(10) updatewhereclause=no name=emp_code dbname="emp_code" )
column=(type=char(60) updatewhereclause=no name=emp_name dbname="emp_name" )
column=(type=char(5) updatewhereclause=no name=site_code dbname="site_code" )
column=(type=datetime updatewhereclause=no name=from_dt dbname="from_dt" )
column=(type=datetime updatewhereclause=no name=to_dt dbname="to_dt" )
)
groupbox(band=detail text="Basic"border="2" color="33554432" x="5" y="4" height="100" width="522" name=gb_1 visible="1" font.face="Arial" font.height="-11" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="553648127" )
text(band=detail alignment="1" text="Employee :" border="0" color="0" x="13" y="28" height="16" width="88" html.valueishtml="0" name=emp_code_t visible="1" font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=detail alignment="1" text="Date From :" border="0" color="0" x="13" y="61" height="16" width="88" html.valueishtml="0" name=from_dt_t visible="1" font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=detail alignment="1" text="Date To :" border="0" color="0" x="342" y="61" height="16" width="88" html.valueishtml="0" name=to_dt_t visible="1" font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=1 alignment="0" tabsequence=32766 border="5" color="255" x="107" y="29" height="16" width="85" format="[general]" html.valueishtml="0" name=emp_code visible="1" edit.limit=10 edit.case=upper edit.focusrectangle=no edit.autoselect=no edit.imemode=0 font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="67108864" )
column(band=detail id=2 alignment="0" tabsequence=32766 border="5" color="255" x="198" y="29" height="16" width="323" format="[general]" html.valueishtml="0" name=emp_name visible="1" edit.limit=60 edit.case=any edit.focusrectangle=no edit.autoselect=no edit.imemode=0 font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="67108864" )
column(band=detail id=4 alignment="0" tabsequence=32766 border="5" color="255" x="106" y="61" height="16" width="85" format="[shortdate] [time]" html.valueishtml="0" name=from_dt visible="1" editmask.mask="dd/mm/yy" editmask.imemode=0 editmask.focusrectangle=no font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="67108864" )
column(band=detail id=5 alignment="0" tabsequence=32766 border="5" color="255" x="436" y="61" height="16" width="85" format="[shortdate] [time]" html.valueishtml="0" name=to_dt visible="1" editmask.mask="dd/mm/yy" editmask.imemode=0 editmask.focusrectangle=no font.face="Times New Roman" font.height="-10" font.weight="400" font.family="1" font.pitch="2" font.charset="0" background.mode="2" background.color="67108864" )
htmltable(border="1" )
htmlgen(clientevents="1" clientvalidation="1" clientcomputedfields="1" clientformatting="0" clientscriptable="0" generatejavascript="1" encodeselflinkargs="1" netscapelayers="0" )
export.xml(headgroups="1" includewhitespace="0" metadatatype=0 savemetadata=0 )
import.xml()
export.pdf(method=0 distill.custompostscript="0" xslfop.print="0" )
\ No newline at end of file
This diff is collapsed.
...@@ -2,17 +2,11 @@ package ibase.webitm.ejb.adm; ...@@ -2,17 +2,11 @@ package ibase.webitm.ejb.adm;
import java.rmi.RemoteException; import java.rmi.RemoteException;
//import java.util.*;
import java.util.Date;
//import java.text.*; //import java.text.*;
import java.sql.*; import java.sql.Connection;
import java.sql.PreparedStatement;
import org.w3c.dom.*; import java.sql.ResultSet;
import ibase.system.config.*; import java.sql.SQLException;
import ibase.utility.E12GenericUtility;
import ibase.webitm.ejb.*;
import ibase.webitm.utility.GenericUtility;
import ibase.webitm.utility.ITMException;
//import javax.naming.InitialContext; //import javax.naming.InitialContext;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
...@@ -20,10 +14,21 @@ import java.util.ArrayList; ...@@ -20,10 +14,21 @@ import java.util.ArrayList;
//import java.util.Date; //import java.util.Date;
/*Created by Chetna on [04/09/2014] For Shift Rotate Change [Start] /*Created by Chetna on [04/09/2014] For Shift Rotate Change [Start]
* */ * */
//import java.util.*;
import java.util.Date;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import ibase.utility.E12GenericUtility;
import ibase.webitm.ejb.ITMDBAccessEJB;
import ibase.webitm.ejb.ValidatorEJB;
import ibase.webitm.utility.ITMException;
@javax.ejb.Stateless
//Added by Dipesh on[06/08/2019][Start]
//@javax.ejb.Stateless
//Added by Dipesh on[06/08/2019][End]
public class ShiftChangeIc extends ValidatorEJB implements ShiftChangeIcLocal ,ShiftChangeIcRemote public class ShiftChangeIc extends ValidatorEJB implements ShiftChangeIcLocal ,ShiftChangeIcRemote
{ {
...@@ -185,7 +190,7 @@ public class ShiftChangeIc extends ValidatorEJB implements ShiftChangeIcLocal , ...@@ -185,7 +190,7 @@ public class ShiftChangeIc extends ValidatorEJB implements ShiftChangeIcLocal ,
else if(childNodeName.equalsIgnoreCase("to_dt")) // Validation for role_code else if(childNodeName.equalsIgnoreCase("to_dt")) // Validation for role_code
{ {
toDate = checkNull(genericUtility.getColumnValue("to_dt", curDom)); toDate = checkNull(genericUtility.getColumnValue("to_dt", curDom));
System.out.println("toDate:::"+toDate);
if(toDate == null || toDate.trim().length() == 0) if(toDate == null || toDate.trim().length() == 0)
{ {
errCode = "VPSHFTCH04"; errCode = "VPSHFTCH04";
...@@ -201,6 +206,8 @@ public class ShiftChangeIc extends ValidatorEJB implements ShiftChangeIcLocal , ...@@ -201,6 +206,8 @@ public class ShiftChangeIc extends ValidatorEJB implements ShiftChangeIcLocal ,
{ {
todt = sdf.parse(toDate); todt = sdf.parse(toDate);
frdt = sdf.parse(fromDate); frdt = sdf.parse(fromDate);
System.out.println("todt::::"+todt);
System.out.println("frdt:::"+frdt);
if(frdt.compareTo(todt)>0) if(frdt.compareTo(todt)>0)
{ {
errCode = "VPSHFTCH05"; errCode = "VPSHFTCH05";
...@@ -212,11 +219,10 @@ public class ShiftChangeIc extends ValidatorEJB implements ShiftChangeIcLocal , ...@@ -212,11 +219,10 @@ public class ShiftChangeIc extends ValidatorEJB implements ShiftChangeIcLocal ,
break; break;
} }
} }
} }
} // End of toDate } // End of toDate
} }
break; break;
case 2: case 2:
...@@ -259,15 +265,10 @@ public class ShiftChangeIc extends ValidatorEJB implements ShiftChangeIcLocal , ...@@ -259,15 +265,10 @@ public class ShiftChangeIc extends ValidatorEJB implements ShiftChangeIcLocal ,
break; break;
} }
} }
} }
} //shift end } //shift end
} }
break; break;
} }
int errListSize = errList.size(); int errListSize = errList.size();
count = 0; count = 0;
...@@ -430,6 +431,7 @@ public class ShiftChangeIc extends ValidatorEJB implements ShiftChangeIcLocal , ...@@ -430,6 +431,7 @@ public class ShiftChangeIc extends ValidatorEJB implements ShiftChangeIcLocal ,
switch (currentFormNo) switch (currentFormNo)
{ {
case 1: case 1:
parentNodeList = dom1.getElementsByTagName("Detail1"); parentNodeList = dom1.getElementsByTagName("Detail1");
parentNode = parentNodeList.item(0); parentNode = parentNodeList.item(0);
childNodeList = parentNode.getChildNodes(); childNodeList = parentNode.getChildNodes();
...@@ -437,6 +439,23 @@ public class ShiftChangeIc extends ValidatorEJB implements ShiftChangeIcLocal , ...@@ -437,6 +439,23 @@ public class ShiftChangeIc extends ValidatorEJB implements ShiftChangeIcLocal ,
childNodeListLength = childNodeList.getLength(); childNodeListLength = childNodeList.getLength();
// valueXmlString.append("<Detail1>\r\n"); // valueXmlString.append("<Detail1>\r\n");
valueXmlString.append("<Detail>\r\n"); valueXmlString.append("<Detail>\r\n");
do
{
childNode = childNodeList.item(ctr);
childNodeName = childNode.getNodeName();
if (childNodeName.equals(currentColumn))
{
if (childNode.getFirstChild() != null)
{
columnValue = childNode.getFirstChild().getNodeValue().trim();
}
}
ctr++;
}
while (ctr < childNodeListLength && !childNodeName.equals(currentColumn));
System.out.println("current form::::::::::::" + currentFormNo);
/* /*
if (currentColumn.trim().equalsIgnoreCase("itm_default")) if (currentColumn.trim().equalsIgnoreCase("itm_default"))
{ {
...@@ -460,9 +479,8 @@ public class ShiftChangeIc extends ValidatorEJB implements ShiftChangeIcLocal , ...@@ -460,9 +479,8 @@ public class ShiftChangeIc extends ValidatorEJB implements ShiftChangeIcLocal ,
*/ */
if(currentColumn.equalsIgnoreCase("emp_code")) if(currentColumn.equalsIgnoreCase("emp_code"))
{ {
empCode = checkNull(genericUtility.getColumnValue("emp_code", dom)); empCode = checkNull(genericUtility.getColumnValue("emp_code", dom));
System.out.println("empCode::::"+empCode);
if(empCode != null && empCode.trim().length() > 0) if(empCode != null && empCode.trim().length() > 0)
{ {
sql="SELECT TRIM(EMP_FNAME) || ' ' || (CASE WHEN EMP_MNAME IS NOT NULL THEN TRIM(EMP_MNAME) ELSE '' END) || ' ' || TRIM(EMP_LNAME) AS EMP_NAME FROM EMPLOYEE WHERE EMP_CODE = ? "; sql="SELECT TRIM(EMP_FNAME) || ' ' || (CASE WHEN EMP_MNAME IS NOT NULL THEN TRIM(EMP_MNAME) ELSE '' END) || ' ' || TRIM(EMP_LNAME) AS EMP_NAME FROM EMPLOYEE WHERE EMP_CODE = ? ";
...@@ -486,13 +504,13 @@ public class ShiftChangeIc extends ValidatorEJB implements ShiftChangeIcLocal , ...@@ -486,13 +504,13 @@ public class ShiftChangeIc extends ValidatorEJB implements ShiftChangeIcLocal ,
}//end of empCode item change }//end of empCode item change
} }
//valueXmlString.append("</Detail1>\r\n"); //valueXmlString.append("</Detail1>\r\n");
valueXmlString.append("</Detail>\r\n"); valueXmlString.append("</Detail>\r\n");
System.out.println("xml string ****** "+valueXmlString.toString()); System.out.println("xml string ****** "+valueXmlString.toString());
break; break;
case 2 : case 2 :
/* Searching the dom for the incoming column value start*/ /* Searching the dom for the incoming column value start*/
parentNodeList = dom.getElementsByTagName("Detail2"); parentNodeList = dom.getElementsByTagName("Detail2");
parentNode = parentNodeList.item(0); parentNode = parentNodeList.item(0);
...@@ -501,10 +519,6 @@ public class ShiftChangeIc extends ValidatorEJB implements ShiftChangeIcLocal , ...@@ -501,10 +519,6 @@ public class ShiftChangeIc extends ValidatorEJB implements ShiftChangeIcLocal ,
childNodeListLength = childNodeList.getLength(); childNodeListLength = childNodeList.getLength();
//valueXmlString.append("<Detail2>\r\n"); //valueXmlString.append("<Detail2>\r\n");
valueXmlString.append("<Detail>\r\n"); valueXmlString.append("<Detail>\r\n");
if (currentColumn == null || currentColumn.trim().length() == 0)
{
currentColumn = "shift";
}
if(currentColumn.trim().equalsIgnoreCase("shift")) //Item change for shift_code if(currentColumn.trim().equalsIgnoreCase("shift")) //Item change for shift_code
{ {
shift = checkNull(genericUtility.getColumnValue("shift", dom)); shift = checkNull(genericUtility.getColumnValue("shift", dom));
...@@ -527,17 +541,14 @@ public class ShiftChangeIc extends ValidatorEJB implements ShiftChangeIcLocal , ...@@ -527,17 +541,14 @@ public class ShiftChangeIc extends ValidatorEJB implements ShiftChangeIcLocal ,
else else
{ {
valueXmlString.append("<workshft_descr><![CDATA[").append(checkNull(descr)).append("]]></workshft_descr>"); valueXmlString.append("<workshft_descr><![CDATA[").append(checkNull(descr)).append("]]></workshft_descr>");
}//end of empCode item change }//end of empCode item change
} }
//valueXmlString.append("</Detail2>\r\n"); //valueXmlString.append("</Detail2>\r\n");
valueXmlString.append("</Detail>\r\n"); valueXmlString.append("</Detail>\r\n");
break; break;
} //eof switch }
valueXmlString.append("</Root>\r\n"); valueXmlString.append("</Root>\r\n");
} //eof try }
catch(Exception e) catch(Exception e)
{ {
System.out.println("Exception :[ShiftChangeIc][itemChanged] BEFORE finally==>\n"+e.getMessage()); System.out.println("Exception :[ShiftChangeIc][itemChanged] BEFORE finally==>\n"+e.getMessage());
......
...@@ -2,30 +2,28 @@ package ibase.webitm.ejb.adm; ...@@ -2,30 +2,28 @@ package ibase.webitm.ejb.adm;
import java.rmi.RemoteException; import java.rmi.RemoteException;
import java.util.*; import java.sql.Connection;
import java.text.*; import java.sql.PreparedStatement;
import java.sql.*; import java.sql.ResultSet;
import java.sql.SQLException;
import org.w3c.dom.*; import java.sql.Timestamp;
import javax.xml.parsers.*;
import javax.ejb.*;
import ibase.webitm.utility.*;
import ibase.system.config.*;
import ibase.utility.E12GenericUtility;
import ibase.webitm.ejb.*;
import ibase.webitm.utility.GenericUtility;
import ibase.system.config.*;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import javax.naming.InitialContext; import java.util.ArrayList;
import java.util.Calendar; import java.util.Calendar;
import java.util.Date; import java.util.Date;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
/*Created by Chetna on [25/08/2014] For Shift Rotate Change [Start] /*Created by Chetna on [25/08/2014] For Shift Rotate Change [Start]
* */ * */
import java.util.HashMap;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import ibase.utility.E12GenericUtility;
import ibase.webitm.ejb.ITMDBAccessEJB;
import ibase.webitm.ejb.ProcessEJB;
import ibase.webitm.utility.ITMException;
//Added by Dipesh on[06/08/2019][Start] //Added by Dipesh on[06/08/2019][Start]
//@javax.ejb.Stateless //@javax.ejb.Stateless
...@@ -97,9 +95,9 @@ public class ShiftChangePrc extends ProcessEJB implements ShiftChangePrcLocal , ...@@ -97,9 +95,9 @@ public class ShiftChangePrc extends ProcessEJB implements ShiftChangePrcLocal ,
Date fromDate= null; Date fromDate= null;
Date toDate= null; Date toDate= null;
ITMDBAccessEJB itmDbAccess = null; ITMDBAccessEJB itmDbAccess = null;
java.sql.Timestamp jSqlFromDate = null; Timestamp jSqlFromDate = null;
java.sql.Timestamp jSqlToDate = null; Timestamp jSqlToDate = null;
System.out.println("jSqlToDate:::::"+jSqlToDate);
try try
{ {
genericUtility = new E12GenericUtility(); genericUtility = new E12GenericUtility();
...@@ -123,10 +121,18 @@ public class ShiftChangePrc extends ProcessEJB implements ShiftChangePrcLocal , ...@@ -123,10 +121,18 @@ public class ShiftChangePrc extends ProcessEJB implements ShiftChangePrcLocal ,
tostrDate= checkNull( genericUtility.getColumnValue("to_dt",headerDom,"1")); tostrDate= checkNull( genericUtility.getColumnValue("to_dt",headerDom,"1"));
System.out.println("Emp CODE ["+ empCode+"] From Date ["+ frstrDate+"] To Date ["+ tostrDate + "]"); System.out.println("Emp CODE ["+ empCode+"] From Date ["+ frstrDate+"] To Date ["+ tostrDate + "]");
//jSqlFromDate = java.sql.Timestamp.valueOf(genericUtility.getValidDateTimeString(frstrDate,genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat()));
//jSqlToDate = java.sql.Timestamp.valueOf(genericUtility.getValidDateTimeString(tostrDate,genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat()));
jSqlFromDate = java.sql.Timestamp.valueOf(genericUtility.getValidDateTimeString(frstrDate,genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat())); if(frstrDate != null && frstrDate.trim().length() > 0)
{
jSqlFromDate = Timestamp.valueOf(genericUtility.getValidDateString(frstrDate, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0");
}
if(tostrDate != null && tostrDate.trim().length() > 0)
{
jSqlToDate = Timestamp.valueOf(genericUtility.getValidDateString(tostrDate, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0");
}
jSqlToDate = java.sql.Timestamp.valueOf(genericUtility.getValidDateTimeString(tostrDate,genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat()));
sql =" SELECT WORK_SHIFT.EMP_CODE , " sql =" SELECT WORK_SHIFT.EMP_CODE , "
...@@ -163,7 +169,8 @@ public class ShiftChangePrc extends ProcessEJB implements ShiftChangePrcLocal , ...@@ -163,7 +169,8 @@ public class ShiftChangePrc extends ProcessEJB implements ShiftChangePrcLocal ,
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
int cnt = 0; int cnt = 0;
int i = 0; //int i = 0;
int i = 1;
if(rs.next()) if(rs.next())
{ {
......
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