|
|
@ -54,6 +54,7 @@ import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.math.BigDecimal; |
|
|
|
import java.time.LocalDate; |
|
|
|
import java.time.LocalDate; |
|
|
|
import java.time.LocalDateTime; |
|
|
|
import java.time.LocalDateTime; |
|
|
|
import java.time.format.DateTimeFormatter; |
|
|
|
import java.time.format.DateTimeFormatter; |
|
|
@ -1162,6 +1163,12 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, TaskEntity> imp |
|
|
|
voteChartVo.setFinishIds(finishIds); |
|
|
|
voteChartVo.setFinishIds(finishIds); |
|
|
|
voteChartVo.setUndoneNum(undoneIds.size()); |
|
|
|
voteChartVo.setUndoneNum(undoneIds.size()); |
|
|
|
voteChartVo.setUndoneIds(undoneIds); |
|
|
|
voteChartVo.setUndoneIds(undoneIds); |
|
|
|
|
|
|
|
if (CollectionUtil.isEmpty(list)||CollectionUtil.isEmpty(undoneIds)){ |
|
|
|
|
|
|
|
voteChartVo.setFinishRate(0.00d); |
|
|
|
|
|
|
|
}else { |
|
|
|
|
|
|
|
BigDecimal divide = new BigDecimal(list.size()).divide(new BigDecimal(list.size()),2,BigDecimal.ROUND_UP); |
|
|
|
|
|
|
|
voteChartVo.setFinishRate( divide.doubleValue()); |
|
|
|
|
|
|
|
} |
|
|
|
return voteChartVo; |
|
|
|
return voteChartVo; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|