查询模组档位统计分布图 修改
This commit is contained in:
parent
c37f25a874
commit
6f50adc782
@ -184,10 +184,14 @@ public class WoPackagingBoxSubstrateController {
|
||||
totalSubNum+= subNum;
|
||||
}
|
||||
for(PowerReportDTO power : powerReportList){
|
||||
Float prop = (Float.valueOf(power.getSubNum())/Float.valueOf(totalSubNum))*100;
|
||||
DecimalFormat df = new DecimalFormat("0.00");
|
||||
String propS = df.format(prop)+"%";
|
||||
power.setProportion(propS);
|
||||
if(power.getSubNum()==0 ||totalSubNum ==0 ){
|
||||
power.setProportion("0%");
|
||||
}else {
|
||||
Float prop = (Float.valueOf(power.getSubNum())/Float.valueOf(totalSubNum))*100;
|
||||
DecimalFormat df = new DecimalFormat("0.00");
|
||||
String propS = df.format(prop)+"%";
|
||||
power.setProportion(propS);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -40,4 +40,9 @@ public class PowerReportDTO implements Serializable {
|
||||
this.sumPMPP = sumPMPP;
|
||||
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