From ec0b1d2179c968382080b926dd39dc9b5021d490 Mon Sep 17 00:00:00 2001 From: zhaoqiaobo Date: Wed, 29 May 2024 16:23:57 +0800 Subject: [PATCH] =?UTF-8?q?feat(all):=20=E8=A7=A3=E5=86=B3=E5=94=AE?= =?UTF-8?q?=E5=90=8E=E5=BC=82=E5=B8=B8=E5=B7=A5=E5=8D=95=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E4=B8=8D=E6=AD=A3=E7=A1=AE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/AftersalesWorkOrderServiceImpl.java | 60 ++++++++++--------- 1 file changed, 32 insertions(+), 28 deletions(-) diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java index 337c6f2fc..11d6c182f 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java @@ -373,34 +373,38 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl 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 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 processorEntityLambdaUpdateWrapper = Wrappers.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());