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.
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