Commit c801ed95 authored by wdy's avatar wdy

Merge branch 'wangdingyi' into 'dev'

创建任务

See merge request !160
parents 5b7b4985 bd26a669
...@@ -116,7 +116,9 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas ...@@ -116,7 +116,9 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
Task task = new Task(); Task task = new Task();
task.setTaskInitiatorId(loginUser.getUserId()); task.setTaskInitiatorId(loginUser.getUserId());
task.setTaskInitiator(initiator.getNickName()); task.setTaskInitiator(initiator.getNickName());
task.setTaskInitiatorDept(initiator.getDept().getDeptName()); if (initiator.getDept().getDeptName() != null) {
task.setTaskInitiatorDept(initiator.getDept().getDeptName());
}
task.setTaskStatus(Task.TASK_STATUS_NEW); task.setTaskStatus(Task.TASK_STATUS_NEW);
task.setRunStatus(Task.RUN_STATUS_RUNNABLE); task.setRunStatus(Task.RUN_STATUS_RUNNABLE);
task.setLeaderId(leader.getUserId()); task.setLeaderId(leader.getUserId());
...@@ -336,10 +338,12 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas ...@@ -336,10 +338,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