|
|
|
|
@ -59,11 +59,6 @@ public class TaskBlueprintServiceImpl extends BaseServiceImpl<TaskBlueprintMappe |
|
|
|
|
@Override |
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
|
public boolean addBluePrint(TaskBlueprint taskBlueprint) { |
|
|
|
|
// 获取委托单所有样品
|
|
|
|
|
LambdaQueryWrapper<Simple> wrapper1 = new LambdaQueryWrapper<>(); |
|
|
|
|
wrapper1.eq(Simple::getEntrustId, taskBlueprint.getEntrustId()); |
|
|
|
|
wrapper1.orderByAsc(Simple::getSort); |
|
|
|
|
List<Simple> simples = simpleService.list(wrapper1); |
|
|
|
|
|
|
|
|
|
// 如果是追加检验计划提交
|
|
|
|
|
if (taskBlueprint.getIsContinue() != null && taskBlueprint.getIsContinue() == 1) { |
|
|
|
|
@ -95,6 +90,14 @@ public class TaskBlueprintServiceImpl extends BaseServiceImpl<TaskBlueprintMappe |
|
|
|
|
if (!"".equals(examine.getExperieNum())) { |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 获取委托单所有样品
|
|
|
|
|
LambdaQueryWrapper<Simple> wrapper1 = new LambdaQueryWrapper<>(); |
|
|
|
|
wrapper1.eq(Simple::getEntrustId, taskBlueprint.getEntrustId()); |
|
|
|
|
wrapper1.eq(Simple::getSimpleName, examine.getSimpleName()); |
|
|
|
|
wrapper1.orderByAsc(Simple::getSort); |
|
|
|
|
List<Simple> simples = simpleService.list(wrapper1); |
|
|
|
|
|
|
|
|
|
SimpleDoExamineLog log = new SimpleDoExamineLog(); |
|
|
|
|
log.setExamineId(examine.getId()); |
|
|
|
|
log.setIsFinished(0); |
|
|
|
|
@ -120,6 +123,7 @@ public class TaskBlueprintServiceImpl extends BaseServiceImpl<TaskBlueprintMappe |
|
|
|
|
examine.setDemandCompletionTime(taskBlueprint.getDemandCompletionTime()); |
|
|
|
|
examine.setDeptId(eTask.getDeptId()); |
|
|
|
|
examine.setSimpleCurrPlace(simpleCurrPlace); |
|
|
|
|
simpleService.updateBatchById(simples); |
|
|
|
|
} |
|
|
|
|
examineService.updateBatchById(examines); |
|
|
|
|
} |
|
|
|
|
@ -161,6 +165,14 @@ public class TaskBlueprintServiceImpl extends BaseServiceImpl<TaskBlueprintMappe |
|
|
|
|
eTask.setUpdateTime(new Date()); |
|
|
|
|
List<Examine> examines = eTask.getExamines(); |
|
|
|
|
for (Examine examine : examines) { |
|
|
|
|
|
|
|
|
|
// 获取委托单所有样品
|
|
|
|
|
LambdaQueryWrapper<Simple> wrapper1 = new LambdaQueryWrapper<>(); |
|
|
|
|
wrapper1.eq(Simple::getEntrustId, taskBlueprint.getEntrustId()); |
|
|
|
|
wrapper1.eq(Simple::getSimpleName, examine.getSimpleName()); |
|
|
|
|
wrapper1.orderByAsc(Simple::getSort); |
|
|
|
|
List<Simple> simples = simpleService.list(wrapper1); |
|
|
|
|
|
|
|
|
|
SimpleDoExamineLog log = new SimpleDoExamineLog(); |
|
|
|
|
log.setExamineId(examine.getId()); |
|
|
|
|
log.setIsFinished(0); |
|
|
|
|
@ -184,6 +196,7 @@ public class TaskBlueprintServiceImpl extends BaseServiceImpl<TaskBlueprintMappe |
|
|
|
|
examine.setIsFinished("-1"); |
|
|
|
|
examine.setDemandCompletionTime(taskBlueprint.getDemandCompletionTime()); |
|
|
|
|
examine.setDeptId(eTask.getDeptId()); |
|
|
|
|
simpleService.updateBatchById(simples); |
|
|
|
|
} |
|
|
|
|
examineService.updateBatchById(examines); |
|
|
|
|
} |
|
|
|
|
@ -209,7 +222,6 @@ public class TaskBlueprintServiceImpl extends BaseServiceImpl<TaskBlueprintMappe |
|
|
|
|
this.save(taskBlueprint); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
simpleService.updateBatchById(simples); |
|
|
|
|
Entrust entrust = new Entrust(); |
|
|
|
|
entrust.setId(taskBlueprint.getEntrustId()); |
|
|
|
|
entrust.setEntrustStatus("111"); |
|
|
|
|
|