xuhy
2025-12-09 e72ea23de41fc149fffe67fda0377ca2401552d1
bug修改
4个文件已修改
64 ■■■■■ 已修改文件
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TCrmBranchController.java 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/TSysNoticeController.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/vo/TCrmBranchLiftVO.java 4 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/resources/mapper/system/TCrmBranchMapper.xml 4 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TCrmBranchController.java
@@ -234,6 +234,48 @@
    }
    /**
     * 查看crm分公司管理详情
     */
    @ApiOperation(value = "查看crm分公司解绑详情")
    @GetMapping(value = "/getDetailUnbindById")
    public R<TCrmBranchLiftVO> getDetailUnbindById(@RequestParam String id) {
        TCrmBranchLift crmBranchLift = crmBranchLiftService.getById(id);
        if(Objects.isNull(crmBranchLift)){
            return R.fail("未找到该解绑信息");
        }
        TCrmBranchLiftVO crmBranchLiftVO = new TCrmBranchLiftVO();
        BeanUtils.copyProperties(crmBranchLift, crmBranchLiftVO);
        TCrmBranch crmBranch = crmBranchService.getById(crmBranchLift.getBranchId());
        TCrmBranchVO crmBranchVO = new TCrmBranchVO();
        BeanUtils.copyProperties(crmBranch, crmBranchVO);
        // 查询负责区域
        List<TCrmBranchArea> crmBranchAreas = crmBranchAreaService.list(Wrappers.lambdaQuery(TCrmBranchArea.class)
                .eq(TCrmBranchArea::getAreaType, 1)
                .eq(TCrmBranchArea::getBranchId, crmBranchLift.getBranchId()));
        crmBranchVO.setCrmBranchAreas(crmBranchAreas);
        // 查询管辖区域
        List<TCrmBranchArea> jurisdictionBranchAreas = crmBranchAreaService.list(Wrappers.lambdaQuery(TCrmBranchArea.class)
                .eq(TCrmBranchArea::getAreaType, 2)
                .eq(TCrmBranchArea::getBranchId, crmBranchLift.getBranchId()));
        crmBranchVO.setJurisdictionBranchAreas(jurisdictionBranchAreas);
        // 职位薪资
        List<TCrmPosition> crmPositions = crmPositionService.list();
        List<TCrmBranchSalary> crmBranchSalaries = crmBranchSalaryService.list(Wrappers.lambdaQuery(TCrmBranchSalary.class).eq(TCrmBranchSalary::getBranchId, id));
        for (TCrmBranchSalary crmBranchSalary : crmBranchSalaries) {
            crmPositions.stream().filter(crmPosition -> Objects.equals(crmPosition.getId(), crmBranchSalary.getPositionId())).findFirst().ifPresent(crmPosition -> crmBranchSalary.setPositionName(crmPosition.getPositionName()));
        }
        crmBranchVO.setCrmBranchSalaries(crmBranchSalaries);
        crmBranchLiftVO.setCrmBranchVO(crmBranchVO);
        return R.ok(crmBranchLiftVO);
    }
    /**
     * 删除crm分公司管理
     */
    @Log(title = "crm分公司管理信息-删除crm分公司管理", businessType = BusinessType.DELETE)
ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/TSysNoticeController.java
@@ -9,9 +9,7 @@
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.time.LocalDateTime;
import java.util.List;
@@ -51,5 +49,15 @@
        return R.ok(list);
    }
    /**
     * 获取公告管理管理列表
     */
    @ApiOperation(value = "获取公告管理详情")
    @GetMapping(value = "/getDetailById")
    public R<TSysNotice> getDetailById(@RequestParam String id) {
        TSysNotice sysNotice = sysNoticeService.getById(id);
        return R.ok(sysNotice);
    }
}
ruoyi-system/src/main/java/com/ruoyi/system/vo/TCrmBranchLiftVO.java
@@ -24,4 +24,8 @@
    @ApiModelProperty(value = "省公司id")
    private String provinceBranchId;
    @ApiModelProperty(value = "分公司信息")
    private TCrmBranchVO crmBranchVO;
}
ruoyi-system/src/main/resources/mapper/system/TCrmBranchMapper.xml
@@ -138,8 +138,8 @@
            <if test="query.phone != null and query.phone != ''">
                and tcb.phone like concat('%',#{query.phone},'%')
            </if>
            <if test="query.status != null">
                and tcbl.status = #{query.status}
            <if test="query.auditStatus != null">
                and tcbl.status = #{query.auditStatus}
            </if>
            <if test="query.branchId != null and query.branchId != ''">
                and tcb.province_branch_id = #{query.branchId}