Commit f2d7fe56 authored by ysawant's avatar ysawant

Added new migrated component of EmpDetChg

emp_det_chg11.xml
emp_det_chg21.xml
d_emp_det_chg_brow.srd
d_emp_det_chg_edit.srd
EmpDetChgCancel.java
EmpDetChgCancPrv.java
w_emp_det_chg.sql
EmpDetChgConfirm.java
EmpDetChgConfirmLocal.java
EmpDetChgConfirmRemote.java
EmpDetChg.java
EmpDetChgLocal.java
EmpDetChgRemote.java


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@205571 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 450f6af9
This diff is collapsed.
......@@ -85,22 +85,22 @@
<dbname>employee_det_change.tran_id</dbname>
</table_column>
<table_column>
<type size="4000">char</type>
<type size="30">char</type>
<updatewhereclause>yes</updatewhereclause>
<name>emp_fname</name>
<dbname>emp_fname</dbname>
<dbname>employee_det_change.emp_fname</dbname>
</table_column>
<table_column>
<type size="4000">char</type>
<type size="30">char</type>
<updatewhereclause>yes</updatewhereclause>
<name>emp_lname</name>
<dbname>emp_lname</dbname>
<name>emp_mname</name>
<dbname>employee_det_change.emp_mname</dbname>
</table_column>
<table_column>
<type size="4000">char</type>
<type size="30">char</type>
<updatewhereclause>yes</updatewhereclause>
<name>emp_mname</name>
<dbname>emp_mname</dbname>
<name>emp_lname</name>
<dbname>employee_det_change.emp_lname</dbname>
</table_column>
<table_column>
<type size="5">char</type>
......@@ -120,7 +120,14 @@
<name>pay_site</name>
<dbname>employee.pay_site</dbname>
</table_column>
<retrieve>PBSELECT( VERSION(400) TABLE(NAME=&quot;employee_det_change&quot; ) TABLE(NAME=&quot;employee&quot; ) COLUMN(NAME=&quot;employee_det_change.emp_code&quot;) COLUMN(NAME=&quot;employee_det_change.status&quot;) COLUMN(NAME=&quot;employee_det_change.conf_date&quot;) COLUMN(NAME=&quot;employee_det_change.emp_code__aprv&quot;) COLUMN(NAME=&quot;employee_det_change.tran_id&quot;) COMPUTE(NAME=&quot;CASE WHEN EMPLOYEE.EMP_FNAME_LONG IS NOT NULL THEN EMPLOYEE.EMP_FNAME_LONG ELSE EMPLOYEE.EMP_FNAME END AS EMP_FNAME&quot;) COMPUTE(NAME=&quot;CASE WHEN EMPLOYEE.EMP_MNAME_LONG IS NOT NULL THEN EMPLOYEE.EMP_MNAME_LONG ELSE EMPLOYEE.EMP_MNAME END AS EMP_MNAME&quot;) COMPUTE(NAME=&quot;CASE WHEN EMPLOYEE.EMP_LNAME_LONG IS NOT NULL THEN EMPLOYEE.EMP_LNAME_LONG ELSE EMPLOYEE.EMP_LNAME END AS EMP_LNAME&quot;) COLUMN(NAME=&quot;employee.emp_site&quot;) COLUMN(NAME=&quot;employee.work_site&quot;) COLUMN(NAME=&quot;employee.pay_site&quot;) JOIN (LEFT=&quot;employee_det_change.emp_code&quot; OP =&quot;=&quot;RIGHT=&quot;employee.emp_code&quot; )WHERE( EXP1 =&quot;EMPLOYEE_DET_CHANGE.TRAN_DATE&quot; OP =&quot;&gt;=&quot; EXP2 =&quot;:tran_date__fr&quot; LOGIC =&quot;and&quot; ) WHERE( EXP1 =&quot;EMPLOYEE_DET_CHANGE.TRAN_DATE&quot; OP =&quot;&lt;=&quot; EXP2 =&quot;:tran_date__to&quot; ) ) ARG(NAME = &quot;tran_date__fr&quot; TYPE = datetime) ARG(NAME = &quot;tran_date__to&quot; TYPE = datetime) </retrieve>
<table_column>
<type size="1">char</type>
<update>yes</update>
<updatewhereclause>yes</updatewhereclause>
<name>trans_mode</name>
<dbname>employee_det_change.trans_mode</dbname>
</table_column>
<retrieve>PBSELECT( VERSION(400) TABLE(NAME=&quot;employee_det_change&quot; ) TABLE(NAME=&quot;employee&quot; ) COLUMN(NAME=&quot;employee_det_change.emp_code&quot;) COLUMN(NAME=&quot;employee_det_change.status&quot;) COLUMN(NAME=&quot;employee_det_change.conf_date&quot;) COLUMN(NAME=&quot;employee_det_change.emp_code__aprv&quot;) COLUMN(NAME=&quot;employee_det_change.tran_id&quot;) COMPUTE(NAME=&quot;CASE WHEN EMPLOYEE.EMP_FNAME_LONG IS NOT NULL THEN EMPLOYEE.EMP_FNAME_LONG ELSE EMPLOYEE.EMP_FNAME END AS EMP_FNAME&quot;) COMPUTE(NAME=&quot;CASE WHEN EMPLOYEE.EMP_MNAME_LONG IS NOT NULL THEN EMPLOYEE.EMP_MNAME_LONG ELSE EMPLOYEE.EMP_MNAME END AS EMP_MNAME&quot;) COMPUTE(NAME=&quot;CASE WHEN EMPLOYEE.EMP_LNAME_LONG IS NOT NULL THEN EMPLOYEE.EMP_LNAME_LONG ELSE EMPLOYEE.EMP_LNAME END AS EMP_LNAME&quot;) COLUMN(NAME=&quot;employee.emp_site&quot;) COLUMN(NAME=&quot;employee.work_site&quot;) COLUMN(NAME=&quot;employee.pay_site&quot;) COLUMN(NAME=&quot;employee_det_change.trans_mode&quot;) JOIN (LEFT=&quot;employee_det_change.emp_code&quot; OP =&quot;=&quot;RIGHT=&quot;employee.emp_code&quot; )WHERE( EXP1 =&quot;EMPLOYEE_DET_CHANGE.TRAN_DATE&quot; OP =&quot;&gt;=&quot; EXP2 =&quot;:tran_date__fr&quot; LOGIC =&quot;and&quot; ) WHERE( EXP1 =&quot;EMPLOYEE_DET_CHANGE.TRAN_DATE&quot; OP =&quot;&lt;=&quot; EXP2 =&quot;:tran_date__to&quot; ) ) ARG(NAME = &quot;tran_date__fr&quot; TYPE = datetime) ARG(NAME = &quot;tran_date__to&quot; TYPE = datetime) </retrieve>
<update>employee_det_change</update>
<updatewhere>0</updatewhere>
<updatekeyinplace>no</updatekeyinplace>
......@@ -332,17 +339,17 @@
<TextObject>
<band>Header</band>
<alignment>0</alignment>
<text>Pay Site</text>
<text>Transaction ID</text>
<border>6</border>
<color>0</color>
<x>1100</x>
<x>796</x>
<y>3</y>
<height>16</height>
<width>68</width>
<width>146</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>pay_site_t</name>
<name>tran_id_t</name>
<visible>1</visible>
<font>
<face>Times New Roman</face>
......@@ -360,17 +367,17 @@
<TextObject>
<band>Header</band>
<alignment>0</alignment>
<text>Transaction ID</text>
<text>Conf/Canc By</text>
<border>6</border>
<color>0</color>
<x>796</x>
<x>690</x>
<y>3</y>
<height>16</height>
<width>146</width>
<width>104</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>tran_id_t</name>
<name>emp_code__aprv_t</name>
<visible>1</visible>
<font>
<face>Times New Roman</face>
......@@ -388,17 +395,17 @@
<TextObject>
<band>Header</band>
<alignment>0</alignment>
<text>Conf/Canc By</text>
<text>Conf/Canc On</text>
<border>6</border>
<color>0</color>
<x>690</x>
<x>594</x>
<y>3</y>
<height>16</height>
<width>104</width>
<width>94</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>emp_code__aprv_t</name>
<name>conf_date_t</name>
<visible>1</visible>
<font>
<face>Times New Roman</face>
......@@ -416,17 +423,17 @@
<TextObject>
<band>Header</band>
<alignment>0</alignment>
<text>Conf/Canc On</text>
<text>Pay Site</text>
<border>6</border>
<color>0</color>
<x>594</x>
<x>1100</x>
<y>3</y>
<height>16</height>
<width>94</width>
<width>68</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>conf_date_t</name>
<name>pay_site_t</name>
<visible>1</visible>
<font>
<face>Times New Roman</face>
......@@ -441,6 +448,34 @@
<color>79741120</color>
</background>
</TextObject>
<TextObject>
<band>Header</band>
<alignment>0</alignment>
<text>Entry Mode</text>
<border>6</border>
<color>0</color>
<x>1170</x>
<y>3</y>
<height>16</height>
<width>89</width>
<html>
<valueishtml>0</valueishtml>
</html>
<name>trans_mode_t</name>
<visible>1</visible>
<font>
<face>Liberation Sans</face>
<height>-11</height>
<weight>400</weight>
<family>2</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>2</mode>
<color>79741120</color>
</background>
</TextObject>
<ColumnObject>
<band>Detail</band>
<id>1</id>
......@@ -518,7 +553,7 @@
</ColumnObject>
<ColumnObject>
<band>Detail</band>
<id>7</id>
<id>8</id>
<alignment>0</alignment>
<tabsequence>30</tabsequence>
<border>5</border>
......@@ -556,7 +591,7 @@
</ColumnObject>
<ColumnObject>
<band>Detail</band>
<id>8</id>
<id>7</id>
<alignment>0</alignment>
<tabsequence>40</tabsequence>
<border>5</border>
......@@ -776,6 +811,42 @@
<color>1090519039</color>
</background>
</ColumnObject>
<ColumnObject>
<band>Detail</band>
<id>5</id>
<alignment>0</alignment>
<tabsequence>32766</tabsequence>
<border>5</border>
<color>0</color>
<x>796</x>
<y>1</y>
<height>20</height>
<width>146</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>tran_id</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>0</limit>
<case>any</case>
<autoselect>yes</autoselect>
<imemode>0</imemode>
</EditStyle>
<font>
<face>Times New Roman</face>
<height>-10</height>
<weight>400</weight>
<family>1</family>
<pitch>2</pitch>
<charset>0</charset>
</font>
<background>
<mode>2</mode>
<color>1090519039</color>
</background>
</ColumnObject>
<ColumnObject>
<band>Detail</band>
<id>11</id>
......@@ -815,25 +886,26 @@
</ColumnObject>
<ColumnObject>
<band>Detail</band>
<id>5</id>
<id>12</id>
<alignment>0</alignment>
<tabsequence>32766</tabsequence>
<tabsequence>80</tabsequence>
<border>5</border>
<color>0</color>
<x>796</x>
<x>1170</x>
<y>1</y>
<height>20</height>
<width>146</width>
<width>89</width>
<format>[general]</format>
<html>
<valueishtml>0</valueishtml>
</html>
<name>tran_id</name>
<name>trans_mode</name>
<visible>1</visible>
<EditStyle style="edit">
<limit>0</limit>
<case>any</case>
<autoselect>yes</autoselect>
<focusrectangle>no</focusrectangle>
<autoselect>no</autoselect>
<imemode>0</imemode>
</EditStyle>
<font>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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 EmpDetChgLocal 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 EmpDetChgRemote 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;
}
......@@ -96,27 +96,18 @@ public class EmpDetChgCancPrv extends ActionHandlerEJB implements EmpDetChgCancP
if("X".equalsIgnoreCase(status))
{
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [START]
//retString = itmDBAccessEJB.getErrorString( "", "VTCANC2" , loginCode);
retString = itmDBAccessEJB.getErrorString("","VTCANC2",loginCode,"",conn);
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [END]
retString = itmDBAccessEJB.getErrorString( "", "VTCANC2" , loginCode);
return retString;
}
else if("C".equalsIgnoreCase(status))
{
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [START]
//retString = itmDBAccessEJB.getErrorString( "", "VTCONF8" , loginCode);
retString = itmDBAccessEJB.getErrorString("","VTCONF8",loginCode,"",conn);
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [END]
retString = itmDBAccessEJB.getErrorString( "", "VTCONF8" , loginCode);
return retString;
}
else
{
System.out.println("Transaction is Neither Confirmed Nor Cancelled so in else block!!!!");
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [START]
//retString = itmDBAccessEJB.getErrorString( "", "VTINVCANC1" , loginCode);//Warning Message shows
retString = itmDBAccessEJB.getErrorString("","VTINVCANC1",loginCode,"",conn);
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [END]
retString = itmDBAccessEJB.getErrorString( "", "VTINVCANC1" , loginCode);//Warning Message shows
}
}
catch(Exception se)
......
......@@ -5,15 +5,15 @@ import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import javax.ejb.Stateless;
import javax.naming.InitialContext;
import ibase.system.config.AppConnectParm;
import ibase.utility.CommonConstants;
import ibase.utility.E12GenericUtility;
import ibase.webitm.ejb.ActionHandlerEJB;
//Added and commented by sarita on 20JULY18
import ibase.webitm.ejb.ITMDBAccessEJB;
//import ibase.webitm.ejb.ITMDBAccessLocal;
import ibase.webitm.ejb.ITMDBAccessLocal;
import ibase.webitm.utility.ITMException;
@Stateless
......@@ -33,22 +33,16 @@ public class EmpDetChgCancel extends ActionHandlerEJB implements EmpDetChgCancel
int updCount = 0;
AppConnectParm appConnect = null;
InitialContext initialCtx = null;
//Added & Commented by sarita to use object of ITMDBAccessEJB instead ITMDBAccessLocal on 20 JULY 18.[START]
//ITMDBAccessLocal itmDBAccess = null;
ITMDBAccessEJB itmDBAccess = null;
//Added & Commented by sarita to use object of ITMDBAccessEJB instead ITMDBAccessLocal on 20 JULY 18.[END]
ITMDBAccessLocal itmDBAccess = null;
E12GenericUtility genericUtility = null;
String loginCode = "";
String loginEmpCode = "";
try
{
conn = getConnection();
//Added & Commented by sarita to create object instead creating lookup for ITMDBAccessEJB on 20 JULY 18 [START]
//appConnect = new AppConnectParm();
//initialCtx = new InitialContext(appConnect.getProperty());
//itmDBAccess = (ITMDBAccessLocal)initialCtx.lookup("ibase/ITMDBAccessEJB/local");
itmDBAccess = new ITMDBAccessEJB();
//Added & Commented by sarita to create object instead creating lookup for ITMDBAccessEJB on 20 JULY 18 [END]
appConnect = new AppConnectParm();
initialCtx = new InitialContext(appConnect.getProperty());
itmDBAccess = (ITMDBAccessLocal)initialCtx.lookup("ibase/ITMDBAccessEJB/local");
genericUtility = new E12GenericUtility();
loginCode = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginCode");
......@@ -99,20 +93,14 @@ public class EmpDetChgCancel extends ActionHandlerEJB implements EmpDetChgCancel
}
if("X".equalsIgnoreCase(status))
{
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [START]
//retString = itmDBAccess.getErrorString( "", "VTCANC2" , loginCode);
retString = itmDBAccess.getErrorString("","VTCANC2",loginCode,"",conn);
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [END]
retString = itmDBAccess.getErrorString( "", "VTCANC2" , loginCode);
return retString;
}
//If transaction in confirmed then unable to cancel the transaction else update the status as "X" in employee_det_change table.
//if("Y".equalsIgnoreCase(confirmed))
else if("C".equalsIgnoreCase(status))
{
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [START]
//retString = itmDBAccess.getErrorString( "", "VTCONF8" , loginCode);
retString = itmDBAccess.getErrorString("","VTCONF8",loginCode,"",conn);
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [END]
retString = itmDBAccess.getErrorString( "", "VTCONF8" , loginCode);
return retString;
}
//else if("N".equalsIgnoreCase(confirmed) || confirmed == null)
......@@ -142,10 +130,7 @@ public class EmpDetChgCancel extends ActionHandlerEJB implements EmpDetChgCancel
{
conn.commit();
System.out.println("Connection commit................");
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [START]
//retString = itmDBAccess.getErrorString( "", "VTCANC1" , loginCode);
retString = itmDBAccess.getErrorString("","VTCANC1",loginCode,"",conn);
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [END]
retString = itmDBAccess.getErrorString( "", "VTCANC1" , loginCode);
}
else
{
......@@ -157,12 +142,23 @@ public class EmpDetChgCancel extends ActionHandlerEJB implements EmpDetChgCancel
}
catch(SQLException se)
{
//Modified by Ahmed on 26-APR-2018 to rollback transaction if exception occurs[start]
try
{
if (conn!=null)
{
conn.rollback();
}
}
catch(Exception ex)
{
ex.printStackTrace();
}
se.printStackTrace();
//Modified by Ahmed on 26-APR-2018 to rollback transaction if exception occurs[end]
System.out.println("SQL Exception from [EmpDetChgCanc][confirm][" + se.getMessage()+ "]");
se.printStackTrace();
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [START]
//retString = itmDBAccess.getErrorString( "", "DS00000000" , loginCode);
retString = itmDBAccess.getErrorString("","DS00000000",loginCode,"",conn);
//Added and commented by sarita on to call getErrorString connection method on 20 JULY 2018 [END]
retString = itmDBAccess.getErrorString( "", "DS00000000" , loginCode);
return retString;
}
catch(Exception e)
......@@ -187,9 +183,6 @@ public class EmpDetChgCancel extends ActionHandlerEJB implements EmpDetChgCancel
{
try
{
//Added by sarita on 25 JULY 18 [START]
itmDBAccess = null;
//Added by sarita on 25 JULY 18 [END]
if(resultSet != null)
{
resultSet.close();
......
This diff is collapsed.
package ibase.webitm.ejb.adm.adv;
import java.rmi.RemoteException;
import ibase.webitm.ejb.ActionHandlerLocal;
import ibase.webitm.utility.ITMException;
public interface EmpDetChgConfirmLocal extends ActionHandlerLocal {
public String confirm(String tranId, String xtraParams, String forcedFlag) throws RemoteException,ITMException;
}
package ibase.webitm.ejb.adm.adv;
import java.rmi.RemoteException;
import ibase.webitm.ejb.ActionHandlerRemote;
import ibase.webitm.utility.ITMException;
public interface EmpDetChgConfirmRemote extends ActionHandlerRemote {
public String confirm(String tranId, String xtraParams, String forcedFlag) throws RemoteException,ITMException;
}
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