Commit 90ec0e24 authored by wdy's avatar wdy

编辑任务

parent d0023d5a
......@@ -219,29 +219,28 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task>implements Tas
task.setTaskList(joinTaskList);
BeanUtils.copyBeanProp(task, request);
Task oldTask = taskMapper.selectById(request.getId());
if(request.getTaskList().contains(Task.SUB_TASK_GRFIS) && oldTask.getCarReviewTaskId() == null) {
// 保存车型审查问卷任务
TaskCreateRequest createRequest = new TaskCreateRequest();
BeanUtils.copyBeanProp(createRequest, request);
task.setCarReviewTaskId(saveCarReview(createRequest,initiator,standard,leader));
}
if ( !request.getTaskList().contains(Task.SUB_TASK_GRFIS) && oldTask.getCarReviewTaskId() != null) {
carReviewTaskMapper.deleteById(oldTask.getCarReviewTaskId());
}
if(request.getTaskList().contains(Task.SUB_TASK_SRAIF) && oldTask.getSystemReviewTaskId() == null) {
// 保存体系审查任务
TaskCreateRequest createRequest = new TaskCreateRequest();
BeanUtils.copyBeanProp(createRequest, request);
task.setSystemReviewTaskId(saveSystemReview(createRequest,initiator,standard,leader));
}
if ( !request.getTaskList().contains(Task.SUB_TASK_SRAIF) && oldTask.getSystemReviewTaskId() != null) {
systemReviewTaskMapper.deleteById(oldTask.getSystemReviewTaskId());
}
taskService.updateById(task);
Task oldTask = taskMapper.selectById(request.getId());
if (task.getTaskStatus() == Task.TASK_STATUS_NEW) {
if(request.getTaskList().contains(Task.SUB_TASK_GRFIS) && oldTask.getCarReviewTaskId() == null) {
// 保存车型审查问卷任务
TaskCreateRequest createRequest = new TaskCreateRequest();
BeanUtils.copyBeanProp(createRequest, request);
task.setCarReviewTaskId(saveCarReview(createRequest,initiator,standard,leader));
}
if ( !request.getTaskList().contains(Task.SUB_TASK_GRFIS) && oldTask.getCarReviewTaskId() != null) {
carReviewTaskMapper.deleteById(oldTask.getCarReviewTaskId());
}
if(request.getTaskList().contains(Task.SUB_TASK_SRAIF) && oldTask.getSystemReviewTaskId() == null) {
// 保存体系审查任务
TaskCreateRequest createRequest = new TaskCreateRequest();
BeanUtils.copyBeanProp(createRequest, request);
task.setSystemReviewTaskId(saveSystemReview(createRequest,initiator,standard,leader));
}
if ( !request.getTaskList().contains(Task.SUB_TASK_SRAIF) && oldTask.getSystemReviewTaskId() != null) {
systemReviewTaskMapper.deleteById(oldTask.getSystemReviewTaskId());
}
taskStateFacade.doCreate(task, request.getTaskList());
}
......
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