Commit 0bae6226 authored by sanashaikh's avatar sanashaikh

Sana S:Modified on 26/08/2019

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@206233 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 1ba3a826
package ibase.webitm.ejb.adm; package ibase.webitm.ejb.adm;
import ibase.system.config.AppConnectParm; //import ibase.system.config.AppConnectParm;
import ibase.system.config.ConnDriver; //import ibase.system.config.ConnDriver;
import ibase.utility.E12GenericUtility;//Modified By Hemlata on[20/11/2014] [As per changes in framework to use genericUtility ] import ibase.utility.E12GenericUtility;//Modified By Hemlata on[20/11/2014] [As per changes in framework to use genericUtility ]
import ibase.webitm.ejb.ITMDBAccessEJB; import ibase.webitm.ejb.ITMDBAccessEJB;
import ibase.webitm.ejb.ITMDBAccessLocal; //import ibase.webitm.ejb.ITMDBAccessLocal;
import ibase.webitm.ejb.ValidatorEJB; import ibase.webitm.ejb.ValidatorEJB;
import ibase.webitm.utility.ITMException; import ibase.webitm.utility.ITMException;
...@@ -14,14 +14,14 @@ import java.sql.PreparedStatement; ...@@ -14,14 +14,14 @@ import java.sql.PreparedStatement;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; //import java.util.Arrays;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import javax.ejb.Stateless; import javax.ejb.Stateless;
import javax.naming.InitialContext; //import javax.naming.InitialContext;
import org.w3c.dom.CDATASection; //import org.w3c.dom.CDATASection;
import org.w3c.dom.Document; import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap; import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node; import org.w3c.dom.Node;
...@@ -38,7 +38,11 @@ import org.w3c.dom.NodeList; ...@@ -38,7 +38,11 @@ import org.w3c.dom.NodeList;
public class EmpLvePrkBalTrfIC extends ValidatorEJB implements EmpLvePrkBalTrfICLocal ,EmpLvePrkBalTrfICRemote public class EmpLvePrkBalTrfIC extends ValidatorEJB implements EmpLvePrkBalTrfICLocal ,EmpLvePrkBalTrfICRemote
{ {
AdmCommon admCommon = new AdmCommon(); AdmCommon admCommon = new AdmCommon();
public String itemChanged() throws RemoteException,ITMException
{
return "";
}
public String itemChanged(String xmlString, String xmlString1,String xmlString2, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException,ITMException public String itemChanged(String xmlString, String xmlString1,String xmlString2, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException,ITMException
{ {
Document dom = null; Document dom = null;
...@@ -88,7 +92,7 @@ public class EmpLvePrkBalTrfIC extends ValidatorEJB implements EmpLvePrkBalTrfIC ...@@ -88,7 +92,7 @@ public class EmpLvePrkBalTrfIC extends ValidatorEJB implements EmpLvePrkBalTrfIC
String sql = ""; String sql = "";
Connection conn = null; Connection conn = null;
ConnDriver connDriver = new ConnDriver(); //ConnDriver connDriver = null;
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
ResultSet rs = null; ResultSet rs = null;
...@@ -99,7 +103,7 @@ public class EmpLvePrkBalTrfIC extends ValidatorEJB implements EmpLvePrkBalTrfIC ...@@ -99,7 +103,7 @@ public class EmpLvePrkBalTrfIC extends ValidatorEJB implements EmpLvePrkBalTrfIC
String relieveDate1 = ""; String relieveDate1 = "";
String empNameFrom = ""; String empNameFrom = "";
String empNameTo =""; String empNameTo ="";
String siteDescrFrm = ""; //String siteDescrFrm = "";
String siteDescrTo = ""; String siteDescrTo = "";
String tranType = ""; String tranType = "";
String chgUser = ""; String chgUser = "";
...@@ -131,7 +135,7 @@ public class EmpLvePrkBalTrfIC extends ValidatorEJB implements EmpLvePrkBalTrfIC ...@@ -131,7 +135,7 @@ public class EmpLvePrkBalTrfIC extends ValidatorEJB implements EmpLvePrkBalTrfIC
E12GenericUtility genericUtility = new E12GenericUtility(); E12GenericUtility genericUtility = new E12GenericUtility();
String loginEmpCode = checkNull( genericUtility.getValueFromXTRA_PARAMS( xtraParams, "loginEmpCode" ) ); String loginEmpCode = checkNull( genericUtility.getValueFromXTRA_PARAMS( xtraParams, "loginEmpCode" ) );
String loginSiteCode = checkNull( genericUtility.getValueFromXTRA_PARAMS( xtraParams, "loginSiteCode") ); // String loginSiteCode = checkNull( genericUtility.getValueFromXTRA_PARAMS( xtraParams, "loginSiteCode") );
String loginCode = checkNull( genericUtility.getValueFromXTRA_PARAMS( xtraParams, "loginCode" ) );//Modified by Anjali R. on [07/09/2018][To get login code from xtraparams] String loginCode = checkNull( genericUtility.getValueFromXTRA_PARAMS( xtraParams, "loginCode" ) );//Modified by Anjali R. on [07/09/2018][To get login code from xtraparams]
chgUser = genericUtility.getValueFromXTRA_PARAMS( xtraParams, "loginCode" ); chgUser = genericUtility.getValueFromXTRA_PARAMS( xtraParams, "loginCode" );
chgTerm = genericUtility.getValueFromXTRA_PARAMS( xtraParams, "termId" ); chgTerm = genericUtility.getValueFromXTRA_PARAMS( xtraParams, "termId" );
...@@ -818,7 +822,7 @@ public class EmpLvePrkBalTrfIC extends ValidatorEJB implements EmpLvePrkBalTrfIC ...@@ -818,7 +822,7 @@ public class EmpLvePrkBalTrfIC extends ValidatorEJB implements EmpLvePrkBalTrfIC
itmDBAccess = new ITMDBAccessEJB(); itmDBAccess = new ITMDBAccessEJB();
//Modified by Anjali R. on[05/11/2018][Start] //Modified by Anjali R. on[05/11/2018][Start]
empFrList = new ArrayList<>(); empFrList = new ArrayList<String>();
//Modified by Anjali R. on[05/11/2018][End] //Modified by Anjali R. on[05/11/2018][End]
System.out.println("objContext ..:: ["+objContext+"]"); System.out.println("objContext ..:: ["+objContext+"]");
...@@ -1225,8 +1229,13 @@ public class EmpLvePrkBalTrfIC extends ValidatorEJB implements EmpLvePrkBalTrfIC ...@@ -1225,8 +1229,13 @@ public class EmpLvePrkBalTrfIC extends ValidatorEJB implements EmpLvePrkBalTrfIC
//condition changed by Varsha on 25-06-18 because join date relieve date can not be same //condition changed by Varsha on 25-06-18 because join date relieve date can not be same
//if( joinDate.compareTo( relieveDate2 ) < 0 ) //if( joinDate.compareTo( relieveDate2 ) < 0 )
//if( joinDate.compareTo( relieveDate2 ) <= 0 ) //if( joinDate.compareTo( relieveDate2 ) <= 0 )
if( joinDate.compareTo( relieveDate2 ) <= 0 ) //if( joinDate.compareTo( relieveDate ) <= 0 )
//condition changed by Sana S on 23-08-19 because even if join date and relieve date is different it shows error.
if( relieveDate.compareTo( joinDate ) <= 0 )
{ {
int test=joinDate.compareTo( relieveDate2 );
System.out.println("Test Value:"+test);
System.out.println("joinDate is not greater than relieveDate ::::"); System.out.println("joinDate is not greater than relieveDate ::::");
retString = itmDBAccess.getErrorString( "", "VTELPTRF10", userId, "", conn ); retString = itmDBAccess.getErrorString( "", "VTELPTRF10", userId, "", conn );
return retString; return retString;
...@@ -1335,7 +1344,6 @@ public class EmpLvePrkBalTrfIC extends ValidatorEJB implements EmpLvePrkBalTrfIC ...@@ -1335,7 +1344,6 @@ public class EmpLvePrkBalTrfIC extends ValidatorEJB implements EmpLvePrkBalTrfIC
} }
} }
} }
} }
} }
} }
...@@ -1492,71 +1500,6 @@ public class EmpLvePrkBalTrfIC extends ValidatorEJB implements EmpLvePrkBalTrfIC ...@@ -1492,71 +1500,6 @@ public class EmpLvePrkBalTrfIC extends ValidatorEJB implements EmpLvePrkBalTrfIC
return objName; return objName;
} }
/**
* This Method get message type from messages
* table against the message no.
*
* @param conn
* @param errorCode
* @return message type.
* @throws ITMException
* @throws RemoteException
*/
private String errorType( Connection conn , String errorCode ) throws ITMException, RemoteException
{
String msgType = "";
PreparedStatement pstmt = null ;
ResultSet rs = null;
String retString = "";
try
{
String sql = " SELECT MSG_TYPE FROM MESSAGES WHERE MSG_NO = ? ";
pstmt = conn.prepareStatement( sql );
pstmt.setString(1, errorCode);
rs = pstmt.executeQuery();
while( rs.next() )
{
msgType = rs.getString("MSG_TYPE");
}
}
catch (Exception ex)
{
ex.printStackTrace();
retString = admCommon.getErrorMessage(ex, "");
retString = admCommon.getErrorXmlString(admCommon, retString, "");
System.out.println("errString after getErrorXmlString: "+retString);
return retString;
}
finally
{
try
{
if ( rs != null )
{
rs.close();
rs = null;
}
if ( pstmt != null )
{
pstmt.close();
pstmt = null;
}
}
catch ( Exception e )
{
e.printStackTrace();
//throw new ITMException(e);
retString = admCommon.getErrorMessage(e, "");
retString = admCommon.getErrorXmlString(admCommon, retString, "");
System.out.println("errString after getErrorXmlString: "+retString);
return retString;
}
}
return msgType;
}
/** /**
* This method get key flag from transetup * This method get key flag from transetup
* against the object name. * against the object name.
...@@ -1693,7 +1636,7 @@ public class EmpLvePrkBalTrfIC extends ValidatorEJB implements EmpLvePrkBalTrfIC ...@@ -1693,7 +1636,7 @@ public class EmpLvePrkBalTrfIC extends ValidatorEJB implements EmpLvePrkBalTrfIC
try try
{ {
genericUtility = new E12GenericUtility(); genericUtility = new E12GenericUtility();
empFromList = new ArrayList<>(); empFromList = new ArrayList<String>();
empFrNodeList = dom.getElementsByTagName("Detail"+objContext); empFrNodeList = dom.getElementsByTagName("Detail"+objContext);
......
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