Commit 8cb63968 authored by dpingle's avatar dpingle

* Migration done for Shift Rotate - obj_name: shift_rotate

ShiftChangeIc.java
ShiftChangePrc.java
shift_rotate11.xml
shift_rotate21.xml
d_shift_rotate_list.srd
ShiftRotateIC.java
ShiftRotateLocal.java
ShiftRotateRemote.java
w_shift_chg.sql
w_shift_rotate.sql
d_shift_rotate_edit.srd


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@205059 ce508802-f39f-4f6c-b175-0d175dae99d5
parent f2d51731
......@@ -2,31 +2,35 @@ package ibase.webitm.ejb.adm;
import java.rmi.RemoteException;
import java.util.*;
//import java.util.*;
import java.util.Date;
import java.text.*;
//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 javax.naming.InitialContext;
//import javax.naming.InitialContext;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
//import java.util.Calendar;
//import java.util.Date;
/*Created by Chetna on [04/09/2014] For Shift Rotate Change [Start]
* */
@javax.ejb.Stateless
public class ShiftChangeIc extends ValidatorEJB implements ShiftChangeIcLocal ,ShiftChangeIcRemote {
GenericUtility genericUtility = GenericUtility.getInstance();
//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
{
//Added by Dipesh on[06/08/2019][Start]
//GenericUtility genericUtility = GenericUtility.getInstance();
E12GenericUtility genericUtility = null;
//Added by Dipesh on[06/08/2019][End]
public String wfValData(String xmlString, String xmlString1, String xmlString2, String objContext, String editFlag, String xtraParams) throws RemoteException,ITMException
{
String errString = "";
......@@ -93,20 +97,22 @@ public class ShiftChangeIc extends ValidatorEJB implements ShiftChangeIcLocal ,
Connection conn = null;
PreparedStatement pstmt = null ;
ResultSet rs = null;
ConnDriver connDriver = new ConnDriver();
//ConnDriver connDriver = new ConnDriver();
//StringBuffer errStringXml = new StringBuffer("<?xml version = \"1.0\"?> \r\n <Root> <Errors>");
StringBuffer errStringXml = new StringBuffer("<?xml version=\"1.0\"?>\r\n<DocumentRoot>\r\n<description>Datawindow Root</description>\r\n<group0>\r\n<description>Group0 description</description>\r\n<Header0>\r\n<description>Header0 members</description>\r\n");
try
{
genericUtility = new E12GenericUtility();
SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getApplDateFormat());
conn = connDriver.getConnectDB("DriverITM");
userId = getValueFromXTRA_PARAMS(xtraParams, "loginCode");
//Added by Dipesh on[06/08/2019][Start]
//conn = connDriver.getConnectDB("DriverITM");
//userId = getValueFromXTRA_PARAMS(xtraParams, "loginCode");
conn=getConnection();
userId = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginCode");
//Added by Dipesh on[06/08/2019][Start]
if(objContext != null && objContext.trim().length() > 0)
{
currentFormNo = Integer.parseInt(objContext);
......@@ -266,11 +272,13 @@ public class ShiftChangeIc extends ValidatorEJB implements ShiftChangeIcLocal ,
int errListSize = errList.size();
count = 0;
String errFldName = null;
//Commented and added by Varsha V on 20-Jul-18 for removing lookup
//AppConnectParm appConnect = new AppConnectParm();
//InitialContext ctx = new InitialContext(appConnect.getProperty()) ;
//ITMDBAccessLocal itmDBAccessEJB = (ITMDBAccessLocal)ctx.lookup("ibase/ITMDBAccessEJB/local");
ITMDBAccessEJB itmDBAccessEJB = new ITMDBAccessEJB();
ITMDBAccessEJB itmDbAccess = null;
//Added by Dipesh on[06/08/2019][Start]
/* AppConnectParm appConnect = new AppConnectParm();
InitialContext ctx = new InitialContext(appConnect.getProperty()) ;
ITMDBAccessLocal itmDBAccessEJB = (ITMDBAccessLocal)ctx.lookup("ibase/ITMDBAccessEJB/local"); */
itmDbAccess = new ITMDBAccessEJB();
//Added by Dipesh on[06/08/2019][End]
if(errList != null && errListSize > 0)
{
......@@ -279,15 +287,15 @@ public class ShiftChangeIc extends ValidatorEJB implements ShiftChangeIcLocal ,
errCode = errList.get(count);
errFldName = errFields.get(count);
System.out.println("errCode .........." + errCode);
//Commented and added by Varsha V on 20-Jul-18 for calling connection method
//Added by Dipesh on[06/08/2019][Start]
//errString = itmDBAccessEJB.getErrorString(errFldName, errCode, userId);
errString = itmDBAccessEJB.getErrorString(errFldName,errCode,userId,"",conn);
errString = itmDbAccess.getErrorString(errFldName, errCode, userId, "", conn);
System.out.println("errString........"+errString);
//Commented and added by Varsha V on 20-Jul-18 for calling connection method
//errString = itmDBAccessEJB.getErrorString("", errCode, userId);
errString = itmDBAccessEJB.getErrorString("",errCode,userId,"",conn);
errString = itmDbAccess.getErrorString("", errCode, userId, "", conn);
System.out.println("errString........"+errString);
//Added by Dipesh on[06/08/2019][End]
errorType = errorType(conn , errCode);
return errString;
......@@ -387,8 +395,8 @@ public class ShiftChangeIc extends ValidatorEJB implements ShiftChangeIcLocal ,
String shift = "";
String descr = "";
String sql = "";
String siteCode = "";
String empCode = "";
String childNodeName = "";
String curtranid = "";
String columnValue = "";
......@@ -397,16 +405,20 @@ public class ShiftChangeIc extends ValidatorEJB implements ShiftChangeIcLocal ,
int ctr = 0;
int currentFormNo = 0;
String siteCode = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"loginSiteCode");
String empCode = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"loginEmpCode");
try
{
genericUtility = new E12GenericUtility();
System.out.println("xtraParams===="+xtraParams);
siteCode = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"loginSiteCode");
empCode = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"loginEmpCode");
System.out.println("**empCode**"+empCode);
//Added by Dipesh on[06/08/2019][Start]
//ConnDriver connDriver = new ConnDriver();
//conn = connDriver.getConnectDB("DriverITM");
conn=getConnection();
//Added by Dipesh on[06/08/2019][End]
ConnDriver connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM");
if(objContext != null && objContext.trim().length()>0)
{
currentFormNo = Integer.parseInt(objContext);
......@@ -448,6 +460,7 @@ public class ShiftChangeIc extends ValidatorEJB implements ShiftChangeIcLocal ,
*/
if(currentColumn.equalsIgnoreCase("emp_code"))
{
empCode = checkNull(genericUtility.getColumnValue("emp_code", dom));
if(empCode != null && empCode.trim().length() > 0)
......
This diff is collapsed.
package ibase.webitm.ejb.adm;
import java.rmi.RemoteException;
import org.w3c.dom.Document;
import ibase.webitm.ejb.ValidatorLocal;
import ibase.webitm.utility.ITMException;
public interface ShiftRotateLocal extends ValidatorLocal
{
public String itemChanged(String xmlString, String xmlString1, String xmlString2, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException,ITMException;
public String itemChanged(Document dom, Document dom1,Document dom2, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException,ITMException;
public String wfValData(String xmlString, String xmlString1,String xmlString2, String objContext, String editFlag,String xtraParams) throws RemoteException,ITMException ;
public String wfValData(Document dom, Document dom1, Document dom2,String objContext, String editFlag, String xtraParams)throws RemoteException, ITMException;
}
package ibase.webitm.ejb.adm;
import java.rmi.RemoteException;
import org.w3c.dom.Document;
import ibase.webitm.ejb.ValidatorRemote;
import ibase.webitm.utility.ITMException;
public interface ShiftRotateRemote extends ValidatorRemote
{
public String itemChanged(String xmlString, String xmlString1, String xmlString2, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException,ITMException;
public String itemChanged(Document dom, Document dom1,Document dom2, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException,ITMException;
public String wfValData(String xmlString, String xmlString1,String xmlString2, String objContext, String editFlag,String xtraParams) throws RemoteException,ITMException ;
public String wfValData(Document dom, Document dom1, Document dom2,String objContext, String editFlag, String xtraParams)throws RemoteException, ITMException;
}
This diff is collapsed.
This diff is collapsed.
......@@ -6,7 +6,7 @@
<units>1</units>
<timer_interval>0</timer_interval>
<color>79741120</color>
<processing>1</processing>
<processing>0</processing>
<HTMLDW>no</HTMLDW>
<print>
<documentname></documentname>
......@@ -29,7 +29,6 @@
<cliptext>no</cliptext>
<overrideprintjob>no</overrideprintjob>
</print>
<grid.lines>0</grid.lines>
</BaseDefinition>
<Header>
<height>20</height>
......@@ -105,21 +104,18 @@
</table_column>
<table_column>
<type>datetime</type>
<update>yes</update>
<updatewhereclause>yes</updatewhereclause>
<name>chg_date</name>
<dbname>work_shift.chg_date</dbname>
</table_column>
<table_column>
<type size="10">char</type>
<update>yes</update>
<updatewhereclause>yes</updatewhereclause>
<name>chg_user</name>
<dbname>work_shift.chg_user</dbname>
</table_column>
<table_column>
<type size="15">char</type>
<update>yes</update>
<type size="300">char</type>
<updatewhereclause>yes</updatewhereclause>
<name>chg_term</name>
<dbname>work_shift.chg_term</dbname>
......@@ -131,8 +127,8 @@
<name>pattern_code</name>
<dbname>work_shift.pattern_code</dbname>
</table_column>
<retrieve>PBSELECT( VERSION(400) TABLE(NAME=&quot;employee&quot; ) TABLE(NAME=&quot;work_shift&quot; ) COLUMN(NAME=&quot;work_shift.emp_code&quot;) COLUMN(NAME=&quot;work_shift.shift&quot;) COLUMN(NAME=&quot;work_shift.from_dt&quot;) COLUMN(NAME=&quot;work_shift.to_dt&quot;) COLUMN(NAME=&quot;employee.emp_fname&quot;) COLUMN(NAME=&quot;employee.emp_lname&quot;) COLUMN(NAME=&quot;employee.dept_code&quot;) COLUMN(NAME=&quot;employee.emp_site&quot;) COLUMN(NAME=&quot;work_shift.chg_date&quot;) COLUMN(NAME=&quot;work_shift.chg_user&quot;) COLUMN(NAME=&quot;work_shift.chg_term&quot;) COLUMN(NAME=&quot;work_shift.pattern_code&quot;)WHERE( EXP1 =&quot;work_shift.emp_code&quot; OP =&quot;=&quot; EXP2 =&quot;employee.emp_code&quot; LOGIC =&quot;and&quot; ) WHERE( EXP1 =&quot;fn_shiftdates_inrange( work_shift.from_dt , work_shift.to_dt , :ad_date_fr , :ad_date_to)&quot; OP =&quot;=&quot; EXP2 =&quot;1&quot; ) ) ARG(NAME = &quot;ad_date_fr&quot; TYPE = datetime) ARG(NAME = &quot;ad_date_to&quot; TYPE = datetime) </retrieve>
<update>work_shift</update>
<retrieve>PBSELECT( VERSION(400) TABLE(NAME=&quot;employee&quot; ) TABLE(NAME=&quot;work_shift&quot; ) COLUMN(NAME=&quot;work_shift.emp_code&quot;) COLUMN(NAME=&quot;work_shift.shift&quot;) COLUMN(NAME=&quot;work_shift.from_dt&quot;) COLUMN(NAME=&quot;work_shift.to_dt&quot;) COLUMN(NAME=&quot;employee.emp_fname&quot;) COLUMN(NAME=&quot;employee.emp_lname&quot;) COLUMN(NAME=&quot;employee.dept_code&quot;) COLUMN(NAME=&quot;employee.emp_site&quot;) COLUMN(NAME=&quot;work_shift.chg_date&quot;) COLUMN(NAME=&quot;work_shift.chg_user&quot;) COLUMN(NAME=&quot;work_shift.chg_term&quot;) COLUMN(NAME=&quot;work_shift.pattern_code&quot;) JOIN (LEFT=&quot;work_shift.emp_code&quot; OP =&quot;=&quot;RIGHT=&quot;employee.emp_code&quot; )WHERE( EXP1 =&quot;(work_shift.from_dt&quot; OP =&quot;&gt;=&quot; EXP2 =&quot;:ad_date_fr &quot; LOGIC =&quot;or&quot; ) WHERE( EXP1 =&quot;work_shift.to_dt&quot; OP =&quot;&lt;=&quot; EXP2 =&quot;:ad_date_to)&quot; ) ) ORDER(NAME=&quot;employee.emp_code&quot; ASC=yes ) ORDER(NAME=&quot;work_shift.from_dt&quot; ASC=yes ) ORDER(NAME=&quot;work_shift.to_dt&quot; ASC=yes ) ARG(NAME = &quot;ad_date_fr&quot; TYPE = datetime) ARG(NAME = &quot;ad_date_to&quot; TYPE = datetime) </retrieve>
<update>WORK_SHIFT</update>
<updatewhere>0</updatewhere>
<updatekeyinplace>no</updatekeyinplace>
<argument>
......@@ -147,13 +143,13 @@
<TextObject>
<band>Header</band>
<alignment>2</alignment>
<text>Employee Code</text>
<text>Emp Code</text>
<border>6</border>
<color>0</color>
<x>2</x>
<x>4</x>
<y>2</y>
<height>16</height>
<width>99</width>
<width>66</width>
<html>
<valueishtml>0</valueishtml>
</html>
......@@ -178,10 +174,10 @@
<text>Shift</text>
<border>6</border>
<color>0</color>
<x>103</x>
<x>74</x>
<y>2</y>
<height>16</height>
<width>76</width>
<width>29</width>
<html>
<valueishtml>0</valueishtml>
</html>
......@@ -206,10 +202,10 @@
<text>From Date</text>
<border>6</border>
<color>0</color>
<x>181</x>
<x>107</x>
<y>2</y>
<height>16</height>
<width>83</width>
<width>67</width>
<html>
<valueishtml>0</valueishtml>
</html>
......@@ -234,10 +230,10 @@
<text>To Date</text>
<border>6</border>
<color>0</color>
<x>266</x>
<x>178</x>
<y>2</y>
<height>16</height>
<width>75</width>
<width>60</width>
<html>
<valueishtml>0</valueishtml>
</html>
......@@ -259,10 +255,10 @@
<TextObject>
<band>Header</band>
<alignment>2</alignment>
<text>Employee First Name</text>
<text>Emp Fname</text>
<border>6</border>
<color>0</color>
<x>343</x>
<x>242</x>
<y>2</y>
<height>16</height>
<width>187</width>
......@@ -287,10 +283,10 @@
<TextObject>
<band>Header</band>
<alignment>2</alignment>
<text>Employee Last Name</text>
<text>Emp Lname</text>
<border>6</border>
<color>0</color>
<x>532</x>
<x>433</x>
<y>2</y>
<height>16</height>
<width>198</width>
......@@ -318,10 +314,10 @@
<text>Dept Code</text>
<border>6</border>
<color>0</color>
<x>732</x>
<x>635</x>
<y>2</y>
<height>16</height>
<width>69</width>
<width>61</width>
<html>
<valueishtml>0</valueishtml>
</html>
......@@ -346,10 +342,10 @@
<text>Site Code</text>
<border>6</border>
<color>0</color>
<x>803</x>
<x>700</x>
<y>2</y>
<height>16</height>
<width>62</width>
<width>61</width>
<html>
<valueishtml>0</valueishtml>
</html>
......@@ -374,10 +370,10 @@
<text>Pattern Code</text>
<border>6</border>
<color>0</color>
<x>867</x>
<x>765</x>
<y>2</y>
<height>16</height>
<width>78</width>
<width>69</width>
<html>
<valueishtml>0</valueishtml>
</html>
......@@ -402,7 +398,7 @@
<text>Chg Date</text>
<border>6</border>
<color>0</color>
<x>947</x>
<x>838</x>
<y>2</y>
<height>16</height>
<width>73</width>
......@@ -430,10 +426,10 @@
<text>Chg User</text>
<border>6</border>
<color>0</color>
<x>1022</x>
<x>915</x>
<y>2</y>
<height>16</height>
<width>80</width>
<width>76</width>
<html>
<valueishtml>0</valueishtml>
</html>
......@@ -458,7 +454,7 @@
<text>Chg Term</text>
<border>6</border>
<color>0</color>
<x>1104</x>
<x>995</x>
<y>2</y>
<height>16</height>
<width>70</width>
......@@ -490,7 +486,7 @@
<x>2</x>
<y>1</y>
<height>16</height>
<width>99</width>
<width>66</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
......@@ -524,10 +520,10 @@
<tabsequence>20</tabsequence>
<border>5</border>
<color>0</color>
<x>103</x>
<x>72</x>
<y>1</y>
<height>16</height>
<width>76</width>
<width>30</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
......@@ -561,10 +557,10 @@
<tabsequence>30</tabsequence>
<border>5</border>
<color>0</color>
<x>181</x>
<x>106</x>
<y>1</y>
<height>16</height>
<width>83</width>
<width>67</width>
<format>[shortdate] [time]</format>
<html>
<valueishtml>0</valueishtml>
......@@ -596,10 +592,10 @@
<tabsequence>40</tabsequence>
<border>5</border>
<color>0</color>
<x>266</x>
<x>178</x>
<y>1</y>
<height>16</height>
<width>75</width>
<width>60</width>
<format>dd/mm/yy</format>
<html>
<valueishtml>0</valueishtml>
......@@ -631,7 +627,7 @@
<tabsequence>50</tabsequence>
<border>5</border>
<color>0</color>
<x>343</x>
<x>241</x>
<y>1</y>
<height>16</height>
<width>187</width>
......@@ -669,7 +665,7 @@
<tabsequence>60</tabsequence>
<border>5</border>
<color>0</color>
<x>532</x>
<x>432</x>
<y>1</y>
<height>16</height>
<width>198</width>
......@@ -707,10 +703,10 @@
<tabsequence>70</tabsequence>
<border>5</border>
<color>0</color>
<x>732</x>
<x>634</x>
<y>1</y>
<height>16</height>
<width>69</width>
<width>61</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
......@@ -745,7 +741,7 @@
<tabsequence>80</tabsequence>
<border>5</border>
<color>0</color>
<x>803</x>
<x>698</x>
<y>1</y>
<height>16</height>
<width>62</width>
......@@ -779,13 +775,13 @@
<band>Detail</band>
<id>12</id>
<alignment>0</alignment>
<tabsequence>90</tabsequence>
<tabsequence>120</tabsequence>
<border>5</border>
<color>0</color>
<x>867</x>
<x>763</x>
<y>1</y>
<height>16</height>
<width>78</width>
<width>69</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
......@@ -816,10 +812,10 @@
<band>Detail</band>
<id>9</id>
<alignment>0</alignment>
<tabsequence>100</tabsequence>
<tabsequence>90</tabsequence>
<border>5</border>
<color>0</color>
<x>947</x>
<x>835</x>
<y>1</y>
<height>16</height>
<width>73</width>
......@@ -853,10 +849,10 @@
<band>Detail</band>
<id>10</id>
<alignment>0</alignment>
<tabsequence>110</tabsequence>
<tabsequence>100</tabsequence>
<border>5</border>
<color>0</color>
<x>1022</x>
<x>912</x>
<y>1</y>
<height>16</height>
<width>80</width>
......@@ -890,10 +886,10 @@
<band>Detail</band>
<id>11</id>
<alignment>0</alignment>
<tabsequence>120</tabsequence>
<tabsequence>110</tabsequence>
<border>5</border>
<color>0</color>
<x>1104</x>
<x>995</x>
<y>1</y>
<height>16</height>
<width>70</width>
......
This diff is collapsed.
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