Commit cae981e8 authored by 盖献康's avatar 盖献康

Merge branch 'dev' of...

Merge branch 'dev' of ssh://gitlab.91isoft.com:10022/wangfei/vehicle-quality-review into gaixiankang
parents 62ec444e be25513e
......@@ -309,6 +309,10 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
// 构建并保存任务信息
// 总任务
Task task = taskMapper.selectById(request.getId());
// 小组组长是否发生变化
changeSubLeader(task,leader);
task.setLeaderId(leader.getUserId());
task.setLeader(leader.getName());
setTaskList(request.getTaskList(),task);
......@@ -776,6 +780,29 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
}
private void changeSubLeader(Task task, TaskUserRelation leader) {
if (!Objects.equals(task.getLeaderId(), leader.getUserId())) {
if (task.getSystemReviewTaskId() != null) {
SystemReviewTask systemReviewTask = systemReviewTaskMapper.selectById(task.getSystemReviewTaskId());
systemReviewTask.setLeaderId(leader.getUserId());
systemReviewTask.setLeader(leader.getName());
systemReviewTaskMapper.updateById(systemReviewTask);
}
if (task.getCarReviewTaskId() != null) {
CarReviewTask carReviewTask = carReviewTaskMapper.selectById(task.getCarReviewTaskId());
carReviewTask.setLeaderId(leader.getUserId());
carReviewTask.setLeader(leader.getName());
carReviewTaskMapper.updateById(carReviewTask);
}
if (task.getModelTestTaskId() != null) {
ModelTestTask modelTestTask = modelTestTaskMapper.selectById(task.getModelTestTaskId());
modelTestTask.setLeaderId(leader.getUserId());
modelTestTask.setLeader(leader.getName());
modelTestTaskMapper.updateById(modelTestTask);
}
}
}
private void setFinishLeader(List<UserNameResponse> responseList, List<Task> taskList) {
if (responseList != null && responseList.size() != 0) {
......
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