From 8a0389251341ca6838d8f314bead7412efbdc598 Mon Sep 17 00:00:00 2001 From: huangzj <826100833@qq.com> Date: Fri, 17 Mar 2023 09:24:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=9D=E5=A7=8B=E5=8C=96?= =?UTF-8?q?=E6=A0=91bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/RGeneralSurveyPlanPOServiceImpl.java | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/RGeneralSurveyPlanPOServiceImpl.java b/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/RGeneralSurveyPlanPOServiceImpl.java index 467445f5a..e2f08435b 100644 --- a/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/RGeneralSurveyPlanPOServiceImpl.java +++ b/pqs-process/process-boot/src/main/java/com/njcn/process/service/impl/RGeneralSurveyPlanPOServiceImpl.java @@ -11,7 +11,6 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.github.jeffreyning.mybatisplus.service.MppServiceImpl; -import com.njcn.common.pojo.enums.response.CommonResponseEnum; import com.njcn.common.pojo.exception.BusinessException; import com.njcn.device.pms.pojo.po.StatationStat; import com.njcn.minioss.bo.MinIoUploadResDTO; @@ -614,7 +613,7 @@ public class RGeneralSurveyPlanPOServiceImpl extends MppServiceImpl Objects.equals (temp.getId ( ), orgdid)).collect (Collectors.toList ( )); + result = recursion(result,orgdid); return result; } @@ -647,4 +646,19 @@ public class RGeneralSurveyPlanPOServiceImpl extends MppServiceImpl recursion ( List result,String orgdid){ + + List finalResult = new ArrayList<> (); + for (DeptSubstationVO deptSubstationVO : result) { + if(Objects.equals (deptSubstationVO.getId (),orgdid)){ + finalResult.add (deptSubstationVO); + return finalResult; + }else { + List recursion = recursion (deptSubstationVO.getChildren ( ), orgdid); + return recursion; + } + } + return null; + } + }