Commit 3e24b526 authored by prane's avatar prane

MRP process - Highligt total demand quantity for each line

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@194510 ce508802-f39f-4f6c-b175-0d175dae99d5
parent ae4f4a9c
...@@ -88,6 +88,8 @@ import org.apache.poi.hssf.usermodel.HSSFRow; ...@@ -88,6 +88,8 @@ import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet; import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.hssf.util.HSSFColor; import org.apache.poi.hssf.util.HSSFColor;
import org.apache.poi.ss.usermodel.CellStyle;
import org.apache.poi.ss.usermodel.IndexedColors;
import org.w3c.dom.Document; import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap; import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node; import org.w3c.dom.Node;
...@@ -12972,7 +12974,11 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe ...@@ -12972,7 +12974,11 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
font.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD); font.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
font.setColor(HSSFColor.BLUE.index); font.setColor(HSSFColor.BLUE.index);
style.setFont(font); style.setFont(font);
//Added by Pavan R on 14dec18 start [to highlight running plan supply column in Excel file]
HSSFCellStyle styleBckgroud = wb.createCellStyle();
styleBckgroud.setFillForegroundColor(IndexedColors.ORANGE.getIndex());
styleBckgroud.setFillPattern(CellStyle.SOLID_FOREGROUND);
//Added by Pavan R on 14dec18 end
//HSSFCell titleCell = titleRow.createCell((short) 0); //HSSFCell titleCell = titleRow.createCell((short) 0);
HSSFCell titleCell = titleRow.createCell((int) 0); HSSFCell titleCell = titleRow.createCell((int) 0);
titleCell.setCellValue("MRP - Material Requirements"); titleCell.setCellValue("MRP - Material Requirements");
...@@ -13134,7 +13140,56 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe ...@@ -13134,7 +13140,56 @@ public class RunMRPPrc extends ProcessEJB implements RunMRPPrcLocal, RunMRPPrcRe
row.getCell(14).setCellValue(planSupply); row.getCell(14).setCellValue(planSupply);
row.getCell(15).setCellValue(runningDemand); row.getCell(15).setCellValue(runningDemand);
row.getCell(16).setCellValue(runningSupply); row.getCell(16).setCellValue(runningSupply);
row.getCell(17).setCellValue(runningPlanSupply); //Added by Pavan R on 14dec18 start [to highlight running plan supply column in Excel file]
System.out.println("Pavan R adpeList["+adpeList+"]adpeCount["+adpeCount+"]timeMRParr["+timeMRParr.size()+"]timeCtr["+timeCtr+"]");
if(adpeList.size() > 0)
{
if(adpeList.size() > adpeCount+1)
{
ADPElement apdEle = (ADPElement)adpeList.get(adpeCount+1);
String nextItem = apdEle.getItemCode();
System.out.println("Pavan R itemCode["+itemCode+"]nextItem["+nextItem+"]");
if(!adpElement.getItemCode().equals(nextItem))
{
if (timeMRParr.size() > 0 && timeCtr == timeMRParr.indexOf(timeMRParr.get(timeMRParr.size()-1)))
{
System.out.println("Inside timeMRParr....1");
cell = row.getCell(17);
cell.setCellValue(runningPlanSupply);
cell.setCellStyle(styleBckgroud);
}else
{
row.getCell(17).setCellValue(runningPlanSupply);
}
}
else{
if (timeMRParr.size() > 0 && timeCtr == timeMRParr.indexOf(timeMRParr.get(timeMRParr.size()-1)))
{
System.out.println("Inside timeMRParr....2");
cell = row.getCell(17);
cell.setCellValue(runningPlanSupply);
cell.setCellStyle(styleBckgroud);
}else
{
row.getCell(17).setCellValue(runningPlanSupply);
}
}
}else if (timeMRParr.size() != 0 && timeCtr == timeMRParr.indexOf(timeMRParr.get(timeMRParr.size()-1)))
{
System.out.println("Inside timeMRParr....3");
cell = row.getCell(17);
cell.setCellValue(runningPlanSupply);
cell.setCellStyle(styleBckgroud);
}else{
row.getCell(17).setCellValue(runningPlanSupply);
}
}else
{
row.getCell(17).setCellValue(runningPlanSupply);
}
//row.getCell(17).setCellValue(runningPlanSupply);
//Added by Pavan R on 14dec18 end
row.getCell(18).setCellValue(independentDemand); row.getCell(18).setCellValue(independentDemand);
// if(flag) // if(flag)
......
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