liujie
2025-12-24 93b4837bc4b26f81cfa2e59d9eb8e852225ce832
Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/haizhentong
5个文件已修改
45 ■■■■■ 已修改文件
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/DataStatisticsController.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/query/TCrmBranchAuditQuery.java 4 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/query/TCrmBranchQuery.java 4 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TCrmBranchServiceImpl.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/resources/mapper/system/TCrmBranchMapper.xml 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/DataStatisticsController.java
@@ -660,10 +660,6 @@
                }
            }
            BranchAdminListVO branchAdminListVO = new BranchAdminListVO();
            branchAdminListVO.setId(branch.getId());
            branchAdminListVO.setName(branch.getBranchName());
            branchAdminListVOs.add(branchAdminListVO);
        }
        return R.ok(branchAdminListVOs);
    }
@@ -726,11 +722,6 @@
                }
            }
            BranchAdminListVO branchAdminListVO = new BranchAdminListVO();
            branchAdminListVO.setId(branch.getId());
            branchAdminListVO.setName(branch.getBranchName());
            branchAdminListVOs.add(branchAdminListVO);
        }
        ArrayList<BranchAdminListVO> list = new ArrayList<>();
@@ -922,8 +913,12 @@
                }
            }
            long count = crmSalespersonService.count(new LambdaQueryWrapper<TCrmSalesperson>().in(TCrmSalesperson::getBranchId, branchIdsAll));
            branchAdminStatisticsOneVo.setStaffCount((int) count);
            if(CollectionUtils.isEmpty(branchIdsAll)){
                branchAdminStatisticsOneVo.setStaffCount(0);
            }else{
                long count = crmSalespersonService.count(new LambdaQueryWrapper<TCrmSalesperson>().in(TCrmSalesperson::getBranchId, branchIdsAll));
                branchAdminStatisticsOneVo.setStaffCount((int) count);
            }
        }
        return R.ok(branchAdminStatisticsOneVo);
ruoyi-system/src/main/java/com/ruoyi/system/query/TCrmBranchAuditQuery.java
@@ -1,5 +1,6 @@
package com.ruoyi.system.query;
import com.baomidou.mybatisplus.annotation.TableField;
import com.ruoyi.common.core.domain.BasePage;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@@ -23,6 +24,9 @@
    @ApiModelProperty(value = "审核状态 1=待审核 2=已通过 3=已驳回")
    private Integer auditStatus;
    @ApiModelProperty(value = "状态 1=待处理 2=已处理")
    private Integer status;
    @ApiModelProperty(value = "分公司id集合,前端忽略")
    private List<String> branchIds;
ruoyi-system/src/main/java/com/ruoyi/system/query/TCrmBranchQuery.java
@@ -1,5 +1,6 @@
package com.ruoyi.system.query;
import com.baomidou.mybatisplus.annotation.TableField;
import com.ruoyi.common.core.domain.BasePage;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@@ -32,6 +33,9 @@
    @ApiModelProperty(value = "区县code")
    private String districtCode;
    @ApiModelProperty(value = "类型 1=省公司负责人 2=地区经理 3=城市经理")
    private Integer personType;
    @ApiModelProperty(value = "分公司id,前端忽略")
    private List<String> branchIds;
    @ApiModelProperty(value = "分公司id,前端忽略")
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();
ruoyi-system/src/main/resources/mapper/system/TCrmBranchMapper.xml
@@ -50,6 +50,9 @@
            <if test="query.status != null">
                and status = #{query.status}
            </if>
            <if test="query.personType != null">
                and personType = #{query.personType}
            </if>
            <if test="query.branchIds != null and query.branchIds.size()>0">
                and id in
                <foreach item="item" collection="query.branchIds" separator="," open="(" close=")" index="">
@@ -138,8 +141,8 @@
            <if test="query.phone != null and query.phone != ''">
                and tcb.phone like concat('%',#{query.phone},'%')
            </if>
            <if test="query.auditStatus != null">
                and tcbl.status = #{query.auditStatus}
            <if test="query.status != null">
                and tcbl.status = #{query.status}
            </if>
            <if test="query.branchId != null and query.branchId != ''">
                and tcb.province_branch_id = #{query.branchId}