Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@ -2444,6 +2444,11 @@ public class PgsProgressCategoryServiceImpl extends ServiceImpl<PgsProgressCateg
|
||||
.map(PgsProgressCategory::getUnitType)
|
||||
.filter(Objects::nonNull)
|
||||
.findFirst().orElse(null);
|
||||
if (StringUtils.isNotBlank(unitType) && unitType.equals(PgsProgressUnitTypeEnum.PERCENTAGE.getValue())) {
|
||||
BigDecimal size = BigDecimal.valueOf(value.size());
|
||||
completedTotal = completedTotal.divide(size, 2, RoundingMode.HALF_UP);
|
||||
finishedNum = finishedNum.divide(size, 2, RoundingMode.HALF_UP);
|
||||
}
|
||||
// 封装数据
|
||||
PgsProgressCategoryDateTotalVo vo = new PgsProgressCategoryDateTotalVo();
|
||||
vo.setName(name);
|
||||
@ -2521,11 +2526,6 @@ public class PgsProgressCategoryServiceImpl extends ServiceImpl<PgsProgressCateg
|
||||
if (planNumber.compareTo(BigDecimal.ZERO) <= 0) {
|
||||
return;
|
||||
}
|
||||
// 获取累计完成数量
|
||||
BigDecimal completedTotal = value.stream()
|
||||
.map(PgsProgressCategory::getCompleted)
|
||||
.filter(Objects::nonNull)
|
||||
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
// 获取类别单位
|
||||
String unit = value.stream()
|
||||
.map(PgsProgressCategory::getUnit)
|
||||
|
||||
Reference in New Issue
Block a user