Commit 828dfdef authored by msinkar's avatar msinkar

adding the query changes

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@184179 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 0c695aa3
...@@ -169,17 +169,43 @@ public class EsiKpiReportEJB extends ValidatorEJB implements EsiKpiReportEJBLoca ...@@ -169,17 +169,43 @@ public class EsiKpiReportEJB extends ValidatorEJB implements EsiKpiReportEJBLoca
int totalCallRetailers = mResultSet.getInt("TOTAL_CALLS_RETAILER"); int totalCallRetailers = mResultSet.getInt("TOTAL_CALLS_RETAILER");
String totalPob = mResultSet.getString("TOTAL_POB_DAY"); String totalPob = mResultSet.getString("TOTAL_POB_DAY");
int displayCnt = mResultSet.getInt("DISPLAY_COUNT"); int displayCnt = mResultSet.getInt("DISPLAY_COUNT");
String drCallAVg="0";
double drAvg = (double)(totalSupporter + totalBeliver)/fwDays; double drAvg = (double)(totalSupporter + totalBeliver)/fwDays;
if(Double.isNaN(drAvg))
{
drCallAVg="0";
}
else if(Double.isInfinite(drAvg))
{
drCallAVg="0";
}
else
{
String drAvgMain = Double.toString(drAvg); String drAvgMain = Double.toString(drAvg);
float f = Float.parseFloat(drAvgMain); float f = Float.parseFloat(drAvgMain);
String drCallAVg = String.format("%.02f", f); drCallAVg = String.format("%.02f", f);
System.out.println("drCallAVg["+drCallAVg+"]"); }
System.out.println("drCallAVg["+drCallAVg+"]");
String chemCallAVg="0";
double chemAvg = (double)(totalCallRetailers)/fwDays; double chemAvg = (double)(totalCallRetailers)/fwDays;
if(Double.isNaN(chemAvg))
{
chemCallAVg="0";
}
else if(Double.isInfinite(chemAvg))
{
chemCallAVg="0";
}
else
{
String chemAvgMain = Double.toString(chemAvg); String chemAvgMain = Double.toString(chemAvg);
float chemAvgf = Float.parseFloat(chemAvgMain); float chemAvgf = Float.parseFloat(chemAvgMain);
String chemCallAVg = String.format("%.02f", chemAvgf); chemCallAVg = String.format("%.02f", chemAvgf);
}
System.out.println("chemCallAVg["+chemCallAVg+"]"); System.out.println("chemCallAVg["+chemCallAVg+"]");
rowDataVar.put("REGION", mResultSet.getString("REGION")); rowDataVar.put("REGION", mResultSet.getString("REGION"));
......
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