Commit 92f821c0 authored by wdy's avatar wdy

Merge branch 'wangdingyi' into 'dev'

任务列表问卷任务进度

See merge request !335
parents 3bbc4194 1d214bce
...@@ -1082,6 +1082,8 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas ...@@ -1082,6 +1082,8 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
for (ResultCountResponse response : carResponseList) { for (ResultCountResponse response : carResponseList) {
if (Objects.equals(response.getTaskStatus(), CarReviewTask.TASK_STATUS_FINISH)) { if (Objects.equals(response.getTaskStatus(), CarReviewTask.TASK_STATUS_FINISH)) {
response.setSchedule(100.0); response.setSchedule(100.0);
} else if (Objects.equals(response.getTaskStatus(), CarReviewTask.TASK_STATUS_SIGNED)) {
response.setSchedule(90.0);
} else { } else {
BigDecimal num = new BigDecimal(response.getSchedule()); BigDecimal num = new BigDecimal(response.getSchedule());
response.setSchedule(num.setScale(1,BigDecimal.ROUND_UP).doubleValue()); response.setSchedule(num.setScale(1,BigDecimal.ROUND_UP).doubleValue());
...@@ -1111,6 +1113,8 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas ...@@ -1111,6 +1113,8 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
for (ResultCountResponse response : responseLists) { for (ResultCountResponse response : responseLists) {
if (Objects.equals(response.getTaskStatus(), SystemReviewTask.STATUS_FINISH)) { if (Objects.equals(response.getTaskStatus(), SystemReviewTask.STATUS_FINISH)) {
response.setSchedule(100.0); response.setSchedule(100.0);
} else if (Objects.equals(response.getTaskStatus(), SystemReviewTask.STATUS_SIGNED)) {
response.setSchedule(90.0);
} else { } else {
BigDecimal num = new BigDecimal(response.getSchedule()); BigDecimal num = new BigDecimal(response.getSchedule());
response.setSchedule(num.setScale(1,BigDecimal.ROUND_UP).doubleValue()); response.setSchedule(num.setScale(1,BigDecimal.ROUND_UP).doubleValue());
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
(SELECT COUNT(*) FROM t_review_details trd (SELECT COUNT(*) FROM t_review_details trd
INNER JOIN t_review_keypoint trk ON trk.id = trd.review_keypoint_id 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 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 1
)) * 90 AS schedule, )) * 90 AS schedule,
ts.task_status AS taskStatus ts.task_status AS taskStatus
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
(SELECT COUNT(*) FROM t_review_details trd (SELECT COUNT(*) FROM t_review_details trd
INNER JOIN t_review_keypoint trk ON trk.id = trd.review_keypoint_id 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 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 1
)) * 90 AS schedule, )) * 90 AS schedule,
tc.task_status AS taskStatus 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