Commit 48f6a29f authored by wdy's avatar wdy

查询用户任务

parent b4f67da5
...@@ -341,10 +341,12 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas ...@@ -341,10 +341,12 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
List<TaskFindResponse> responses = taskMapper.findByUserId(request,userId); List<TaskFindResponse> responses = taskMapper.findByUserId(request,userId);
for (TaskFindResponse response : responses) { for (TaskFindResponse response : responses) {
if (response.getSystemReviewTaskId() != null) { if (response.getSystemReviewTaskId() != null) {
response.setSystemReview((double)reviewDetailsMapper.count(response.getSystemReviewTaskId(),SystemReviewTask.TYPE)); BigDecimal num = new BigDecimal(((double)reviewDetailsMapper.count(response.getSystemReviewTaskId(),SystemReviewTask.TYPE))* 100);
response.setSystemReview(num.setScale(1,BigDecimal.ROUND_UP).doubleValue());
} }
if (response.getCarReviewTaskId() != null) { if (response.getCarReviewTaskId() != null) {
response.setCarReview((double)reviewDetailsMapper.count(response.getCarReviewTaskId(),CarReviewTask.TYPE)); BigDecimal num = new BigDecimal(((double)reviewDetailsMapper.count(response.getCarReviewTaskId(),CarReviewTask.TYPE)) * 100);
response.setCarReview(num.setScale(1,BigDecimal.ROUND_UP).doubleValue());
} }
} }
return responses; return responses;
......
...@@ -130,6 +130,7 @@ ...@@ -130,6 +130,7 @@
t.task_no,t.task_name,t.task_status,t.name, t.task_no,t.task_name,t.task_status,t.name,
t.product_model, t.product_model,
t.standard_no, t.standard_no,
t.task_list,
t.leader_id,t.leader, t.leader_id,t.leader,
t.task_begin_time,t.task_end_time t.task_begin_time,t.task_end_time
FROM t_task t FROM t_task t
...@@ -216,6 +217,7 @@ ...@@ -216,6 +217,7 @@
t.task_no,t.task_name,t.task_status,t.name, t.task_no,t.task_name,t.task_status,t.name,
t.standard_no, t.standard_no,
t.product_model, t.product_model,
t.task_list,
t.leader_id,t.leader, t.leader_id,t.leader,
t.task_begin_time,t.task_end_time t.task_begin_time,t.task_end_time
FROM t_task t FROM t_task t
......
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