查询模组档位统计分布图 修改
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user