Commit 1709e354 authored by cshah's avatar cshah

DI90SUN059-changes done in getData method for type AL


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@91378 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 15f39383
......@@ -485,17 +485,18 @@ public class BenefitPrc extends ProcessEJB implements BenefitPrcLocal,BenefitPrc
} // end of if
if(benefitType != null && benefitType.trim().equalsIgnoreCase("DP"))
{
sql=" SELECT x.tran_id,x.file_no FROM "
+"(SELECT a.tran_id,a.file_no,a.site_code__depb,a.eff_date,a.valid_upto, "
+"c.fin_entity FROM depb a,site b,finent c "
+"where a.site_code__depb = b.site_code "
+"and b.fin_entity = c.fin_entity "
+"and a.status = 'O') X, "
+"(select p.tran_id,p.site_code,r.fin_entity from po_clearance p,site q,finent r "
+"where p.site_code = q.site_code and "
+"q.fin_entity = r.fin_entity) Y "
+"where x.fin_entity = y.fin_entity "
+"and y.tran_id = ? ";
sql =" SELECT x.tran_id,x.file_no FROM "
+"(SELECT a.tran_id,a.file_no,a.site_code__depb,a.eff_date,a.valid_upto, "
+"c.fin_entity FROM depb a,site b,finent c "
+"where a.site_code__depb = b.site_code "
+"and b.fin_entity = c.fin_entity "
+"and a.status = 'O') X, "
+"(select p.tran_id,p.site_code,r.fin_entity from po_clearance p,site q,finent r "
+"where p.site_code = q.site_code and "
+"q.fin_entity = r.fin_entity) Y "
+"where x.fin_entity = y.fin_entity "
+"and y.tran_id = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,tranId.trim());
rs = pstmt.executeQuery();
......@@ -503,11 +504,12 @@ public class BenefitPrc extends ProcessEJB implements BenefitPrcLocal,BenefitPrc
{
valueXmlString.append(rs.getString(1)==null ?"":rs.getString(1).trim()).append("\t");
valueXmlString.append(rs.getString(2)==null ?"":rs.getString(2).trim()).append("\t");
valueXmlString.append(rs.getString(3)==null ?"":rs.getString(3).trim()).append("\t");
valueXmlString.append(rs.getString(4)==null ?"":rs.getString(4).trim()).append("\t");
valueXmlString.append(rs.getString(5)==null ?"":rs.getString(5).trim()).append("\t");
valueXmlString.append("").append("\t");
valueXmlString.append("").append("\t");
valueXmlString.append("").append("\t");
valueXmlString.append("").append("\t");
valueXmlString.append("").append("\t");
valueXmlString.append("\n");
}
rs.close();
......@@ -767,12 +769,14 @@ public class BenefitPrc extends ProcessEJB implements BenefitPrcLocal,BenefitPrc
pstmtInsert.setDouble(12, quantityDec);
pstmtInsert.setString(13, currCode);
pstmtInsert.setDouble(14, returnExchRateDec);
pstmtInsert.setDouble(15, valueDec);
//pstmtInsert.setDouble(15, valueDec);
pstmtInsert.setDouble(15, netAmountDec);//22/12/10
pstmtInsert.setString(16, "O");
pstmtInsert.setTimestamp(17,tranDate);
pstmtInsert.setString(18, "BASE");
pstmtInsert.setString(19, "BASE");
pstmtInsert.setDouble(20, baseValue);
//pstmtInsert.setDouble(20, baseValue);
pstmtInsert.setDouble(20, netAmountDec);//22/12/10
pstmtInsert.setString(21, "0.000");
pstmtInsert.setDouble(22, exchRateDec);
pstmtInsert.executeUpdate();
......
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