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