|
|
@ -123,10 +123,20 @@ public class AccessTaskV4ServiceImpl implements AccessTaskV4Service { |
|
|
|
if (CollectionUtil.isEmpty(entity.getAccessMaterials())) { |
|
|
|
if (CollectionUtil.isEmpty(entity.getAccessMaterials())) { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
materialService.saveOrUpdateBatch(entity.getAccessMaterials().stream().peek(material -> { |
|
|
|
|
|
|
|
|
|
|
|
List<OperAccessMaterialEntity> exists = materialService.list(new LambdaQueryWrapper<OperAccessMaterialEntity>() {{ |
|
|
|
|
|
|
|
eq(OperAccessMaterialEntity::getPlanId, entity.getPlanId()); |
|
|
|
|
|
|
|
eq(OperAccessMaterialEntity::getIsDeleted, 0L); |
|
|
|
|
|
|
|
}}); |
|
|
|
|
|
|
|
if(CollectionUtil.isNotEmpty(exists)){ |
|
|
|
|
|
|
|
materialService.deleteLogic(exists.stream().map(OperAccessMaterialEntity::getId).collect(Collectors.toList())); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
for (OperAccessMaterialEntity material : entity.getAccessMaterials()){ |
|
|
|
|
|
|
|
material.setId(null); |
|
|
|
material.setPlanId(entity.getPlanId()); |
|
|
|
material.setPlanId(entity.getPlanId()); |
|
|
|
material.setTaskId(entity.getId()); |
|
|
|
material.setTaskId(entity.getId()); |
|
|
|
}).collect(Collectors.toList())); |
|
|
|
materialService.save(material); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -169,6 +179,7 @@ public class AccessTaskV4ServiceImpl implements AccessTaskV4Service { |
|
|
|
if(ObjectUtil.isNotEmpty(variables.get("examine")) && (Boolean) variables.get("examine")){ |
|
|
|
if(ObjectUtil.isNotEmpty(variables.get("examine")) && (Boolean) variables.get("examine")){ |
|
|
|
entity.setTaskName("流程结束"); |
|
|
|
entity.setTaskName("流程结束"); |
|
|
|
entity.setNextStepOperator("流程结束,无需人员处理"); |
|
|
|
entity.setNextStepOperator("流程结束,无需人员处理"); |
|
|
|
|
|
|
|
entity.setStatus(4); |
|
|
|
// 检修台账保存
|
|
|
|
// 检修台账保存
|
|
|
|
this.statiticsSave(entity); |
|
|
|
this.statiticsSave(entity); |
|
|
|
// 更新任务数据
|
|
|
|
// 更新任务数据
|
|
|
|