查询模组档位统计分布图 修改
This commit is contained in:
parent
c37f25a874
commit
6f50adc782
@ -184,11 +184,15 @@ public class WoPackagingBoxSubstrateController {
|
|||||||
totalSubNum+= subNum;
|
totalSubNum+= subNum;
|
||||||
}
|
}
|
||||||
for(PowerReportDTO power : powerReportList){
|
for(PowerReportDTO power : powerReportList){
|
||||||
|
if(power.getSubNum()==0 ||totalSubNum ==0 ){
|
||||||
|
power.setProportion("0%");
|
||||||
|
}else {
|
||||||
Float prop = (Float.valueOf(power.getSubNum())/Float.valueOf(totalSubNum))*100;
|
Float prop = (Float.valueOf(power.getSubNum())/Float.valueOf(totalSubNum))*100;
|
||||||
DecimalFormat df = new DecimalFormat("0.00");
|
DecimalFormat df = new DecimalFormat("0.00");
|
||||||
String propS = df.format(prop)+"%";
|
String propS = df.format(prop)+"%";
|
||||||
power.setProportion(propS);
|
power.setProportion(propS);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
diversePower = totalCompensatePower - totalLevelPower;
|
diversePower = totalCompensatePower - totalLevelPower;
|
||||||
|
@ -40,4 +40,9 @@ public class PowerReportDTO implements Serializable {
|
|||||||
this.sumPMPP = sumPMPP;
|
this.sumPMPP = sumPMPP;
|
||||||
this.proportion = proportion;
|
this.proportion = proportion;
|
||||||
}
|
}
|
||||||
|
public PowerReportDTO(Integer subNum, String subLevel, Float sumPMPP) {
|
||||||
|
this.subNum = subNum;
|
||||||
|
this.subLevel = subLevel;
|
||||||
|
this.sumPMPP = sumPMPP;
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user