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; ...@@ -2,31 +2,35 @@ package ibase.webitm.ejb.adm;
import java.rmi.RemoteException; import java.rmi.RemoteException;
import java.util.*; //import java.util.*;
import java.util.Date; import java.util.Date;
import java.text.*; //import java.text.*;
import java.sql.*; import java.sql.*;
import org.w3c.dom.*; import org.w3c.dom.*;
import ibase.system.config.*; import ibase.system.config.*;
import ibase.utility.E12GenericUtility;
import ibase.webitm.ejb.*; import ibase.webitm.ejb.*;
import ibase.webitm.utility.GenericUtility; import ibase.webitm.utility.GenericUtility;
import ibase.webitm.utility.ITMException; 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;
import java.util.Calendar; //import java.util.Calendar;
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]
* */ * */
@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 {
GenericUtility genericUtility = GenericUtility.getInstance();
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 public String wfValData(String xmlString, String xmlString1, String xmlString2, String objContext, String editFlag, String xtraParams) throws RemoteException,ITMException
{ {
String errString = ""; String errString = "";
...@@ -93,20 +97,22 @@ public class ShiftChangeIc extends ValidatorEJB implements ShiftChangeIcLocal , ...@@ -93,20 +97,22 @@ public class ShiftChangeIc extends ValidatorEJB implements ShiftChangeIcLocal ,
Connection conn = null; Connection conn = null;
PreparedStatement pstmt = null ; PreparedStatement pstmt = null ;
ResultSet rs = 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 <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"); 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 try
{ {
genericUtility = new E12GenericUtility();
SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getApplDateFormat()); SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getApplDateFormat());
//Added by Dipesh on[06/08/2019][Start]
conn = connDriver.getConnectDB("DriverITM"); //conn = connDriver.getConnectDB("DriverITM");
userId = getValueFromXTRA_PARAMS(xtraParams, "loginCode"); //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) if(objContext != null && objContext.trim().length() > 0)
{ {
currentFormNo = Integer.parseInt(objContext); currentFormNo = Integer.parseInt(objContext);
...@@ -266,11 +272,13 @@ public class ShiftChangeIc extends ValidatorEJB implements ShiftChangeIcLocal , ...@@ -266,11 +272,13 @@ public class ShiftChangeIc extends ValidatorEJB implements ShiftChangeIcLocal ,
int errListSize = errList.size(); int errListSize = errList.size();
count = 0; count = 0;
String errFldName = null; String errFldName = null;
//Commented and added by Varsha V on 20-Jul-18 for removing lookup ITMDBAccessEJB itmDbAccess = null;
//AppConnectParm appConnect = new AppConnectParm(); //Added by Dipesh on[06/08/2019][Start]
//InitialContext ctx = new InitialContext(appConnect.getProperty()) ; /* AppConnectParm appConnect = new AppConnectParm();
//ITMDBAccessLocal itmDBAccessEJB = (ITMDBAccessLocal)ctx.lookup("ibase/ITMDBAccessEJB/local"); InitialContext ctx = new InitialContext(appConnect.getProperty()) ;
ITMDBAccessEJB itmDBAccessEJB = new ITMDBAccessEJB(); ITMDBAccessLocal itmDBAccessEJB = (ITMDBAccessLocal)ctx.lookup("ibase/ITMDBAccessEJB/local"); */
itmDbAccess = new ITMDBAccessEJB();
//Added by Dipesh on[06/08/2019][End]
if(errList != null && errListSize > 0) if(errList != null && errListSize > 0)
{ {
...@@ -279,15 +287,15 @@ public class ShiftChangeIc extends ValidatorEJB implements ShiftChangeIcLocal , ...@@ -279,15 +287,15 @@ public class ShiftChangeIc extends ValidatorEJB implements ShiftChangeIcLocal ,
errCode = errList.get(count); errCode = errList.get(count);
errFldName = errFields.get(count); errFldName = errFields.get(count);
System.out.println("errCode .........." + errCode); 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);
errString = itmDBAccessEJB.getErrorString(errFldName,errCode,userId,"",conn); errString = itmDbAccess.getErrorString(errFldName, errCode, userId, "", conn);
System.out.println("errString........"+errString); 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);
errString = itmDBAccessEJB.getErrorString("",errCode,userId,"",conn); errString = itmDbAccess.getErrorString("", errCode, userId, "", conn);
System.out.println("errString........"+errString); System.out.println("errString........"+errString);
//Added by Dipesh on[06/08/2019][End]
errorType = errorType(conn , errCode); errorType = errorType(conn , errCode);
return errString; return errString;
...@@ -387,8 +395,8 @@ public class ShiftChangeIc extends ValidatorEJB implements ShiftChangeIcLocal , ...@@ -387,8 +395,8 @@ public class ShiftChangeIc extends ValidatorEJB implements ShiftChangeIcLocal ,
String shift = ""; String shift = "";
String descr = ""; String descr = "";
String sql = ""; String sql = "";
String siteCode = "";
String empCode = "";
String childNodeName = ""; String childNodeName = "";
String curtranid = ""; String curtranid = "";
String columnValue = ""; String columnValue = "";
...@@ -397,16 +405,20 @@ public class ShiftChangeIc extends ValidatorEJB implements ShiftChangeIcLocal , ...@@ -397,16 +405,20 @@ public class ShiftChangeIc extends ValidatorEJB implements ShiftChangeIcLocal ,
int ctr = 0; int ctr = 0;
int currentFormNo = 0; int currentFormNo = 0;
String siteCode = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"loginSiteCode");
String empCode = genericUtility.getValueFromXTRA_PARAMS(xtraParams,"loginEmpCode");
try 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); 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) if(objContext != null && objContext.trim().length()>0)
{ {
currentFormNo = Integer.parseInt(objContext); currentFormNo = Integer.parseInt(objContext);
...@@ -448,6 +460,7 @@ public class ShiftChangeIc extends ValidatorEJB implements ShiftChangeIcLocal , ...@@ -448,6 +460,7 @@ 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));
if(empCode != null && empCode.trim().length() > 0) 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.
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