Commit 1d214bce authored by wdy's avatar wdy

任务列表问卷任务进度

parent 3bbc4194
......@@ -1082,6 +1082,8 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
for (ResultCountResponse response : carResponseList) {
if (Objects.equals(response.getTaskStatus(), CarReviewTask.TASK_STATUS_FINISH)) {
response.setSchedule(100.0);
} else if (Objects.equals(response.getTaskStatus(), CarReviewTask.TASK_STATUS_SIGNED)) {
response.setSchedule(90.0);
} else {
BigDecimal num = new BigDecimal(response.getSchedule());
response.setSchedule(num.setScale(1,BigDecimal.ROUND_UP).doubleValue());
......@@ -1111,6 +1113,8 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
for (ResultCountResponse response : responseLists) {
if (Objects.equals(response.getTaskStatus(), SystemReviewTask.STATUS_FINISH)) {
response.setSchedule(100.0);
} else if (Objects.equals(response.getTaskStatus(), SystemReviewTask.STATUS_SIGNED)) {
response.setSchedule(90.0);
} else {
BigDecimal num = new BigDecimal(response.getSchedule());
response.setSchedule(num.setScale(1,BigDecimal.ROUND_UP).doubleValue());
......
......@@ -42,7 +42,7 @@
(SELECT COUNT(*) FROM t_review_details trd
INNER JOIN t_review_keypoint trk ON trk.id = trd.review_keypoint_id
INNER JOIN t_review_standard trs ON trs.id = trk.review_standard_id
WHERE trs.type = #{type}),
WHERE trs.type = #{type} and trs.standard_id = #{task.standardId}),
1
)) * 90 AS schedule,
ts.task_status AS taskStatus
......@@ -62,7 +62,7 @@
(SELECT COUNT(*) FROM t_review_details trd
INNER JOIN t_review_keypoint trk ON trk.id = trd.review_keypoint_id
INNER JOIN t_review_standard trs ON trs.id = trk.review_standard_id
WHERE trs.type = #{type}),
WHERE trs.type = #{type} and trs.standard_id = #{task.standardId}),
1
)) * 90 AS schedule,
tc.task_status AS taskStatus
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment