Compare commits
2 Commits
3862fc379d
...
9b4c3092c1
| Author | SHA1 | Date | |
|---|---|---|---|
| 9b4c3092c1 | |||
| eaf90fb8b5 |
@ -283,8 +283,14 @@ public class OpsInspectionReportServiceImpl implements IOpsInspectionReportServi
|
|||||||
//完成率
|
//完成率
|
||||||
//完成数
|
//完成数
|
||||||
int finishCount = thisMonth.stream().filter(vo -> vo.getStatus().equals("3")).toList().size();
|
int finishCount = thisMonth.stream().filter(vo -> vo.getStatus().equals("3")).toList().size();
|
||||||
BigDecimal divide = BigDecimal.valueOf(finishCount).divide(BigDecimal.valueOf(thisMonth.size()), 2, RoundingMode.HALF_UP);
|
BigDecimal divide = BigDecimal.ZERO;
|
||||||
|
if (thisMonth.size() == 0){
|
||||||
|
divide = BigDecimal.valueOf(finishCount).divide(BigDecimal.valueOf(thisMonth.size()), 2, RoundingMode.HALF_UP);
|
||||||
recordVo.setWcl(divide.multiply(new BigDecimal("100")).toString());
|
recordVo.setWcl(divide.multiply(new BigDecimal("100")).toString());
|
||||||
|
}else {
|
||||||
|
recordVo.setWcl("0");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//统计上一月的数据
|
//统计上一月的数据
|
||||||
firstDay = LocalDate.now().minusMonths(1).withDayOfMonth(1);
|
firstDay = LocalDate.now().minusMonths(1).withDayOfMonth(1);
|
||||||
|
|||||||
Reference in New Issue
Block a user