calculateValues();
}
private String createGridReport(List<FicheStDto> grid, List<String> lstKeyGrid, Map<String, String> mapGrid,
Map<String, String> mapTotalGroupGrid) {
FicheStDto ficheStDto = null;
double sumtotalObjectif = 0.0;
double sumtotalObj = 0.0;
double sumtotalTransfert = 0.0;
double sumtotalRd = 0.0;
double sumtotalTs = 0.0;
double sumtotaltotal = 0.0;
double sumtotalTraite = 0.0;
double sumtotalArrete = 0.0;
double sumtotalNonArete = 0.0;
double sumtotalProvision = 0.0;
double sumtotalTotalFinal = 0.0;
double sumtotalDevisRefuse = 0.0;
double sumtotalEcartM = 0.0;
double sumtotalEcratM1 = 0.0;
double sumtotalVariationM = 0.0;
double sumtotalEcartDernierPoint = 0.0;
double sumtotalVariationEcartPoint = 0.0;
double summontantBA = 0.0;
double summontantReel = 0.0;
double sumtotalCanto = 0.0;
double sumtotalBadge = 0.0;
double sumtotalGrue = 0.0;
double sumtotlaLift = 0.0;
double sumtotalBenne = 0.0;
double sumtotalNettoy = 0.0;
double sumtotalAutres = 0.0;
double sumtotalProrata = 0.0;
double sumtotalTotal = 0.0;
double sumtotalPrestationTraite = 0.0;
double sumtotalPenaliteFacture = 0.0;
double sumtotalProrataAppliqueSt = 0.0;
double sumtotalProrataMarche = 0.0;
double sumtotalProrataSuRad = 0.0;
double sumtotalMarcheRestantATraiter = 0.0;
double sumtotalVariationDuAuxTransferts = 0.0;
double sumtotalManqueAGagnerStsansProrata = 0.0;
double cellts = 0.0;
double celltotlafinal = 0.0;
NumberFormat numberFormat = NumberFormat.getFormat(Constants.NUMBER_FORMAT);
for( int i = 0 ; i < lstKeyGrid.size() ; i++ ) {
String grid1 = "";
String sumTotalGroup1 = "";
double totalObjectif = 0.0;
double totalObj = 0.0;
double totalTransfert = 0.0;
double totalRd = 0.0;
double totalTs = 0.0;
double totaltotal = 0.0;
double totalTraite = 0.0;
double totalArrete = 0.0;
double totalNonArete = 0.0;
double totalProvision = 0.0;
double totalTotalFinal = 0.0;
double totalDevisRefuse = 0.0;
double totalEcartM = 0.0;
double totalEcratM1 = 0.0;
double totalVariationM = 0.0;
double totalEcartDernierPoint = 0.0;
double totalVariationEcartPoint = 0.0;
double montantBA = 0.0;
double montantReel = 0.0;
double totalCanto = 0.0;
double totalBadge = 0.0;
double totalGrue = 0.0;
double totlaLift = 0.0;
double totalBenne = 0.0;
double totalNettoy = 0.0;
double totalAutres = 0.0;
double totalProrata = 0.0;
double totalTotal = 0.0;
double totalPrestationTraite = 0.0;
double totalPenaliteFacture = 0.0;
double totalProrataAppliqueSt = 0.0;
double totalProrataMarche = 0.0;
double totalProrataSuRad = 0.0;
double totalMarcheRestantATraiterPercentage = 0.0;
double totalMarcheRestantATraiter = 0.0;
double totalVariationDuAuxTransferts = 0.0;
double totalManqueAGagnerStsansProrata = 0.0;
for( int j = 0 ; j < grid.size() ; j++ ) {
ficheStDto = grid.get(j);
if( lstKeyGrid.get(i).equalsIgnoreCase(ficheStDto.getLotType().getName()) ) {
cellts = ficheStDto.getObj() + ficheStDto.getTransferts() + ficheStDto.getRd() + ficheStDto.getTs();
celltotlafinal = ficheStDto.getTraite() + ficheStDto.getArrete() + ficheStDto.getNonArrete() + ficheStDto.getProvision();
totalObjectif += ficheStDto.getObjectif();
totalObj += ficheStDto.getObj();
totalTransfert += ficheStDto.getTransferts();
totalRd += ficheStDto.getRd();
totalTs += ficheStDto.getTs();
totaltotal += cellts;
totalTraite += ficheStDto.getTraite();
totalArrete += ficheStDto.getArrete();
totalNonArete += ficheStDto.getNonArrete();
totalProvision += ficheStDto.getProvision();
totalTotalFinal += celltotlafinal;
totalDevisRefuse += ficheStDto.getDevisRefuse();
totalEcartM += ficheStDto.getEcartM();
totalEcratM1 += ficheStDto.getEcartM1();
totalVariationM += ficheStDto.getVariationM();
totalEcartDernierPoint += ficheStDto.getEcartDernierPoint();
totalVariationEcartPoint += ficheStDto.getVariationEcartPointM();
montantBA += ficheStDto.getTotalCumule();
montantReel += ficheStDto.getTraite();
totalCanto += ficheStDto.getTotalCanto();
totalBadge += ficheStDto.getTotalBadge();
totalGrue += ficheStDto.getTotalGrue();
totlaLift += ficheStDto.getTotalLift();
totalBenne += ficheStDto.getTotalBenne();
totalNettoy += ficheStDto.getTotalNettoy();
totalAutres += ficheStDto.getTotalAutres();
totalProrata += ficheStDto.getTotalProrata();
totalTotal += ficheStDto.getTotal2();
totalPrestationTraite += ficheStDto.getPrestationTraitePercentage();
totalPenaliteFacture += ficheStDto.getTotalPenalty();
totalProrataAppliqueSt += ficheStDto.getProrataAppliqueST();
totalProrataMarche += ficheStDto.getProrataMarche();
totalProrataSuRad += ficheStDto.getProrataSurRAD();
totalMarcheRestantATraiterPercentage += ficheStDto.getMarchesRestantATraiterPercentage();
totalMarcheRestantATraiter += ficheStDto.getMarchesRestantATraiter();
totalVariationDuAuxTransferts += ficheStDto.getVariationDuAuxTransferts();
totalManqueAGagnerStsansProrata += ficheStDto.getManqueAGagnerSTSansProrata();
// Create row report
grid1 += createRowReport(ficheStDto, cellts, celltotlafinal, numberFormat);
}
}