Browse Source

新增巡检统计字段

zhongwei
ty 1 year ago
parent
commit
f8dc2ca249
  1. 2
      hzims-service-api/common-api/src/main/java/com/hnac/hzims/vo/VoteChartVo.java
  2. 2
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskServiceImpl.java

2
hzims-service-api/common-api/src/main/java/com/hnac/hzims/vo/VoteChartVo.java

@ -37,6 +37,6 @@ public class VoteChartVo {
@ExcelIgnore @ExcelIgnore
private List<Long> finishIds; private List<Long> finishIds;
@ApiModelProperty(value = "完成率") @ApiModelProperty(value = "完成率")
@ExcelProperty(value = "完成率", index = 3) @ExcelProperty(value = "完成率", index = 4)
private Double finishRate; private Double finishRate;
} }

2
hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskServiceImpl.java

@ -1166,7 +1166,7 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, TaskEntity> imp
if (CollectionUtil.isEmpty(list)||CollectionUtil.isEmpty(undoneIds)){ if (CollectionUtil.isEmpty(list)||CollectionUtil.isEmpty(undoneIds)){
voteChartVo.setFinishRate(0.00d); voteChartVo.setFinishRate(0.00d);
}else { }else {
BigDecimal divide = new BigDecimal(list.size()).divide(new BigDecimal(list.size()),2,BigDecimal.ROUND_UP); BigDecimal divide = new BigDecimal(finishIds.size()).divide(new BigDecimal(list.size()),2,BigDecimal.ROUND_UP);
voteChartVo.setFinishRate(divide.doubleValue()); voteChartVo.setFinishRate(divide.doubleValue());
} }
return voteChartVo; return voteChartVo;

Loading…
Cancel
Save