Commit 8c0bbbe9 authored by bpandey's avatar bpandey

change leve LBE to Work Plan


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@96297 ce508802-f39f-4f6c-b175-0d175dae99d5
parent a79d52e2
package ibase.dashboard.mfg.ejb;
import ibase.system.config.ConnDriver;
import ibase.utility.EMail;
import ibase.webitm.ejb.ValidatorEJB;
......@@ -18,9 +17,7 @@ import java.util.Calendar;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ejb.Stateless;
import com.lowagie.text.Document;
import com.lowagie.text.Element;
import com.lowagie.text.Font;
......@@ -63,18 +60,6 @@ public class ProductionVsBudgetReport extends ValidatorEJB implements Production
{
conn = connDriver.getConnectDB("DriverITM");
connDriver = null;
/*
* sql="select to_char ( trunc(sysdate,'Month') + rownum - 1,'DD') as tran_date from item where rownum <= last_day (sysdate) - trunc(sysdate,'Month') + 1 order by 1 "
* ;
*
* pstmt = conn.prepareStatement(sql); rs = pstmt.executeQuery();
*
* while(rs.next()) { listDate.add(rs.getString(1)); }
* pstmt.close(); rs.close(); pstmt = null; rs = null;
*
* /** Code for get first n last date of month date 17/10/13
*/
cal = Calendar.getInstance();
sdf = new SimpleDateFormat("dd-MMM-yy");
cal.set(Calendar.DATE, cal.getActualMaximum(Calendar.DATE));
......@@ -87,7 +72,6 @@ public class ProductionVsBudgetReport extends ValidatorEJB implements Production
pstmt = conn.prepareStatement(sql);
rs = pstmt.executeQuery();
xmlDataForGeo = new StringBuffer("<?xml version=\"1.0\"?><Root>");
while (rs.next())
{
......@@ -556,11 +540,11 @@ public class ProductionVsBudgetReport extends ValidatorEJB implements Production
//end Role validation
//start method for PDF generate
public String generatePDF(HashMap<String, List<String>> hashMap, String exportPDFPath, String exportImagePath, String preyearMonth, String rptTitle,String userID) throws RemoteException, ITMException
public String generatePDF(HashMap<String, List<String>> hashMap, String exportPDFPath, String exportImagePath, String preyearMonth,String rptTitle,String userID) throws RemoteException, ITMException
{
@SuppressWarnings("unused")
PdfWriter writer = null;
PdfWriter writer = null;
OutputStream file = null;
Document document = null;
ConnDriver connDriver = new ConnDriver();
......@@ -594,19 +578,15 @@ public class ProductionVsBudgetReport extends ValidatorEJB implements Production
pdfFileName = exportPDFPath+"ProductionVsBudgetReport-"+userID+"-"+currDate+".pdf";
file = new FileOutputStream(new File(pdfFileName));
writer = PdfWriter.getInstance(document, file);
document.open();
document.open();
Paragraph preface = new Paragraph();
preface.setAlignment(Element.ALIGN_CENTER);
preface.add(new Paragraph(rptTitle, FontFactory.getFont(FontFactory.TIMES_ROMAN, 15)));
preface.add(new Paragraph(" "));
document.add(preface);
document.add(preface);
System.out.println(" size of HashMap is="+hashMap.size());
ArrayList<String> keyList=new ArrayList<String>();
ArrayList<List<String>> valueList=new ArrayList<List<String>>();
ArrayList<List<String>> valueList=new ArrayList<List<String>>();
for (Map.Entry<String, List<String>> entry : hashMap.entrySet())
{
keyList.add(entry.getKey());
......@@ -655,8 +635,6 @@ public class ProductionVsBudgetReport extends ValidatorEJB implements Production
existImgFile.delete();
System.out.println("Image Deleted after status *******"+imgFilePath );
}
image.scaleAbsolute(320f, 250f);// image width,height
image.setAlignment(5);
......@@ -676,12 +654,12 @@ public class ProductionVsBudgetReport extends ValidatorEJB implements Production
cell.setBackgroundColor(Color.GREEN);
table.addCell(cell);
cell = new PdfPCell(new Paragraph("LBE",font));
cell = new PdfPCell(new Paragraph("Work Plan",font));
cell.setHorizontalAlignment(Element.ALIGN_CENTER);
cell.setBackgroundColor(Color.GREEN);
table.addCell(cell);
cell = new PdfPCell(new Paragraph("Actual/LBE",font));
cell = new PdfPCell(new Paragraph("Actual/Work Plan",font));
cell.setHorizontalAlignment(Element.ALIGN_CENTER);
cell.setBackgroundColor(Color.GREEN);
table.addCell(cell);
......@@ -691,7 +669,7 @@ public class ProductionVsBudgetReport extends ValidatorEJB implements Production
cell.setBackgroundColor(Color.GREEN);
table.addCell(cell);
cell = new PdfPCell(new Paragraph("Pace(EOM)/LBE",font));
cell = new PdfPCell(new Paragraph("Pace(EOM)/Work Plan",font));
cell.setHorizontalAlignment(Element.ALIGN_CENTER);
cell.setBackgroundColor(Color.GREEN);
table.addCell(cell);
......
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