Commit 652bb8e4 authored by vvengurlekar's avatar vvengurlekar

WeekOffCreation.java - all weeks is set by default or if rotate is no


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@199633 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 765345bc
package ibase.webitm.ejb.adm; package ibase.webitm.ejb.adm;
import java.rmi.RemoteException; import java.rmi.RemoteException;
import java.util.*; import java.sql.Connection;
import java.text.*; import java.text.SimpleDateFormat;
import java.sql.*; import java.util.Calendar;
import javax.ejb.*;
import org.w3c.dom.*;
import ibase.webitm.utility.ITMException;
import ibase.webitm.ejb.*;
import ibase.webitm.utility.GenericUtility;
import javax.ejb.Stateless; // added for ejb3 import javax.ejb.Stateless; // added for ejb3
import org.w3c.dom.Document;
import ibase.utility.E12GenericUtility;
import ibase.webitm.ejb.ValidatorEJB;
import ibase.webitm.utility.ITMException;
@Stateless // added for ejb3 @Stateless // added for ejb3
public class WeekOffCreation extends ValidatorEJB implements WeekOffCreationLocal,WeekOffCreationRemote //SessionBean public class WeekOffCreation extends ValidatorEJB implements WeekOffCreationLocal,WeekOffCreationRemote //SessionBean
...@@ -67,7 +68,9 @@ public class WeekOffCreation extends ValidatorEJB implements WeekOffCreationLoca ...@@ -67,7 +68,9 @@ public class WeekOffCreation extends ValidatorEJB implements WeekOffCreationLoca
int currentYear = 0, currentFormNo = 0; int currentYear = 0, currentFormNo = 0;
java.util.Date currentDate = null, date1 = null, date2 = null; java.util.Date currentDate = null, date1 = null, date2 = null;
String offFor , offDay = "";//Added by sarita on 28 JANUARY 2019 String offFor , offDay = "";//Added by sarita on 28 JANUARY 2019
GenericUtility genericUtility = GenericUtility.getInstance(); //Changed by Varsha V on 15-04-19 to use E12GenericUtility
//GenericUtility genericUtility = GenericUtility.getInstance();
E12GenericUtility genericUtility = new E12GenericUtility();
StringBuffer valueXmlString = new StringBuffer("<?xml version=\"1.0\"?>"); StringBuffer valueXmlString = new StringBuffer("<?xml version=\"1.0\"?>");
try try
...@@ -103,7 +106,9 @@ public class WeekOffCreation extends ValidatorEJB implements WeekOffCreationLoca ...@@ -103,7 +106,9 @@ public class WeekOffCreation extends ValidatorEJB implements WeekOffCreationLoca
offDay = genericUtility.getColumnValue("off_day",currentDom); offDay = genericUtility.getColumnValue("off_day",currentDom);
System.out.println("Values in CurrentDom are :: rotate["+rotate+"]\t offFor["+offFor+"]\t offDay["+offDay+"]"); System.out.println("Values in CurrentDom are :: rotate["+rotate+"]\t offFor["+offFor+"]\t offDay["+offDay+"]");
valueXmlString.append("<rotate>").append(rotate).append("</rotate>"); valueXmlString.append("<rotate>").append(rotate).append("</rotate>");
valueXmlString.append("<off_for>").append(offFor).append("</off_for>"); //Changes done by Varsha V on 15-04-19 to set all weeks by default
//valueXmlString.append("<off_for>").append(offFor).append("</off_for>");
valueXmlString.append("<off_for protect = '0'>").append("A").append("</off_for>");
valueXmlString.append("<off_day>").append(offDay).append("</off_day>"); valueXmlString.append("<off_day>").append(offDay).append("</off_day>");
//Added and Commented by sarita on 28 JANUARY 2019 [END] //Added and Commented by sarita on 28 JANUARY 2019 [END]
} }
...@@ -116,7 +121,8 @@ public class WeekOffCreation extends ValidatorEJB implements WeekOffCreationLoca ...@@ -116,7 +121,8 @@ public class WeekOffCreation extends ValidatorEJB implements WeekOffCreationLoca
} }
else else
{ {
valueXmlString.append("<off_for protect = '0'>").append("</off_for>"); //valueXmlString.append("<off_for protect = '0'>").append("</off_for>");
valueXmlString.append("<off_for protect = '0'>").append("A").append("</off_for>");
} }
} }
valueXmlString.append("</Detail>"); valueXmlString.append("</Detail>");
......
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