From 7c4fa2247cc52583c47107a49d0c0dd7d8ffa223 Mon Sep 17 00:00:00 2001
From: caoyizhong <1270296080>
Date: Tue, 26 Dec 2023 17:52:14 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BC=82=E5=B8=B8=E5=B7=A5?=
=?UTF-8?q?=E5=8D=95=E5=9B=9E=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../mapper/AftersalesWorkOrderMapper.xml | 6 +-
.../impl/AftersalesWorkOrderServiceImpl.java | 56 ++++++++++++-------
2 files changed, 41 insertions(+), 21 deletions(-)
diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml
index 279ef3eb9..c2f1a373c 100644
--- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml
+++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml
@@ -51,10 +51,11 @@
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 9269e6c4a..1afc66d36 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
@@ -1235,27 +1235,45 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl list, AftersaleSurveyRecordDTO surveyRecordDTO) {
- aftersalesWorkOrderDTO.getProcessorEntityList().forEach( i ->{
- Optional first = list.stream().filter(a -> a.getBusinessId().equals(i.getBusinessId())).findFirst();
+ if(!aftersalesWorkOrderDTO.getProcessorEntityList().isEmpty()){
+ aftersalesWorkOrderDTO.getProcessorEntityList().forEach( i ->{
+ Optional first = list.stream().filter(a -> a.getBusinessId().equals(i.getBusinessId())).findFirst();
- if(first.isPresent()){
- //修改处理方 处理状态
- updateProcessor(ProcessorProcessingStatusStatusConstant.daichuli.getValue(),first.get());
- }else{
- //不存在 添加处理方信息
- AftersalesProcessorEntity processor = addProcessor(aftersalesWorkOrderDTO, myCurrentWarehouse, i);
- processor.setConditions(ProcessorConditionsStatusConstant.xinzeng.getValue());
- processor.setAssignTime(new Date());
- //添加处理方
- aftersalesProcessorService.save(processor);
- }
- //添加指定处理结果
- //处理方
- addSurveRecord(aftersalesWorkOrderDTO, user, i);
- AftersalesReplyingPartyEntity replyingPartyEntity = getPartyEntity(aftersalesWorkOrderDTO,i,surveyRecordDTO);
+ if(first.isPresent()){
+ //修改处理方 处理状态
+ updateProcessor(ProcessorProcessingStatusStatusConstant.daichuli.getValue(),first.get());
+ }else{
+ //不存在 添加处理方信息
+ AftersalesProcessorEntity processor = addProcessor(aftersalesWorkOrderDTO, myCurrentWarehouse, i);
+ processor.setConditions(ProcessorConditionsStatusConstant.xinzeng.getValue());
+ processor.setAssignTime(new Date());
+ //添加处理方
+ aftersalesProcessorService.save(processor);
+ }
+ //添加指定处理结果
+ //处理方
+ addSurveRecord(aftersalesWorkOrderDTO, user, i);
+ AftersalesReplyingPartyEntity replyingPartyEntity = getPartyEntity(aftersalesWorkOrderDTO,i,surveyRecordDTO);
+ //添加待回复信息
+ aftersalesReplyingPartyService.save(replyingPartyEntity);
+ });
+
+ }else{
+ //没有 全部
+ List collect = list.stream().filter(i -> "1".equals(i.getProcessingStatus())).collect(Collectors.toList());
//添加待回复信息
- aftersalesReplyingPartyService.save(replyingPartyEntity);
- });
+ collect.forEach( i ->{
+ //修改处理方 处理状态
+ updateProcessor(ProcessorProcessingStatusStatusConstant.daichuli.getValue(),i);
+ //添加指定处理结果
+ addSurveRecord(aftersalesWorkOrderDTO, user, i);
+ AftersalesReplyingPartyEntity replyingPartyEntity = getPartyEntity(aftersalesWorkOrderDTO,i,surveyRecordDTO);
+ //添加待回复信息
+ aftersalesReplyingPartyService.save(replyingPartyEntity);
+ });
+ }
+
+
}
/**