|
@@ -98,25 +98,25 @@ public class FB02 extends EvaSummary<Item02>{
|
|
|
formulaDataBlocks.forEach(fdb -> {
|
|
|
List<ElementBlock> elementBlockList = JSON.parseArray(fdb.getVal(), ElementBlock.class);
|
|
|
elementBlockList.forEach(eb -> {
|
|
|
- String name = eb.getEName();
|
|
|
- Item02 xm = new Item02();
|
|
|
- xm.setName(checkItemName(name));
|
|
|
- if(name.contains("△")){
|
|
|
- xm.setWeight(2);
|
|
|
- }
|
|
|
- xm.setSubItem(swNameMap.get(fdb.getSwId().toString()));
|
|
|
List<ItemBlock> ib = eb.getList();
|
|
|
int total = ib.stream().mapToInt(ItemBlock::getSubTotal).sum();
|
|
|
- int pass = ib.stream().mapToInt(ItemBlock::getSubPass).sum();
|
|
|
if (total > 0) {
|
|
|
+ String name = eb.getEName();
|
|
|
+ Item02 xm = new Item02();
|
|
|
+ xm.setName(checkItemName(name));
|
|
|
+ if(name.contains("△")){
|
|
|
+ xm.setWeight(2);
|
|
|
+ }
|
|
|
+ xm.setSubItem(swNameMap.get(fdb.getSwId().toString()));
|
|
|
+ int pass = ib.stream().mapToInt(ItemBlock::getSubPass).sum();
|
|
|
double rate = (double) pass / (double) total;
|
|
|
if (rate >= 0.9 && rate <= 100) {
|
|
|
xm.setPassRate(new BigDecimal(rate*100).setScale(1, RoundingMode.HALF_UP).doubleValue());
|
|
|
}else{
|
|
|
xm.setPassRate(100D);
|
|
|
}
|
|
|
+ this.getDatas().add(xm);
|
|
|
}
|
|
|
- this.getDatas().add(xm);
|
|
|
});
|
|
|
});
|
|
|
}
|