liujie
2025-12-24 93b4837bc4b26f81cfa2e59d9eb8e852225ce832
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TCrmBranchServiceImpl.java
@@ -64,18 +64,27 @@
            crmBranchAreas = crmBranchAreaService.list(Wrappers.lambdaQuery(TCrmBranchArea.class)
                    .eq(TCrmBranchArea::getDistrictCode, query.getDistrictCode())
                    .eq(TCrmBranchArea::getAreaType, 2));
            if(CollectionUtils.isEmpty(crmBranchAreas)){
                return new PageInfo<>();
            }
        }
        if(StringUtils.isNotEmpty(query.getCityCode())){
            crmBranchAreas = crmBranchAreaService.list(Wrappers.lambdaQuery(TCrmBranchArea.class)
                    .eq(TCrmBranchArea::getCityCode, query.getCityCode())
                    .eq(TCrmBranchArea::getAreaType, 2));
            if(CollectionUtils.isEmpty(crmBranchAreas)){
                return new PageInfo<>();
            }
        }
        if(StringUtils.isNotEmpty(query.getProvinceCode())){
            crmBranchAreas = crmBranchAreaService.list(Wrappers.lambdaQuery(TCrmBranchArea.class)
                    .eq(TCrmBranchArea::getProvinceCode, query.getProvinceCode())
                    .eq(TCrmBranchArea::getAreaType, 2));
            if(CollectionUtils.isEmpty(crmBranchAreas)){
                return new PageInfo<>();
            }
        }
        if(!CollectionUtils.isEmpty(crmBranchAreas)){
            List<String> branchIds = crmBranchAreas.stream().map(TCrmBranchArea::getBranchId).collect(Collectors.toList());
@@ -110,8 +119,8 @@
                .eq(TCrmBranchLift::getStatus, 1));
        for (TCrmBranchVO tCrmBranchVO : list) {
            List<TCrmBranchArea> tCrmBranchAreas = crmBranchAreaList.stream().filter(t -> t.getBranchId().equals(tCrmBranchVO.getId())).collect(Collectors.toList());
            if(!CollectionUtils.isEmpty(tCrmBranchAreas)){
                tCrmBranchVO.setProvinceName(tCrmBranchAreas.get(0).getProvinceName());
            if(!CollectionUtils.isEmpty(tCrmBranchAreas) && StringUtils.isNotEmpty(tCrmBranchAreas.get(0).getProvinceName())){
                tCrmBranchVO.setProvinceName(tCrmBranchAreas.get(0).getProvinceName()+"/"+tCrmBranchAreas.get(0).getCityName()+"/"+tCrmBranchAreas.get(0).getDistrictName());
            }
            if(!CollectionUtils.isEmpty(crmBranchLifts)){
                long count = crmBranchLifts.stream().filter(t -> t.getBranchId().equals(tCrmBranchVO.getId())).count();