Browse Source

Merge remote-tracking branch 'origin/dev'

dev_shibei_match
yinzuomei 4 years ago
parent
commit
c26ddf7cb6
  1. 11
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollDistrictDepartmentServiceImpl.java
  2. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectLogDailyServiceImpl.java

11
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexCollDistrictDepartmentServiceImpl.java

@ -118,11 +118,16 @@ public class IndexCollDistrictDepartmentServiceImpl implements IndexCollDistrict
if (CollectionUtils.isNotEmpty(handle)) {
list.forEach(entity -> handle.stream().filter(dto -> dto.getOrgId().equals(entity.getDeptId())).forEach(item -> {
if (item.getCount() != NumConstant.ZERO) {
BigDecimal count = new BigDecimal(item.getCount());
BigDecimal count = null != item.getCount() && NumConstant.ZERO != item.getCount() ? new BigDecimal(item.getCount()) : BigDecimal.ZERO;
BigDecimal sum = new BigDecimal(item.getSum());
BigDecimal one = new BigDecimal(NumConstant.ONE);
entity.setClosedProjectRatio(one.divide(sum.divide(count), NumConstant.SIX, RoundingMode.HALF_UP));
entity.setClosedProjectRatio(sum.divide(count).setScale(NumConstant.SIX, RoundingMode.HALF_UP));
//entity.setClosedProjectRatio(one.divide(sum.divide(count), NumConstant.SIX, RoundingMode.HALF_UP));
if (count.compareTo(BigDecimal.ZERO) == 1) {
//如果count>0
entity.setClosedProjectRatio(sum.divide(count).setScale(NumConstant.SIX, RoundingMode.HALF_UP));
} else {
entity.setClosedProjectRatio(BigDecimal.ZERO);
}
}
}));
}

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectLogDailyServiceImpl.java

@ -270,7 +270,7 @@ public class FactOriginProjectLogDailyServiceImpl extends BaseServiceImpl<FactOr
BigDecimal avgCost = new BigDecimal(total).divide(new BigDecimal(v.size()),4, BigDecimal.ROUND_HALF_UP);
//efficiencyMap.put(k,BigDecimal.ONE.divide(avgCost,4, BigDecimal.ROUND_HALF_UP));
efficiencyMap.put(k,avgCost.setScale(6,BigDecimal.ROUND_HALF_UP));
efficiencyMap.put(k, null == avgCost ? BigDecimal.ZERO : avgCost.setScale(6, BigDecimal.ROUND_HALF_UP));
}else{
efficiencyMap.put(k,BigDecimal.ZERO);
}

Loading…
Cancel
Save