|
|
@ -205,7 +205,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo |
|
|
|
} |
|
|
|
} |
|
|
|
if(ObjectUtil.isNotNull(aftersalesWorkOrder.getUnProcessorEntityList())){ |
|
|
|
if(ObjectUtil.isNotNull(aftersalesWorkOrder.getUnProcessorEntityList())){ |
|
|
|
//责任方 处理方
|
|
|
|
//责任方 处理方
|
|
|
|
List<AftersalesProcessorEntity> list = new ArrayList<>(); |
|
|
|
// List<AftersalesProcessorEntity> list = new ArrayList<>();
|
|
|
|
aftersalesWorkOrder.getUnProcessorEntityList().forEach(i ->{ |
|
|
|
aftersalesWorkOrder.getUnProcessorEntityList().forEach(i ->{ |
|
|
|
AftersalesProcessorEntity processorEntity = new AftersalesProcessorEntity(); |
|
|
|
AftersalesProcessorEntity processorEntity = new AftersalesProcessorEntity(); |
|
|
|
processorEntity.setId(i); |
|
|
|
processorEntity.setId(i); |
|
|
@ -224,19 +224,37 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
aftersalesProcessorService.updateById(processorEntity); |
|
|
|
list.add(processorEntity); |
|
|
|
// list.add(processorEntity);
|
|
|
|
}); |
|
|
|
}); |
|
|
|
if(!list.isEmpty()){ |
|
|
|
// if(!list.isEmpty()){
|
|
|
|
aftersalesProcessorService.saveOrUpdateBatch(list); |
|
|
|
// aftersalesProcessorService.saveOrUpdateBatch(list);
|
|
|
|
} |
|
|
|
// }
|
|
|
|
} |
|
|
|
} |
|
|
|
if( ObjectUtil.isNotNull(aftersalesWorkOrder.getUnDecreaseImageEntityList()) && !aftersalesWorkOrder.getUnDecreaseImageEntityList().isEmpty() ){ |
|
|
|
if( ObjectUtil.isNotNull(aftersalesWorkOrder.getUnDecreaseImageEntityList()) && !aftersalesWorkOrder.getUnDecreaseImageEntityList().isEmpty() ){ |
|
|
|
//图片修改
|
|
|
|
//图片修改
|
|
|
|
aftersalesDecreaseImageService.deleteLogic(aftersalesWorkOrder.getUnDecreaseImageEntityList()); |
|
|
|
aftersalesDecreaseImageService.deleteLogic(aftersalesWorkOrder.getUnDecreaseImageEntityList()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//修改调查经过
|
|
|
|
|
|
|
|
if(ObjectUtils.isNotNull(aftersalesWorkOrder.getSurveyRecordDTO())){ |
|
|
|
|
|
|
|
aftersalesWorkOrder.setInvestigationProcess(aftersalesWorkOrder.getSurveyRecordDTO().getContent()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//修改责任方
|
|
|
|
|
|
|
|
if(ObjectUtils.isNotNull(aftersalesWorkOrder.getUnPersonResponsibleDTO())){ |
|
|
|
|
|
|
|
aftersalesPersonResponsibleService.deleteLogic(aftersalesWorkOrder.getUnPersonResponsibleDTO()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//修改赔款方
|
|
|
|
|
|
|
|
if(ObjectUtils.isNotNull(aftersalesWorkOrder.getUnCompletionRecordEntities())){ |
|
|
|
|
|
|
|
completionRecordService.deleteLogic(aftersalesWorkOrder.getUnCompletionRecordEntities()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//修改收款方
|
|
|
|
|
|
|
|
if(ObjectUtils.isNotNull(aftersalesWorkOrder.getUnCompletionRecipientEntities())){ |
|
|
|
|
|
|
|
completionRecipientService.deleteLogic(aftersalesWorkOrder.getUnCompletionRecipientEntities()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//
|
|
|
|
baseMapper.updateById(aftersalesWorkOrder); |
|
|
|
baseMapper.updateById(aftersalesWorkOrder); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
//添加包件信息
|
|
|
|
//添加包件信息
|
|
|
|
if(ObjectUtils.isNotNull(aftersalesWorkOrder.getPackageEntityList())){ |
|
|
|
if(ObjectUtils.isNotNull(aftersalesWorkOrder.getPackageEntityList())){ |
|
|
@ -317,11 +335,37 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo |
|
|
|
} |
|
|
|
} |
|
|
|
//添加完结受款方数据
|
|
|
|
//添加完结受款方数据
|
|
|
|
if(ObjectUtils.isNotNull(aftersalesWorkOrder.getCompletionRecipientEntities())){ |
|
|
|
if(ObjectUtils.isNotNull(aftersalesWorkOrder.getCompletionRecipientEntities())){ |
|
|
|
completionRecordService.saveBatch(aftersalesWorkOrder.getCompletionRecordEntities()); |
|
|
|
List<AftersalesCompletionRecipientEntity> collect = aftersalesWorkOrder.getCompletionRecipientEntities().stream().filter(i -> ObjectUtils.isNotNull(i.getId())).collect(Collectors.toList()); |
|
|
|
|
|
|
|
List<AftersalesCompletionRecipientEntity> collect1 = aftersalesWorkOrder.getCompletionRecipientEntities().stream().filter(i -> ObjectUtils.isNull(i.getId())).collect(Collectors.toList()); |
|
|
|
|
|
|
|
if(!collect.isEmpty()){ |
|
|
|
|
|
|
|
//修改
|
|
|
|
|
|
|
|
collect.forEach(i ->{ |
|
|
|
|
|
|
|
completionRecipientService.updateById(i); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(!collect1.isEmpty()){ |
|
|
|
|
|
|
|
//添加
|
|
|
|
|
|
|
|
completionRecipientService.saveBatch(collect1); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
//添加完结赔款方数据
|
|
|
|
//添加完结赔款方数据
|
|
|
|
if(ObjectUtils.isNotNull(aftersalesWorkOrder.getCompletionRecordEntities())){ |
|
|
|
if(ObjectUtils.isNotNull(aftersalesWorkOrder.getCompletionRecordEntities())){ |
|
|
|
completionRecordService.saveBatch(aftersalesWorkOrder.getCompletionRecordEntities()); |
|
|
|
|
|
|
|
|
|
|
|
List<AftersalesCompletionRecordEntity> collect = aftersalesWorkOrder.getCompletionRecordEntities().stream().filter(i -> ObjectUtils.isNotNull(i.getId())).collect(Collectors.toList()); |
|
|
|
|
|
|
|
List<AftersalesCompletionRecordEntity> collect1 = aftersalesWorkOrder.getCompletionRecordEntities().stream().filter(i -> ObjectUtils.isNull(i.getId())).collect(Collectors.toList()); |
|
|
|
|
|
|
|
if(!collect.isEmpty()){ |
|
|
|
|
|
|
|
//修改
|
|
|
|
|
|
|
|
collect.forEach(i ->{ |
|
|
|
|
|
|
|
completionRecordService.updateById(i); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(!collect1.isEmpty()){ |
|
|
|
|
|
|
|
//添加
|
|
|
|
|
|
|
|
completionRecordService.saveBatch(collect1); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// completionRecordService.saveBatch(aftersalesWorkOrder.getCompletionRecordEntities());
|
|
|
|
} |
|
|
|
} |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
@ -761,6 +805,7 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo |
|
|
|
// List<AftersalesProcessorVO> processorVOS = new ArrayList<>();
|
|
|
|
// List<AftersalesProcessorVO> processorVOS = new ArrayList<>();
|
|
|
|
List<AftersalesProcessorEntity> list = aftersalesProcessorService.list(Wrappers.<AftersalesProcessorEntity>query().lambda() |
|
|
|
List<AftersalesProcessorEntity> list = aftersalesProcessorService.list(Wrappers.<AftersalesProcessorEntity>query().lambda() |
|
|
|
.eq(AftersalesProcessorEntity::getWorkOrderId, aftersalesWorkOrder.getId()) |
|
|
|
.eq(AftersalesProcessorEntity::getWorkOrderId, aftersalesWorkOrder.getId()) |
|
|
|
|
|
|
|
.apply("conditions in (1,2)") |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
List<AftersalesProcessorVO> processorVOS = list.stream().map( i ->{ |
|
|
|
List<AftersalesProcessorVO> processorVOS = list.stream().map( i ->{ |
|
|
@ -1378,7 +1423,11 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo |
|
|
|
private Boolean addSurveRecord(AftersalesWorkOrderDTO aftersalesWorkOrderDTO, BladeUser user, AftersalesProcessorEntity i) { |
|
|
|
private Boolean addSurveRecord(AftersalesWorkOrderDTO aftersalesWorkOrderDTO, BladeUser user, AftersalesProcessorEntity i) { |
|
|
|
AftersaleSurveyRecordDTO surveyRecordDTO = changName(aftersalesWorkOrderDTO, user); |
|
|
|
AftersaleSurveyRecordDTO surveyRecordDTO = changName(aftersalesWorkOrderDTO, user); |
|
|
|
surveyRecordDTO.setWorkOrderId(aftersalesWorkOrderDTO.getId()); |
|
|
|
surveyRecordDTO.setWorkOrderId(aftersalesWorkOrderDTO.getId()); |
|
|
|
surveyRecordDTO.setContent(aftersalesWorkOrderDTO.getSurveyRecordDTO().getContent());//内容
|
|
|
|
if(ObjectUtils.isNotNull( aftersalesWorkOrderDTO.getSurveyRecordDTO())){ |
|
|
|
|
|
|
|
surveyRecordDTO.setContent(aftersalesWorkOrderDTO.getSurveyRecordDTO().getContent());//内容
|
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
surveyRecordDTO.setContent("指定信息");//内容
|
|
|
|
|
|
|
|
} |
|
|
|
surveyRecordDTO.setTypesOf("1"); |
|
|
|
surveyRecordDTO.setTypesOf("1"); |
|
|
|
surveyRecordDTO.setDifference("2"); |
|
|
|
surveyRecordDTO.setDifference("2"); |
|
|
|
surveyRecordDTO.setCreateUser(user.getUserId()); |
|
|
|
surveyRecordDTO.setCreateUser(user.getUserId()); |
|
|
|