Browse Source

Merge branch 'dev' into pre-production

master
zhaoqiaobo 8 months ago
parent
commit
c48caeb174
  1. 58
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java

58
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java

@ -373,34 +373,38 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
.set(AftersalesAbnormalPackageEntity::getIsDeleted, 1)
.eq(AftersalesAbnormalPackageEntity::getWorkOrderId, aftersalesWorkOrder.getId());
aftersalesAbnormalPackageService.update(updateWrapper);
if (ObjectUtil.isNotNull(aftersalesWorkOrder.getUnProcessorEntityList())) {
//责任方 处理方
// List<AftersalesProcessorEntity> list = new ArrayList<>();
aftersalesWorkOrder.getUnProcessorEntityList().forEach(i -> {
AftersalesProcessorEntity processorEntity = new AftersalesProcessorEntity();
processorEntity.setId(i);
processorEntity.setConditions("3");
if (ObjectUtils.isNotNull(aftersalesWorkOrder.getProcessorEntityList())) {
aftersalesWorkOrder.getProcessorEntityList().stream().collect(Collectors.groupingBy(AftersalesProcessorEntity::getTypesOf))
.forEach((k, v) -> {
if ("1".equals(k)) {
//责任人
String collect = v.stream().map(AftersalesProcessorEntity::getBusinessName).collect(Collectors.joining(","));
aftersalesWorkOrder.setResponsiblePerson(collect);
} else {
String collect = v.stream().map(AftersalesProcessorEntity::getBusinessName).collect(Collectors.joining(","));
aftersalesWorkOrder.setProcessedBy(collect);
}
});
}
aftersalesProcessorService.updateById(processorEntity);
// list.add(processorEntity);
});
// if(!list.isEmpty()){
// aftersalesProcessorService.saveOrUpdateBatch(list);
// if (ObjectUtil.isNotNull(aftersalesWorkOrder.getUnProcessorEntityList())) {
// //责任方 处理方
//// List<AftersalesProcessorEntity> list = new ArrayList<>();
// aftersalesWorkOrder.getUnProcessorEntityList().forEach(i -> {
// AftersalesProcessorEntity processorEntity = new AftersalesProcessorEntity();
// processorEntity.setId(i);
// processorEntity.setConditions("3");
// if (ObjectUtils.isNotNull(aftersalesWorkOrder.getProcessorEntityList())) {
// aftersalesWorkOrder.getProcessorEntityList().stream().collect(Collectors.groupingBy(AftersalesProcessorEntity::getTypesOf))
// .forEach((k, v) -> {
// if ("1".equals(k)) {
// //责任人
// String collect = v.stream().map(AftersalesProcessorEntity::getBusinessName).collect(Collectors.joining(","));
// aftersalesWorkOrder.setResponsiblePerson(collect);
// } else {
// String collect = v.stream().map(AftersalesProcessorEntity::getBusinessName).collect(Collectors.joining(","));
// aftersalesWorkOrder.setProcessedBy(collect);
// }
}
//
// });
// }
// aftersalesProcessorService.updateById(processorEntity);
//// list.add(processorEntity);
// });
//// if(!list.isEmpty()){
//// aftersalesProcessorService.saveOrUpdateBatch(list);
//// }
// }
LambdaUpdateWrapper<AftersalesProcessorEntity> processorEntityLambdaUpdateWrapper = Wrappers.<AftersalesProcessorEntity>lambdaUpdate()
.set(AftersalesProcessorEntity::getIsDeleted, 1)
.eq(AftersalesProcessorEntity::getWorkOrderId, aftersalesWorkOrder.getId());
aftersalesProcessorService.update(processorEntityLambdaUpdateWrapper);
// if (ObjectUtil.isNotNull(aftersalesWorkOrder.getUnDecreaseImageEntityList()) && !aftersalesWorkOrder.getUnDecreaseImageEntityList().isEmpty()) {
// //图片修改
// aftersalesDecreaseImageService.deleteLogic(aftersalesWorkOrder.getUnDecreaseImageEntityList());

Loading…
Cancel
Save