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 @@
<dbname>to_dt</dbname>
</table_column>
</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>
<band>Detail</band>
<alignment>1</alignment>
<text>Employee :</text>
<border>0</border>
<color>0</color>
<x>6</x>
<y>8</y>
<x>13</x>
<y>28</y>
<height>16</height>
<width>88</width>
<html>
......@@ -108,8 +132,8 @@
<text>Date From :</text>
<border>0</border>
<color>0</color>
<x>6</x>
<y>41</y>
<x>13</x>
<y>61</y>
<height>16</height>
<width>88</width>
<html>
......@@ -136,8 +160,8 @@
<text>Date To :</text>
<border>0</border>
<color>0</color>
<x>335</x>
<y>41</y>
<x>342</x>
<y>61</y>
<height>16</height>
<width>88</width>
<html>
......@@ -165,8 +189,8 @@
<tabsequence>32766</tabsequence>
<border>5</border>
<color>255</color>
<x>100</x>
<y>9</y>
<x>107</x>
<y>29</y>
<height>16</height>
<width>85</width>
<format>[general]</format>
......@@ -202,8 +226,8 @@
<tabsequence>32766</tabsequence>
<border>5</border>
<color>255</color>
<x>191</x>
<y>9</y>
<x>198</x>
<y>29</y>
<height>16</height>
<width>323</width>
<format>[general]</format>
......@@ -239,8 +263,8 @@
<tabsequence>32766</tabsequence>
<border>5</border>
<color>255</color>
<x>100</x>
<y>41</y>
<x>106</x>
<y>61</y>
<height>16</height>
<width>85</width>
<format>[shortdate] [time]</format>
......@@ -274,8 +298,8 @@
<tabsequence>32766</tabsequence>
<border>5</border>
<color>255</color>
<x>429</x>
<y>41</y>
<x>436</x>
<y>61</y>
<height>16</height>
<width>85</width>
<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;
import java.rmi.RemoteException;
//import java.util.*;
import java.util.Date;
//import java.text.*;
import java.sql.*;
import org.w3c.dom.*;
import ibase.system.config.*;
import ibase.utility.E12GenericUtility;
import ibase.webitm.ejb.*;
import ibase.webitm.utility.GenericUtility;
import ibase.webitm.utility.ITMException;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
//import javax.naming.InitialContext;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
......@@ -20,10 +14,21 @@ import java.util.ArrayList;
//import java.util.Date;
/*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
{
......@@ -185,7 +190,7 @@ public class ShiftChangeIc extends ValidatorEJB implements ShiftChangeIcLocal ,
else if(childNodeName.equalsIgnoreCase("to_dt")) // Validation for role_code
{
toDate = checkNull(genericUtility.getColumnValue("to_dt", curDom));
System.out.println("toDate:::"+toDate);
if(toDate == null || toDate.trim().length() == 0)
{
errCode = "VPSHFTCH04";
......@@ -201,6 +206,8 @@ public class ShiftChangeIc extends ValidatorEJB implements ShiftChangeIcLocal ,
{
todt = sdf.parse(toDate);
frdt = sdf.parse(fromDate);
System.out.println("todt::::"+todt);
System.out.println("frdt:::"+frdt);
if(frdt.compareTo(todt)>0)
{
errCode = "VPSHFTCH05";
......@@ -212,11 +219,10 @@ public class ShiftChangeIc extends ValidatorEJB implements ShiftChangeIcLocal ,
break;
}
}
}
} // End of toDate
}
break;
case 2:
......@@ -259,15 +265,10 @@ public class ShiftChangeIc extends ValidatorEJB implements ShiftChangeIcLocal ,
break;
}
}
}
} //shift end
}
break;
}
int errListSize = errList.size();
count = 0;
......@@ -430,6 +431,7 @@ public class ShiftChangeIc extends ValidatorEJB implements ShiftChangeIcLocal ,
switch (currentFormNo)
{
case 1:
parentNodeList = dom1.getElementsByTagName("Detail1");
parentNode = parentNodeList.item(0);
childNodeList = parentNode.getChildNodes();
......@@ -437,6 +439,23 @@ public class ShiftChangeIc extends ValidatorEJB implements ShiftChangeIcLocal ,
childNodeListLength = childNodeList.getLength();
// valueXmlString.append("<Detail1>\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"))
{
......@@ -460,9 +479,8 @@ public class ShiftChangeIc extends ValidatorEJB implements ShiftChangeIcLocal ,
*/
if(currentColumn.equalsIgnoreCase("emp_code"))
{
empCode = checkNull(genericUtility.getColumnValue("emp_code", dom));
System.out.println("empCode::::"+empCode);
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 = ? ";
......@@ -486,13 +504,13 @@ public class ShiftChangeIc extends ValidatorEJB implements ShiftChangeIcLocal ,
}//end of empCode item change
}
//valueXmlString.append("</Detail1>\r\n");
valueXmlString.append("</Detail>\r\n");
System.out.println("xml string ****** "+valueXmlString.toString());
break;
case 2 :
/* Searching the dom for the incoming column value start*/
parentNodeList = dom.getElementsByTagName("Detail2");
parentNode = parentNodeList.item(0);
......@@ -501,10 +519,6 @@ public class ShiftChangeIc extends ValidatorEJB implements ShiftChangeIcLocal ,
childNodeListLength = childNodeList.getLength();
//valueXmlString.append("<Detail2>\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
{
shift = checkNull(genericUtility.getColumnValue("shift", dom));
......@@ -527,17 +541,14 @@ public class ShiftChangeIc extends ValidatorEJB implements ShiftChangeIcLocal ,
else
{
valueXmlString.append("<workshft_descr><![CDATA[").append(checkNull(descr)).append("]]></workshft_descr>");
}//end of empCode item change
}
//valueXmlString.append("</Detail2>\r\n");
valueXmlString.append("</Detail>\r\n");
break;
} //eof switch
}
valueXmlString.append("</Root>\r\n");
} //eof try
}
catch(Exception e)
{
System.out.println("Exception :[ShiftChangeIc][itemChanged] BEFORE finally==>\n"+e.getMessage());
......
......@@ -2,30 +2,28 @@ package ibase.webitm.ejb.adm;
import java.rmi.RemoteException;
import java.util.*;
import java.text.*;
import java.sql.*;
import org.w3c.dom.*;
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.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import javax.naming.InitialContext;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
/*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]
//@javax.ejb.Stateless
......@@ -97,9 +95,9 @@ public class ShiftChangePrc extends ProcessEJB implements ShiftChangePrcLocal ,
Date fromDate= null;
Date toDate= null;
ITMDBAccessEJB itmDbAccess = null;
java.sql.Timestamp jSqlFromDate = null;
java.sql.Timestamp jSqlToDate = null;
Timestamp jSqlFromDate = null;
Timestamp jSqlToDate = null;
System.out.println("jSqlToDate:::::"+jSqlToDate);
try
{
genericUtility = new E12GenericUtility();
......@@ -123,10 +121,18 @@ public class ShiftChangePrc extends ProcessEJB implements ShiftChangePrcLocal ,
tostrDate= checkNull( genericUtility.getColumnValue("to_dt",headerDom,"1"));
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 , "
......@@ -163,7 +169,8 @@ public class ShiftChangePrc extends ProcessEJB implements ShiftChangePrcLocal ,
rs = pstmt.executeQuery();
int cnt = 0;
int i = 0;
//int i = 0;
int i = 1;
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