Commit a2f47631 authored by kmandhre's avatar kmandhre

sun source merge mail by sumit sarkar


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@92353 ce508802-f39f-4f6c-b175-0d175dae99d5
parent aa743b87
/******************************************************** /********************************************************
Title : InvoiceAmendmentIC Title : InvoiceAmendmentIC
Date : 01/06/2012 Date : 01/06/2012
Developer: Mahesh Patidar Developer: Mahesh Patidar
********************************************************/ ********************************************************/
package ibase.webitm.ejb.wms; package ibase.webitm.ejb.wms;
import ibase.system.config.ConnDriver; import ibase.system.config.ConnDriver;
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.rmi.RemoteException; import java.rmi.RemoteException;
import java.sql.Connection; import java.sql.Connection;
import java.sql.Date; import java.sql.Date;
import java.sql.PreparedStatement; import java.sql.PreparedStatement;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import org.w3c.dom.CDATASection; import org.w3c.dom.CDATASection;
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;
@javax.ejb.Stateless @javax.ejb.Stateless
public class InvoiceAmendmentIC extends ValidatorEJB implements InvoiceAmendmentICLocal,InvoiceAmendmentICRemote public class InvoiceAmendmentIC extends ValidatorEJB implements InvoiceAmendmentICLocal,InvoiceAmendmentICRemote
{ {
public String wfValData() throws RemoteException, ITMException public String wfValData() throws RemoteException, ITMException
{ {
return ""; return "";
} }
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
{ {
Document dom = null; Document dom = null;
Document dom1 = null; Document dom1 = null;
Document dom2 = null; Document dom2 = null;
String errString = null; String errString = null;
GenericUtility genericUtility = GenericUtility.getInstance(); GenericUtility genericUtility = GenericUtility.getInstance();
System.out.println("WFVALDATA 111111"); System.out.println("WFVALDATA 111111");
try try
{ {
System.out.println("xmlString [" + xmlString + "]"); System.out.println("xmlString [" + xmlString + "]");
System.out.println("xmlString1 [" + xmlString1 + "]"); System.out.println("xmlString1 [" + xmlString1 + "]");
System.out.println("xmlString2 [" + xmlString2 + "]"); System.out.println("xmlString2 [" + xmlString2 + "]");
if(xmlString != null && xmlString.trim().length()!=0) if(xmlString != null && xmlString.trim().length()!=0)
{ {
dom = genericUtility.parseString(xmlString); dom = genericUtility.parseString(xmlString);
} }
if(xmlString1 != null && xmlString1.trim().length()!=0) if(xmlString1 != null && xmlString1.trim().length()!=0)
{ {
dom1 = genericUtility.parseString(xmlString1); dom1 = genericUtility.parseString(xmlString1);
} }
if(xmlString2 != null && xmlString2.trim().length()!=0) if(xmlString2 != null && xmlString2.trim().length()!=0)
{ {
dom2 = genericUtility.parseString(xmlString2); dom2 = genericUtility.parseString(xmlString2);
} }
errString = wfValData( dom, dom1, dom2, objContext, editFlag, xtraParams ); errString = wfValData( dom, dom1, dom2, objContext, editFlag, xtraParams );
System.out.println ( "ErrString: " + errString); System.out.println ( "ErrString: " + errString);
} }
catch(Exception e) catch(Exception e)
{ {
System.out.println ( "Exception: InvoiceAmendmentIC: wfValData(String xmlString): " + e.getMessage() + ":" ); System.out.println ( "Exception: InvoiceAmendmentIC: wfValData(String xmlString): " + e.getMessage() + ":" );
errString = genericUtility.createErrorString(e); errString = genericUtility.createErrorString(e);
e.printStackTrace(); e.printStackTrace();
throw new ITMException(e); throw new ITMException(e);
} }
System.out.println ( "Returning from InvoiceAmendmentIC wfValData" ); System.out.println ( "Returning from InvoiceAmendmentIC wfValData" );
return ( errString ); return ( errString );
} }
public String wfValData(Document dom, Document dom1, Document dom2, String objContext,String editFlag, String xtraParams ) throws RemoteException, ITMException public String wfValData(Document dom, Document dom1, Document dom2, String objContext,String editFlag, String xtraParams ) throws RemoteException, ITMException
{ {
String errString = ""; String errString = "";
String siteCode1 = ""; String siteCode1 = "";
String siteCode = ""; String siteCode = "";
ResultSet rs = null; ResultSet rs = null;
Connection conn = null; Connection conn = null;
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
GenericUtility genericUtility = GenericUtility.getInstance(); GenericUtility genericUtility = GenericUtility.getInstance();
StringBuffer errStringXml = new StringBuffer("<?xml version=\"1.0\"?>\r\n<Root><Errors>"); StringBuffer errStringXml = new StringBuffer("<?xml version=\"1.0\"?>\r\n<Root><Errors>");
String errorType = "", errCode = ""; String errorType = "", errCode = "";
ArrayList<String> errList = new ArrayList<String>(); ArrayList<String> errList = new ArrayList<String>();
ArrayList<String> errFields = new ArrayList<String>(); ArrayList<String> errFields = new ArrayList<String>();
NodeList parentList = null; NodeList parentList = null;
NodeList childList = null; NodeList childList = null;
int noOfChilds ; int noOfChilds ;
String childNodeName = ""; String childNodeName = "";
Node childNode =null; Node childNode =null;
String userId = ""; String userId = "";
int cnt = 0; int cnt = 0;
String columnValue = ""; String columnValue = "";
String columnValue1 = ""; String columnValue1 = "";
String confirmed = ""; String confirmed = "";
String sql = ""; String sql = "";
Timestamp date1 = null; Timestamp date1 = null;
Timestamp date2 = null; Timestamp date2 = null;
int currentFormNo = 0; int currentFormNo = 0;
ConnDriver connDriver = null; ConnDriver connDriver = null;
try try
{ {
connDriver = new ConnDriver(); connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM"); conn = connDriver.getConnectDB("DriverITM");
connDriver = null; connDriver = null;
userId = genericUtility.getValueFromXTRA_PARAMS( xtraParams, "loginCode" ); userId = genericUtility.getValueFromXTRA_PARAMS( xtraParams, "loginCode" );
if ( objContext != null && objContext.trim().length() > 0 ) if ( objContext != null && objContext.trim().length() > 0 )
{ {
currentFormNo = Integer.parseInt( objContext ); currentFormNo = Integer.parseInt( objContext );
} }
switch(currentFormNo) switch(currentFormNo)
{ {
case 1 : case 1 :
{ {
parentList = dom.getElementsByTagName( "Detail" + currentFormNo ); parentList = dom.getElementsByTagName( "Detail" + currentFormNo );
childList = parentList.item( 0 ).getChildNodes(); childList = parentList.item( 0 ).getChildNodes();
noOfChilds = childList.getLength(); noOfChilds = childList.getLength();
for (int ctr = 0; ctr < noOfChilds; ctr++) for (int ctr = 0; ctr < noOfChilds; ctr++)
{ {
childNode = childList.item( ctr ); childNode = childList.item( ctr );
childNodeName = childNode.getNodeName(); childNodeName = childNode.getNodeName();
if ( childNode != null && childNode.getFirstChild() != null ) if ( childNode != null && childNode.getFirstChild() != null )
{ {
columnValue = childNode.getFirstChild().getNodeValue(); columnValue = childNode.getFirstChild().getNodeValue();
} }
System.out.println(" columnName [" + childNodeName + "] columnValue [" + columnValue + "]"); System.out.println(" columnName [" + childNodeName + "] columnValue [" + columnValue + "]");
if ( childNodeName.equalsIgnoreCase("invoice_id") ) if ( childNodeName.equalsIgnoreCase("invoice_id") )
{ {
columnValue = genericUtility.getColumnValue("invoice_id", dom); columnValue = genericUtility.getColumnValue("invoice_id", dom);
columnValue1 = genericUtility.getColumnValue("status", dom); columnValue1 = genericUtility.getColumnValue("status", dom);
System.out.println("iNSIDE INVOICE ID["+columnValue+"]"); System.out.println("iNSIDE INVOICE ID["+columnValue+"]");
if(columnValue != null && columnValue.trim().length() > 0) if(columnValue != null && columnValue.trim().length() > 0)
{ {
sql = "select confirmed from invoice where invoice_id = ? "; sql = "select confirmed from invoice where invoice_id = ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, columnValue); pstmt.setString(1, columnValue);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if( rs.next() ) if( rs.next() )
{ {
confirmed = checkNull(rs.getString(1)); confirmed = checkNull(rs.getString(1));
} }
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
if(! confirmed.trim().equals("Y")) if(! confirmed.trim().equals("Y"))
{ {
errList.add( "VMINVCD1" ); errList.add( "VMINVCD1" );
errFields.add( childNodeName.toLowerCase() ); errFields.add( childNodeName.toLowerCase() );
} }
else else
{ {
sql = "select count(*) from invoice_amendment where invoice_id = ? and status = ? "; sql = "select count(*) from invoice_amendment where invoice_id = ? and status = ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, columnValue); pstmt.setString(1, columnValue);
pstmt.setString(2, columnValue1); pstmt.setString(2, columnValue1);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if( rs.next() ) if( rs.next() )
{ {
cnt = rs.getInt(1); cnt = rs.getInt(1);
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
confirmed = ""; confirmed = "";
sql = "select (case when a.confirmed is null then 'N' else a.confirmed end) " + sql = "select (case when a.confirmed is null then 'N' else a.confirmed end) " +
" from receipt a, rcpdet b where a.tran_id = b.tran_id and b.ref_ser = 'S-INV' and b.ref_no = ?"; " from receipt a, rcpdet b where a.tran_id = b.tran_id and b.ref_ser = 'S-INV' and b.ref_no = ?";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, columnValue); pstmt.setString(1, columnValue);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if( rs.next() ) if( rs.next() )
{ {
confirmed = rs.getString(1); confirmed = rs.getString(1);
} }
if(confirmed.trim().equals("Y")) if(confirmed.trim().equals("Y"))
{ {
errList.add( "VTRCPCON" ); errList.add( "VTRCPCON" );
errFields.add( childNodeName.toLowerCase() ); errFields.add( childNodeName.toLowerCase() );
} }
if(errList == null || errList.size() == 0) if(errList == null || errList.size() == 0)
{ {
if(cnt == 1 && (! editFlag.equals("E"))) if(cnt == 1 && (! editFlag.equals("E")))
{ {
errList.add( "VTINVCD01" ); errList.add( "VTINVCD01" );
errFields.add( childNodeName.toLowerCase() ); errFields.add( childNodeName.toLowerCase() );
} }
} }
} }
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
} }
if(errList == null || errList.size() == 0) if(errList == null || errList.size() == 0)
{ {
siteCode = getValueFromXTRA_PARAMS(xtraParams, "loginSiteCode"); siteCode = getValueFromXTRA_PARAMS(xtraParams, "loginSiteCode");
sql = "select site_code from invoice where invoice_id =? "; sql = "select site_code from invoice where invoice_id =? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, columnValue); pstmt.setString(1, columnValue);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if( rs.next() ) if( rs.next() )
{ {
siteCode1 = checkNull(rs.getString(1)); siteCode1 = checkNull(rs.getString(1));
} }
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
if(! siteCode.trim().equals(siteCode1)) if(! siteCode.trim().equals(siteCode1))
{ {
errList.add( "VTDIFFST" ); errList.add( "VTDIFFST" );
errFields.add( childNodeName.toLowerCase() ); errFields.add( childNodeName.toLowerCase() );
} }
} }
} }
else else
{ {
errList.add( "VMINVIDNL" ); errList.add( "VMINVIDNL" );
errFields.add( childNodeName.toLowerCase() ); errFields.add( childNodeName.toLowerCase() );
} }
} }
else if ( childNodeName.equalsIgnoreCase("tran_code") ) else if ( childNodeName.equalsIgnoreCase("tran_code") )
{ {
columnValue = genericUtility.getColumnValue("tran_code", dom); columnValue = genericUtility.getColumnValue("tran_code", dom);
if(columnValue != null && columnValue.trim().length() >0) if(columnValue != null && columnValue.trim().length() >0)
{ {
columnValue1 = genericUtility.getColumnValue("status", dom); columnValue1 = genericUtility.getColumnValue("status", dom);
if(columnValue1.equals("S")) if(columnValue1.equals("S"))
{ {
sql = " Select Count(*) from transporter where tran_code = ? "; sql = " Select Count(*) from transporter where tran_code = ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, columnValue); pstmt.setString(1, columnValue);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if( rs.next() ) if( rs.next() )
{ {
cnt = rs.getInt(1); cnt = rs.getInt(1);
if(cnt == 0) if(cnt == 0)
{ {
errList.add( "VMTRAN1" ); errList.add( "VMTRAN1" );
errFields.add( childNodeName.toLowerCase() ); errFields.add( childNodeName.toLowerCase() );
} }
} }
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
} }
} }
else else
{ {
errList.add( "VMTRANCD1" ); errList.add( "VMTRANCD1" );
errFields.add( childNodeName.toLowerCase() ); errFields.add( childNodeName.toLowerCase() );
} }
} }
else if ( childNodeName.equalsIgnoreCase("trans_mode") ) else if ( childNodeName.equalsIgnoreCase("trans_mode") )
{ {
columnValue = genericUtility.getColumnValue("trans_mode", dom); columnValue = genericUtility.getColumnValue("trans_mode", dom);
if(columnValue == null || columnValue.trim().length() == 0) if(columnValue == null || columnValue.trim().length() == 0)
{ {
errList.add( "VTITMOD" ); errList.add( "VTITMOD" );
errFields.add( childNodeName.toLowerCase() ); errFields.add( childNodeName.toLowerCase() );
} }
else else
{ {
sql = " select count(*) from gencodes where fld_value = ? and fld_name = 'TRANS_MODE' and mod_name = 'W_INVOICE_AMENDMENT' "; sql = " select count(*) from gencodes where fld_value = ? and fld_name = 'TRANS_MODE' and mod_name = 'W_INVOICE_AMENDMENT' ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, columnValue); pstmt.setString(1, columnValue);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if( rs.next() ) if( rs.next() )
{ {
cnt = rs.getInt(1); cnt = rs.getInt(1);
if(cnt == 0) if(cnt == 0)
{ {
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
sql = " select count(*) from gencodes where fld_value = ? and fld_name = 'TRANS_MODE' and mod_name = 'X' "; sql = " select count(*) from gencodes where fld_value = ? and fld_name = 'TRANS_MODE' and mod_name = 'X' ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, columnValue); pstmt.setString(1, columnValue);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if( rs.next() ) if( rs.next() )
{ {
cnt = rs.getInt(1); cnt = rs.getInt(1);
if(cnt == 0) if(cnt == 0)
{ {
errList.add( "VTITMOD" ); errList.add( "VTITMOD" );
errFields.add( childNodeName.toLowerCase() ); errFields.add( childNodeName.toLowerCase() );
} }
} }
} }
} }
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
} }
} }
else if ( childNodeName.equalsIgnoreCase("eff_date") ) else if ( childNodeName.equalsIgnoreCase("eff_date") )
{ {
if(genericUtility.getColumnValue("eff_date", dom) != null) if(genericUtility.getColumnValue("eff_date", dom) != null)
{ {
date1 = Timestamp.valueOf(genericUtility.getValidDateString( genericUtility.getColumnValue("eff_date", dom) , genericUtility.getApplDateFormat(),getDBDateFormat()) + " 00:00:00.0");; date1 = Timestamp.valueOf(genericUtility.getValidDateString( genericUtility.getColumnValue("eff_date", dom) , genericUtility.getApplDateFormat(),getDBDateFormat()) + " 00:00:00.0");;
} }
columnValue = genericUtility.getColumnValue("invoice_id", dom); columnValue = genericUtility.getColumnValue("invoice_id", dom);
columnValue1 = genericUtility.getColumnValue("status", dom); columnValue1 = genericUtility.getColumnValue("status", dom);
if(columnValue1.equals("B")) if(columnValue1.equals("B"))
{ {
sql = "select eff_date from invoice where invoice_id = ? "; sql = "select eff_date from invoice where invoice_id = ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, columnValue); pstmt.setString(1, columnValue);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if( rs.next() ) if( rs.next() )
{ {
date2 = rs.getTimestamp(1); date2 = rs.getTimestamp(1);
} }
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
} }
if(date1 != null && date2 != null && date2.before(date1)) if(date1 != null && date2 != null && date2.before(date1))
{ {
errList.add( "VTEFF01" ); errList.add( "VTEFF01" );
errFields.add( childNodeName.toLowerCase() ); errFields.add( childNodeName.toLowerCase() );
} }
} }
else if ( childNodeName.equalsIgnoreCase("rd_permit_no") ) else if ( childNodeName.equalsIgnoreCase("rd_permit_no") )
{ {
if(genericUtility.getColumnValue("eff_date", dom) != null) if(genericUtility.getColumnValue("eff_date", dom) != null)
{ {
date1 = Timestamp.valueOf(genericUtility.getValidDateString( genericUtility.getColumnValue("eff_date", dom) , genericUtility.getApplDateFormat(),getDBDateFormat()) + " 00:00:00.0");; date1 = Timestamp.valueOf(genericUtility.getValidDateString( genericUtility.getColumnValue("eff_date", dom) , genericUtility.getApplDateFormat(),getDBDateFormat()) + " 00:00:00.0");;
} }
columnValue = genericUtility.getColumnValue("rd_permit_no", dom); columnValue = genericUtility.getColumnValue("rd_permit_no", dom);
if(columnValue != null && columnValue.trim().length() > 0 && date1 != null) if(columnValue != null && columnValue.trim().length() > 0 && date1 != null)
{ {
sql = "select expiry_date, status from roadpermit where rd_permit_no = ? "; sql = "select expiry_date, status from roadpermit where rd_permit_no = ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, columnValue); pstmt.setString(1, columnValue);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if( rs.next() ) if( rs.next() )
{ {
date2 = rs.getTimestamp(1); date2 = rs.getTimestamp(1);
columnValue1 = checkNull(rs.getString(2)); columnValue1 = checkNull(rs.getString(2));
if(date2.after(date1)) if(date2.after(date1))
{ {
errList.add( "VTEFF01" ); errList.add( "VTEFF01" );
errFields.add( childNodeName.toLowerCase() ); errFields.add( childNodeName.toLowerCase() );
} }
else else
{ {
if(columnValue1.equals("C")) if(columnValue1.equals("C"))
{ {
errList.add( "VTRDPS" ); errList.add( "VTRDPS" );
errFields.add( childNodeName.toLowerCase() ); errFields.add( childNodeName.toLowerCase() );
} }
} }
} }
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
} }
} }
else if ( childNodeName.equalsIgnoreCase("curr_code__frt") ) else if ( childNodeName.equalsIgnoreCase("curr_code__frt") )
{ {
columnValue = genericUtility.getColumnValue("curr_code__frt", dom); columnValue = genericUtility.getColumnValue("curr_code__frt", dom);
if(columnValue != null && columnValue.trim().length() > 0) if(columnValue != null && columnValue.trim().length() > 0)
{ {
sql = "Select Count(*) from currency where curr_code = ?"; sql = "Select Count(*) from currency where curr_code = ?";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, columnValue); pstmt.setString(1, columnValue);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if( rs.next() ) if( rs.next() )
{ {
cnt = rs.getInt(1); cnt = rs.getInt(1);
if(cnt == 0) if(cnt == 0)
{ {
errList.add( "VTCURRCD1" ); errList.add( "VTCURRCD1" );
errFields.add( childNodeName.toLowerCase() ); errFields.add( childNodeName.toLowerCase() );
} }
} }
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
} }
} }
else if ( childNodeName.equalsIgnoreCase("curr_code__ins") ) else if ( childNodeName.equalsIgnoreCase("curr_code__ins") )
{ {
columnValue = genericUtility.getColumnValue("curr_code__ins", dom); columnValue = genericUtility.getColumnValue("curr_code__ins", dom);
if(columnValue != null && columnValue.trim().length() > 0) if(columnValue != null && columnValue.trim().length() > 0)
{ {
sql = "Select Count(*) from currency where curr_code = ?"; sql = "Select Count(*) from currency where curr_code = ?";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, columnValue); pstmt.setString(1, columnValue);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if( rs.next() ) if( rs.next() )
{ {
cnt = rs.getInt(1); cnt = rs.getInt(1);
if(cnt == 0) if(cnt == 0)
{ {
errList.add( "VTCURRCD1" ); errList.add( "VTCURRCD1" );
errFields.add( childNodeName.toLowerCase() ); errFields.add( childNodeName.toLowerCase() );
} }
} }
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
} }
} }
else if ( childNodeName.equalsIgnoreCase("lr_date") ) else if ( childNodeName.equalsIgnoreCase("lr_date") )
{ {
if(genericUtility.getColumnValue("lr_date", dom) != null) if(genericUtility.getColumnValue("lr_date", dom) != null)
{ {
date1 = Timestamp.valueOf(genericUtility.getValidDateString( genericUtility.getColumnValue("lr_date", dom) , genericUtility.getApplDateFormat(),getDBDateFormat()) + " 00:00:00.0");; date1 = Timestamp.valueOf(genericUtility.getValidDateString( genericUtility.getColumnValue("lr_date", dom) , genericUtility.getApplDateFormat(),getDBDateFormat()) + " 00:00:00.0");;
} }
columnValue = genericUtility.getColumnValue("invoice_id", dom); columnValue = genericUtility.getColumnValue("invoice_id", dom);
columnValue1 = genericUtility.getColumnValue("status", dom); columnValue1 = genericUtility.getColumnValue("status", dom);
if(! columnValue1.equals("D")) if(! columnValue1.equals("D"))
{ {
if(date1 != null) if(date1 != null)
{ {
sql = "select var_value from disparm where prd_code = '999999'" + sql = "select var_value from disparm where prd_code = '999999'" +
" and var_name = 'MAX_DELAY_IN_SHIP' "; " and var_name = 'MAX_DELAY_IN_SHIP' ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if( rs.next() ) if( rs.next() )
{ {
cnt = rs.getInt(1); cnt = rs.getInt(1);
} }
else else
{ {
cnt = 7; cnt = 7;
} }
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
if(errList == null || errList.size() == 0) if(errList == null || errList.size() == 0)
{ {
sql = "select tran_date from invoice where invoice_id = ?"; sql = "select tran_date from invoice where invoice_id = ?";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, columnValue); pstmt.setString(1, columnValue);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if( rs.next() ) if( rs.next() )
{ {
date2 = rs.getTimestamp(1); date2 = rs.getTimestamp(1);
} }
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
int diffDays = Math.abs(date1.compareTo(date2)); int diffDays = Math.abs(date1.compareTo(date2));
if(date1 != null && (date1.before(date2) || diffDays > cnt)) if(date1 != null && (date1.before(date2) || diffDays > cnt))
{ {
errList.add( "VTILRD" ); errList.add( "VTILRD" );
errFields.add( childNodeName.toLowerCase() ); errFields.add( childNodeName.toLowerCase() );
} }
} }
} }
else else
{ {
errList.add( "VTILRDATE" ); errList.add( "VTILRDATE" );
errFields.add( childNodeName.toLowerCase() ); errFields.add( childNodeName.toLowerCase() );
} }
} }
} }
else if ( childNodeName.equalsIgnoreCase("shipment_id") ) else if ( childNodeName.equalsIgnoreCase("shipment_id") )
{ {
columnValue = genericUtility.getColumnValue("shipment_id", dom); columnValue = genericUtility.getColumnValue("shipment_id", dom);
if(columnValue != null && columnValue.trim().length() > 0) if(columnValue != null && columnValue.trim().length() > 0)
{ {
sql = "select count(1) from shipment where shipment_id = ?"; sql = "select count(1) from shipment where shipment_id = ?";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, columnValue); pstmt.setString(1, columnValue);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if( rs.next() ) if( rs.next() )
{ {
cnt = rs.getInt(1); cnt = rs.getInt(1);
if(cnt == 0) if(cnt == 0)
{ {
errList.add( "VTSHIPIDEX" ); errList.add( "VTSHIPIDEX" );
errFields.add( childNodeName.toLowerCase() ); errFields.add( childNodeName.toLowerCase() );
} }
} }
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
} }
else else
{ {
errList.add( "VTSHIPID" ); errList.add( "VTSHIPID" );
errFields.add( childNodeName.toLowerCase() ); errFields.add( childNodeName.toLowerCase() );
} }
} }
else if ( childNodeName.equalsIgnoreCase("stan_code__init") ) else if ( childNodeName.equalsIgnoreCase("stan_code__init") )
{ {
columnValue = genericUtility.getColumnValue("stan_code__init", dom); columnValue = genericUtility.getColumnValue("stan_code__init", dom);
if(columnValue != null && columnValue.trim().length() > 0) if(columnValue != null && columnValue.trim().length() > 0)
{ {
sql = "select count(*) from STATION where STAN_CODE = ?"; sql = "select count(*) from STATION where STAN_CODE = ?";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, columnValue); pstmt.setString(1, columnValue);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if( rs.next() ) if( rs.next() )
{ {
cnt = rs.getInt(1); cnt = rs.getInt(1);
if(cnt == 0) if(cnt == 0)
{ {
errList.add( "VESTACD2" ); errList.add( "VESTACD2" );
errFields.add( childNodeName.toLowerCase() ); errFields.add( childNodeName.toLowerCase() );
} }
} }
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
} }
} }
else if ( childNodeName.equalsIgnoreCase("date_dep") ) else if ( childNodeName.equalsIgnoreCase("date_dep") )
{ {
if(genericUtility.getColumnValue("date_dep", dom) != null) if(genericUtility.getColumnValue("date_dep", dom) != null)
{ {
date1 = Timestamp.valueOf(genericUtility.getValidDateString( genericUtility.getColumnValue("date_dep", dom) , genericUtility.getApplDateFormat(),getDBDateFormat()) + " 00:00:00.0");; date1 = Timestamp.valueOf(genericUtility.getValidDateString( genericUtility.getColumnValue("date_dep", dom) , genericUtility.getApplDateFormat(),getDBDateFormat()) + " 00:00:00.0");;
} }
if(genericUtility.getColumnValue("date_arr", dom) != null) if(genericUtility.getColumnValue("date_arr", dom) != null)
{ {
date2 = Timestamp.valueOf(genericUtility.getValidDateString( genericUtility.getColumnValue("date_arr", dom) , genericUtility.getApplDateFormat(),getDBDateFormat()) + " 00:00:00.0");; date2 = Timestamp.valueOf(genericUtility.getValidDateString( genericUtility.getColumnValue("date_arr", dom) , genericUtility.getApplDateFormat(),getDBDateFormat()) + " 00:00:00.0");;
} }
if(date1 != null && date2 != null && date1.before(date2)) if(date1 != null && date2 != null && date1.before(date2))
{ {
System.out.println("Date ["+date1+"]["+date2+"]"); System.out.println("Date ["+date1+"]["+date2+"]");
errList.add( "VTETDETA" ); errList.add( "VTETDETA" );
errFields.add( childNodeName.toLowerCase() ); errFields.add( childNodeName.toLowerCase() );
} }
} }
else if ( childNodeName.equalsIgnoreCase("date_arr") ) else if ( childNodeName.equalsIgnoreCase("date_arr") )
{ {
if(genericUtility.getColumnValue("date_dep", dom) != null) if(genericUtility.getColumnValue("date_dep", dom) != null)
{ {
date1 = Timestamp.valueOf(genericUtility.getValidDateString( genericUtility.getColumnValue("date_dep", dom) , genericUtility.getApplDateFormat(),getDBDateFormat()) + " 00:00:00.0");; date1 = Timestamp.valueOf(genericUtility.getValidDateString( genericUtility.getColumnValue("date_dep", dom) , genericUtility.getApplDateFormat(),getDBDateFormat()) + " 00:00:00.0");;
} }
if(genericUtility.getColumnValue("date_arr", dom) != null) if(genericUtility.getColumnValue("date_arr", dom) != null)
{ {
date2 = Timestamp.valueOf(genericUtility.getValidDateString( genericUtility.getColumnValue("date_arr", dom), genericUtility.getApplDateFormat(),getDBDateFormat()) + " 00:00:00.0");; date2 = Timestamp.valueOf(genericUtility.getValidDateString( genericUtility.getColumnValue("date_arr", dom), genericUtility.getApplDateFormat(),getDBDateFormat()) + " 00:00:00.0");;
} }
if(date1 != null && date2 != null && date1.before(date2)) if(date1 != null && date2 != null && date1.before(date2))
{ {
errList.add( "VTETDETA" ); errList.add( "VTETDETA" );
errFields.add( childNodeName.toLowerCase() ); errFields.add( childNodeName.toLowerCase() );
} }
} }
} }
} }
break; break;
case 2 : case 2 :
{ {
parentList = dom.getElementsByTagName( "Detail2" ); parentList = dom.getElementsByTagName( "Detail2" );
childList = parentList.item( 0 ).getChildNodes(); childList = parentList.item( 0 ).getChildNodes();
noOfChilds = childList.getLength(); noOfChilds = childList.getLength();
for (int ctr = 0; ctr < noOfChilds; ctr++) for (int ctr = 0; ctr < noOfChilds; ctr++)
{ {
childNode = childList.item( ctr ); childNode = childList.item( ctr );
childNodeName = childNode.getNodeName(); childNodeName = childNode.getNodeName();
if ( childNode != null && childNode.getFirstChild() != null ) if ( childNode != null && childNode.getFirstChild() != null )
{ {
columnValue = childNode.getFirstChild().getNodeValue(); columnValue = childNode.getFirstChild().getNodeValue();
} }
else if ( childNodeName.equalsIgnoreCase("status") ) else if ( childNodeName.equalsIgnoreCase("status") )
{ {
columnValue = genericUtility.getColumnValue("status", dom); columnValue = genericUtility.getColumnValue("status", dom);
System.out.println("cURRENT COLUNM STATUS["+columnValue+"]"); System.out.println("cURRENT COLUNM STATUS["+columnValue+"]");
if(columnValue == null || columnValue.trim().length() == 0) if(columnValue == null || columnValue.trim().length() == 0)
{ {
errList.add( "VMSTAT" ); errList.add( "VMSTAT" );
errFields.add( childNodeName.toLowerCase() ); errFields.add( childNodeName.toLowerCase() );
} }
} }
if ( childNodeName.equalsIgnoreCase("tracking_no") ) if ( childNodeName.equalsIgnoreCase("tracking_no") )
{ {
columnValue = genericUtility.getColumnValue("tracking_no", dom); columnValue = genericUtility.getColumnValue("tracking_no", dom);
System.out.println("cURRENT COLUNM TRACKING NO["+columnValue+"]"); System.out.println("cURRENT COLUNM TRACKING NO["+columnValue+"]");
if(columnValue == null || columnValue.trim().length() == 0) if(columnValue == null || columnValue.trim().length() == 0)
{ {
errList.add( "VMTRACKCD" ); errList.add( "VMTRACKCD" );
errFields.add( childNodeName.toLowerCase() ); errFields.add( childNodeName.toLowerCase() );
} }
} }
else if ( childNodeName.equalsIgnoreCase("status_date") ) else if ( childNodeName.equalsIgnoreCase("status_date") )
{ {
columnValue = genericUtility.getColumnValue("status_date", dom); columnValue = genericUtility.getColumnValue("status_date", dom);
System.out.println("cURRENT COLUNM status datee["+columnValue+"]"); System.out.println("cURRENT COLUNM status datee["+columnValue+"]");
if(columnValue == null || columnValue.trim().length() == 0) if(columnValue == null || columnValue.trim().length() == 0)
{ {
errList.add( "VMSTSCD1" ); errList.add( "VMSTSCD1" );
errFields.add( childNodeName.toLowerCase() ); errFields.add( childNodeName.toLowerCase() );
} }
} }
} }
} }
} }
int errListSize = errList.size(); int errListSize = errList.size();
cnt =0; cnt =0;
String errFldName = null; String errFldName = null;
if ( errList != null && errListSize > 0 ) if ( errList != null && errListSize > 0 )
{ {
for (cnt = 0; cnt < errListSize; cnt++ ) for (cnt = 0; cnt < errListSize; cnt++ )
{ {
errCode = (String)errList.get(cnt); errCode = (String)errList.get(cnt);
errFldName = (String)errFields.get(cnt); errFldName = (String)errFields.get(cnt);
System.out.println("errCode .........."+errCode); System.out.println("errCode .........."+errCode);
//String errMsg = hashMap.get(errCode)!=null ? hashMap.get(errCode).toString():""; //String errMsg = hashMap.get(errCode)!=null ? hashMap.get(errCode).toString():"";
//System.out.println("errMsg .........."+errMsg); //System.out.println("errMsg .........."+errMsg);
errString = getErrorString( errFldName, errCode, userId ); errString = getErrorString( errFldName, errCode, userId );
errorType = errorType( conn , errCode ); errorType = errorType( conn , errCode );
if ( errString.length() > 0) if ( errString.length() > 0)
{ {
String bifurErrString = errString.substring( errString.indexOf("<Errors>") + 8,errString.indexOf("<trace>")); String bifurErrString = errString.substring( errString.indexOf("<Errors>") + 8,errString.indexOf("<trace>"));
bifurErrString =bifurErrString+errString.substring( errString.indexOf("</trace>") + 8,errString.indexOf("</Errors>")); bifurErrString =bifurErrString+errString.substring( errString.indexOf("</trace>") + 8,errString.indexOf("</Errors>"));
errStringXml.append(bifurErrString); errStringXml.append(bifurErrString);
System.out.println("errStringXml .........."+errStringXml); System.out.println("errStringXml .........."+errStringXml);
errString = ""; errString = "";
} }
if ( errorType.equalsIgnoreCase("E")) if ( errorType.equalsIgnoreCase("E"))
{ {
break; break;
} }
} }
errList.clear(); errList.clear();
errList = null; errList = null;
errFields.clear(); errFields.clear();
errFields = null; errFields = null;
errStringXml.append("</Errors></Root>\r\n"); errStringXml.append("</Errors></Root>\r\n");
} }
else else
{ {
errStringXml = new StringBuffer( "" ); errStringXml = new StringBuffer( "" );
} }
errString = errStringXml.toString(); errString = errStringXml.toString();
}//END TRY }//END TRY
catch(Exception e) catch(Exception e)
{ {
System.out.println("Exception in invoice amendmentIC == >"); System.out.println("Exception in invoice amendmentIC == >");
e.printStackTrace(); e.printStackTrace();
throw new ITMException(e); throw new ITMException(e);
} }
finally finally
{ {
try try
{ {
if( conn != null && !conn.isClosed() ) if( conn != null && !conn.isClosed() )
{ {
if( rs != null ) if( rs != null )
{ {
rs.close(); rs.close();
rs = null; rs = null;
} }
if( pstmt != null ) if( pstmt != null )
{ {
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
} }
conn.close(); conn.close();
} }
} }
catch(Exception e) catch(Exception e)
{ {
System.out.println( "Exception :invoice amendmentIC:wfValData :==>\n"+e.getMessage()); System.out.println( "Exception :invoice amendmentIC:wfValData :==>\n"+e.getMessage());
throw new ITMException(e); throw new ITMException(e);
} }
} }
return errString; return errString;
} }
private String errorType( Connection conn , String errorCode ) throws ITMException private String errorType( Connection conn , String errorCode ) throws ITMException
{ {
String msgType = ""; String msgType = "";
PreparedStatement pstmt = null ; PreparedStatement pstmt = null ;
ResultSet rs = null; ResultSet rs = null;
try try
{ {
String sql = " SELECT MSG_TYPE FROM MESSAGES WHERE MSG_NO = ? "; String sql = " SELECT MSG_TYPE FROM MESSAGES WHERE MSG_NO = ? ";
pstmt = conn.prepareStatement( sql ); pstmt = conn.prepareStatement( sql );
pstmt.setString(1, errorCode); pstmt.setString(1, errorCode);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
while( rs.next() ) while( rs.next() )
{ {
msgType = rs.getString("MSG_TYPE"); msgType = rs.getString("MSG_TYPE");
} }
} }
catch (Exception ex) catch (Exception ex)
{ {
ex.printStackTrace(); ex.printStackTrace();
throw new ITMException(ex); throw new ITMException(ex);
} }
finally finally
{ {
try try
{ {
if ( rs != null ) if ( rs != null )
{ {
rs.close(); rs.close();
rs = null; rs = null;
} }
if ( pstmt != null ) if ( pstmt != null )
{ {
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
} }
} }
catch ( Exception e ) catch ( Exception e )
{ {
e.printStackTrace(); e.printStackTrace();
throw new ITMException(e); throw new ITMException(e);
} }
} }
return msgType; return msgType;
} }
public String itemChanged() throws RemoteException, ITMException public String itemChanged() throws RemoteException, ITMException
{ {
return ""; return "";
} }
public String itemChanged(String xmlString, String xmlString1, String xmlString2, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException, ITMException public String itemChanged(String xmlString, String xmlString1, String xmlString2, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException, ITMException
{ {
Document dom = null; Document dom = null;
Document dom1 = null; Document dom1 = null;
Document dom2 = null; Document dom2 = null;
String errString = null; String errString = null;
GenericUtility genericUtility = GenericUtility.getInstance(); GenericUtility genericUtility = GenericUtility.getInstance();
try try
{ {
if (xmlString != null && xmlString.trim().length()!=0) if (xmlString != null && xmlString.trim().length()!=0)
{ {
dom = genericUtility.parseString(xmlString); dom = genericUtility.parseString(xmlString);
} }
if (xmlString1 != null && xmlString1.trim().length()!=0) if (xmlString1 != null && xmlString1.trim().length()!=0)
{ {
dom1 = genericUtility.parseString(xmlString1); dom1 = genericUtility.parseString(xmlString1);
} }
if (xmlString2 != null && xmlString2.trim().length()!=0) if (xmlString2 != null && xmlString2.trim().length()!=0)
{ {
dom2 = genericUtility.parseString(xmlString2); dom2 = genericUtility.parseString(xmlString2);
} }
errString = itemChanged( dom, dom1, dom2, objContext, currentColumn, editFlag, xtraParams ); errString = itemChanged( dom, dom1, dom2, objContext, currentColumn, editFlag, xtraParams );
System.out.println ( "ErrString :" + errString); System.out.println ( "ErrString :" + errString);
} }
catch (Exception e) catch (Exception e)
{ {
System.out.println ( "Exception :invoice amendmentIC :itemChanged(String,String):" + e.getMessage() + ":" ); System.out.println ( "Exception :invoice amendmentIC :itemChanged(String,String):" + e.getMessage() + ":" );
errString = genericUtility.createErrorString(e); errString = genericUtility.createErrorString(e);
throw new ITMException(e); throw new ITMException(e);
} }
System.out.println ( "returning from invoice amendmentIC itemChanged" ); System.out.println ( "returning from invoice amendmentIC itemChanged" );
return errString; return errString;
} }
public String itemChanged( Document dom, Document dom1, Document dom2, String objContext, String currentColumn, String editFlag, String xtraParams ) throws RemoteException,ITMException public String itemChanged( Document dom, Document dom1, Document dom2, String objContext, String currentColumn, String editFlag, String xtraParams ) throws RemoteException,ITMException
{ {
int grossWeight = 0; int grossWeight = 0;
int frtAmt = 0; int frtAmt = 0;
int exchRateFrt = 0; int exchRateFrt = 0;
int exchRateIns = 0; int exchRateIns = 0;
int currentFormNo = 0; int currentFormNo = 0;
int InsAmt = 0; int InsAmt = 0;
int noArt = 0; int noArt = 0;
int pos = 0; int pos = 0;
int amt1 = 0; int amt1 = 0;
int childNodeListLength = 0; int childNodeListLength = 0;
int ctr = 0; int ctr = 0;
double amt4 = 0.0; double amt4 = 0.0;
String sql = ""; String sql = "";
String columnValue = ""; String columnValue = "";
String columnValue1 = ""; String columnValue1 = "";
String itemCode = ""; String itemCode = "";
String childNodeName = ""; String childNodeName = "";
String descr = ""; String descr = "";
String descr1 = ""; String descr1 = "";
String reStr = ""; String reStr = "";
String currCodeFrt = ""; String currCodeFrt = "";
String currCodeIns = ""; String currCodeIns = "";
String lrNo = ""; String lrNo = "";
String octroiRcpNo = ""; String octroiRcpNo = "";
String lorryNo = ""; String lorryNo = "";
String gpNo = ""; String gpNo = "";
String grNo = ""; String grNo = "";
String sbNo = ""; String sbNo = "";
String stanCodeInit = ""; String stanCodeInit = "";
String shipmentId = ""; String shipmentId = "";
String custCode = ""; String custCode = "";
String custName = ""; String custName = "";
String salesPers = ""; String salesPers = "";
String spName = ""; String spName = "";
String saleOrder = ""; String saleOrder = "";
String tranCode = ""; String tranCode = "";
String transMode = ""; String transMode = "";
String despId = ""; String despId = "";
String remark = ""; String remark = "";
String chequeNo = ""; String chequeNo = "";
Date effFrom = null; Date effFrom = null;
Date sbDate = null; Date sbDate = null;
Date grDate = null; Date grDate = null;
Date sailDate = null; Date sailDate = null;
Date gpDate = null; Date gpDate = null;
Date lrDate = null; Date lrDate = null;
Date octroiRcpDate = null; Date octroiRcpDate = null;
Date chequeDate = null; Date chequeDate = null;
NodeList parentNodeList = null; NodeList parentNodeList = null;
NodeList childNodeList = null; NodeList childNodeList = null;
Node parentNode = null; Node parentNode = null;
Node childNode = null; Node childNode = null;
Connection conn = null; Connection conn = null;
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
ResultSet rs = null; ResultSet rs = null;
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yy"); SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yy");
StringBuffer valueXmlString = new StringBuffer(); StringBuffer valueXmlString = new StringBuffer();
GenericUtility genericUtility = GenericUtility.getInstance(); GenericUtility genericUtility = GenericUtility.getInstance();
try try
{ {
columnValue = genericUtility.getColumnValue( currentColumn, dom ); columnValue = genericUtility.getColumnValue( currentColumn, dom );
ConnDriver connDriver = null; ConnDriver connDriver = null;
connDriver = new ConnDriver(); connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverValidator"); conn = connDriver.getConnectDB("DriverValidator");
if( objContext != null && objContext.trim().length() > 0 ) if( objContext != null && objContext.trim().length() > 0 )
{ {
currentFormNo = Integer.parseInt( objContext ); currentFormNo = Integer.parseInt( objContext );
} }
valueXmlString = new StringBuffer( "<?xml version=\"1.0\"?>\r\n<Root>\r\n<Header>\r\n<editFlag>" ); valueXmlString = new StringBuffer( "<?xml version=\"1.0\"?>\r\n<Root>\r\n<Header>\r\n<editFlag>" );
valueXmlString.append( editFlag ).append( "</editFlag>\r\n</Header>\r\n" ); valueXmlString.append( editFlag ).append( "</editFlag>\r\n</Header>\r\n" );
switch ( currentFormNo ) switch ( currentFormNo )
{ {
case 1: case 1:
parentNodeList = dom.getElementsByTagName("Detail1"); parentNodeList = dom.getElementsByTagName("Detail1");
parentNode = parentNodeList.item(0); parentNode = parentNodeList.item(0);
childNodeList = parentNode.getChildNodes(); childNodeList = parentNode.getChildNodes();
valueXmlString.append( "<Detail1>\r\n" ); valueXmlString.append( "<Detail1>\r\n" );
childNodeListLength = childNodeList.getLength(); childNodeListLength = childNodeList.getLength();
do do
{ {
childNode = childNodeList.item(ctr); childNode = childNodeList.item(ctr);
childNodeName = childNode.getNodeName(); childNodeName = childNode.getNodeName();
ctr ++; ctr ++;
}while(ctr < childNodeListLength && ! childNodeName.equals(currentColumn)); }while(ctr < childNodeListLength && ! childNodeName.equals(currentColumn));
if( currentColumn.trim().equalsIgnoreCase( "invoice_id" ) ) if( currentColumn.trim().equalsIgnoreCase( "invoice_id" ) )
{ {
columnValue = genericUtility.getColumnValue("invoice_id",dom); columnValue = genericUtility.getColumnValue("invoice_id",dom);
sql = "select invoice.frt_amt, invoice.curr_code__frt, invoice.exch_rate__frt, " + sql = "select invoice.frt_amt, invoice.curr_code__frt, invoice.exch_rate__frt, " +
" invoice.curr_code__ins, invoice.exch_rate__ins, invoice.ins_amt, " + " invoice.curr_code__ins, invoice.exch_rate__ins, invoice.ins_amt, " +
" invoice.cust_code,customer.cust_name,invoice.sales_pers,sales_pers.sp_name, " + " invoice.cust_code,customer.cust_name,invoice.sales_pers,sales_pers.sp_name, " +
" invoice.sale_order,invoice.tran_code,invoice.trans_mode ,invoice.desp_id, remarks " + " invoice.sale_order,invoice.tran_code,invoice.trans_mode ,invoice.desp_id, remarks " +
" From invoice LEFT OUTER JOIN customer ON invoice.cust_code = customer.cust_code " + " From invoice LEFT OUTER JOIN customer ON invoice.cust_code = customer.cust_code " +
" LEFT OUTER JOIN sales_pers ON invoice.sales_pers = sales_pers.sales_pers " + " LEFT OUTER JOIN sales_pers ON invoice.sales_pers = sales_pers.sales_pers " +
" where invoice.invoice_id = ?"; " where invoice.invoice_id = ?";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, columnValue); pstmt.setString(1, columnValue);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if( rs.next() ) if( rs.next() )
{ {
frtAmt = rs.getInt(1); frtAmt = rs.getInt(1);
currCodeFrt = checkNull(rs.getString(2)); currCodeFrt = checkNull(rs.getString(2));
exchRateFrt = rs.getInt(3); exchRateFrt = rs.getInt(3);
currCodeIns = checkNull(rs.getString(4)); currCodeIns = checkNull(rs.getString(4));
exchRateIns = rs.getInt(5); exchRateIns = rs.getInt(5);
InsAmt = rs.getInt(6); InsAmt = rs.getInt(6);
custCode = checkNull(rs.getString(7)); custCode = checkNull(rs.getString(7));
custName = checkNull(rs.getString(8)); custName = checkNull(rs.getString(8));
salesPers = checkNull(rs.getString(9)); salesPers = checkNull(rs.getString(9));
spName = checkNull(rs.getString(10)); spName = checkNull(rs.getString(10));
saleOrder = checkNull(rs.getString(11)); saleOrder = checkNull(rs.getString(11));
tranCode = checkNull(rs.getString(12)); tranCode = checkNull(rs.getString(12));
transMode = checkNull(rs.getString(13)); transMode = checkNull(rs.getString(13));
despId = checkNull(rs.getString(14)); despId = checkNull(rs.getString(14));
remark = checkNull(rs.getString(15)); remark = checkNull(rs.getString(15));
} }
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
sql = "select gross_weight from despatch where desp_id = ?"; sql = "select gross_weight from despatch where desp_id = ?";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, despId); pstmt.setString(1, despId);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if( rs.next() ) if( rs.next() )
{ {
grossWeight = rs.getInt(1); grossWeight = rs.getInt(1);
} }
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
valueXmlString.append( "<gross_weight><![CDATA[" ).append( grossWeight ).append( "]]></gross_weight>\r\n" ); valueXmlString.append( "<gross_weight><![CDATA[" ).append( grossWeight ).append( "]]></gross_weight>\r\n" );
sql = "select cheque_no, cheque_date from sorder where sale_order = ?"; sql = "select cheque_no, cheque_date from sorder where sale_order = ?";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, saleOrder); pstmt.setString(1, saleOrder);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if( rs.next() ) if( rs.next() )
{ {
chequeNo = checkNull(rs.getString(1)); chequeNo = checkNull(rs.getString(1));
chequeDate = rs.getDate(2); chequeDate = rs.getDate(2);
} }
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
valueXmlString.append( "<ref_no><![CDATA[" ).append( chequeNo ).append( "]]></ref_no>\r\n" ); valueXmlString.append( "<ref_no><![CDATA[" ).append( chequeNo ).append( "]]></ref_no>\r\n" );
valueXmlString.append( "<ref_date><![CDATA[" ).append( chequeDate==null?"":sdf.format(chequeDate) ).append( "]]></ref_date>\r\n" ); valueXmlString.append( "<ref_date><![CDATA[" ).append( chequeDate==null?"":sdf.format(chequeDate) ).append( "]]></ref_date>\r\n" );
sql = "select descr from gencodes where fld_value = ? and mod_name='W_INVOICE_AMENDMENT'"; sql = "select descr from gencodes where fld_value = ? and mod_name='W_INVOICE_AMENDMENT'";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1,transMode ); pstmt.setString(1,transMode );
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if( rs.next() ) if( rs.next() )
{ {
descr = checkNull(rs.getString(1)); descr = checkNull(rs.getString(1));
} }
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
valueXmlString.append( "<trans_mode><![CDATA[" ).append( transMode ).append( "]]></trans_mode>\r\n" ); valueXmlString.append( "<trans_mode><![CDATA[" ).append( transMode ).append( "]]></trans_mode>\r\n" );
valueXmlString.append( "<trans_descr><![CDATA[" ).append( descr ).append( "]]></trans_descr>\r\n" ); valueXmlString.append( "<trans_descr><![CDATA[" ).append( descr ).append( "]]></trans_descr>\r\n" );
descr = ""; descr = "";
sql = "select tran_name from transporter where tran_code = ?"; sql = "select tran_name from transporter where tran_code = ?";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1,tranCode ); pstmt.setString(1,tranCode );
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if( rs.next() ) if( rs.next() )
{ {
descr = checkNull(rs.getString(1)); descr = checkNull(rs.getString(1));
} }
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
valueXmlString.append( "<invoice_cust_code><![CDATA[" ).append( custCode ).append( "]]></invoice_cust_code>\r\n" ); valueXmlString.append( "<invoice_cust_code><![CDATA[" ).append( custCode ).append( "]]></invoice_cust_code>\r\n" );
valueXmlString.append( "<customer_cust_name><![CDATA[" ).append( custName ).append( "]]></customer_cust_name>\r\n" ); valueXmlString.append( "<customer_cust_name><![CDATA[" ).append( custName ).append( "]]></customer_cust_name>\r\n" );
valueXmlString.append( "<frt_amt><![CDATA[" ).append( frtAmt ).append( "]]></frt_amt>\r\n" ); valueXmlString.append( "<frt_amt><![CDATA[" ).append( frtAmt ).append( "]]></frt_amt>\r\n" );
valueXmlString.append( "<invoice_sales_pers><![CDATA[" ).append( salesPers ).append( "]]></invoice_sales_pers>\r\n" ); valueXmlString.append( "<invoice_sales_pers><![CDATA[" ).append( salesPers ).append( "]]></invoice_sales_pers>\r\n" );
valueXmlString.append( "<sales_pers_sp_name><![CDATA[" ).append( spName ).append( "]]></sales_pers_sp_name>\r\n" ); valueXmlString.append( "<sales_pers_sp_name><![CDATA[" ).append( spName ).append( "]]></sales_pers_sp_name>\r\n" );
valueXmlString.append( "<curr_code__frt><![CDATA[" ).append( currCodeFrt ).append( "]]></curr_code__frt>\r\n" ); valueXmlString.append( "<curr_code__frt><![CDATA[" ).append( currCodeFrt ).append( "]]></curr_code__frt>\r\n" );
valueXmlString.append( "<exch_rate__frt><![CDATA[" ).append( exchRateFrt ).append( "]]></exch_rate__frt>\r\n" ); valueXmlString.append( "<exch_rate__frt><![CDATA[" ).append( exchRateFrt ).append( "]]></exch_rate__frt>\r\n" );
valueXmlString.append( "<ins_amt><![CDATA[" ).append( InsAmt ).append( "]]></ins_amt>\r\n" ); valueXmlString.append( "<ins_amt><![CDATA[" ).append( InsAmt ).append( "]]></ins_amt>\r\n" );
valueXmlString.append( "<curr_code__ins><![CDATA[" ).append( currCodeIns ).append( "]]></curr_code__ins>\r\n" ); valueXmlString.append( "<curr_code__ins><![CDATA[" ).append( currCodeIns ).append( "]]></curr_code__ins>\r\n" );
valueXmlString.append( "<exch_rate__ins><![CDATA[" ).append( exchRateIns ).append( "]]></exch_rate__ins>\r\n" ); valueXmlString.append( "<exch_rate__ins><![CDATA[" ).append( exchRateIns ).append( "]]></exch_rate__ins>\r\n" );
valueXmlString.append( "<remarks><![CDATA[" ).append( remark ).append( "]]></remarks>\r\n" ); valueXmlString.append( "<remarks><![CDATA[" ).append( remark ).append( "]]></remarks>\r\n" );
reStr = itemChanged(dom, dom1, dom2, objContext, "status", editFlag, xtraParams); reStr = itemChanged(dom, dom1, dom2, objContext, "status", editFlag, xtraParams);
pos = reStr.indexOf("<Detail1>"); pos = reStr.indexOf("<Detail1>");
reStr = reStr.substring(pos + 9); reStr = reStr.substring(pos + 9);
pos = reStr.indexOf("</Detail1>"); pos = reStr.indexOf("</Detail1>");
reStr = reStr.substring(0,pos); reStr = reStr.substring(0,pos);
valueXmlString.append(reStr); valueXmlString.append(reStr);
descr = ""; descr = "";
descr1 = ""; descr1 = "";
sql = "select distinct invdet.item_code, rtrim(ltrim(item.descr)), sum(invdet.quantity) " + sql = "select distinct invdet.item_code, rtrim(ltrim(item.descr)), sum(invdet.quantity) " +
" from invdet,item where invdet.item_code = item.item_code and invdet.invoice_id = ? " + " from invdet,item where invdet.item_code = item.item_code and invdet.invoice_id = ? " +
" group by invdet.item_code, rtrim(ltrim(item.descr)) "; " group by invdet.item_code, rtrim(ltrim(item.descr)) ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, columnValue); pstmt.setString(1, columnValue);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
while( rs.next() ) while( rs.next() )
{ {
itemCode = checkNull(rs.getString(1)); itemCode = checkNull(rs.getString(1));
descr = checkNull(rs.getString(2)); descr = checkNull(rs.getString(2));
amt1 = rs.getInt(3); amt1 = rs.getInt(3);
if(descr.indexOf('/') > 0) if(descr.indexOf('/') > 0)
{ {
descr = descr.replace('/', '\''); descr = descr.replace('/', '\'');
} }
descr1 = descr1 + itemCode +" "+ descr + " "+ amt1 +"/"; descr1 = descr1 + itemCode +" "+ descr + " "+ amt1 +"/";
} }
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
valueXmlString.append( "<item_info><![CDATA[" ).append( descr1 ).append( "]]></item_info>\r\n" ); valueXmlString.append( "<item_info><![CDATA[" ).append( descr1 ).append( "]]></item_info>\r\n" );
} }
if( currentColumn.trim().equalsIgnoreCase( "status" ) ) if( currentColumn.trim().equalsIgnoreCase( "status" ) )
{ {
columnValue = genericUtility.getColumnValue("status",dom).trim(); columnValue = genericUtility.getColumnValue("status",dom).trim();
columnValue1 = genericUtility.getColumnValue("invoice_id",dom); columnValue1 = genericUtility.getColumnValue("invoice_id",dom);
if(columnValue.equals("S")) if(columnValue.equals("S"))
{ {
sql = "select desp_id, eff_date from invoice where invoice_id = ?"; sql = "select desp_id, eff_date from invoice where invoice_id = ?";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, columnValue1); pstmt.setString(1, columnValue1);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if( rs.next() ) if( rs.next() )
{ {
despId = checkNull(rs.getString(1)); despId = checkNull(rs.getString(1));
effFrom = rs.getDate(2); effFrom = rs.getDate(2);
} }
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
sql = "select tran_code, lr_no, lr_date, octroi_rcp_no, orctoi_rcp_date," + sql = "select tran_code, lr_no, lr_date, octroi_rcp_no, orctoi_rcp_date," +
" case when no_art is null then 0 else no_art end, lorry_no,gp_no, " + " case when no_art is null then 0 else no_art end, lorry_no,gp_no, " +
" gp_date,gr_no,gr_date,sail_date, sb_no,sb_date,stan_code__init, " + " gp_date,gr_no,gr_date,sail_date, sb_no,sb_date,stan_code__init, " +
" SHIPMENT_ID from despatch where desp_id = ?"; " SHIPMENT_ID from despatch where desp_id = ?";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, despId); pstmt.setString(1, despId);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if( rs.next() ) if( rs.next() )
{ {
tranCode = checkNull(rs.getString(1)); tranCode = checkNull(rs.getString(1));
lrNo = checkNull(rs.getString(2)); lrNo = checkNull(rs.getString(2));
lrDate = rs.getDate(3); lrDate = rs.getDate(3);
octroiRcpNo = checkNull(rs.getString(4)); octroiRcpNo = checkNull(rs.getString(4));
octroiRcpDate = rs.getDate(5); octroiRcpDate = rs.getDate(5);
noArt = rs.getInt(6); noArt = rs.getInt(6);
lorryNo = checkNull(rs.getString(7)); lorryNo = checkNull(rs.getString(7));
gpNo = checkNull(rs.getString(8)); gpNo = checkNull(rs.getString(8));
gpDate = rs.getDate(9); gpDate = rs.getDate(9);
grNo = checkNull(rs.getString(10)); grNo = checkNull(rs.getString(10));
grDate = rs.getDate(11); grDate = rs.getDate(11);
sailDate = rs.getDate(12); sailDate = rs.getDate(12);
sbNo = checkNull(rs.getString(13)); sbNo = checkNull(rs.getString(13));
sbDate = rs.getDate(14); sbDate = rs.getDate(14);
stanCodeInit = checkNull(rs.getString(15)); stanCodeInit = checkNull(rs.getString(15));
shipmentId = checkNull(rs.getString(16)); shipmentId = checkNull(rs.getString(16));
} }
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
descr = ""; descr = "";
sql = "select tran_name from transporter where tran_code = ?"; sql = "select tran_name from transporter where tran_code = ?";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, tranCode); pstmt.setString(1, tranCode);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if( rs.next() ) if( rs.next() )
{ {
descr = rs.getString(1); descr = rs.getString(1);
} }
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
valueXmlString.append( "<shipment_id><![CDATA[" ).append( shipmentId ).append( "]]></shipment_id>\r\n" ); valueXmlString.append( "<shipment_id><![CDATA[" ).append( shipmentId ).append( "]]></shipment_id>\r\n" );
valueXmlString.append( "<tran_code protect = \"0\"><![CDATA[" ).append( tranCode ).append( "]]></tran_code>\r\n" ); valueXmlString.append( "<tran_code protect = \"0\"><![CDATA[" ).append( tranCode ).append( "]]></tran_code>\r\n" );
valueXmlString.append( "<tran_name><![CDATA[" ).append( descr ).append( "]]></tran_name>\r\n" ); valueXmlString.append( "<tran_name><![CDATA[" ).append( descr ).append( "]]></tran_name>\r\n" );
valueXmlString.append( "<lr_no protect = \"0\"><![CDATA[" ).append( lrNo ).append( "]]></lr_no>\r\n" ); valueXmlString.append( "<lr_no protect = \"0\"><![CDATA[" ).append( lrNo ).append( "]]></lr_no>\r\n" );
valueXmlString.append( "<lr_date protect = \"0\"><![CDATA[" ).append( lrDate==null?"":sdf.format(lrDate) ).append( "]]></lr_date>\r\n" ); valueXmlString.append( "<lr_date protect = \"0\"><![CDATA[" ).append( lrDate==null?"":sdf.format(lrDate) ).append( "]]></lr_date>\r\n" );
valueXmlString.append( "<no_art><![CDATA[" ).append( noArt ).append( "]]></no_art>\r\n" ); valueXmlString.append( "<no_art><![CDATA[" ).append( noArt ).append( "]]></no_art>\r\n" );
valueXmlString.append( "<octroi_rcp_no protect = \"0\"><![CDATA[" ).append( octroiRcpNo ).append( "]]></octroi_rcp_no>\r\n" ); valueXmlString.append( "<octroi_rcp_no protect = \"0\"><![CDATA[" ).append( octroiRcpNo ).append( "]]></octroi_rcp_no>\r\n" );
valueXmlString.append( "<octroi_rcp_date protect = \"0\"><![CDATA[" ).append( octroiRcpDate==null?"":sdf.format(octroiRcpDate) ).append( "]]></octroi_rcp_date>\r\n" ); valueXmlString.append( "<octroi_rcp_date protect = \"0\"><![CDATA[" ).append( octroiRcpDate==null?"":sdf.format(octroiRcpDate) ).append( "]]></octroi_rcp_date>\r\n" );
valueXmlString.append( "<desp_id><![CDATA[" ).append( despId ).append( "]]></desp_id>\r\n" ); valueXmlString.append( "<desp_id><![CDATA[" ).append( despId ).append( "]]></desp_id>\r\n" );
valueXmlString.append( "<eff_date protect = \"0\"><![CDATA[" ).append( effFrom==null?"":sdf.format(effFrom) ).append( "]]></eff_date>\r\n" ); valueXmlString.append( "<eff_date protect = \"0\"><![CDATA[" ).append( effFrom==null?"":sdf.format(effFrom) ).append( "]]></eff_date>\r\n" );
valueXmlString.append( "<lorry_no><![CDATA[" ).append( lorryNo ).append( "]]></lorry_no>\r\n" ); valueXmlString.append( "<lorry_no><![CDATA[" ).append( lorryNo ).append( "]]></lorry_no>\r\n" );
valueXmlString.append( "<gp_no><![CDATA[" ).append( gpNo ).append( "]]></gp_no>\r\n" ); valueXmlString.append( "<gp_no><![CDATA[" ).append( gpNo ).append( "]]></gp_no>\r\n" );
valueXmlString.append( "<gp_date><![CDATA[" ).append( gpDate==null?"":sdf.format(gpDate) ).append( "]]></gp_date>\r\n" ); valueXmlString.append( "<gp_date><![CDATA[" ).append( gpDate==null?"":sdf.format(gpDate) ).append( "]]></gp_date>\r\n" );
valueXmlString.append( "<gr_no><![CDATA[" ).append( grNo ).append( "]]></gr_no>\r\n" ); valueXmlString.append( "<gr_no><![CDATA[" ).append( grNo ).append( "]]></gr_no>\r\n" );
valueXmlString.append( "<gr_date><![CDATA[" ).append( grDate==null?"":sdf.format(grDate) ).append( "]]></gr_date>\r\n" ); valueXmlString.append( "<gr_date><![CDATA[" ).append( grDate==null?"":sdf.format(grDate) ).append( "]]></gr_date>\r\n" );
valueXmlString.append( "<sail_date><![CDATA[" ).append( sailDate==null?"":sdf.format(sailDate) ).append( "]]></sail_date>\r\n" ); valueXmlString.append( "<sail_date><![CDATA[" ).append( sailDate==null?"":sdf.format(sailDate) ).append( "]]></sail_date>\r\n" );
valueXmlString.append( "<sb_no><![CDATA[" ).append( sbNo ).append( "]]></sb_no>\r\n" ); valueXmlString.append( "<sb_no><![CDATA[" ).append( sbNo ).append( "]]></sb_no>\r\n" );
valueXmlString.append( "<sb_date><![CDATA[" ).append( sbDate==null?"":sdf.format(sbDate) ).append( "]]></sb_date>\r\n" ); valueXmlString.append( "<sb_date><![CDATA[" ).append( sbDate==null?"":sdf.format(sbDate) ).append( "]]></sb_date>\r\n" );
valueXmlString.append( "<stan_code__init><![CDATA[" ).append( stanCodeInit ).append( "]]></stan_code__init>\r\n" ); valueXmlString.append( "<stan_code__init><![CDATA[" ).append( stanCodeInit ).append( "]]></stan_code__init>\r\n" );
valueXmlString.append( "<ref_no><![CDATA[" ).append( genericUtility.getColumnValue("ref_no", dom) ).append( "]]></ref_no>\r\n" ); valueXmlString.append( "<ref_no><![CDATA[" ).append( genericUtility.getColumnValue("ref_no", dom) ).append( "]]></ref_no>\r\n" );
valueXmlString.append( "<ref_date><![CDATA[" ).append( checkDate(genericUtility.getColumnValue("ref_date", dom)) ).append( "]]></ref_date>\r\n" ); valueXmlString.append( "<ref_date><![CDATA[" ).append( checkDate(genericUtility.getColumnValue("ref_date", dom)) ).append( "]]></ref_date>\r\n" );
setNodeValue( dom,"stan_code__init" ,stanCodeInit ); setNodeValue( dom,"stan_code__init" ,stanCodeInit );
reStr = itemChanged(dom, dom1, dom2, objContext, "stan_code__init", editFlag, xtraParams); reStr = itemChanged(dom, dom1, dom2, objContext, "stan_code__init", editFlag, xtraParams);
pos = reStr.indexOf("<Detail1>"); pos = reStr.indexOf("<Detail1>");
reStr = reStr.substring(pos + 9); reStr = reStr.substring(pos + 9);
pos = reStr.indexOf("</Detail1>"); pos = reStr.indexOf("</Detail1>");
reStr = reStr.substring(0,pos); reStr = reStr.substring(0,pos);
valueXmlString.append(reStr); valueXmlString.append(reStr);
} }
else else
{ {
valueXmlString.append( "<tran_code protect = \"1\"><![CDATA[]]></tran_code>\r\n" ); valueXmlString.append( "<tran_code protect = \"1\"><![CDATA[]]></tran_code>\r\n" );
valueXmlString.append( "<lr_no protect = \"1\"><![CDATA[]]></lr_no>\r\n" ); valueXmlString.append( "<lr_no protect = \"1\"><![CDATA[]]></lr_no>\r\n" );
valueXmlString.append( "<lr_date protect = \"1\"><![CDATA[" ).append( checkDate(genericUtility.getColumnValue("lr_date", dom)) ).append( "]]></lr_date>\r\n" ); valueXmlString.append( "<lr_date protect = \"1\"><![CDATA[" ).append( checkDate(genericUtility.getColumnValue("lr_date", dom)) ).append( "]]></lr_date>\r\n" );
if(columnValue.equals("B")) if(columnValue.equals("B"))
{ {
valueXmlString.append( "<octroi_rcp_no protect = \"1\"><![CDATA[]]></octroi_rcp_no>\r\n" ); valueXmlString.append( "<octroi_rcp_no protect = \"1\"><![CDATA[]]></octroi_rcp_no>\r\n" );
valueXmlString.append( "<octroi_rcp_date protect = \"1\"><![CDATA[" ).append( checkDate(genericUtility.getColumnValue("octroi_rcp_date", dom)) ).append( "]]></octroi_rcp_date>\r\n" ); valueXmlString.append( "<octroi_rcp_date protect = \"1\"><![CDATA[" ).append( checkDate(genericUtility.getColumnValue("octroi_rcp_date", dom)) ).append( "]]></octroi_rcp_date>\r\n" );
} }
else else
{ {
valueXmlString.append( "<octroi_rcp_no protect = \"0\"><![CDATA[]]></octroi_rcp_no>\r\n" ); valueXmlString.append( "<octroi_rcp_no protect = \"0\"><![CDATA[]]></octroi_rcp_no>\r\n" );
valueXmlString.append( "<octroi_rcp_date protect = \"0\"><![CDATA[" ).append( checkDate(genericUtility.getColumnValue("octroi_rcp_date", dom)) ).append( "]]></octroi_rcp_date>\r\n" ); valueXmlString.append( "<octroi_rcp_date protect = \"0\"><![CDATA[" ).append( checkDate(genericUtility.getColumnValue("octroi_rcp_date", dom)) ).append( "]]></octroi_rcp_date>\r\n" );
} }
valueXmlString.append( "<transporter_tran_name><![CDATA[]]></transporter_tran_name>\r\n" ); valueXmlString.append( "<transporter_tran_name><![CDATA[]]></transporter_tran_name>\r\n" );
valueXmlString.append( "<desp_id><![CDATA[]]></desp_id>\r\n" ); valueXmlString.append( "<desp_id><![CDATA[]]></desp_id>\r\n" );
valueXmlString.append( "<eff_date protect = \"0\"><![CDATA[" ).append( checkDate(genericUtility.getColumnValue("eff_date", dom)) ).append( "]]></eff_date>\r\n" ); valueXmlString.append( "<eff_date protect = \"0\"><![CDATA[" ).append( checkDate(genericUtility.getColumnValue("eff_date", dom)) ).append( "]]></eff_date>\r\n" );
valueXmlString.append( "<ref_no protect = \"1\"><![CDATA[]]></ref_no>\r\n" ); valueXmlString.append( "<ref_no protect = \"1\"><![CDATA[]]></ref_no>\r\n" );
valueXmlString.append( "<ref_date protect = \"1\"><![CDATA[" ).append( checkDate(genericUtility.getColumnValue("ref_date", dom)) ).append( "]]></ref_date>\r\n" ); valueXmlString.append( "<ref_date protect = \"1\"><![CDATA[" ).append( checkDate(genericUtility.getColumnValue("ref_date", dom)) ).append( "]]></ref_date>\r\n" );
} }
} }
if( currentColumn.trim().equalsIgnoreCase( "tran_code" ) ) if( currentColumn.trim().equalsIgnoreCase( "tran_code" ) )
{ {
columnValue = genericUtility.getColumnValue("tran_code",dom); columnValue = genericUtility.getColumnValue("tran_code",dom);
sql = "select tran_name from transporter where tran_code = ? "; sql = "select tran_name from transporter where tran_code = ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, columnValue); pstmt.setString(1, columnValue);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if( rs.next() ) if( rs.next() )
{ {
descr = checkNull(rs.getString(1)); descr = checkNull(rs.getString(1));
} }
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
valueXmlString.append( "<transporter_tran_name><![CDATA[" ).append( descr ).append( "]]></transporter_tran_name>\r\n" ); valueXmlString.append( "<transporter_tran_name><![CDATA[" ).append( descr ).append( "]]></transporter_tran_name>\r\n" );
} }
if( currentColumn.trim().equalsIgnoreCase( "trans_mode" ) ) if( currentColumn.trim().equalsIgnoreCase( "trans_mode" ) )
{ {
columnValue = genericUtility.getColumnValue("trans_mode",dom); columnValue = genericUtility.getColumnValue("trans_mode",dom);
sql = "select descr from gencodes where fld_value = ? and fld_name = 'TRANS_MODE' and mod_name = 'W_INVOICE_AMENDMENT'"; sql = "select descr from gencodes where fld_value = ? and fld_name = 'TRANS_MODE' and mod_name = 'W_INVOICE_AMENDMENT'";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, columnValue); pstmt.setString(1, columnValue);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if( rs.next() ) if( rs.next() )
{ {
descr = checkNull(rs.getString(1)); descr = checkNull(rs.getString(1));
} }
else else
{ {
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
sql = "select descr from gencodes where fld_value = ? and fld_name = 'TRANS_MODE' and mod_name = 'X'"; sql = "select descr from gencodes where fld_value = ? and fld_name = 'TRANS_MODE' and mod_name = 'X'";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, columnValue); pstmt.setString(1, columnValue);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if( rs.next() ) if( rs.next() )
{ {
descr = checkNull(rs.getString(1)); descr = checkNull(rs.getString(1));
} }
} }
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
valueXmlString.append( "<trans_descr><![CDATA[" ).append( descr ).append( "]]></trans_descr>\r\n" ); valueXmlString.append( "<trans_descr><![CDATA[" ).append( descr ).append( "]]></trans_descr>\r\n" );
} }
if( currentColumn.trim().equalsIgnoreCase( "curr_code__frt" ) ) if( currentColumn.trim().equalsIgnoreCase( "curr_code__frt" ) )
{ {
columnValue = genericUtility.getColumnValue("curr_code__frt",dom); columnValue = genericUtility.getColumnValue("curr_code__frt",dom);
sql = "select std_exrt from currency where curr_code = ? "; sql = "select std_exrt from currency where curr_code = ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, columnValue); pstmt.setString(1, columnValue);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if( rs.next() ) if( rs.next() )
{ {
amt4 = rs.getDouble(1); amt4 = rs.getDouble(1);
} }
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
valueXmlString.append( "<exch_rate__frt><![CDATA[" ).append( amt4 ).append( "]]></exch_rate__frt>\r\n" ); valueXmlString.append( "<exch_rate__frt><![CDATA[" ).append( amt4 ).append( "]]></exch_rate__frt>\r\n" );
} }
if( currentColumn.trim().equalsIgnoreCase( "curr_code__ins" ) ) if( currentColumn.trim().equalsIgnoreCase( "curr_code__ins" ) )
{ {
columnValue = genericUtility.getColumnValue("curr_code__ins",dom); columnValue = genericUtility.getColumnValue("curr_code__ins",dom);
sql = "select std_exrt from currency where curr_code = ? "; sql = "select std_exrt from currency where curr_code = ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, columnValue); pstmt.setString(1, columnValue);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if( rs.next() ) if( rs.next() )
{ {
amt4 = rs.getDouble(1); amt4 = rs.getDouble(1);
} }
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
valueXmlString.append( "<exch_rate__ins><![CDATA[" ).append( amt4 ).append( "]]></exch_rate__ins>\r\n" ); valueXmlString.append( "<exch_rate__ins><![CDATA[" ).append( amt4 ).append( "]]></exch_rate__ins>\r\n" );
} }
if( currentColumn.trim().equalsIgnoreCase( "stan_code__init" ) ) if( currentColumn.trim().equalsIgnoreCase( "stan_code__init" ) )
{ {
columnValue = genericUtility.getColumnValue("stan_code__init",dom); columnValue = genericUtility.getColumnValue("stan_code__init",dom);
sql = "select descr from station where stan_code = ? "; sql = "select descr from station where stan_code = ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, columnValue); pstmt.setString(1, columnValue);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if( rs.next() ) if( rs.next() )
{ {
descr = checkNull(rs.getString(1)); descr = checkNull(rs.getString(1));
} }
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
valueXmlString.append( "<station_descr><![CDATA[" ).append( descr ).append( "]]></station_descr>\r\n" ); valueXmlString.append( "<station_descr><![CDATA[" ).append( descr ).append( "]]></station_descr>\r\n" );
} }
if( currentColumn.trim().equalsIgnoreCase( "shipment_id" ) ) if( currentColumn.trim().equalsIgnoreCase( "shipment_id" ) )
{ {
columnValue = genericUtility.getColumnValue("shipment_id",dom); columnValue = genericUtility.getColumnValue("shipment_id",dom);
if(columnValue != null && columnValue.trim().length() > 0) if(columnValue != null && columnValue.trim().length() > 0)
{ {
sql = "select lr_no,lr_date from shipment where shipment_id = ? "; sql = "select lr_no,lr_date from shipment where shipment_id = ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, columnValue); pstmt.setString(1, columnValue);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if( rs.next() ) if( rs.next() )
{ {
lrNo = checkNull(rs.getString(1)); lrNo = checkNull(rs.getString(1));
lrDate = rs.getDate(2); lrDate = rs.getDate(2);
} }
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
if(lrNo.trim().length() > 0) if(lrNo.trim().length() > 0)
{ {
valueXmlString.append( "<lr_no><![CDATA[" ).append( lrNo ).append( "]]></lr_no>\r\n" ); valueXmlString.append( "<lr_no><![CDATA[" ).append( lrNo ).append( "]]></lr_no>\r\n" );
} }
if(lrDate != null) if(lrDate != null)
{ {
valueXmlString.append( "<lr_date><![CDATA[" ).append( lrDate==null?"":sdf.format(lrDate) ).append( "]]></lr_date>\r\n" ); valueXmlString.append( "<lr_date><![CDATA[" ).append( lrDate==null?"":sdf.format(lrDate) ).append( "]]></lr_date>\r\n" );
} }
} }
else else
{ {
columnValue1 = genericUtility.getColumnValue("desp_id",dom); columnValue1 = genericUtility.getColumnValue("desp_id",dom);
if(columnValue1 != null && columnValue1.trim().length() > 0) if(columnValue1 != null && columnValue1.trim().length() > 0)
{ {
sql = "select lr_no, lr_date from despatch where desp_id = ? "; sql = "select lr_no, lr_date from despatch where desp_id = ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, columnValue1); pstmt.setString(1, columnValue1);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if( rs.next() ) if( rs.next() )
{ {
lrNo = checkNull(rs.getString(1)); lrNo = checkNull(rs.getString(1));
lrDate = rs.getDate(2); lrDate = rs.getDate(2);
} }
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
if(lrNo.trim().length() > 0) if(lrNo.trim().length() > 0)
{ {
valueXmlString.append( "<lr_no><![CDATA[" ).append( lrNo ).append( "]]></lr_no>\r\n" ); valueXmlString.append( "<lr_no><![CDATA[" ).append( lrNo ).append( "]]></lr_no>\r\n" );
} }
if(lrDate != null) if(lrDate != null)
{ {
valueXmlString.append( "<lr_date><![CDATA[" ).append( lrDate==null?"":sdf.format(lrDate) ).append( "]]></lr_date>\r\n" ); valueXmlString.append( "<lr_date><![CDATA[" ).append( lrDate==null?"":sdf.format(lrDate) ).append( "]]></lr_date>\r\n" );
} }
} }
} }
} }
valueXmlString.append( "</Detail1>\r\n" ); valueXmlString.append( "</Detail1>\r\n" );
break; break;
case 2: case 2:
{ {
parentNodeList = dom.getElementsByTagName("Detail2"); parentNodeList = dom.getElementsByTagName("Detail2");
parentNode = parentNodeList.item(0); parentNode = parentNodeList.item(0);
childNodeList = parentNode.getChildNodes(); childNodeList = parentNode.getChildNodes();
valueXmlString.append("<Detail2>"); valueXmlString.append("<Detail2>");
childNodeListLength = childNodeList.getLength(); childNodeListLength = childNodeList.getLength();
do do
{ {
childNode = childNodeList.item(ctr); childNode = childNodeList.item(ctr);
childNodeName = childNode.getNodeName(); childNodeName = childNode.getNodeName();
ctr ++; ctr ++;
}while(ctr < childNodeListLength && ! childNodeName.equals(currentColumn)); }while(ctr < childNodeListLength && ! childNodeName.equals(currentColumn));
if( currentColumn.trim().equalsIgnoreCase( "itm_default" ) ) if( currentColumn.trim().equalsIgnoreCase( "itm_default" ) )
{ {
columnValue = genericUtility.getColumnValue("tran_id", dom1); columnValue = genericUtility.getColumnValue("tran_id", dom1);
valueXmlString.append( "<tran_id><![CDATA[" ).append( checkNull(columnValue) ).append( "]]></tran_id>\r\n" ); valueXmlString.append( "<tran_id><![CDATA[" ).append( checkNull(columnValue) ).append( "]]></tran_id>\r\n" );
valueXmlString.append( "<status_date><![CDATA[" ).append( sdf.format(new java.util.Date()) ).append( "]]></status_date>\r\n" ); valueXmlString.append( "<status_date><![CDATA[" ).append( sdf.format(new java.util.Date()) ).append( "]]></status_date>\r\n" );
} }
valueXmlString.append( "</Detail2>\r\n" ); valueXmlString.append( "</Detail2>\r\n" );
System.out.println("------------------------COMPLETE DESCRIPTION-------------------"); System.out.println("------------------------COMPLETE DESCRIPTION-------------------");
break; break;
} }
} }
} }
catch(Exception e) catch(Exception e)
{ {
System.out.println( "Exception :invoice amendment :itemChanged(Document,String):" + e.getMessage() + ":" ); System.out.println( "Exception :invoice amendment :itemChanged(Document,String):" + e.getMessage() + ":" );
valueXmlString = valueXmlString.append( genericUtility.createErrorString( e ) ); valueXmlString = valueXmlString.append( genericUtility.createErrorString( e ) );
throw new ITMException(e); throw new ITMException(e);
} }
finally finally
{ {
try try
{ {
if( conn != null && ! conn.isClosed() ) if( conn != null && ! conn.isClosed() )
{ {
if( rs != null ) if( rs != null )
{ {
rs.close(); rs.close();
rs = null; rs = null;
} }
if( pstmt != null ) if( pstmt != null )
{ {
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
} }
conn.close(); conn.close();
} }
//System.out.println("------------------------INSIDE FINALLY-------------------"); //System.out.println("------------------------INSIDE FINALLY-------------------");
} }
catch(Exception e) catch(Exception e)
{ {
System.out.println( "Exception :invoice amendment:itemChanged :==>\n"+e.getMessage()); System.out.println( "Exception :invoice amendment:itemChanged :==>\n"+e.getMessage());
throw new ITMException(e); throw new ITMException(e);
} }
} }
valueXmlString.append( "</Root>\r\n" ); valueXmlString.append( "</Root>\r\n" );
System.out.println( "\n****ValueXmlString :" + valueXmlString.toString() + ":********" ); System.out.println( "\n****ValueXmlString :" + valueXmlString.toString() + ":********" );
return valueXmlString.toString(); return valueXmlString.toString();
} }
private static void setNodeValue( Document dom, String nodeName, String nodeVal ) throws Exception private static void setNodeValue( Document dom, String nodeName, String nodeVal ) throws Exception
{ {
Node tempNode = dom.getElementsByTagName( nodeName ).item(0); Node tempNode = dom.getElementsByTagName( nodeName ).item(0);
if( tempNode != null ) if( tempNode != null )
{ {
if( tempNode.getFirstChild() == null ) if( tempNode.getFirstChild() == null )
{ {
CDATASection cDataSection = dom.createCDATASection( nodeVal ); CDATASection cDataSection = dom.createCDATASection( nodeVal );
tempNode.appendChild( cDataSection ); tempNode.appendChild( cDataSection );
} }
else else
{ {
tempNode.getFirstChild().setNodeValue(nodeVal); tempNode.getFirstChild().setNodeValue(nodeVal);
} }
} }
tempNode = null; tempNode = null;
} }
private String checkNull( String input ) private String checkNull( String input )
{ {
if ( input == null ) if ( input == null )
{ {
input = ""; input = "";
} }
return input; return input;
} }
private String checkDate( String input ) throws ITMException private String checkDate( String input ) throws ITMException
{ {
try try
{ {
if(input != null && input.trim().length() > 0 && (! input.trim().equals("null"))) if(input != null && input.trim().length() > 0 && (! input.trim().equals("null")))
{ {
input = GenericUtility.getInstance().getValidDateString(input, getApplDateFormat()); input = GenericUtility.getInstance().getValidDateString(input, getApplDateFormat());
} }
else else
input = ""; input = "";
} }
catch (Exception e) catch (Exception e)
{ {
input = ""; input = "";
System.out.println("Error in date format at 1283"+e.getMessage()); System.out.println("Error in date format at 1283"+e.getMessage());
e.printStackTrace(); e.printStackTrace();
throw new ITMException(e); throw new ITMException(e);
} }
return input; return input;
} }
} }
\ No newline at end of file
/******************************************************** /********************************************************
Title : InvoiceAmendmentICLocal Title : InvoiceAmendmentICLocal
Date : 08/06/2012 Date : 08/06/2012
Developer: Mahesh Patidar Developer: Mahesh Patidar
********************************************************/ ********************************************************/
package ibase.webitm.ejb.wms; package ibase.webitm.ejb.wms;
import ibase.webitm.ejb.ValidatorLocal; import ibase.webitm.ejb.ValidatorLocal;
import ibase.webitm.utility.ITMException; import ibase.webitm.utility.ITMException;
import java.rmi.RemoteException; import java.rmi.RemoteException;
import org.w3c.dom.Document; import org.w3c.dom.Document;
@javax.ejb.Local @javax.ejb.Local
public interface InvoiceAmendmentICLocal extends ValidatorLocal public interface InvoiceAmendmentICLocal extends ValidatorLocal
{ {
public String wfValData() throws RemoteException,ITMException; public String wfValData() throws RemoteException,ITMException;
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;
public String wfValData(Document dom, Document dom1,Document dom2, String objContext, String editFlag, String xtraParams) throws RemoteException,ITMException; public String wfValData(Document dom, Document dom1,Document dom2, String objContext, String editFlag, String xtraParams) throws RemoteException,ITMException;
public String itemChanged() throws RemoteException,ITMException; public String itemChanged() throws RemoteException,ITMException;
public String itemChanged(String xmlString, String xmlString1,String xmlString2, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException,ITMException; public String itemChanged(String xmlString, String xmlString1,String xmlString2, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException,ITMException;
public String itemChanged(Document dom, Document dom1, Document dom2, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException,ITMException; public String itemChanged(Document dom, Document dom1, Document dom2, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException,ITMException;
} }
/******************************************************** /********************************************************
Title : InvoiceAmendmentICRemote Title : InvoiceAmendmentICRemote
Date : 08/06/2012 Date : 08/06/2012
Developer: Mahesh Patidar Developer: Mahesh Patidar
********************************************************/ ********************************************************/
package ibase.webitm.ejb.wms; package ibase.webitm.ejb.wms;
import ibase.webitm.ejb.ValidatorRemote; import ibase.webitm.ejb.ValidatorRemote;
import ibase.webitm.utility.ITMException; import ibase.webitm.utility.ITMException;
import java.rmi.RemoteException; import java.rmi.RemoteException;
import org.w3c.dom.Document; import org.w3c.dom.Document;
@javax.ejb.Remote @javax.ejb.Remote
public interface InvoiceAmendmentICRemote extends ValidatorRemote public interface InvoiceAmendmentICRemote extends ValidatorRemote
{ {
public String wfValData() throws RemoteException,ITMException; public String wfValData() throws RemoteException,ITMException;
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;
public String wfValData(Document dom, Document dom1,Document dom2, String objContext, String editFlag, String xtraParams) throws RemoteException,ITMException; public String wfValData(Document dom, Document dom1,Document dom2, String objContext, String editFlag, String xtraParams) throws RemoteException,ITMException;
public String itemChanged() throws RemoteException,ITMException; public String itemChanged() throws RemoteException,ITMException;
public String itemChanged(String xmlString, String xmlString1,String xmlString2, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException,ITMException; public String itemChanged(String xmlString, String xmlString1,String xmlString2, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException,ITMException;
public String itemChanged(Document dom, Document dom1, Document dom2, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException,ITMException; public String itemChanged(Document dom, Document dom1, Document dom2, String objContext, String currentColumn, String editFlag, String xtraParams) throws RemoteException,ITMException;
} }
[Dolphin]
Timestamp=2012,12,12,14,0,33
ViewMode=1
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