Commit 5b46abc9 authored by bpandey's avatar bpandey

modify for summary calculation


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@93618 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 835d50b3
...@@ -172,9 +172,9 @@ public class ProductionVsBudgetReport extends ValidatorEJB implements Production ...@@ -172,9 +172,9 @@ public class ProductionVsBudgetReport extends ValidatorEJB implements Production
for(int j=0;j<lastDayOfMonth-cntr;j++) for(int j=0;j<lastDayOfMonth-cntr;j++)
{ {
cntFrBudget++; cntFrBudget++;
System.out.println("Budget Counter remaining last dated ===="+cntFrBudget); //System.out.println("Budget Counter remaining last dated ===="+cntFrBudget);
xmlData.append("<tran_date date=\""+(listDate.get(dayCount))+"\">"); xmlData.append("<tran_date date=\""+(listDate.get(dayCount))+"\">");
System.out.println("listDate.get(dayCount) case of after date ==="+listDate.get(dayCount)); //System.out.println("listDate.get(dayCount) case of after date ==="+listDate.get(dayCount));
xmlData.append("<day_quantity quantity=\"0\">"); xmlData.append("<day_quantity quantity=\"0\">");
xmlData.append("<pyr_dayqty>").append("<![CDATA["+prePyrDayQty+"]]>").append("</pyr_dayqty>"); xmlData.append("<pyr_dayqty>").append("<![CDATA["+prePyrDayQty+"]]>").append("</pyr_dayqty>");
xmlData.append("<daily_budqty>").append("<![CDATA["+dailyBudgetQty*(cntFrBudget)+"]]>").append("</daily_budqty>"); xmlData.append("<daily_budqty>").append("<![CDATA["+dailyBudgetQty*(cntFrBudget)+"]]>").append("</daily_budqty>");
...@@ -196,23 +196,40 @@ public class ProductionVsBudgetReport extends ValidatorEJB implements Production ...@@ -196,23 +196,40 @@ public class ProductionVsBudgetReport extends ValidatorEJB implements Production
//Add here for decr pupose //Add here for decr pupose
sql="select g.descr as geol_descr, u.descr as unit_descr from gencodes g , uom u where g.FLD_NAME='GEO_LOC' and g.fld_value= ? and u.unit= ?"; //sql="select g.descr as geol_descr, u.descr as unit_descr from gencodes g , uom u where g.FLD_NAME='GEO_LOC' and g.fld_value= ? and u.unit= ?";
sql="select descr from gencodes where FLD_NAME='GEO_LOC' and fld_value= ?";
pstmt1 = conn.prepareStatement(sql); pstmt1 = conn.prepareStatement(sql);
pstmt1.setString(1,geoLocation); pstmt1.setString(1,geoLocation);
pstmt1.setString(2,unit);
rs1 = pstmt1.executeQuery(); rs1 = pstmt1.executeQuery();
if(rs1.next()) if(rs1.next())
{ {
geol_Descr = checkNull(rs1.getString("geol_descr")) ; geol_Descr = checkNull(rs1.getString("descr")) ;
unit_Descr = checkNull(rs1.getString("unit_descr")) ;
} }
pstmt1.close(); pstmt1 = null;
pstmt1 = null;
rs1.close();
rs1 = null; rs1 = null;
//**************************************************
sql="select descr from uom where unit= ?";
pstmt1 = conn.prepareStatement(sql);
pstmt1.setString(1,unit);
rs1 = pstmt1.executeQuery();
if(rs1.next())
{
unit_Descr = checkNull(rs1.getString("descr")) ;
}
pstmt1.close();
pstmt1 = null;
rs1.close();
rs1 = null;
//End here decr pupose for Unit_form and geo_location //End here decr pupose for Unit_form and geo_location
cntFrBudget=0; cntFrBudget=0;
...@@ -221,8 +238,8 @@ public class ProductionVsBudgetReport extends ValidatorEJB implements Production ...@@ -221,8 +238,8 @@ public class ProductionVsBudgetReport extends ValidatorEJB implements Production
dayCount=0; dayCount=0;
preCumQty="0.0"; preCumQty="0.0";
prePyrDayQty="0.0"; prePyrDayQty="0.0";
geoLocationPrevious=geoLocation=checkNull(rs.getString("geo_loc")); geoLocationPrevious =geoLocation=checkNull(rs.getString("geo_loc"));
previousUnit=checkNull(rs.getString("unit__form")); previousUnit =checkNull(rs.getString("unit__form"));
//Add descr //Add descr
geol_Descr=""; geol_Descr="";
unit_Descr=""; unit_Descr="";
...@@ -274,6 +291,7 @@ public class ProductionVsBudgetReport extends ValidatorEJB implements Production ...@@ -274,6 +291,7 @@ public class ProductionVsBudgetReport extends ValidatorEJB implements Production
if(count>0) if(count>0)
{ {
if(dayCount<lastDayOfMonth){ if(dayCount<lastDayOfMonth){
for(int p=dayCount;p<lastDayOfMonth;p++){
cntFrBudget++; cntFrBudget++;
xmlData.append("<tran_date date=\""+(listDate.get(dayCount))+"\">"); xmlData.append("<tran_date date=\""+(listDate.get(dayCount))+"\">");
xmlData.append("<day_quantity quantity=\"0\">"); xmlData.append("<day_quantity quantity=\"0\">");
...@@ -282,7 +300,7 @@ public class ProductionVsBudgetReport extends ValidatorEJB implements Production ...@@ -282,7 +300,7 @@ public class ProductionVsBudgetReport extends ValidatorEJB implements Production
xmlData.append("<cur_cumqty>").append("<![CDATA["+preCumQty+"]]>").append("</cur_cumqty>"); xmlData.append("<cur_cumqty>").append("<![CDATA["+preCumQty+"]]>").append("</cur_cumqty>");
xmlData.append("</day_quantity>"); xmlData.append("</day_quantity>");
xmlData.append("</tran_date>"); xmlData.append("</tran_date>");
//System.out.println("Budget Counter last graph empty tag===="+cntFrBudget); }
} }
xmlData.append("</unit_form>"); xmlData.append("</unit_form>");
xmlData.append("</geo_loc>"); xmlData.append("</geo_loc>");
......
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