Commit b36bd2ab authored by agaikwad's avatar agaikwad

Merge updated code

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@139922 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 44a3b8fa
...@@ -57,7 +57,7 @@ public class RcpAdvTaxCalulationProIC extends ValidatorEJB implements RcpAdvTaxC ...@@ -57,7 +57,7 @@ public class RcpAdvTaxCalulationProIC extends ValidatorEJB implements RcpAdvTaxC
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
ResultSet rs = null; ResultSet rs = null;
String sql=""; String sql="";
ConnDriver connDriver = new ConnDriver(); ConnDriver connDriver = null;
java.util.Date currDate = new java.util.Date(System.currentTimeMillis()); java.util.Date currDate = new java.util.Date(System.currentTimeMillis());
String dateStr = ""; String dateStr = "";
String descr = "",currcode = "",currdescr=""; String descr = "",currcode = "",currdescr="";
...@@ -68,6 +68,10 @@ public class RcpAdvTaxCalulationProIC extends ValidatorEJB implements RcpAdvTaxC ...@@ -68,6 +68,10 @@ public class RcpAdvTaxCalulationProIC extends ValidatorEJB implements RcpAdvTaxC
E12GenericUtility genericUtility = new E12GenericUtility(); E12GenericUtility genericUtility = new E12GenericUtility();
try{ try{
conn = getConnection(); conn = getConnection();
/*connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM");
conn.setAutoCommit(false);
connDriver = null;*/
connDriver = null; connDriver = null;
FinCommon finCommon = new FinCommon(); FinCommon finCommon = new FinCommon();
SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getApplDateFormat()); SimpleDateFormat sdf = new SimpleDateFormat(genericUtility.getApplDateFormat());
......
...@@ -82,6 +82,7 @@ public class RcpAdvTaxcalcConf extends ActionHandlerEJB implements RcpAdvTaxcalc ...@@ -82,6 +82,7 @@ public class RcpAdvTaxcalcConf extends ActionHandlerEJB implements RcpAdvTaxcalc
{ {
connDriver = new ConnDriver(); connDriver = new ConnDriver();
//conn = connDriver.getConnectDB("DriverITM"); //conn = connDriver.getConnectDB("DriverITM");
conn = getConnection(); conn = getConnection();
System.out.println("Connection[" + conn + "]"); System.out.println("Connection[" + conn + "]");
connDriver = null; connDriver = null;
......
...@@ -94,10 +94,15 @@ public class RcpAdvTaxcalcIC extends ValidatorEJB ...@@ -94,10 +94,15 @@ public class RcpAdvTaxcalcIC extends ValidatorEJB
ResultSet rs = null; ResultSet rs = null;
E12GenericUtility genericUtility = new E12GenericUtility(); E12GenericUtility genericUtility = new E12GenericUtility();
StringBuffer errStringXml = new StringBuffer("<?xml version = \"1.0\"?> \r\n <Root> <Errors>"); StringBuffer errStringXml = new StringBuffer("<?xml version = \"1.0\"?> \r\n <Root> <Errors>");
ConnDriver connDriver =null;
try try
{ {
conn = getConnection(); conn = getConnection();
/* connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM");
conn.setAutoCommit(false);
connDriver = null;*/
userId = getValueFromXTRA_PARAMS(xtraParams, "loginCode"); userId = getValueFromXTRA_PARAMS(xtraParams, "loginCode");
if(objContext != null && objContext.trim().length() > 0) if(objContext != null && objContext.trim().length() > 0)
{ {
...@@ -660,6 +665,7 @@ public class RcpAdvTaxcalcIC extends ValidatorEJB ...@@ -660,6 +665,7 @@ public class RcpAdvTaxcalcIC extends ValidatorEJB
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
ResultSet rs = null ; ResultSet rs = null ;
E12GenericUtility genericUtility = new E12GenericUtility(); E12GenericUtility genericUtility = new E12GenericUtility();
ConnDriver connDriver =null;
//Added //Added
System.out.println("Dom"+dom); System.out.println("Dom"+dom);
System.out.println( "dom1"+dom1); System.out.println( "dom1"+dom1);
...@@ -669,6 +675,11 @@ public class RcpAdvTaxcalcIC extends ValidatorEJB ...@@ -669,6 +675,11 @@ public class RcpAdvTaxcalcIC extends ValidatorEJB
{ {
conn = getConnection(); conn = getConnection();
/*connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM");
conn.setAutoCommit(false);
connDriver = null;*/
this.finCommon = new FinCommon(); this.finCommon = new FinCommon();
if ((objContext != null) && (objContext.trim().length() > 0)) if ((objContext != null) && (objContext.trim().length() > 0))
{ {
......
...@@ -2,15 +2,16 @@ ...@@ -2,15 +2,16 @@
Button Name : Process Button Name : Process
*/ */
package ibase.webitm.ejb.gstclient; //package ibase.webitm.ejb.fin.adv;
package ibase.webitm.ejb.gstclient;
import java.rmi.RemoteException; import java.rmi.RemoteException;
import java.text.DateFormat;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
import java.sql.*; import java.sql.*;
import org.w3c.dom.*; import org.w3c.dom.*;
import javax.ejb.*; import javax.ejb.*;
import ibase.utility.E12GenericUtility; import ibase.utility.E12GenericUtility;
...@@ -27,7 +28,6 @@ import javax.naming.InitialContext; ...@@ -27,7 +28,6 @@ import javax.naming.InitialContext;
public class RcpAdvTaxcalcPrc extends ProcessEJB implements RcpAdvTaxcalcPrcLocal,RcpAdvTaxcalcPrcRemote //SessionBean public class RcpAdvTaxcalcPrc extends ProcessEJB implements RcpAdvTaxcalcPrcLocal,RcpAdvTaxcalcPrcRemote //SessionBean
{ {
ITMDBAccessEJB itmDBAccessEJB = new ITMDBAccessEJB(); ITMDBAccessEJB itmDBAccessEJB = new ITMDBAccessEJB();
E12GenericUtility genericUtility = new E12GenericUtility();
public String process() throws RemoteException,ITMException public String process() throws RemoteException,ITMException
{ {
return ""; return "";
...@@ -75,7 +75,7 @@ public String process(Document dom,Document dom1,String windowName,String xtraPa ...@@ -75,7 +75,7 @@ public String process(Document dom,Document dom1,String windowName,String xtraPa
double totAmt=0,totAmtrevAdj=0,totAmtrevAdjcnt=0,repadvAdjamt=0; double totAmt=0,totAmtrevAdj=0,totAmtrevAdjcnt=0,repadvAdjamt=0;
Timestamp dateFrom = null,dateTo = null; Timestamp dateFrom = null,dateTo = null;
int cntsiteCode = 0,cnttaxClass=0,cnttaxChap = 0,cnttaxEnv = 0,cntcurrCode=0; int cntsiteCode = 0,cnttaxClass=0,cnttaxChap = 0,cnttaxEnv = 0,cntcurrCode=0;
ConnDriver connDriver = new ConnDriver(); ConnDriver connDriver = null;
SimpleDateFormat sdf = null; SimpleDateFormat sdf = null;
StringBuffer xmlBuff = null; StringBuffer xmlBuff = null;
RcpAdvTaxcalcConf Conf = null; RcpAdvTaxcalcConf Conf = null;
...@@ -91,7 +91,10 @@ public String process(Document dom,Document dom1,String windowName,String xtraPa ...@@ -91,7 +91,10 @@ public String process(Document dom,Document dom1,String windowName,String xtraPa
String finEntity=""; String finEntity="";
try try
{ Conf = new RcpAdvTaxcalcConf(); { Conf = new RcpAdvTaxcalcConf();
//conn = connDriver.getConnectDB("DriverITM"); /* connDriver = new ConnDriver();
conn = connDriver.getConnectDB("DriverITM");
conn.setAutoCommit(false);
connDriver = null;*/
conn = getConnection(); conn = getConnection();
sdf = new SimpleDateFormat(genericUtility.getApplDateFormat()); sdf = new SimpleDateFormat(genericUtility.getApplDateFormat());
...@@ -330,7 +333,7 @@ public String process(Document dom,Document dom1,String windowName,String xtraPa ...@@ -330,7 +333,7 @@ public String process(Document dom,Document dom1,String windowName,String xtraPa
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
String stateCodeCust="",stateCodeSite=""; String stateCodeCust="",stateCodeSite="",receivablesSiteCode="";
Object date = null; Object date = null;
sdf = new SimpleDateFormat(genericUtility.getApplDateFormat()); sdf = new SimpleDateFormat(genericUtility.getApplDateFormat());
date = sdf.parse(frDate); date = sdf.parse(frDate);
...@@ -353,7 +356,7 @@ public String process(Document dom,Document dom1,String windowName,String xtraPa ...@@ -353,7 +356,7 @@ public String process(Document dom,Document dom1,String windowName,String xtraPa
String trandate = simpleDateFormat.format( prvDate ); String trandate = simpleDateFormat.format( prvDate );
String trandate1 = genericUtility.getValidDateString(trandate,genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat()); String trandate1 = genericUtility.getValidDateString(trandate,genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat());
frmDatePrdTemp = java.sql.Timestamp.valueOf(trandate1 + " 00:00:00.00"); frmDatePrdTemp = java.sql.Timestamp.valueOf(trandate1 + " 00:00:00.00");
System.out.println("trandate:"+trandate); System.out.println("frmDatePrdTemp:"+frmDatePrdTemp);
sql = "SELECT FR_DATE FROM PERIOD WHERE ? BETWEEN FR_DATE AND TO_DATE " ; sql = "SELECT FR_DATE FROM PERIOD WHERE ? BETWEEN FR_DATE AND TO_DATE " ;
System.out.println("sqlCnt : [" +sql+ "]"); System.out.println("sqlCnt : [" +sql+ "]");
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
...@@ -384,8 +387,8 @@ public String process(Document dom,Document dom1,String windowName,String xtraPa ...@@ -384,8 +387,8 @@ public String process(Document dom,Document dom1,String windowName,String xtraPa
rs = null; rs = null;
sql=" select count(1) from ADV_RCP_TAX where confirmed='N' and tran_date between ? and ?"; sql=" select count(1) from ADV_RCP_TAX where confirmed='N' and tran_date between ? and ?";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setTimestamp(1, dateFrom); pstmt.setTimestamp(1, frmDatePrd);
pstmt.setTimestamp(2, dateTo); pstmt.setTimestamp(2, todatePrd);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if(rs.next()) if(rs.next())
{ {
...@@ -403,17 +406,17 @@ public String process(Document dom,Document dom1,String windowName,String xtraPa ...@@ -403,17 +406,17 @@ public String process(Document dom,Document dom1,String windowName,String xtraPa
} }
else else
{ {
sql="select tot_amt,ref_no,cust_code,ref_date from receivables where ref_date > = ? and ref_date <= ? and site_code=? and tran_ser=? " + HashMap<String,ArrayList<HashMap<String,String>>> siteCodeWiseHMap= new HashMap();
sql="select tot_amt,ref_no,cust_code,ref_date ,site_code from receivables where ref_date >=? and ref_date <=? and tran_ser=? " +
"and ref_no NOT IN( select ADV_RCP_TAX_DET.ref_id " + "and ref_no NOT IN( select ADV_RCP_TAX_DET.ref_id " +
"from ADV_RCP_TAX_DET ,ADV_RCP_TAX where ADV_RCP_TAX_DET.tran_id = ADV_RCP_TAX.tran_id " + "from ADV_RCP_TAX_DET ,ADV_RCP_TAX where ADV_RCP_TAX_DET.tran_id = ADV_RCP_TAX.tran_id " +
"and ADV_RCP_TAX.confirmed = 'Y' and (ADV_RCP_TAX.tran_date between ? and ?) and ADV_RCP_TAX_DET.ref_type = '1' )"; "and ADV_RCP_TAX.confirmed = 'Y' and (ADV_RCP_TAX.tran_date between ? and ?) and ADV_RCP_TAX_DET.ref_type = '1' )";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setTimestamp(1, dateFrom); pstmt.setTimestamp(1, dateFrom);
pstmt.setTimestamp(2, dateTo); pstmt.setTimestamp(2, dateTo);
pstmt.setString(3, siteCode); pstmt.setString(3,refSer);
pstmt.setString(4,refSer); pstmt.setTimestamp(4, dateFrom);
pstmt.setTimestamp(5, dateFrom); pstmt.setTimestamp(5, dateTo);
pstmt.setTimestamp(6, dateTo);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
System.out.println("rs["+rs+"]"); System.out.println("rs["+rs+"]");
while(rs.next()) while(rs.next())
...@@ -422,6 +425,7 @@ public String process(Document dom,Document dom1,String windowName,String xtraPa ...@@ -422,6 +425,7 @@ public String process(Document dom,Document dom1,String windowName,String xtraPa
refNorecv=rs.getString(2); refNorecv=rs.getString(2);
custCode=rs.getString(3); custCode=rs.getString(3);
refDate=rs.getTimestamp(4); refDate=rs.getTimestamp(4);
receivablesSiteCode= rs.getString(5);
HashMap receivablesMap = new HashMap(); HashMap receivablesMap = new HashMap();
receivablesMap.put("cust_code",custCode); receivablesMap.put("cust_code",custCode);
receivablesMap.put("ref_type","1"); receivablesMap.put("ref_type","1");
...@@ -429,6 +433,7 @@ public String process(Document dom,Document dom1,String windowName,String xtraPa ...@@ -429,6 +433,7 @@ public String process(Document dom,Document dom1,String windowName,String xtraPa
receivablesMap.put("ref_id",refNorecv); receivablesMap.put("ref_id",refNorecv);
receivablesMap.put("ref_date",refDate); receivablesMap.put("ref_date",refDate);
receivablesMap.put("amount",totAmt); receivablesMap.put("amount",totAmt);
receivablesMap.put("ref_id__adv",""); receivablesMap.put("ref_id__adv","");
//receivablesMap.put("date_adv",""); //receivablesMap.put("date_adv","");
receivablesMap.put("tax_class",taxClass); receivablesMap.put("tax_class",taxClass);
...@@ -447,7 +452,7 @@ public String process(Document dom,Document dom1,String windowName,String xtraPa ...@@ -447,7 +452,7 @@ public String process(Document dom,Document dom1,String windowName,String xtraPa
pstmt1=null; pstmt1=null;
sql1="select stan_code from site where site_code= ?"; sql1="select stan_code from site where site_code= ?";
pstmt1 = conn.prepareStatement(sql1); pstmt1 = conn.prepareStatement(sql1);
pstmt1.setString(1,siteCode); pstmt1.setString(1,receivablesSiteCode);
rs1 = pstmt1.executeQuery(); rs1 = pstmt1.executeQuery();
if(rs1.next()) if(rs1.next())
{ {
...@@ -467,22 +472,38 @@ public String process(Document dom,Document dom1,String windowName,String xtraPa ...@@ -467,22 +472,38 @@ public String process(Document dom,Document dom1,String windowName,String xtraPa
{ {
receivablesMap.put("tax_env",taxEnv); receivablesMap.put("tax_env",taxEnv);
} }
receivablesMap.put("site_code",receivablesSiteCode);
//receivableslList.add(receivablesMap);
if(siteCodeWiseHMap.containsKey(receivablesSiteCode))
{
ArrayList tempList=siteCodeWiseHMap.get(receivablesSiteCode);
tempList.add(receivablesMap);
siteCodeWiseHMap.put(receivablesSiteCode, tempList);
}
else
{
receivableslList=new ArrayList();
receivableslList.add(receivablesMap); receivableslList.add(receivablesMap);
System.out.println("@@@@@@@@@@@@@@@@ List1["+receivableslList+"]"); siteCodeWiseHMap.put(receivablesSiteCode, receivableslList);
System.out.println("@@@@@@@@@@@@@@@@ Size[List1]["+receivableslList.size()+"]"); }
System.out.println("@@@@@@@@@@@@@@@@ siteCodeWiseHMap1["+siteCodeWiseHMap+"]");
System.out.println("@@@@@@@@@@@@@@@@ Size[List1]["+siteCodeWiseHMap.size()+"]");
} }
rs.close(); rs.close();
rs=null; rs=null;
pstmt.close(); pstmt.close();
pstmt=null; pstmt=null;
String refSerAdj="",custCodei="",refNo="",refNoAdj=""; String refSerAdj="",custCodei="",refNo="",refNoAdj="",siteCodeAdj="";
double netAmt=0; double netAmt=0;
String refseries="R-ADV"; String refseries="R-ADV";
String refseriesAdj="S-INV"; String refseriesAdj="S-INV";
Timestamp tranDatei= null; Timestamp tranDatei= null;
sql1="select r.ref_ser_adj ,r.ref_no_adj,r.adj_amt,i.cust_code,i.tran_date ,r.ref_no from receivables_adj r ,invoice i where r.ref_no_adj=i.invoice_id " + sql1="select r.ref_ser_adj ,r.ref_no_adj,r.adj_amt,i.cust_code,i.tran_date ,r.ref_no ,i.site_code from receivables_adj r ,invoice i where r.ref_no_adj=i.invoice_id " +
"and r.ref_ser= ? and r.ref_ser_adj= ? and i.tran_date > =? and i.tran_date < =? and i.confirmed= 'Y' " + "and r.ref_ser=? and r.ref_ser_adj=? and i.tran_date >=? and i.tran_date <=? and i.confirmed= 'Y' " +
"and r.ref_no_adj NOT IN( select ADV_RCP_TAX_DET.ref_id " + "and r.ref_no_adj NOT IN( select ADV_RCP_TAX_DET.ref_id " +
"from ADV_RCP_TAX_DET ,ADV_RCP_TAX where ADV_RCP_TAX_DET.tran_id = ADV_RCP_TAX.tran_id " + "from ADV_RCP_TAX_DET ,ADV_RCP_TAX where ADV_RCP_TAX_DET.tran_id = ADV_RCP_TAX.tran_id " +
"and ADV_RCP_TAX.confirmed = 'Y' and (ADV_RCP_TAX.tran_date between ? and ?) and ADV_RCP_TAX_DET.ref_type = '2' )"; "and ADV_RCP_TAX.confirmed = 'Y' and (ADV_RCP_TAX.tran_date between ? and ?) and ADV_RCP_TAX_DET.ref_type = '2' )";
...@@ -502,6 +523,7 @@ public String process(Document dom,Document dom1,String windowName,String xtraPa ...@@ -502,6 +523,7 @@ public String process(Document dom,Document dom1,String windowName,String xtraPa
custCodei=rs1.getString(4); custCodei=rs1.getString(4);
tranDatei=rs1.getTimestamp(5); tranDatei=rs1.getTimestamp(5);
refNo=rs1.getString(6); refNo=rs1.getString(6);
siteCodeAdj=rs1.getString(7);
System.out.println("refSerAdj["+refSerAdj+"] refNoAdj ["+refNoAdj+"] netAmt ["+netAmt+"] custCodei["+custCodei+"] tranDatei ["+tranDatei+"]"); System.out.println("refSerAdj["+refSerAdj+"] refNoAdj ["+refNoAdj+"] netAmt ["+netAmt+"] custCodei["+custCodei+"] tranDatei ["+tranDatei+"]");
System.out.println("refNo["+refNo+"]"); System.out.println("refNo["+refNo+"]");
HashMap receivableadj = new HashMap(); HashMap receivableadj = new HashMap();
...@@ -529,7 +551,7 @@ public String process(Document dom,Document dom1,String windowName,String xtraPa ...@@ -529,7 +551,7 @@ public String process(Document dom,Document dom1,String windowName,String xtraPa
pstmt2=null; pstmt2=null;
sql2="select stan_code from site where site_code= ?"; sql2="select stan_code from site where site_code= ?";
pstmt2 = conn.prepareStatement(sql2); pstmt2 = conn.prepareStatement(sql2);
pstmt2.setString(1,siteCode); pstmt2.setString(1,siteCodeAdj);
rs2 = pstmt2.executeQuery(); rs2 = pstmt2.executeQuery();
if(rs2.next()) if(rs2.next())
{ {
...@@ -548,7 +570,21 @@ public String process(Document dom,Document dom1,String windowName,String xtraPa ...@@ -548,7 +570,21 @@ public String process(Document dom,Document dom1,String windowName,String xtraPa
receivableadj.put("tax_env",taxEnv); receivableadj.put("tax_env",taxEnv);
} }
System.out.println("@@@@@@@@@@@@@@@@receivableadj["+receivableadj+"]"); System.out.println("@@@@@@@@@@@@@@@@receivableadj["+receivableadj+"]");
receivableadj.put("site_code",siteCodeAdj);
// receivableslList.add(receivableadj);
if(siteCodeWiseHMap.containsKey(siteCodeAdj))
{
ArrayList tempList=siteCodeWiseHMap.get(siteCodeAdj);
tempList.add(receivableadj);
siteCodeWiseHMap.put(siteCodeAdj, tempList);
}
else
{
receivableslList=new ArrayList();
receivableslList.add(receivableadj); receivableslList.add(receivableadj);
siteCodeWiseHMap.put(siteCodeAdj, receivableslList);
}
refSerAdj=""; refSerAdj="";
refNoAdj=""; refNoAdj="";
netAmt= 0; netAmt= 0;
...@@ -568,13 +604,13 @@ public String process(Document dom,Document dom1,String windowName,String xtraPa ...@@ -568,13 +604,13 @@ public String process(Document dom,Document dom1,String windowName,String xtraPa
pstmt1.close(); pstmt1.close();
pstmt1=null; pstmt1=null;
System.out.println("2 List["+receivableslList+"]"); System.out.println("2 List["+siteCodeWiseHMap+"]");
System.out.println("2 List Size["+receivableslList.size()+"]"); System.out.println("2 List Size["+siteCodeWiseHMap.size()+"]");
double repadvTotamt=0; double repadvTotamt=0;
String reciptTranId="",rcpAdvCustCOde="",rcpAdvrefType="2",rcpadvRefno=""; String reciptTranId="",rcpAdvCustCOde="",rcpAdvrefType="2",rcpadvRefno="",rcpadvSiteCode="";
Timestamp rcpAdvrefDate=null; Timestamp rcpAdvrefDate=null;
sql="select rcpadv.adj_amt,receipt.cust_code,receipt.tran_date,receipt.tran_id,rcpadv.ref_no from rcpadv ,receipt " + sql="select rcpadv.adj_amt,receipt.cust_code,receipt.tran_date,receipt.tran_id,rcpadv.ref_no ,receipt.site_code from rcpadv ,receipt " +
"where receipt.tran_id=rcpadv.tran_id and receipt.tran_date >= ? and receipt.tran_date <= ? and rcpadv.ref_ser=? and " + "where receipt.tran_id=rcpadv.tran_id and receipt.tran_date >=? and receipt.tran_date <=? and rcpadv.ref_ser=? and " +
" receipt.tran_id NOT IN( select ADV_RCP_TAX_DET.ref_id " + " receipt.tran_id NOT IN( select ADV_RCP_TAX_DET.ref_id " +
"from ADV_RCP_TAX_DET ,ADV_RCP_TAX where ADV_RCP_TAX_DET.tran_id = ADV_RCP_TAX.tran_id " + "from ADV_RCP_TAX_DET ,ADV_RCP_TAX where ADV_RCP_TAX_DET.tran_id = ADV_RCP_TAX.tran_id " +
"and ADV_RCP_TAX.confirmed = 'Y' and (ADV_RCP_TAX.tran_date between ? and ?) and ADV_RCP_TAX_DET.ref_type = '2' )"; "and ADV_RCP_TAX.confirmed = 'Y' and (ADV_RCP_TAX.tran_date between ? and ?) and ADV_RCP_TAX_DET.ref_type = '2' )";
...@@ -593,6 +629,7 @@ public String process(Document dom,Document dom1,String windowName,String xtraPa ...@@ -593,6 +629,7 @@ public String process(Document dom,Document dom1,String windowName,String xtraPa
rcpAdvrefDate=rs.getTimestamp(3); rcpAdvrefDate=rs.getTimestamp(3);
reciptTranId=rs.getString(4); reciptTranId=rs.getString(4);
rcpadvRefno=rs.getString(5); rcpadvRefno=rs.getString(5);
rcpadvSiteCode=rs.getString(6);
System.out.println("repadvTotamt["+repadvTotamt+"] reciptTranId ["+reciptTranId+"] repadvAdjamt ["+repadvAdjamt+"] rcpAdvCustCOde["+rcpAdvCustCOde+"] rcpAdvrefDate ["+rcpAdvrefDate+"]"); System.out.println("repadvTotamt["+repadvTotamt+"] reciptTranId ["+reciptTranId+"] repadvAdjamt ["+repadvAdjamt+"] rcpAdvCustCOde["+rcpAdvCustCOde+"] rcpAdvrefDate ["+rcpAdvrefDate+"]");
HashMap rcpAdv = new HashMap(); HashMap rcpAdv = new HashMap();
...@@ -638,10 +675,27 @@ public String process(Document dom,Document dom1,String windowName,String xtraPa ...@@ -638,10 +675,27 @@ public String process(Document dom,Document dom1,String windowName,String xtraPa
{ {
rcpAdv.put("tax_env",taxEnv); rcpAdv.put("tax_env",taxEnv);
} }
rcpAdv.put("site_code",rcpadvSiteCode);
//rcpadvSiteCode
if(siteCodeWiseHMap.containsKey(rcpadvSiteCode))
{
ArrayList tempList=siteCodeWiseHMap.get(rcpadvSiteCode);
tempList.add(rcpAdv);
siteCodeWiseHMap.put(rcpadvSiteCode, tempList);
}
else
{
receivableslList=new ArrayList();
receivableslList.add(rcpAdv); receivableslList.add(rcpAdv);
System.out.println("@@@@@@@@@@@@@@@@ List3["+receivableslList+"]"); siteCodeWiseHMap.put(rcpadvSiteCode, receivableslList);
System.out.println("@@@@@@@@@@@@@@@@ List3 Size["+receivableslList.size()+"]"); }
//receivableslList.add(rcpAdv);
System.out.println("@@@@@@@@@@@@@@@@ List3["+siteCodeWiseHMap+"]");
System.out.println("@@@@@@@@@@@@@@@@ List3 Size["+siteCodeWiseHMap.size()+"]");
repadvAdjamt=0; repadvAdjamt=0;
rcpAdvCustCOde=""; rcpAdvCustCOde="";
rcpAdvrefDate=null; rcpAdvrefDate=null;
...@@ -654,11 +708,11 @@ public String process(Document dom,Document dom1,String windowName,String xtraPa ...@@ -654,11 +708,11 @@ public String process(Document dom,Document dom1,String windowName,String xtraPa
pstmt.close(); pstmt.close();
pstmt=null; pstmt=null;
//rcpdet //rcpdet
String rcpDetrefNo="",rcpDetCustCOde="",rcpAdvrefNo="",rcpTranId=""; String rcpDetrefNo="",rcpDetCustCOde="",rcpAdvrefNo="",rcpTranId="",rcpSiteCode="";
double rcpDetrcpAmt=0; double rcpDetrcpAmt=0;
String confTemp="N"; String confTemp="N";
Timestamp rcpDetrefDate=null; Timestamp rcpDetrefDate=null;
sql="select rcpdet.ref_no,rcpdet.rcp_amt,receipt.cust_code,receipt.tran_date,receipt.tran_id from rcpdet,receipt where receipt.tran_id=rcpdet.tran_id and receipt.tran_date >= ? and receipt.tran_date <= ? and rcpdet.ref_ser= ? and " + sql="select rcpdet.ref_no,rcpdet.rcp_amt,receipt.cust_code,receipt.tran_date,receipt.tran_id ,receipt.site_code from rcpdet,receipt where receipt.tran_id=rcpdet.tran_id and receipt.tran_date >=? and receipt.tran_date <=? and rcpdet.ref_ser=? and " +
" receipt.tran_id NOT IN( select ADV_RCP_TAX_DET.ref_id " + " receipt.tran_id NOT IN( select ADV_RCP_TAX_DET.ref_id " +
"from ADV_RCP_TAX_DET ,ADV_RCP_TAX where ADV_RCP_TAX_DET.tran_id = ADV_RCP_TAX.tran_id " + "from ADV_RCP_TAX_DET ,ADV_RCP_TAX where ADV_RCP_TAX_DET.tran_id = ADV_RCP_TAX.tran_id " +
"and ADV_RCP_TAX.confirmed = 'Y' and (ADV_RCP_TAX.tran_date between ? and ?) and ADV_RCP_TAX_DET.ref_type = '2' )"; "and ADV_RCP_TAX.confirmed = 'Y' and (ADV_RCP_TAX.tran_date between ? and ?) and ADV_RCP_TAX_DET.ref_type = '2' )";
...@@ -676,6 +730,7 @@ public String process(Document dom,Document dom1,String windowName,String xtraPa ...@@ -676,6 +730,7 @@ public String process(Document dom,Document dom1,String windowName,String xtraPa
rcpDetCustCOde=rs.getString(3); rcpDetCustCOde=rs.getString(3);
rcpDetrefDate=rs.getTimestamp(4); rcpDetrefDate=rs.getTimestamp(4);
rcpTranId=rs.getString(5); rcpTranId=rs.getString(5);
rcpSiteCode=rs.getString(6);
System.out.println("rcpDetrcpAmt["+rcpDetrcpAmt+"] rcpDetrefNo ["+rcpDetrefNo+"] rcpDetCustCOde["+rcpDetCustCOde+"] rcpDetrefDate ["+rcpDetrefDate+"]"); System.out.println("rcpDetrcpAmt["+rcpDetrcpAmt+"] rcpDetrefNo ["+rcpDetrefNo+"] rcpDetCustCOde["+rcpDetCustCOde+"] rcpDetrefDate ["+rcpDetrefDate+"]");
HashMap rcpDet = new HashMap(); HashMap rcpDet = new HashMap();
rcpDet.put("cust_code",rcpDetCustCOde); rcpDet.put("cust_code",rcpDetCustCOde);
...@@ -701,7 +756,7 @@ public String process(Document dom,Document dom1,String windowName,String xtraPa ...@@ -701,7 +756,7 @@ public String process(Document dom,Document dom1,String windowName,String xtraPa
pstmt1=null; pstmt1=null;
sql1="select stan_code from site where site_code= ?"; sql1="select stan_code from site where site_code= ?";
pstmt1 = conn.prepareStatement(sql1); pstmt1 = conn.prepareStatement(sql1);
pstmt1.setString(1,siteCode); pstmt1.setString(1,rcpSiteCode);
rs1 = pstmt1.executeQuery(); rs1 = pstmt1.executeQuery();
if(rs1.next()) if(rs1.next())
{ {
...@@ -720,7 +775,21 @@ public String process(Document dom,Document dom1,String windowName,String xtraPa ...@@ -720,7 +775,21 @@ public String process(Document dom,Document dom1,String windowName,String xtraPa
rcpDet.put("tax_env",taxEnv); rcpDet.put("tax_env",taxEnv);
} }
//receivableslList.add(rcpDet);
if(siteCodeWiseHMap.containsKey(rcpSiteCode))
{
ArrayList tempList=siteCodeWiseHMap.get(rcpSiteCode);
tempList.add(rcpDet);
siteCodeWiseHMap.put(rcpSiteCode, tempList);
}
else
{
receivableslList=new ArrayList();
receivableslList.add(rcpDet); receivableslList.add(rcpDet);
siteCodeWiseHMap.put(rcpSiteCode, receivableslList);
}
rcpAdvCustCOde=""; rcpAdvCustCOde="";
rcpAdvrefNo=""; rcpAdvrefNo="";
rcpAdvrefDate=null; rcpAdvrefDate=null;
...@@ -734,12 +803,18 @@ public String process(Document dom,Document dom1,String windowName,String xtraPa ...@@ -734,12 +803,18 @@ public String process(Document dom,Document dom1,String windowName,String xtraPa
pstmt.close(); pstmt.close();
pstmt=null; pstmt=null;
xmlBuff = new StringBuffer();
System.out.println("--XML CREATION --"); System.out.println("--XML CREATION --");
System.out.println("--Records Details--"+receivableslList); System.out.println("--Records Details--"+receivableslList);
System.out.println("--Records --"+receivableslList.size()); System.out.println("--Records --"+receivableslList.size());
if(receivableslList.size() > 0) if(siteCodeWiseHMap.size()>0)
// if(receivableslList.size() > 0)
{
//siteCodeWiseHMap
Set <String> siteCodekeys=siteCodeWiseHMap.keySet();
for(String eachSiteCode : siteCodekeys)
{ {
xmlBuff = new StringBuffer();
System.out.println("tran_date-->dateStr@@["+dateStr+"]"); System.out.println("tran_date-->dateStr@@["+dateStr+"]");
System.out.println("confTemp-->["+dateStr+"]"); System.out.println("confTemp-->["+dateStr+"]");
xmlBuff.append("<?xml version='1.0' encoding='ISO-8859-1'?>\n"); xmlBuff.append("<?xml version='1.0' encoding='ISO-8859-1'?>\n");
...@@ -768,7 +843,7 @@ public String process(Document dom,Document dom1,String windowName,String xtraPa ...@@ -768,7 +843,7 @@ public String process(Document dom,Document dom1,String windowName,String xtraPa
xmlBuff.append("<tran_date><![CDATA[" + dateStr + "]]></tran_date>"); xmlBuff.append("<tran_date><![CDATA[" + dateStr + "]]></tran_date>");
xmlBuff.append("<curr_code><![CDATA[" + currCode + "]]></curr_code>"); xmlBuff.append("<curr_code><![CDATA[" + currCode + "]]></curr_code>");
//xmlBuff.append("<tax_date><![CDATA[" + sdf.format(new java.util.Date()).toString() + "]]></tax_date>"); //xmlBuff.append("<tax_date><![CDATA[" + sdf.format(new java.util.Date()).toString() + "]]></tax_date>");
xmlBuff.append("<site_code><![CDATA[" + siteCode + "]]></site_code>"); xmlBuff.append("<site_code><![CDATA[" + eachSiteCode + "]]></site_code>");
xmlBuff.append("<confirmed><![CDATA[" + confTemp + "]]></confirmed>"); xmlBuff.append("<confirmed><![CDATA[" + confTemp + "]]></confirmed>");
xmlBuff.append("<add_date><![CDATA[" + dateStr + "]]></add_date>"); xmlBuff.append("<add_date><![CDATA[" + dateStr + "]]></add_date>");
xmlBuff.append("<add_user><![CDATA[" + loginUser + "]]></add_user>"); xmlBuff.append("<add_user><![CDATA[" + loginUser + "]]></add_user>");
...@@ -777,14 +852,16 @@ public String process(Document dom,Document dom1,String windowName,String xtraPa ...@@ -777,14 +852,16 @@ public String process(Document dom,Document dom1,String windowName,String xtraPa
xmlBuff.append("<chg_user><![CDATA[" + loginUser + "]]></chg_user>"); xmlBuff.append("<chg_user><![CDATA[" + loginUser + "]]></chg_user>");
xmlBuff.append("<chg_term><![CDATA[" + termID + "]]></chg_term>"); xmlBuff.append("<chg_term><![CDATA[" + termID + "]]></chg_term>");
xmlBuff.append("</Detail1>"); xmlBuff.append("</Detail1>");
ArrayList detailDataList=siteCodeWiseHMap.get(eachSiteCode);
int lilineno1=1; int lilineno1=1;
for(int n = 0;n < receivableslList.size();n++) for(int n = 0;n < detailDataList.size();n++)
{ {
String custcodeDet="",refTypeDet="",refSerDet="",refIdDet="",refIdAdvDet="",taxClassDet="",taxChapDet="",taxEnvDet=""; String custcodeDet="",refTypeDet="",refSerDet="",refIdDet="",refIdAdvDet="",taxClassDet="",taxChapDet="",taxEnvDet="";
double amount=0,lctaxdet=0; double amount=0,lctaxdet=0;
Timestamp refDadteDet=null; Timestamp refDadteDet=null;
SimpleDateFormat sdftemp = null; SimpleDateFormat sdftemp = null;
HashMap payDetTranMap = (HashMap)receivableslList.get(n); HashMap payDetTranMap = (HashMap)detailDataList.get(n);
System.out.println("lilineno1["+lilineno1+"]"); System.out.println("lilineno1["+lilineno1+"]");
custcodeDet =(String)payDetTranMap.get("cust_code"); custcodeDet =(String)payDetTranMap.get("cust_code");
refTypeDet = (String)payDetTranMap.get("ref_type"); refTypeDet = (String)payDetTranMap.get("ref_type");
...@@ -815,7 +892,7 @@ public String process(Document dom,Document dom1,String windowName,String xtraPa ...@@ -815,7 +892,7 @@ public String process(Document dom,Document dom1,String windowName,String xtraPa
{ {
xmlBuff.append("<ref_id><![CDATA["+refIdDet.trim()+"]]></ref_id>"); xmlBuff.append("<ref_id><![CDATA["+refIdDet.trim()+"]]></ref_id>");
} }
if(refDadteDet !=null) if(refIdAdvDet !=null && refIdAdvDet.trim().length() > 0)
{ {
System.out.println("refDadteDet:::"+refDadteDet); System.out.println("refDadteDet:::"+refDadteDet);
dateStr = sdftemp.format(refDadteDet); dateStr = sdftemp.format(refDadteDet);
...@@ -860,18 +937,195 @@ public String process(Document dom,Document dom1,String windowName,String xtraPa ...@@ -860,18 +937,195 @@ public String process(Document dom,Document dom1,String windowName,String xtraPa
xmlBuff.append("</DocumentRoot>"); xmlBuff.append("</DocumentRoot>");
xmlString = xmlBuff.toString(); xmlString = xmlBuff.toString();
System.out.println("@@@@@2: xmlString:"+xmlBuff.toString()); System.out.println("@@@@@2: xmlString:"+xmlBuff.toString());
System.out.println("...............just before savdata()");
//siteCodeXml = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginSiteCode");
System.out.println("== eachSiteCode =="+eachSiteCode);
retString = saveData(eachSiteCode,xmlString,conn);
System.out.println("@@@@@2: retString :"+retString);
System.out.println("--retString finished--");
if (retString.indexOf("Success") > -1)
{
System.out.println(" Generated retString [" + retString + "]");
String[] arrayForTranId1 = retString.split("<TranID>");
System.out.println("Tran ID :::::in conf:::::::"+arrayForTranId1);
System.out.println("Tran ID :::::in conf:::::::"+arrayForTranId1[1]);
int endIndex1 = arrayForTranId1[1].indexOf("</TranID>");
System.out.println("endIndex1:::::::"+endIndex1);
tranIdPe = arrayForTranId1[1].substring(0, endIndex1);
System.out.println("tranIdPe=====["+tranIdPe+"]");
}
else
{
conn.rollback();
return retString;
}
confirmed = genericUtility.getColumnValue("confirmed",dom);
System.out.println("confirmed()"+confirmed);
if( "Y".equalsIgnoreCase(confirmed))
{
System.out.println("confirmed"+ confirmed);
retString = Conf.confirm(tranIdPe, xtraParams, forcedFlag,conn); //nvo_miscvouch.gbf_retrieve_misc_vou(lstr_pur_exp_reco.voucher_no, lstr_pur_exp_reco.voucher_no,2,ls_errcode,ls_site_code)
}
Conf = null;
System.out.println("@@@@@@retString is" + retString);
if(retString.indexOf("CONFSUCCES") > -1 || retString.indexOf("Success") > -1 )
{
retString = itmDBAccessEJB.getErrorString("","VPSUCC1","","",conn);
conn.commit();
System.out.println("##### COmmit is");
}
else
{
conn.rollback();
System.out.println("#####Error String is" + retString);
return retString;
}
tranIdPe="";
if("N".equalsIgnoreCase(confirmed))
{
System.out.println("N.equalsIgnoreCase(confirmed)"+confirmed );
}
}
/*System.out.println("tran_date-->dateStr@@["+dateStr+"]");
System.out.println("confTemp-->["+dateStr+"]");
xmlBuff.append("<?xml version='1.0' encoding='ISO-8859-1'?>\n");
xmlBuff.append("<DocumentRoot>");
xmlBuff.append("<description>").append("Datawindow Root").append("</description>");
xmlBuff.append("<group0>");
xmlBuff.append("<description>").append("Group0 description").append("</description>");
xmlBuff.append("<Header0>");
xmlBuff.append("<objName><![CDATA[").append("rcpadv_taxcalc").append("]]></objName>");
xmlBuff.append("<pageContext><![CDATA[").append("1").append("]]></pageContext>");
xmlBuff.append("<objContext><![CDATA[").append("1").append("]]></objContext>");
xmlBuff.append("<editFlag><![CDATA[").append("A").append("]]></editFlag>");
xmlBuff.append("<focusedColumn><![CDATA[").append("").append("]]></focusedColumn>");
xmlBuff.append("<action><![CDATA[").append("SAVE").append("]]></action>");
xmlBuff.append("<elementName><![CDATA[").append("").append("]]></elementName>");
xmlBuff.append("<keyValue><![CDATA[").append("1").append("]]></keyValue>");
xmlBuff.append("<taxKeyValue><![CDATA[").append("").append("]]></taxKeyValue>");
xmlBuff.append("<saveLevel><![CDATA[").append("1").append("]]></saveLevel>");
xmlBuff.append("<forcedSave><![CDATA[").append(true).append("]]></forcedSave>");
xmlBuff.append("<taxInFocus><![CDATA[").append(false).append("]]></taxInFocus>");
xmlBuff.append("<description>").append("Header0 members").append("</description>");
xmlBuff.append("<Detail1 dbID=\"\" domID=\"1\" objName=\"rcpadv_taxcalc\" objContext=\"1\">");
xmlBuff.append("<attribute selected=\"N\" updateFlag=\"A\" status=\"N\" pkNames=\"\"/>");
//xmlBuff.append("<tran_id><![CDATA[" + tranIdPe + "]]></tran_id>");
xmlBuff.append("<tran_id><![CDATA[]]></tran_id>");
xmlBuff.append("<tran_date><![CDATA[" + dateStr + "]]></tran_date>");
xmlBuff.append("<curr_code><![CDATA[" + currCode + "]]></curr_code>");
//xmlBuff.append("<tax_date><![CDATA[" + sdf.format(new java.util.Date()).toString() + "]]></tax_date>");
xmlBuff.append("<site_code><![CDATA[" + siteCode + "]]></site_code>");
xmlBuff.append("<confirmed><![CDATA[" + confTemp + "]]></confirmed>");
xmlBuff.append("<add_date><![CDATA[" + dateStr + "]]></add_date>");
xmlBuff.append("<add_user><![CDATA[" + loginUser + "]]></add_user>");
xmlBuff.append("<add_term><![CDATA[" + termID + "]]></add_term>");
xmlBuff.append("<chg_date><![CDATA[" + dateStr + "]]></chg_date>");
xmlBuff.append("<chg_user><![CDATA[" + loginUser + "]]></chg_user>");
xmlBuff.append("<chg_term><![CDATA[" + termID + "]]></chg_term>");
xmlBuff.append("</Detail1>");*/
/*int lilineno1=1;
for(int n = 0;n < receivableslList.size();n++)
{
String custcodeDet="",refTypeDet="",refSerDet="",refIdDet="",refIdAdvDet="",taxClassDet="",taxChapDet="",taxEnvDet="";
double amount=0,lctaxdet=0;
Timestamp refDadteDet=null;
SimpleDateFormat sdftemp = null;
HashMap payDetTranMap = (HashMap)receivableslList.get(n);
System.out.println("lilineno1["+lilineno1+"]");
custcodeDet =(String)payDetTranMap.get("cust_code");
refTypeDet = (String)payDetTranMap.get("ref_type");
refSerDet = (String)payDetTranMap.get("ref_ser");
refIdDet= (String)payDetTranMap.get("ref_id");
refDadteDet =(Timestamp)(payDetTranMap.get("ref_date"));
amount = ((Double)payDetTranMap.get("amount")).doubleValue();
taxClassDet = (String)payDetTranMap.get("tax_class");
System.out.println("taxClassDet is [In Loop]"+taxClassDet);
taxChapDet = (String)payDetTranMap.get("tax_chap");
System.out.println("taxChapDet is [In Loop]"+taxChapDet);
taxEnvDet = (String)payDetTranMap.get("tax_env");
System.out.println("taxEnvDet is [In Loop]"+taxEnvDet);
refIdAdvDet=(String)payDetTranMap.get("ref_id__adv");
sdftemp=new SimpleDateFormat(genericUtility.getApplDateFormat());
System.out.println("Amount is [In Loop]"+amount);
if(amount !=0)
{
xmlBuff.append("<Detail2 dbID='' domID=\"1\" objName=\"rcpadv_taxcalc\" objContext=\"2\">");
xmlBuff.append("<attribute pkNames=\"\" selected=\"N\" updateFlag=\"A\" status=\"N\" />");
xmlBuff.append("<tran_id><![CDATA[]]></tran_id>");
xmlBuff.append("<line_no><![CDATA["+lilineno1+"]]></line_no>");
xmlBuff.append("<cust_code><![CDATA["+custcodeDet+"]]></cust_code>");
xmlBuff.append("<ref_type><![CDATA["+refTypeDet+"]]></ref_type>");
System.out.println("refTypeDet"+refTypeDet);
xmlBuff.append("<ref_ser><![CDATA["+refSerDet+"]]></ref_ser>");
if(refIdDet !=null && refIdDet.trim().length() > 0)
{
xmlBuff.append("<ref_id><![CDATA["+refIdDet.trim()+"]]></ref_id>");
}
if(refIdAdvDet !=null && refIdAdvDet.trim().length() > 0)
{
System.out.println("refDadteDet:::"+refDadteDet);
dateStr = sdftemp.format(refDadteDet);
System.out.println("dateStr:::"+dateStr);
xmlBuff.append("<ref_date><![CDATA["+dateStr+"]]></ref_date>");
}
else
{
System.out.println("Ref Date in Else");
xmlBuff.append("<ref_date><![CDATA[]]></ref_date>");
}
if("1".equalsIgnoreCase(refTypeDet))
{
double amt=0;
amt=getAdvance(amount);
System.out.println("amt["+amt+"]");
xmlBuff.append("<amount><![CDATA["+amt+"]]></amount>");
}
else
{
System.out.println("Else refType is:"+refTypeDet);
double amttemp=0;
amttemp=getAdjust(amount);
System.out.println("amttemp["+amttemp+"]");
xmlBuff.append("<amount><![CDATA["+amttemp+"]]></amount>");
}
if(refIdAdvDet!=null && refIdAdvDet.trim().length() > 0)
{
xmlBuff.append("<ref_id__adv><![CDATA["+refIdAdvDet.trim()+"]]></ref_id__adv>");
}
xmlBuff.append("<tax_class><![CDATA["+taxClassDet+"]]></tax_class>");
xmlBuff.append("<tax_chap><![CDATA["+taxChapDet+"]]></tax_chap>");
xmlBuff.append("<tax_env><![CDATA["+taxEnvDet+"]]></tax_env>");
xmlBuff.append("<tax_amt><![CDATA["+ lctaxdet +"]]></tax_amt>");
xmlBuff.append("</Detail2>");
System.out.println("XML@@@@@@@@@@@@@Deatil2"+xmlBuff);
lilineno1++;
}
}*/
/*xmlBuff.append("</Header0>");
xmlBuff.append("</group0>");
xmlBuff.append("</DocumentRoot>");
xmlString = xmlBuff.toString();
System.out.println("@@@@@2: xmlString:"+xmlBuff.toString());
System.out.println("...............just before savdata()"); System.out.println("...............just before savdata()");
siteCodeXml = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginSiteCode"); //siteCodeXml = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginSiteCode");
System.out.println("== siteCodeXml =="+siteCodeXml); System.out.println("== siteCodeXml =="+siteCodeXml);
retString = saveData(siteCodeXml,xmlString,conn); retString = saveData(siteCodeXml,xmlString,conn);
System.out.println("@@@@@2: retString :"+retString); System.out.println("@@@@@2: retString :"+retString);
System.out.println("--retString finished--"); System.out.println("--retString finished--");*/
} }
else else
{ {
retString = itmDBAccessEJB.getErrorString("","NORECFND","","",conn); retString = itmDBAccessEJB.getErrorString("","NORECFND","","",conn);
} }
if (retString.indexOf("Success") > -1) /*if (retString.indexOf("Success") > -1)
{ {
System.out.println(" Generated retString [" + retString + "]"); System.out.println(" Generated retString [" + retString + "]");
String[] arrayForTranId1 = retString.split("<TranID>"); String[] arrayForTranId1 = retString.split("<TranID>");
...@@ -890,8 +1144,8 @@ public String process(Document dom,Document dom1,String windowName,String xtraPa ...@@ -890,8 +1144,8 @@ public String process(Document dom,Document dom1,String windowName,String xtraPa
{ {
conn.rollback(); conn.rollback();
return retString; return retString;
} }*/
confirmed = genericUtility.getColumnValue("confirmed",dom); /* confirmed = genericUtility.getColumnValue("confirmed",dom);
System.out.println("confirmed()"+confirmed); System.out.println("confirmed()"+confirmed);
if( "Y".equalsIgnoreCase(confirmed)) if( "Y".equalsIgnoreCase(confirmed))
{ {
...@@ -915,7 +1169,7 @@ public String process(Document dom,Document dom1,String windowName,String xtraPa ...@@ -915,7 +1169,7 @@ public String process(Document dom,Document dom1,String windowName,String xtraPa
if("N".equalsIgnoreCase(confirmed)) if("N".equalsIgnoreCase(confirmed))
{ {
System.out.println("N.equalsIgnoreCase(confirmed)"+confirmed ); System.out.println("N.equalsIgnoreCase(confirmed)"+confirmed );
} }*/
} }
} }
catch(SQLException e) catch(SQLException e)
...@@ -1011,18 +1265,17 @@ private double getAdjust(Double input) ...@@ -1011,18 +1265,17 @@ private double getAdjust(Double input)
} }
public java.util.Date getDateObject(String date) throws RemoteException,ITMException public java.util.Date getDateObject(String date) throws RemoteException,ITMException
{ {
java.util.Date dat = null; java.util.Date dat = null;
DateFormat df = null; E12GenericUtility genericUtility = new E12GenericUtility();
try try
{ {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(genericUtility.getApplDateFormat()); SimpleDateFormat simpleDateFormat = new SimpleDateFormat(genericUtility.getApplDateFormat());
dat = simpleDateFormat.parse(date); dat = simpleDateFormat.parse(date);
System.out.println("dat::::"+dat); System.out.println("dat::::"+dat);
} }
catch(Exception e) catch(Exception e)
{ {
System.out.println("Exception :ValidatorEJB :getDateObject :==>\n"+e.getMessage()); //$NON-NLS-1$ System.out.println("Exception :ValidatorEJB :getDateObject :==>\n"+e.getMessage()); //$NON-NLS-1$
}
return dat;
} }
return dat;
} }
\ No newline at end of file
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