Commit 3344dfe7 authored by ysawant's avatar ysawant

*Added updated component of TourIC

TourIC.java


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@215263 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 9c6f6792
......@@ -7,7 +7,6 @@ import java.sql.ResultSet;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
......@@ -113,8 +112,8 @@ public class TourIC extends ValidatorEJB implements TourICLocal,TourICRemote
{
conn = getConnection();
SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getApplDateFormat());
userId = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginCode");
loginSite = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginSiteCode");
userId = checkNull(genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginCode"));
loginSite = checkNull(genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginSiteCode"));
System.out.println("User Id ---> "+userId);
System.out.println("Login Site ---> "+loginSite);
......@@ -925,8 +924,8 @@ public class TourIC extends ValidatorEJB implements TourICLocal,TourICRemote
{
conn = getConnection();
userId = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginCode");
loginSiteCode = this.genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginSiteCode");
userId = checkNull(genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginCode"));
loginSiteCode = checkNull(genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginSiteCode"));
if(objContext != null && objContext.trim().length()>0)
{
......@@ -982,7 +981,7 @@ public class TourIC extends ValidatorEJB implements TourICLocal,TourICRemote
{
System.out.println(":::Inside emp_code Validation:::");
empCode = genericUtility.getColumnValue("emp_code", dom);
empCode = checkNull(genericUtility.getColumnValue("emp_code", dom));
sql = "select count(*) as cnt from employee where emp_code = ? and work_site = (case when ? > 1 then ? else work_site end)";
pstmt = conn.prepareStatement(sql);
......@@ -1044,7 +1043,7 @@ public class TourIC extends ValidatorEJB implements TourICLocal,TourICRemote
}
}
planId = genericUtility.getColumnValue("plan_id", dom);
planId = checkNull(genericUtility.getColumnValue("plan_id", dom));
if(planId != null && planId.trim().length() > 0)
{
......@@ -1066,9 +1065,10 @@ public class TourIC extends ValidatorEJB implements TourICLocal,TourICRemote
pstmt.close();
pstmt = null;
}
System.out.println("planId :::"+planId);
System.out.println("emp_code :::"+mtpemp);
if(!planId.equalsIgnoreCase(mtpemp))
System.out.println("empCode :::["+empCode+"]");
System.out.println("tour empCode :::["+mtpemp+"]");
if(!empCode.equalsIgnoreCase(mtpemp))
{
errList.add("VTEMPNF");
errFields.add(childNodeName.toLowerCase());
......@@ -1085,7 +1085,7 @@ public class TourIC extends ValidatorEJB implements TourICLocal,TourICRemote
{
System.out.println(":::Inside emp_code__appr Validation:::");
mVal = genericUtility.getColumnValue("emp_code__appr", dom);
mVal = checkNull(genericUtility.getColumnValue("emp_code__appr", dom));
cnt = 0;
if(mVal != null && mVal.trim().length() > 0)
{
......
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