|
|
|
@ -1303,20 +1303,35 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
|
|
|
|
|
workOrderEntity.setCompletionId(myCurrentWarehouse.getId()); |
|
|
|
|
baseMapper.updateById(workOrderEntity); |
|
|
|
|
//修改处理方提交结果
|
|
|
|
|
AftersalesProcessorEntity one = aftersalesProcessorService.getOne(Wrappers.<AftersalesProcessorEntity>query().lambda() |
|
|
|
|
List<AftersalesProcessorEntity> list = aftersalesProcessorService.list(Wrappers.<AftersalesProcessorEntity>query().lambda() |
|
|
|
|
.eq(AftersalesProcessorEntity::getWorkOrderId, aftersalesWorkOrderDTO.getId()) |
|
|
|
|
.eq(AftersalesProcessorEntity::getBusinessName, myCurrentWarehouse.getName()) |
|
|
|
|
.eq(AftersalesProcessorEntity::getBusinessId, myCurrentWarehouse.getId()) |
|
|
|
|
/*.eq(AftersalesProcessorEntity::getBusinessName, myCurrentWarehouse.getName()) |
|
|
|
|
.eq(AftersalesProcessorEntity::getBusinessId, myCurrentWarehouse.getId())*/ |
|
|
|
|
.eq(AftersalesProcessorEntity::getTypesOf, ProcessorTypesOfStatusConstant.chulifang.getValue()) |
|
|
|
|
.apply("conditions in ( 1 , 2 )") |
|
|
|
|
); |
|
|
|
|
if(ObjectUtils.isNull(one)){ |
|
|
|
|
throw new ServiceException("处理方信息不存在!!"); |
|
|
|
|
if(list.isEmpty()){ |
|
|
|
|
// throw new ServiceException("处理方信息不存在!!");
|
|
|
|
|
log.info("异常工单处理结果》》》不是处理方提交数据"); |
|
|
|
|
//查询处理方待回复的;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}else{ |
|
|
|
|
Optional<AftersalesProcessorEntity> first = list.stream().filter(i -> i.getBusinessId().equals(myCurrentWarehouse.getId()) && i.getBusinessName().equals(myCurrentWarehouse.getName())).findFirst(); |
|
|
|
|
if(first.isPresent()){ |
|
|
|
|
AftersalesProcessorEntity processor = new AftersalesProcessorEntity(); |
|
|
|
|
processor.setProcessingStatus(ProcessorProcessingStatusStatusConstant.tijiaofang.getValue()); |
|
|
|
|
processor.setId(first.get().getId()); |
|
|
|
|
aftersalesProcessorService.updateById(processor); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
AftersalesProcessorEntity processor = new AftersalesProcessorEntity(); |
|
|
|
|
processor.setProcessingStatus(ProcessorProcessingStatusStatusConstant.tijiaofang.getValue()); |
|
|
|
|
processor.setId(one.getId()); |
|
|
|
|
aftersalesProcessorService.updateById(processor); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//添加操作记录
|
|
|
|
|
// AftersaleSurveyRecordDTO aftersaleSurveyRecordDTO = new AftersaleSurveyRecordDTO();
|
|
|
|
|