* @return
*/
private String createGestion(List<Gestion> listGestion,List<String> listSrcGestion,List<String> listSumGroupGestion){
List<String> listKeyGestion = createKeyGestion(listGestion);
//List<String> list = new ArrayList<String>();
Gestion gestion = null;
String sumGestion = "";
//Calculate Sum Gestion
double sumAmount = 0.0;
double sumAvenants = 0.0;
double sumArrete = 0.0;
double sumNonarrete = 0.0;
double sumProvision = 0.0;
double sumDevisrefuse = 0.0;
double sumReelactivitive = 0.0;
double sumAmount2 = 0.0;
double sumTotalecart = 0.0;
double sumTotalfdc = 0.0;
for(int i = 0;i<listKeyGestion.size();i++){
String srcGestion = "";
String sumGroupGestion = "";
double amount = 0.0;
double avenants = 0.0;
double arrete = 0.0;
double nonarrete = 0.0;
double provision = 0.0;
double devisrefuse = 0.0;
double reelactivitive = 0.0;
double amount2 = 0.0;
double ecartSum = 0.0;
double totalfdcSum = 0.0;
for(int j =0 ; j < listGestion.size() ; j++){
gestion = listGestion.get(j);
if(gestion.getMarche().getLabel().equalsIgnoreCase(listKeyGestion.get(i))){
String tmp = gestion.getMarche().getLabel() + " " + gestion.getTraite();
String gestionComment = gestion.getComment() != null ? gestion.getComment() : "";
String statutLabel = gestion.getStatut() != null ? gestion.getStatut().getLabel() : "";
/*srcGestion += gestion.getDevis() + Constants.SEPRATE + statutLabel + Constants.SEPRATE +
gestion.getLabel() + Constants.SEPRATE + gestionComment + Constants.SEPRATE + gestion.getAmount() + Constants.SEPRATE +
tmp + Constants.SEPRATE + gestion.getArrete() + Constants.SEPRATE +
gestion.getNonArrete() + Constants.SEPRATE + gestion.getProvision() + Constants.SEPRATE +
gestion.getDevisRefuse() + Constants.SEPRATE + calculateTotalFdc(gestion) + Constants.SEPRATE +
gestion.getReelActivitive() + Constants.SEPRATE +
gestion.getType().getLabel() + Constants.SEPRATE +
gestion.getLabel2() + Constants.SEPRATE +
gestion.getAmount2() + Constants.SEPRATE +
calculateEcart(gestion) + Constants.SEPRATE;*/
srcGestion += append(gestion.getDevis(),statutLabel,gestion.getLabel(),gestionComment,gestion.getAmount(),tmp,gestion.getArrete(),gestion.getNonArrete(),
gestion.getProvision(),gestion.getDevisRefuse(),calculateTotalFdc(gestion),gestion.getReelActivitive(),gestion.getType().getLabel(),
gestion.getLabel2(),gestion.getAmount2(),calculateEcart(gestion));
//Group
amount += gestion.getAmount();
avenants += gestion.getTraite();
arrete += gestion.getArrete();
nonarrete += gestion.getNonArrete();
provision += gestion.getProvision();
devisrefuse += gestion.getDevisRefuse();
reelactivitive += gestion.getReelActivitive();
amount2 += gestion.getAmount2();
ecartSum += calculateEcart(gestion);
totalfdcSum += calculateTotalFdc(gestion);
}
}
listSrcGestion.add(srcGestion);