Commit 60e164f7 authored by nkhan's avatar nkhan

*** empty log message ***


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@103642 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 541f01dd
......@@ -10,8 +10,9 @@
package ibase.webitm.ejb.dis;
import ibase.system.config.ConnDriver;
import ibase.utility.E12GenericUtility;
import ibase.webitm.ejb.ValidatorEJB;
import ibase.webitm.utility.GenericUtility;
//import ibase.webitm.utility.GenericUtility;
import ibase.webitm.utility.ITMException;
import java.util.*;
import java.rmi.RemoteException;
......@@ -26,7 +27,9 @@ import javax.ejb.Stateless;
public class PackingDetIC extends ValidatorEJB implements PackingDetICLocal, PackingDetICRemote
{
GenericUtility genericUtility = GenericUtility.getInstance();
E12GenericUtility genericUtility = new E12GenericUtility();
//GenericUtility genericUtility = GenericUtility.getInstance();
//method for validation
public String wfValData(String xmlString, String xmlString1, String xmlString2, String objContext, String editFlag, String xtraParams) throws RemoteException,ITMException
......@@ -288,7 +291,9 @@ public class PackingDetIC extends ValidatorEJB implements PackingDetICLocal, Pac
Connection conn = null;
PreparedStatement pstmt = null;
ResultSet rs = null ;
GenericUtility genericUtility = GenericUtility.getInstance();
//changed by nasruddin 07-10-16
//GenericUtility genericUtility = GenericUtility.getInstance();
E12GenericUtility genericUtility = new E12GenericUtility();
ConnDriver connDriver = new ConnDriver();
try
{
......
......@@ -9,8 +9,9 @@
package ibase.webitm.ejb.dis;
import ibase.system.config.ConnDriver;
import ibase.utility.E12GenericUtility;
import ibase.webitm.ejb.ValidatorEJB;
import ibase.webitm.utility.GenericUtility;
//import ibase.webitm.utility.GenericUtility;
import ibase.webitm.utility.ITMException;
import java.util.*;
import java.rmi.RemoteException;
......@@ -27,8 +28,9 @@ import javax.ejb.Stateless;
public class PackingMasterIC extends ValidatorEJB implements PackingMasterICLocal, PackingMasterICRemote
{
GenericUtility genericUtility = GenericUtility.getInstance();
//changed by nasruddin 07-10-16
//GenericUtility genericUtility = GenericUtility.getInstance();
E12GenericUtility genericUtility = new E12GenericUtility();
public String wfValData(String xmlString, String xmlString1, String xmlString2, String objContext, String editFlag, String xtraParams) throws RemoteException,ITMException
{
String errString = "";
......@@ -77,6 +79,7 @@ public class PackingMasterIC extends ValidatorEJB implements PackingMasterICLoca
int count = 0;
int ctr=0;
int childNodeListLength;
int currentFormNo = 1;
NodeList parentNodeList = null;
NodeList childNodeList = null;
Node parentNode = null;
......@@ -96,75 +99,39 @@ public class PackingMasterIC extends ValidatorEJB implements PackingMasterICLoca
conn = getConnection();
//Changes and Commented By Bhushan on 09-06-2016 :END
userId = getValueFromXTRA_PARAMS(xtraParams, "loginCode");
parentNodeList = dom.getElementsByTagName("Detail1");
parentNode = parentNodeList.item(0);
childNodeList = parentNode.getChildNodes();
childNodeListLength = childNodeList.getLength();
for(ctr = 0; ctr < childNodeListLength; ctr++)
//Added By nasruddin start 06-oct-16 add switch case
if (objContext != null && objContext.trim().length() > 0)
{
childNode = childNodeList.item(ctr);
childNodeName = childNode.getNodeName();
//System.out.println("ALL NODE .........." + childNodeName);//NEELAM
if(childNodeName.equalsIgnoreCase("pack_code"))
currentFormNo = Integer.parseInt(objContext);
}
switch (currentFormNo)
{
case 1:
parentNodeList = dom.getElementsByTagName("Detail1");
parentNode = parentNodeList.item(0);
childNodeList = parentNode.getChildNodes();
childNodeListLength = childNodeList.getLength();
for(ctr = 0; ctr < childNodeListLength; ctr++)
{
packCode = checkNull(genericUtility.getColumnValue("pack_code", dom));
System.out.println("Pack Code="+packCode);
/* Changed BY Nasruddin 22-SEP-16 START
if(packCode == null || packCode.trim().length() == 0)
{
errCode = "VMPACNU";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
else
childNode = childNodeList.item(ctr);
childNodeName = childNode.getNodeName();
//System.out.println("ALL NODE .........." + childNodeName);//NEELAM
if(childNodeName.equalsIgnoreCase("pack_code"))
{
sql = "select count(*) from packing where pack_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,unit);
rs = pstmt.executeQuery();
if(rs.next())
{
count = rs.getInt(1);
}
if(count > 0)
packCode = checkNull(genericUtility.getColumnValue("pack_code", dom));
System.out.println("Pack Code="+packCode);
/* Changed BY Nasruddin 22-SEP-16 START
if(packCode == null || packCode.trim().length() == 0)
{
errCode = "VMPACUNI";
errCode = "VMPACNU";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
}
*/
sql = "SELECT KEY_FLAG FROM TRANSETUP WHERE TRAN_WINDOW = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,"w_packing");
rs = pstmt.executeQuery();
if(rs.next())
{
keyFalg = rs.getString("KEY_FLAG");
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
keyFalg = keyFalg == null ?"M" : keyFalg.trim();
if(keyFalg.equals("M") && packCode == null || packCode.trim().length() == 0)
{
errCode = "VMCODNULL";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
else
{
if(editFlag.equals("A"))
else
{
sql = "select count(1) from packing where pack_code = ?";
sql = "select count(*) from packing where pack_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,packCode);
pstmt.setString(1,unit);
rs = pstmt.executeQuery();
if(rs.next())
{
......@@ -172,7 +139,7 @@ public class PackingMasterIC extends ValidatorEJB implements PackingMasterICLoca
}
if(count > 0)
{
errCode = "VMDUPL1";
errCode = "VMPACUNI";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
......@@ -181,210 +148,257 @@ public class PackingMasterIC extends ValidatorEJB implements PackingMasterICLoca
pstmt.close();
pstmt = null;
}
}
// Changed By Nasruddin 22-SEP-16 END
}
else if(childNodeName.equalsIgnoreCase("descr"))
{
descr = checkNull(genericUtility.getColumnValue("descr", dom));
System.out.println("Descr="+descr);
if(descr == null || descr.trim().length() == 0)
{
errCode = "VMDESCR";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
// Changed By Nasruddin 22-SEP-16 START
else
{
count = 0;
packCode = checkNull(genericUtility.getColumnValue("pack_code", dom));
sql = "SELECT COUNT(1) FROM PACKING WHERE PACK_CODE <> ? AND DESCR = ?";
*/
sql = "SELECT KEY_FLAG FROM TRANSETUP WHERE TRAN_WINDOW = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,packCode);
pstmt.setString(2,descr);
pstmt.setString(1,"w_packing");
rs = pstmt.executeQuery();
if(rs.next())
{
count = rs.getInt(1);
keyFalg = rs.getString("KEY_FLAG");
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
if(count > 0)
keyFalg = keyFalg == null ?"M" : keyFalg.trim();
if(keyFalg.equals("M") && packCode == null || packCode.trim().length() == 0)
{
errCode = "VMDUPDESCR";
errCode = "VMCODNULL";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
//Changed By Nasruddin END [22-SEP-16]
}
/* Comment By Nasruddin START [22-SEP-16] START
else if(childNodeName.equalsIgnoreCase("capacity"))
{
capacity = checkNull(genericUtility.getColumnValue("capacity", dom));
System.out.println("capacity="+capacity);
if(capacity != null && capacity.trim().length() > 0)
{
count =Integer.parseInt(capacity);
System.out.println("count="+count);
if(count < 0){
errCode = "VMCAPNEG";//need to be chanage errorcode
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
}Comment By Nasruddin START [22-SEP-16] END */
else if(childNodeName.equalsIgnoreCase("unit"))
{
unit = checkNull(genericUtility.getColumnValue("unit", dom));
System.out.println("Unit code="+unit);
if(unit == null || unit.trim().length() == 0)
{
errCode = "VMUNIT1";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
else
{
sql = "select count(*) from uom where unit = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,unit);
rs = pstmt.executeQuery();
if(rs.next())
else
{
count = rs.getInt(1);
if(editFlag.equals("A"))
{
sql = "select count(1) from packing where pack_code = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,packCode);
rs = pstmt.executeQuery();
if(rs.next())
{
count = rs.getInt(1);
}
if(count > 0)
{
errCode = "VMDUPL1";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
}
}
if(count == 0)
// Changed By Nasruddin 22-SEP-16 END
}
else if(childNodeName.equalsIgnoreCase("descr"))
{
descr = checkNull(genericUtility.getColumnValue("descr", dom));
System.out.println("Descr="+descr);
if(descr == null || descr.trim().length() == 0)
{
errCode = "VTUNIT1";
errCode = "VMDESCR";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
}
}
/* Comment By Nasruddin START [22-SEP-16] START
else if(childNodeName.equalsIgnoreCase("unit__dimn"))
{
unitDmn = checkNull(genericUtility.getColumnValue("unit__dimn", dom));
System.out.println("unit__dimn code="+unitDmn);
if(unitDmn != null && unitDmn.trim().length() > 0)
{
sql = "select count(*) from uom where unit = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,unitDmn);
rs = pstmt.executeQuery();
if(rs.next())
// Changed By Nasruddin 22-SEP-16 START
else
{
count = rs.getInt(1);
count = 0;
packCode = checkNull(genericUtility.getColumnValue("pack_code", dom));
sql = "SELECT COUNT(1) FROM PACKING WHERE PACK_CODE <> ? AND DESCR = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,packCode);
pstmt.setString(2,descr);
rs = pstmt.executeQuery();
if(rs.next())
{
count = rs.getInt(1);
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
if(count > 0)
{
errCode = "VMDUPDESCR";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
if(count == 0)
{
errCode = "VTUNIT1";
//Changed By Nasruddin END [22-SEP-16]
}
/* Comment By Nasruddin START [22-SEP-16] START
else if(childNodeName.equalsIgnoreCase("capacity"))
{
capacity = checkNull(genericUtility.getColumnValue("capacity", dom));
System.out.println("capacity="+capacity);
if(capacity != null && capacity.trim().length() > 0)
{
count =Integer.parseInt(capacity);
System.out.println("count="+count);
if(count < 0){
errCode = "VMCAPNEG";//need to be chanage errorcode
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
}
}
Comment By Nasruddin START [22-SEP-16] END */
else if(childNodeName.equalsIgnoreCase("unit__nwt"))
{
unitNwt = checkNull(genericUtility.getColumnValue("unit__nwt", dom));
System.out.println("unit__nwt code="+unitNwt);
if(unitNwt != null && unitNwt.trim().length() > 0)
}Comment By Nasruddin START [22-SEP-16] END */
else if(childNodeName.equalsIgnoreCase("unit"))
{
sql = "select count(*) from uom where unit = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,unitNwt);
rs = pstmt.executeQuery();
if(rs.next())
unit = checkNull(genericUtility.getColumnValue("unit", dom));
System.out.println("Unit code="+unit);
if(unit == null || unit.trim().length() == 0)
{
count = rs.getInt(1);
}
if(count == 0)
{
errCode = "VTUNIT1";
errCode = "VMUNIT1";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
else
{
sql = "select count(*) from uom where unit = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,unit);
rs = pstmt.executeQuery();
if(rs.next())
{
count = rs.getInt(1);
}
if(count == 0)
{
errCode = "VTUNIT1";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
}
}
}
else if(childNodeName.equalsIgnoreCase("unit__gwt"))
{
unitGwt = checkNull(genericUtility.getColumnValue("unit__gwt", dom));
System.out.println("unit__gwt code="+unitGwt);
if(unitGwt != null && unitGwt.trim().length() > 0)
/* Comment By Nasruddin START [22-SEP-16] START
else if(childNodeName.equalsIgnoreCase("unit__dimn"))
{
sql = "select count(*) from uom where unit = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,unitGwt);
rs = pstmt.executeQuery();
if(rs.next())
unitDmn = checkNull(genericUtility.getColumnValue("unit__dimn", dom));
System.out.println("unit__dimn code="+unitDmn);
if(unitDmn != null && unitDmn.trim().length() > 0)
{
count = rs.getInt(1);
sql = "select count(*) from uom where unit = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,unitDmn);
rs = pstmt.executeQuery();
if(rs.next())
{
count = rs.getInt(1);
}
if(count == 0)
{
errCode = "VTUNIT1";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
}
if(count == 0)
}
Comment By Nasruddin START [22-SEP-16] END */
else if(childNodeName.equalsIgnoreCase("unit__nwt"))
{
unitNwt = checkNull(genericUtility.getColumnValue("unit__nwt", dom));
System.out.println("unit__nwt code="+unitNwt);
if(unitNwt != null && unitNwt.trim().length() > 0)
{
errCode = "VTUNIT1";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
sql = "select count(*) from uom where unit = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,unitNwt);
rs = pstmt.executeQuery();
if(rs.next())
{
count = rs.getInt(1);
}
if(count == 0)
{
errCode = "VTUNIT1";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
}
}
else if(childNodeName.equalsIgnoreCase("unit__twt"))
{
unitTwt = checkNull(genericUtility.getColumnValue("unit__twt", dom));
System.out.println("unit code="+unitTwt);
if(unitTwt != null && unitTwt.trim().length() > 0)
else if(childNodeName.equalsIgnoreCase("unit__gwt"))
{
sql = "select count(*) from uom where unit = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,unitTwt);
rs = pstmt.executeQuery();
if(rs.next())
unitGwt = checkNull(genericUtility.getColumnValue("unit__gwt", dom));
System.out.println("unit__gwt code="+unitGwt);
if(unitGwt != null && unitGwt.trim().length() > 0)
{
count = rs.getInt(1);
sql = "select count(*) from uom where unit = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,unitGwt);
rs = pstmt.executeQuery();
if(rs.next())
{
count = rs.getInt(1);
}
if(count == 0)
{
errCode = "VTUNIT1";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
}
if(count == 0)
}
else if(childNodeName.equalsIgnoreCase("unit__twt"))
{
unitTwt = checkNull(genericUtility.getColumnValue("unit__twt", dom));
System.out.println("unit code="+unitTwt);
if(unitTwt != null && unitTwt.trim().length() > 0)
{
errCode = "VTUNIT1";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
sql = "select count(*) from uom where unit = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,unitTwt);
rs = pstmt.executeQuery();
if(rs.next())
{
count = rs.getInt(1);
}
if(count == 0)
{
errCode = "VTUNIT1";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
}
}
break;
case 2:
System.out.println("Inside Case 2");
case 3:
System.out.println("Inside case 3");
}
int errListSize = errList.size();
count = 0;
String errFldName = null;
......@@ -500,7 +514,9 @@ public class PackingMasterIC extends ValidatorEJB implements PackingMasterICLoca
Connection conn = null;
PreparedStatement pstmt = null;
ResultSet rs = null ;
GenericUtility genericUtility = GenericUtility.getInstance();
//changed by nasruddin 07-10-16
//GenericUtility genericUtility = GenericUtility.getInstance();
E12GenericUtility genericUtility = new E12GenericUtility();
ConnDriver connDriver = new ConnDriver();
try
{
......
......@@ -718,7 +718,6 @@ public class PriceList extends ValidatorEJB implements PriceListLocal, PriceList
}
}
errStringXml.append("</Detail1>");//Changed by nasruddin 29-sep-16 closing tag missing
}//switch
//}//for
int errListSize = errList.size();
......
......@@ -126,7 +126,6 @@ public class PriceListIC extends ValidatorEJB implements PriceListICLocal, Price
{
childNode = childNodeList.item(ctr);
childNodeName = childNode.getNodeName();
/* Comment By Nasruddin [20-SEP-16] START
if(childNodeName.equalsIgnoreCase("calc_method"))
{
calcMethod = genericUtility.getColumnValue("calc_method", dom);
......@@ -152,17 +151,15 @@ public class PriceListIC extends ValidatorEJB implements PriceListICLocal, Price
pstmt = null;
}
/*else
else
{
errCode = "VTCALMNUL";
errList.add(errCode);
errFields.add(childNodeName.toLowerCase());
}
}
Comment By Nasruddin [20-SEP-16] END
*/
/* Comment By Nasruddin [20-SEP-16] START
else if(childNodeName.equalsIgnoreCase("price_list"))
{
priceList = genericUtility.getColumnValue("price_list", dom);
......@@ -214,7 +211,7 @@ public class PriceListIC extends ValidatorEJB implements PriceListICLocal, Price
}Comment By Nasruddin [20-SEP-16] END*/
}
if(childNodeName.equalsIgnoreCase("price_list__parent"))
{
......@@ -295,8 +292,8 @@ public class PriceListIC extends ValidatorEJB implements PriceListICLocal, Price
{
childNode = childNodeList.item(ctr);
childNodeName = childNode.getNodeName();
/* cOMMENT bY Nasruddin [20-SEP-16] START
* if(childNodeName.equalsIgnoreCase("calc_method"))
if(childNodeName.equalsIgnoreCase("calc_method"))
{
calcMethod = genericUtility.getColumnValue("calc_method", dom);
if (calcMethod !=null && calcMethod.trim().length() > 0)
......@@ -351,9 +348,9 @@ public class PriceListIC extends ValidatorEJB implements PriceListICLocal, Price
}
}
}cOMMENT bY Nasruddin [20-SEP-16] end*/
}
//Changed By Nasruddin STARt [20-sep-16] START
if(childNodeName.equalsIgnoreCase("min_qty"))
{
minQty = convertNumber(checkNullAndTrim(genericUtility.getColumnValue("min_qty", dom)));
......@@ -427,7 +424,7 @@ public class PriceListIC extends ValidatorEJB implements PriceListICLocal, Price
errFields.add(childNodeName.toLowerCase());
}
}
//Changed By Nasruddin [20-sep-16] END
}
valueXmlString.append("</Detail2>");
break;
......
......@@ -10,9 +10,10 @@ import java.sql.Timestamp;
import java.util.Date;
import ibase.system.config.ConnDriver;
import ibase.utility.E12GenericUtility;
import ibase.webitm.ejb.ActionHandlerEJB;
import ibase.webitm.ejb.ITMDBAccessEJB;
import ibase.webitm.utility.GenericUtility;
//import ibase.webitm.utility.GenericUtility;
import ibase.webitm.utility.ITMException;
import javax.ejb.Stateless;
......@@ -20,8 +21,10 @@ import javax.ejb.Stateless;
@Stateless
public class PriceListTranConf extends ActionHandlerEJB implements PriceListTranConfRemote, PriceListTranConfLocal {
GenericUtility genericUtility = GenericUtility.getInstance();
//changed by nasruddin 07-10-16
//GenericUtility genericUtility = GenericUtility.getInstance();
E12GenericUtility genericUtility = new E12GenericUtility();
ITMDBAccessEJB itmDBAccessEJB = new ITMDBAccessEJB();
public String confirm(String tranID, String xtraParams, String forcedFlag) throws RemoteException, ITMException {
......
......@@ -451,7 +451,9 @@ public class PriceListTranIC extends ValidatorEJB implements
Document dom1 = null;
Document dom2 = null;
String rtStr = "";
GenericUtility genericUtility = GenericUtility.getInstance();
//changed by nasruddin 07-10-16
// GenericUtility genericUtility = GenericUtility.getInstance();
E12GenericUtility genericUtility = new E12GenericUtility();
System.out.println("In Itemchange String:::");
try {
......
......@@ -18,14 +18,17 @@ import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import ibase.system.config.ConnDriver;
import ibase.utility.E12GenericUtility;
import ibase.webitm.ejb.ValidatorEJB;
import ibase.webitm.utility.GenericUtility;
//import ibase.webitm.utility.GenericUtility;
import ibase.webitm.utility.ITMException;
@Stateless
public class SalesContractIC extends ValidatorEJB implements SalesContractICLocal, SalesContractICRemote
{
GenericUtility genericUtility = GenericUtility.getInstance();
//changed by nasruddin 07-10-16
//GenericUtility genericUtility = GenericUtility.getInstance();
E12GenericUtility genericUtility = new E12GenericUtility();
public String wfValData(String xmlString, String xmlString1, String xmlString2, String objContext, String editFlag, String xtraParams) throws RemoteException,ITMException
{
String errString = "";
......@@ -1918,7 +1921,9 @@ public class SalesContractIC extends ValidatorEJB implements SalesContractICLoca
Connection conn = null;
PreparedStatement pstmt = null;
ResultSet rs = null ;
GenericUtility genericUtility = GenericUtility.getInstance();
//changed by nasruddin 07-10-16
//GenericUtility genericUtility = GenericUtility.getInstance();
E12GenericUtility genericUtility = new E12GenericUtility();
ConnDriver connDriver = new ConnDriver();
try
{
......
......@@ -3,9 +3,10 @@
* */
package ibase.webitm.ejb.dis;
import ibase.system.config.ConnDriver;
import ibase.utility.E12GenericUtility;
import ibase.webitm.ejb.ValidatorEJB;
import ibase.webitm.ejb.fin.FinCommon;
import ibase.webitm.utility.GenericUtility;
//import ibase.webitm.utility.GenericUtility;
import ibase.webitm.utility.ITMException;
import java.text.DateFormat;
......@@ -26,7 +27,9 @@ import java.sql.Timestamp;
public class SchemeApplIC extends ValidatorEJB implements SchemeApplICLocal, SchemeApplICRemote
{
GenericUtility genericUtility = GenericUtility.getInstance();
//changed by nasruddin 05-10-16
//GenericUtility genericUtility = GenericUtility.getInstance();
E12GenericUtility genericUtility = new E12GenericUtility();
public String wfValData(String xmlString, String xmlString1, String xmlString2, String objContext, String editFlag, String xtraParams) throws RemoteException,ITMException
{
String errString = "";
......@@ -717,7 +720,9 @@ public class SchemeApplIC extends ValidatorEJB implements SchemeApplICLocal, Sch
Connection conn = null;
PreparedStatement pstmt = null;
ResultSet rs = null ;
GenericUtility genericUtility = GenericUtility.getInstance();
//changed by nasruddin 05-10-16
//GenericUtility genericUtility = GenericUtility.getInstance();
E12GenericUtility genericUtility = new E12GenericUtility();
ConnDriver connDriver = new ConnDriver();
String columnValue="";
int currentFormNo =0;
......
......@@ -9,9 +9,10 @@
package ibase.webitm.ejb.dis;
import ibase.system.config.ConnDriver;
import ibase.utility.E12GenericUtility;
import ibase.webitm.ejb.ValidatorEJB;
import ibase.webitm.ejb.fin.FinCommon;
import ibase.webitm.utility.GenericUtility;
//import ibase.webitm.utility.GenericUtility;
import ibase.webitm.utility.ITMException;
import java.util.*;
import java.rmi.RemoteException;
......@@ -26,7 +27,9 @@ import javax.ejb.Stateless;
public class SiteItemIC extends ValidatorEJB implements SiteItemICLocal, SiteItemICRemote
{
GenericUtility genericUtility = GenericUtility.getInstance();
//changed by nasruddin 05-10-16
//GenericUtility genericUtility = GenericUtility.getInstance();
E12GenericUtility genericUtility = new E12GenericUtility();
public String wfValData(String xmlString, String xmlString1, String xmlString2, String objContext, String editFlag, String xtraParams) throws RemoteException,ITMException
{
......@@ -36,16 +39,20 @@ public class SiteItemIC extends ValidatorEJB implements SiteItemICLocal, SiteIte
Document dom2 = null;
try
{
if (xmlString != null && xmlString.trim().length() > 0 )
{
System.out.println("xmlString ["+xmlString+"]");
dom = parseString(xmlString);
}
if (xmlString1 != null && xmlString1.trim().length() > 0 )
{
System.out.println("xmlString ["+xmlString1+"]");
dom1 = parseString(xmlString1);
}
if (xmlString2 != null && xmlString2.trim().length() > 0 )
{
System.out.println("xmlString ["+xmlString2+"]");
dom2 = parseString(xmlString2);
}
errString = wfValData(dom, dom1, dom2, objContext, editFlag, xtraParams);
......@@ -737,7 +744,8 @@ public class SiteItemIC extends ValidatorEJB implements SiteItemICLocal, SiteIte
{
bomCode = checkNull(genericUtility.getColumnValue("bom_code", dom));
today = new Date();
suppilerSour = checkNull(genericUtility.getColumnValue("supp_sour", dom));
//suppilerSour = checkNull(genericUtility.getColumnValue("supp_sour", dom));
System.out.println(" bomCode ====>>>>>["+bomCode+"]");
if(bomCode != null && bomCode.trim().length() > 0)
{
sql = "select count(*) from bom where bom_code = ? and active = 'Y' and confirmed = 'Y' ";
......@@ -1525,7 +1533,9 @@ public class SiteItemIC extends ValidatorEJB implements SiteItemICLocal, SiteIte
Connection conn = null;
PreparedStatement pstmt = null;
ResultSet rs = null ;
GenericUtility genericUtility = GenericUtility.getInstance();
//changed by nasruddin 05-10-16
//GenericUtility genericUtility = GenericUtility.getInstance();
E12GenericUtility genericUtility = new E12GenericUtility();
ConnDriver connDriver = new ConnDriver();
try
{
......@@ -2404,7 +2414,7 @@ public class SiteItemIC extends ValidatorEJB implements SiteItemICLocal, SiteIte
}
private String checkNull(String input)
{
if(input == null)
if(input == null || input.equalsIgnoreCase("null"))
{
input = "";
}
......
......@@ -9,8 +9,9 @@
package ibase.webitm.ejb.dis;
import ibase.system.config.ConnDriver;
import ibase.utility.E12GenericUtility;
import ibase.webitm.ejb.ValidatorEJB;
import ibase.webitm.utility.GenericUtility;
//import ibase.webitm.utility.GenericUtility;
import ibase.webitm.utility.ITMException;
import java.util.*;
import java.rmi.RemoteException;
......@@ -24,7 +25,9 @@ import javax.ejb.Stateless;
@Stateless
public class SupplierItem extends ValidatorEJB implements SupplierItemLocal,SupplierItemRemote {
GenericUtility genericUtility = GenericUtility.getInstance();
//changed by nasruddin 05-10-16
//GenericUtility genericUtility = GenericUtility.getInstance();
E12GenericUtility genericUtility = new E12GenericUtility();
public String wfValData(String xmlString, String xmlString1, String xmlString2, String objContext, String editFlag, String xtraParams) throws RemoteException,ITMException
{
......
......@@ -6,13 +6,12 @@ import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import ibase.system.config.ConnDriver;
import ibase.utility.E12GenericUtility;
import ibase.webitm.ejb.ITMDBAccessEJB;
import ibase.webitm.ejb.ValidatorEJB;
import ibase.webitm.utility.GenericUtility;
//import ibase.webitm.utility.GenericUtility;
import ibase.webitm.utility.ITMException;
import javax.ejb.Stateless;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
......@@ -23,10 +22,12 @@ import org.w3c.dom.NodeList;
public class TaxBaseIC extends ValidatorEJB implements TaxBaseICRemote, TaxBaseICLocal {
GenericUtility genericUtility = GenericUtility.getInstance();
ITMDBAccessEJB itmdbAccessEJB = new ITMDBAccessEJB();
public String wfValData(String xmlString, String xmlString1, String xmlString2, String objContext, String editFlag, String xtraParams)
//changed by nasruddin 05-10-16
//GenericUtility genericUtility = GenericUtility.getInstance();
E12GenericUtility genericUtility = new E12GenericUtility();
ITMDBAccessEJB itmdbAccessEJB = new ITMDBAccessEJB();
public String wfValData(String xmlString, String xmlString1, String xmlString2, String objContext, String editFlag, String xtraParams)
throws RemoteException, ITMException {
String rtStr = "";
......@@ -54,7 +55,7 @@ public class TaxBaseIC extends ValidatorEJB implements TaxBaseICRemote, TaxBaseI
}
return rtStr;
}
@Override
@Override
public String wfValData(Document dom, Document dom1, Document dom2, String objContext, String editFlag, String xtraParams)
throws RemoteException, ITMException {
......@@ -266,17 +267,19 @@ public class TaxBaseIC extends ValidatorEJB implements TaxBaseICRemote, TaxBaseI
d.printStackTrace();
throw new ITMException(d);
}
} // Changed By Nasruddin 21-SEP-16 STart
return errString;
}
public String itemChanged(String xmlString, String xmlString1,String xmlString2, String objContext, String currentColumn, String editFlag,
}
public String itemChanged(String xmlString, String xmlString1,String xmlString2, String objContext, String currentColumn, String editFlag,
String xtraParams) throws RemoteException, ITMException {
Document dom = null;
Document dom1 = null;
Document dom2 = null;
String rtStr = "";
GenericUtility genericUtility = GenericUtility.getInstance();
//changed by nasruddin 05-10-16
//GenericUtility genericUtility = GenericUtility.getInstance();
E12GenericUtility genericUtility = new E12GenericUtility();
System.out.println("In Itemchange String:::");
try {
......@@ -296,9 +299,9 @@ public class TaxBaseIC extends ValidatorEJB implements TaxBaseICRemote, TaxBaseI
}
return rtStr;
}
public String itemChanged(Document dom, Document dom1, Document dom2, String objContext, String currentColumn, String editFlag,
public String itemChanged(Document dom, Document dom1, Document dom2, String objContext, String currentColumn, String editFlag,
String xtraParams) throws RemoteException, ITMException {
Connection conn = null;
String taxBase = "", taxCode = "", sql = "", descr = "", seqNo = "";
PreparedStatement pstmt = null;
......@@ -326,87 +329,87 @@ public class TaxBaseIC extends ValidatorEJB implements TaxBaseICRemote, TaxBaseI
System.out.println("currentColumn: " + currentColumn);
if (currentColumn != null) {
if (currentColumn.equalsIgnoreCase("itm_default")) {
if (currentColumn.equalsIgnoreCase("tax_base")){
taxBase = genericUtility.getColumnValue("tax_base", dom);
System.out.println(":::: taxBase" + taxBase);
taxBase = taxBase == null ? "" : taxBase.trim();
}
if (currentColumn.equalsIgnoreCase("tax_base")){
taxBase = genericUtility.getColumnValue("tax_base", dom);
System.out.println(":::: taxBase" + taxBase);
taxBase = taxBase == null ? "" : taxBase.trim();
}
System.out.println("itm_default called::::");
valueXmlString.append("<tax_base><![CDATA["+ taxBase + "]]></tax_base>");
}
valueXmlString.append("</Detail1>\r\n");
break;
}
}
case 2 :
valueXmlString.append("<Detail2>");
System.out.println("currentColumn: " + currentColumn);
if (currentColumn != null) {
if (currentColumn.equalsIgnoreCase("tax_code")){
System.out.println("editFlag:::" + editFlag);
taxCode = genericUtility.getColumnValue("tax_code", dom);
System.out.println(":::: taxCode" + taxCode);
taxCode = taxCode == null ? "" : taxCode.trim();
try {
if(taxCode.length() > 0){
sql = "select descr from tax where tax_code = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, taxCode);
rs = pstmt.executeQuery();
if(rs.next()){
descr = rs.getString("descr");
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
taxCode = genericUtility.getColumnValue("tax_code", dom);
System.out.println(":::: taxCode" + taxCode);
taxCode = taxCode == null ? "" : taxCode.trim();
try {
if(taxCode.length() > 0){
sql = "select descr from tax where tax_code = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, taxCode);
rs = pstmt.executeQuery();
if(rs.next()){
descr = rs.getString("descr");
}
} catch (Exception e) {
System.out.println("::" + this.getClass().getSimpleName() + "::::" + e.getMessage());
e.printStackTrace();
rs.close();
rs = null;
pstmt.close();
pstmt = null;
}
System.out.println("tax_code called::::");
valueXmlString.append("<tax_descr><![CDATA["+ descr + "]]></tax_descr>");
} catch (Exception e) {
System.out.println("::" + this.getClass().getSimpleName() + "::::" + e.getMessage());
e.printStackTrace();
}
System.out.println("tax_code called::::");
valueXmlString.append("<tax_descr><![CDATA["+ descr + "]]></tax_descr>");
}
if (currentColumn.equalsIgnoreCase("itm_defaultedit")){
if(editFlag.equalsIgnoreCase("E")){
if (currentColumn.equalsIgnoreCase("itm_defaultedit")){
if(editFlag.equalsIgnoreCase("E")){
taxCode = genericUtility.getColumnValue("tax_code", dom);
System.out.println(":::: taxCode" + taxCode);
taxCode = taxCode == null ? "" : taxCode.trim();
System.out.println("tax_code called::::");
System.out.println(":::: taxCode" + taxCode);
taxCode = taxCode == null ? "" : taxCode.trim();
System.out.println("tax_code called::::");
valueXmlString.append("<tax_code protect = \"1\"><![CDATA["+ taxCode + "]]></tax_code>");
}
}
} if (currentColumn.equalsIgnoreCase("itm_default")){
taxCode = genericUtility.getColumnValue("tax_code", dom);
System.out.println(":::: taxCode" + taxCode);
taxCode = taxCode == null ? "" : taxCode.trim();
System.out.println("tax_code called::::");
valueXmlString.append("<tax_code protect = \"0\"><![CDATA["+ taxCode + "]]></tax_code>");
}
taxCode = genericUtility.getColumnValue("tax_code", dom);
System.out.println(":::: taxCode" + taxCode);
taxCode = taxCode == null ? "" : taxCode.trim();
System.out.println("tax_code called::::");
valueXmlString.append("<tax_code protect = \"0\"><![CDATA["+ taxCode + "]]></tax_code>");
}
/*if (currentColumn.equalsIgnoreCase("itm_defaultedit")){
System.out.println("itmdefaultedit called::::");
seqNo = genericUtility.getColumnValue("seq_no", dom);
System.out.println(":::: seqNo" + seqNo);
seqNo = seqNo == null ? "" : seqNo.trim();
valueXmlString.append("<seq_no protect = \"1\"><![CDATA["+ seqNo + "]]></seq_no>");
taxCode = genericUtility.getColumnValue("tax_code", dom);
System.out.println(":::: taxCode" + taxCode);
taxCode = taxCode == null ? "" : taxCode.trim();
valueXmlString.append("<tax_code protect = \"1\"><![CDATA["+ taxCode + "]]></tax_code>");
}*/
/*if (currentColumn.equalsIgnoreCase("itm_default")) {
if (currentColumn.equalsIgnoreCase("tax_code")){
taxCode = genericUtility.getColumnValue("tax_code", dom);
System.out.println(":::: taxCode" + taxCode);
......@@ -417,7 +420,7 @@ public class TaxBaseIC extends ValidatorEJB implements TaxBaseICRemote, TaxBaseI
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, taxCode);
rs = pstmt.executeQuery();
if(rs.next()){
descr = rs.getString("descr");
}
......@@ -434,15 +437,15 @@ public class TaxBaseIC extends ValidatorEJB implements TaxBaseICRemote, TaxBaseI
valueXmlString.append("<tax_descr><![CDATA["+ descr + "]]></tax_descr>");
valueXmlString.append("<tax_base><![CDATA["+ taxBase + "]]></tax_base>");
}
}*/
/*else if (currentColumn.equalsIgnoreCase("itm_defaultedit")){
if(currentColumn.equalsIgnoreCase("seq_no")){
seqNo = genericUtility.getColumnValue("seq_no", dom);
System.out.println(":::: seqNo" + seqNo);
seqNo = seqNo == null ? "" : seqNo.trim();
}
System.out.println("itmdefaultedit called::::");
valueXmlString.append("<seq_no protect = \"1\"><![CDATA["+ seqNo + "]]></seq_no>");
......@@ -490,7 +493,7 @@ public class TaxBaseIC extends ValidatorEJB implements TaxBaseICRemote, TaxBaseI
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, taxCode);
rs = pstmt.executeQuery();
if(rs.next()){
descr = rs.getString("descr");
}
......@@ -514,8 +517,8 @@ public class TaxBaseIC extends ValidatorEJB implements TaxBaseICRemote, TaxBaseI
System.out.print("*************** Generated XML ******************" + valueXmlString.toString());
valueXmlString.append("</Detail2>\r\n");
break;*/
}
}
}catch(Exception e){
System.out.println("::" + this.getClass().getSimpleName() + "::::" + e.getMessage());
e.printStackTrace();
......@@ -531,6 +534,6 @@ public class TaxBaseIC extends ValidatorEJB implements TaxBaseICRemote, TaxBaseI
valueXmlString.append("</Root>\r\n");
System.out.println("ValueXmlString:::::" + valueXmlString.toString());
return valueXmlString.toString();
}
}
}
......@@ -9,8 +9,9 @@
package ibase.webitm.ejb.dis;
import ibase.system.config.ConnDriver;
import ibase.utility.E12GenericUtility;
import ibase.webitm.ejb.ValidatorEJB;
import ibase.webitm.utility.GenericUtility;
//import ibase.webitm.utility.GenericUtility;
import ibase.webitm.utility.ITMException;
import java.util.*;
import java.rmi.RemoteException;
......@@ -25,7 +26,9 @@ import javax.ejb.Stateless;
public class TaxIC extends ValidatorEJB implements TaxICLocal, TaxICRemote
{
GenericUtility genericUtility = GenericUtility.getInstance();
//changed by nasruddin 05-10-16
//GenericUtility genericUtility = GenericUtility.getInstance();
E12GenericUtility genericUtility = new E12GenericUtility();
public String wfValData(String xmlString, String xmlString1, String xmlString2, String objContext, String editFlag, String xtraParams) throws RemoteException,ITMException
{
......@@ -580,7 +583,9 @@ public class TaxIC extends ValidatorEJB implements TaxICLocal, TaxICRemote
Connection conn = null;
PreparedStatement pstmt = null;
ResultSet rs = null ;
GenericUtility genericUtility = GenericUtility.getInstance();
//changed by nasruddin 05-10-16
//GenericUtility genericUtility = GenericUtility.getInstance();
E12GenericUtility genericUtility = new E12GenericUtility();
ConnDriver connDriver = new ConnDriver();
try
{
......
......@@ -7,9 +7,10 @@
package ibase.webitm.ejb.dis;
import ibase.system.config.ConnDriver;
import ibase.utility.E12GenericUtility;
import ibase.webitm.ejb.ValidatorEJB;
import ibase.webitm.ejb.fin.FinCommon;
import ibase.webitm.utility.GenericUtility;
//import ibase.webitm.utility.GenericUtility;
import ibase.webitm.utility.ITMException;
import java.rmi.RemoteException;
import java.sql.Connection;
......@@ -28,7 +29,9 @@ import org.w3c.dom.NodeList;
public class TaxRateIC extends ValidatorEJB
implements TaxRateICLocal, TaxRateICRemote
{
GenericUtility genericUtility = GenericUtility.getInstance();
//changed by nasruddin 05-10-16
//GenericUtility genericUtility = GenericUtility.getInstance();
E12GenericUtility genericUtility = new E12GenericUtility();
String winName = null;
FinCommon finCommon = null;
ValidatorEJB validator = null;
......@@ -511,7 +514,9 @@ implements TaxRateICLocal, TaxRateICRemote
Connection conn = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
GenericUtility genericUtility = GenericUtility.getInstance();
//changed by nasruddin 05-10-16
//GenericUtility genericUtility = GenericUtility.getInstance();
E12GenericUtility genericUtility = new E12GenericUtility();
ConnDriver connDriver = new ConnDriver();
try
{
......
......@@ -6,9 +6,10 @@ import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import ibase.system.config.ConnDriver;
import ibase.utility.E12GenericUtility;
import ibase.webitm.ejb.ITMDBAccessEJB;
import ibase.webitm.ejb.ValidatorEJB;
import ibase.webitm.utility.GenericUtility;
//import ibase.webitm.utility.GenericUtility;
import ibase.webitm.utility.ITMException;
import javax.ejb.Stateless;
import org.w3c.dom.Document;
......@@ -19,7 +20,9 @@ import org.w3c.dom.NodeList;
public class TransporterModeIC extends ValidatorEJB implements TransporterModeICRemote, TransporterModeICLocal {
GenericUtility genericUtility = GenericUtility.getInstance();
//changed by nasruddin 05-10-16
//GenericUtility genericUtility = GenericUtility.getInstance();
E12GenericUtility genericUtility = new E12GenericUtility();
ITMDBAccessEJB itmdbAccessEJB = new ITMDBAccessEJB();
public String wfValData(String xmlString, String xmlString1, String xmlString2, String objContext, String editFlag, String xtraParams)
......@@ -205,7 +208,9 @@ public class TransporterModeIC extends ValidatorEJB implements TransporterModeIC
Document dom1 = null;
Document dom2 = null;
String rtStr = "";
GenericUtility genericUtility = GenericUtility.getInstance();
//changed by nasruddin 05-10-16
//GenericUtility genericUtility = GenericUtility.getInstance();
E12GenericUtility genericUtility = new E12GenericUtility();
System.out.println("In Itemchange String:::");
try {
......
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