crm
xuhy
2025-09-05 47b3dc73a5b9274815a3e3fa631ad911453c84ad
crm
3个文件已修改
16 ■■■■ 已修改文件
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TCrmBranchController.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/core/config/DataUpdateHandlerConfig.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/model/TCrmBranchSalary.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TCrmBranchController.java
@@ -41,13 +41,15 @@
    private final TCrmBranchSalaryService crmBranchSalaryService;
    private final ISysUserService sysUserService;
    private final TCrmChangePointsService crmChangePointsService;
    private final TCrmPositionService crmPositionService;
    @Autowired
    public TCrmBranchController(TCrmBranchService crmBranchService, TCrmBranchAreaService crmBranchAreaService, TCrmBranchSalaryService crmBranchSalaryService, ISysUserService sysUserService, TCrmChangePointsService crmChangePointsService) {
    public TCrmBranchController(TCrmBranchService crmBranchService, TCrmBranchAreaService crmBranchAreaService, TCrmBranchSalaryService crmBranchSalaryService, ISysUserService sysUserService, TCrmChangePointsService crmChangePointsService, TCrmPositionService crmPositionService) {
        this.crmBranchService = crmBranchService;
        this.crmBranchAreaService = crmBranchAreaService;
        this.crmBranchSalaryService = crmBranchSalaryService;
        this.sysUserService = sysUserService;
        this.crmChangePointsService = crmChangePointsService;
        this.crmPositionService = crmPositionService;
    }
    /**
@@ -103,7 +105,11 @@
        List<TCrmBranchArea> crmBranchAreas = crmBranchAreaService.list(Wrappers.lambdaQuery(TCrmBranchArea.class).eq(TCrmBranchArea::getBranchId, id));
        crmBranchVO.setCrmBranchAreas(crmBranchAreas);
        // 职位薪资
        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);
        return R.ok(crmBranchVO);
    }
ruoyi-admin/src/main/java/com/ruoyi/web/core/config/DataUpdateHandlerConfig.java
@@ -33,11 +33,11 @@
        Long userId = SecurityUtils.getUserId();
        if (StringUtils.isNotBlank(userName)) {
            this.setFieldValByName("createBy", userName, metaObject);
            this.setFieldValByName("createId", userId, metaObject);
//            this.setFieldValByName("createId", userId, metaObject);
            this.setFieldValByName("updateBy", userName, metaObject);
        } else {
            this.setFieldValByName("createBy", userName, metaObject);
            this.setFieldValByName("createId", userId, metaObject);
//            this.setFieldValByName("createId", userId, metaObject);
            this.setFieldValByName("updateBy", userName, metaObject);
        }
ruoyi-system/src/main/java/com/ruoyi/system/model/TCrmBranchSalary.java
@@ -48,5 +48,7 @@
    @TableField("travel_allowance")
    private BigDecimal travelAllowance;
    @ApiModelProperty(value = "职位名称")
    @TableField(exist = false)
    private String positionName;
}