Commit 316f1dc2 authored by dpawar's avatar dpawar

arrange columns as per requirement


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@93348 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 020d21cd
...@@ -35,7 +35,7 @@ import javax.ejb.Stateless; // added for ejb3 ...@@ -35,7 +35,7 @@ import javax.ejb.Stateless; // added for ejb3
@Stateless // added for ejb3 @Stateless // added for ejb3
public class GenerateReceiptPrc extends ProcessEJB implements GenerateReceiptPrcLocal ,GenerateReceiptPrcRemote //SessionBean public class GenerateReceiptPrc extends ProcessEJB implements GenerateReceiptPrcLocal ,GenerateReceiptPrcRemote //SessionBean
{ {
ibase.webitm.utility.GenericUtility genericUtility = ibase.webitm.utility.GenericUtility.getInstance(); ibase.webitm.utility.GenericUtility genericUtility = ibase.webitm.utility.GenericUtility.getInstance();
ITMDBAccessEJB itmDBAccessEJB = new ITMDBAccessEJB(); ITMDBAccessEJB itmDBAccessEJB = new ITMDBAccessEJB();
CommonConstants commonConstants = new CommonConstants(); CommonConstants commonConstants = new CommonConstants();
...@@ -190,7 +190,7 @@ Put a validation chq amount in filter and total of details matches in case heade ...@@ -190,7 +190,7 @@ Put a validation chq amount in filter and total of details matches in case heade
siteCode = genericUtility.getColumnValue("site_code",headerDom); siteCode = genericUtility.getColumnValue("site_code",headerDom);
writeLog(filePtr,"siteCode:::"+siteCode,true); writeLog(filePtr,"siteCode:::"+siteCode,true);
System.out.println("siteCode :::- "+ siteCode); System.out.println("siteCode------>"+ siteCode);
if(siteCode == null || siteCode.trim().length() == 0) if(siteCode == null || siteCode.trim().length() == 0)
{ {
...@@ -503,41 +503,56 @@ Put a validation chq amount in filter and total of details matches in case heade ...@@ -503,41 +503,56 @@ Put a validation chq amount in filter and total of details matches in case heade
{ {
retTabSepStrBuff.append("<Detail2>"); retTabSepStrBuff.append("<Detail2>");
System.out.println("ch no 1 = "+rs.getString(8)); System.out.println("ch no 1 = "+rs.getString(8));
//TRAN_SERNO
//retTabSepStrBuff.append(rs.getString(2)).append("\t");
retTabSepStrBuff.append("<tran_ser>").append("<![CDATA[" + rs.getString(2) +"]]>").append("</tran_ser>");
//INVOICE_ID //INVOICE_ID
//retTabSepStrBuff.append(rs.getString(1)).append("\t"); //retTabSepStrBuff.append(rs.getString(1)).append("\t");
//added by kunal on 04/02/13 Data set in Xml string format //added by kunal on 04/02/13 Data set in Xml string format
retTabSepStrBuff.append("<invoice_id>").append("<![CDATA[" + rs.getString(1) +"]]>").append("</invoice_id>");
retTabSepStrBuff.append("<invoice_id>").append("<![CDATA[" + rs.getString(1) +"]]>").append("</invoice_id>"); //cust_ref_no
//TRAN_SERNO if (rs.getString("CUST_REF_NO") == null || rs.getString("CUST_REF_NO").trim().length() == 0)
//retTabSepStrBuff.append(rs.getString(2)).append("\t"); {
retTabSepStrBuff.append("<tran_ser>").append("<![CDATA[" + rs.getString(2) +"]]>").append("</tran_ser>"); //retTabSepStrBuff.append("").append("\t");
retTabSepStrBuff.append("<cust_ref_no>").append("<![CDATA[]]>").append("</cust_ref_no>");
}
else
{
//retTabSepStrBuff.append(rs.getString("CUST_REF_NO")).append("\t");
retTabSepStrBuff.append("<cust_ref_no>").append("<![CDATA[" +rs.getString("CUST_REF_NO") +"]]>").append("</cust_ref_no>");
}
//TRAN_DATE //TRAN_DATE
//retTabSepStrBuff.append(rs.getDate(3)).append("\t"); //retTabSepStrBuff.append(rs.getDate(3)).append("\t");
System.out.println(sdf.format(rs.getTimestamp(3))); System.out.println(sdf.format(rs.getTimestamp(3)));
//retTabSepStrBuff.append(sdf.format(rs.getTimestamp(3))).append("\t"); //retTabSepStrBuff.append(sdf.format(rs.getTimestamp(3))).append("\t");
retTabSepStrBuff.append("<tran_date>").append("<![CDATA[" +sdf.format(rs.getTimestamp(3)) +"]]>").append("</tran_date>"); retTabSepStrBuff.append("<tran_date>").append("<![CDATA[" +sdf.format(rs.getTimestamp(3)) +"]]>").append("</tran_date>");
//TOT_AMT
//retTabSepStrBuff.append(rs.getDouble("TOT_AMT")).append("\n"); //retTabSepStrBuff.append(rs.getDouble("TOT_AMT")).append("\n");
retTabSepStrBuff.append("<tot_amt>").append("<![CDATA["+rs.getDouble("TOT_AMT")+"]]>").append("</tot_amt>"); retTabSepStrBuff.append("<tot_amt>").append("<![CDATA["+rs.getDouble("TOT_AMT")+"]]>").append("</tot_amt>");
//INV_AMT
//retTabSepStrBuff.append(rs.getDouble(4)).append("\t");
retTabSepStrBuff.append("<inv_amt>").append("<![CDATA[" +rs.getDouble(4) +"]]>").append("</inv_amt>");
//Added by manoj dtd 18/10/2012 to display absolute value
//retTabSepStrBuff.append(Math.abs(rs.getDouble(4))).append("\t"); //retTabSepStrBuff.append(Math.abs(rs.getDouble(4))).append("\t");
retTabSepStrBuff.append("<bal_amt>").append("<![CDATA[" +Math.abs(rs.getDouble(4)) +"]]>").append("</bal_amt>"); retTabSepStrBuff.append("<bal_amt>").append("<![CDATA[" +Math.abs(rs.getDouble(4)) +"]]>").append("</bal_amt>");
//adj_AMT //adj_AMT
//retTabSepStrBuff.append(rs.getDouble(4)).append("\t"); //retTabSepStrBuff.append(rs.getDouble(4)).append("\t");
retTabSepStrBuff.append("<adj_amt>").append("<![CDATA[" +rs.getDouble(4) +"]]>").append("</adj_amt>"); retTabSepStrBuff.append("<adj_amt>").append("<![CDATA[" +rs.getDouble(4) +"]]>").append("</adj_amt>");
// adjusted_amt // adjusted_amt
//retTabSepStrBuff.append(rs.getDouble("ADJ_AMT")).append("\t"); //retTabSepStrBuff.append(rs.getDouble("ADJ_AMT")).append("\t");
retTabSepStrBuff.append("<adjusted_amt>").append("<![CDATA["+rs.getDouble("ADJ_AMT")+"]]>").append("</adjusted_amt>"); retTabSepStrBuff.append("<adjusted_amt>").append("<![CDATA["+rs.getDouble("ADJ_AMT")+"]]>").append("</adjusted_amt>");
//INV_AMT
//retTabSepStrBuff.append(rs.getDouble(4)).append("\t");
retTabSepStrBuff.append("<inv_amt>").append("<![CDATA[" +rs.getDouble(4) +"]]>").append("</inv_amt>");
//Added by manoj dtd 18/10/2012 to display absolute value
//CUST_NAME //CUST_NAME
//retTabSepStrBuff.append(rs.getString(5)).append("\t"); //retTabSepStrBuff.append(rs.getString(5)).append("\t");
retTabSepStrBuff.append("<cust_name>").append("<![CDATA[" +rs.getString(5) +"]]>").append("</cust_name>"); retTabSepStrBuff.append("<cust_name>").append("<![CDATA[" +rs.getString(5) +"]]>").append("</cust_name>");
//CUST_CODE
//retTabSepStrBuff.append(rs.getString(10)).append("\t");//added by rajesh k to append cust_code
retTabSepStrBuff.append("<cust_code>").append("<![CDATA["+rs.getString(10)+"]]>").append("</cust_code>");
//BANK_CODE //BANK_CODE
//retTabSepStrBuff.append(rs.getString(6)).append("\t"); //retTabSepStrBuff.append(rs.getString(6)).append("\t");
...@@ -573,21 +588,18 @@ Put a validation chq amount in filter and total of details matches in case heade ...@@ -573,21 +588,18 @@ Put a validation chq amount in filter and total of details matches in case heade
//retTabSepStrBuff.append(rs.getDouble(9)).append("\t"); //retTabSepStrBuff.append(rs.getDouble(9)).append("\t");
retTabSepStrBuff.append("<chq_amount>").append("<![CDATA["+rs.getDouble(9)+"]]>").append("</chq_amount>"); retTabSepStrBuff.append("<chq_amount>").append("<![CDATA["+rs.getDouble(9)+"]]>").append("</chq_amount>");
//CUST_CODE //cust_ref_date
//retTabSepStrBuff.append(rs.getString(10)).append("\t");//added by rajesh k to append cust_code if(rs.getDate("CUST_REF_DATE") == null)
retTabSepStrBuff.append("<cust_code>").append("<![CDATA["+rs.getString(10)+"]]>").append("</cust_code>");
//cust_ref_no
if (rs.getString("CUST_REF_NO") == null || rs.getString("CUST_REF_NO").trim().length() == 0)
{ {
//retTabSepStrBuff.append("").append("\t"); //retTabSepStrBuff.append("").append("\t");
retTabSepStrBuff.append("<cust_ref_no>").append("<![CDATA[]]>").append("</cust_ref_no>"); retTabSepStrBuff.append("<cust_ref_date>").append("<![CDATA[]]>").append("</cust_ref_date>");
} }
else else
{ {
//retTabSepStrBuff.append(rs.getString("CUST_REF_NO")).append("\t"); //retTabSepStrBuff.append(rs.getDate("CUST_REF_DATE")).append("\t");
retTabSepStrBuff.append("<cust_ref_no>").append("<![CDATA[" +rs.getString("CUST_REF_NO") +"]]>").append("</cust_ref_no>"); //retTabSepStrBuff.append(sdf.format(rs.getTimestamp("CUST_REF_DATE"))).append("\t");
} retTabSepStrBuff.append("<cust_ref_date>").append("<![CDATA["+sdf.format(rs.getTimestamp("CUST_REF_DATE"))+"]]>").append("</cust_ref_date>");
}
//due_date //due_date
...@@ -601,18 +613,7 @@ Put a validation chq amount in filter and total of details matches in case heade ...@@ -601,18 +613,7 @@ Put a validation chq amount in filter and total of details matches in case heade
//retTabSepStrBuff.append(sdf.format(rs.getTimestamp("DUE_DATE"))).append("\t"); //retTabSepStrBuff.append(sdf.format(rs.getTimestamp("DUE_DATE"))).append("\t");
retTabSepStrBuff.append("<due_date>").append("<![CDATA[" +sdf.format(rs.getTimestamp("DUE_DATE")) +"]]>").append("</due_date>"); retTabSepStrBuff.append("<due_date>").append("<![CDATA[" +sdf.format(rs.getTimestamp("DUE_DATE")) +"]]>").append("</due_date>");
} }
//cust_ref_date
if(rs.getDate("CUST_REF_DATE") == null)
{
//retTabSepStrBuff.append("").append("\t");
retTabSepStrBuff.append("<cust_ref_date>").append("<![CDATA[]]>").append("</cust_ref_date>");
}
else
{
//retTabSepStrBuff.append(rs.getDate("CUST_REF_DATE")).append("\t");
//retTabSepStrBuff.append(sdf.format(rs.getTimestamp("CUST_REF_DATE"))).append("\t");
retTabSepStrBuff.append("<cust_ref_date>").append("<![CDATA["+sdf.format(rs.getTimestamp("CUST_REF_DATE"))+"]]>").append("</cust_ref_date>");
}
//reas_CODE //reas_CODE
if (rs.getString("REAS_CODE") == null || rs.getString("REAS_CODE").trim().length() == 0) if (rs.getString("REAS_CODE") == null || rs.getString("REAS_CODE").trim().length() == 0)
{ {
......
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