xiangpei
2025-02-25 c2c9e3b1039c0a5223801759475112c6da9a3a3d
项目相关联系人调整
10个文件已修改
112 ■■■■■ 已修改文件
business/src/main/java/com/ycl/domain/entity/ProjectInfo.java 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
business/src/main/java/com/ycl/domain/form/ProjectInfoForm.java 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
business/src/main/java/com/ycl/domain/vo/ProjectInfoVO.java 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
business/src/main/java/com/ycl/service/impl/ProjectInfoServiceImpl.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
business/src/main/resources/mapper/ProjectInfoMapper.xml 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
start/src/main/java/com/ycl/web/controller/system/SysDeptController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
system/src/main/java/com/ycl/system/mapper/SysDeptMapper.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
system/src/main/java/com/ycl/system/service/ISysDeptService.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
system/src/main/java/com/ycl/system/service/impl/SysDeptServiceImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
system/src/main/resources/mapper/system/SysDeptMapper.xml 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
business/src/main/java/com/ycl/domain/entity/ProjectInfo.java
@@ -74,13 +74,13 @@
    /** 主管部门(对应审批部门id) */
    private String competentDepartment;
//    @TableField("competent_department_person")
//    /** 主管部门联系人 */
//    private Long competentDepartmentPerson;
//
//    @TableField("competent_department_phone")
//    /** 主管部门联系方式 */
//    private String competentDepartmentPhone;
    @TableField("competent_department_person")
    /** 主管部门联系人 */
    private String competentDepartmentPerson;
    @TableField("competent_department_phone")
    /** 主管部门联系方式 */
    private String competentDepartmentPhone;
    @TableField("area")
    /** 行政区域 */
@@ -179,7 +179,7 @@
    @TableField("industry_competent_department_person")
    /** 行业主管部门联系人 */
    private Long industryCompetentDepartmentPerson;
    private String industryCompetentDepartmentPerson;
    @TableField("department_person_phone")
    /** 行业主管部门联系方式 */
business/src/main/java/com/ycl/domain/form/ProjectInfoForm.java
@@ -15,7 +15,6 @@
import org.springframework.util.CollectionUtils;
import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
@@ -67,7 +66,15 @@
    private String tag;
    @ApiModelProperty("主管部门(对应审批部门id)")
    private List<Long> competentDepartmentList;
    private String competentDepartment;
    @ApiModelProperty("主管部门联系人")
    /** 主管部门联系人 */
    private String competentDepartmentPerson;
    @ApiModelProperty("主管部门联系方式")
    /** 主管部门联系方式 */
    private String competentDepartmentPhone;
    @ApiModelProperty("行政区域")
    private String area;
@@ -146,7 +153,7 @@
    @ApiModelProperty("行业主管部门")
    private Long industryCompetentDepartment;
    @ApiModelProperty("行业主管部门联系人")
    private Long industryCompetentDepartmentPerson;
    private String industryCompetentDepartmentPerson;
    @ApiModelProperty("行业主管部门联系方式")
    private String departmentPersonPhone;
@@ -156,13 +163,6 @@
          entity = new ProjectInfo();
        }
        BeanUtils.copyProperties(form, entity);
        //审核部门转换
        List<Long> competentDepartmentList = form.getCompetentDepartmentList();
        if(!CollectionUtils.isEmpty(competentDepartmentList)){
            entity.setCompetentDepartment(StringUtils.join(competentDepartmentList, ","));
        } else {
            entity.setCompetentDepartment("");
        }
        //资金类型转换
        List<String> fundTypeList = form.getFundTypeList();
        if(!CollectionUtils.isEmpty(fundTypeList)){
business/src/main/java/com/ycl/domain/vo/ProjectInfoVO.java
@@ -76,12 +76,16 @@
    /** 主管部门(对应审批部门id) */
    @ApiModelProperty("主管部门(对应审批部门id)")
    private List<Long> competentDepartmentList;
    private String competentDepartment;
    @ApiModelProperty("主管部门联系人")
    /** 主管部门联系人 */
    private String competentDepartmentPerson;
    @ApiModelProperty("主管部门联系方式")
    /** 主管部门联系方式 */
    private String competentDepartmentPhone;
    /** 行政区域 */
    @ApiModelProperty("行政区域")
    private String area;
@@ -184,7 +188,7 @@
    @ApiModelProperty("行业主管部门")
    private Long industryCompetentDepartment;
    @ApiModelProperty("行业主管部门联系人")
    private Long industryCompetentDepartmentPerson;
    private String industryCompetentDepartmentPerson;
    @ApiModelProperty("行业主管部门联系方式")
    private String departmentPersonPhone;
@@ -203,14 +207,7 @@
        }
        BeanUtils.copyProperties(entity, vo);
        //主管部门转成list
        String competentDepartment = entity.getCompetentDepartment();
        if(!StringUtils.isBlank(competentDepartment)){
            List<Long> list = Arrays.stream(competentDepartment.split(","))
                    .map(Long::parseLong)
                    .collect(Collectors.toList());
            vo.setCompetentDepartmentList(list);
        }
        //管理归口转换
        String managementCentralization = entity.getManagementCentralization();
        if(!StringUtils.isBlank(managementCentralization)){
@@ -233,14 +230,6 @@
    }
    //转换字符串集合字段
    public static void transform(@NonNull ProjectInfoVO vo) {
        //主管部门转成list
        String competentDepartment = vo.getCompetentDepartment();
        if(!StringUtils.isBlank(competentDepartment)){
            List<Long> list = Arrays.stream(competentDepartment.split(","))
                    .map(Long::parseLong)
                    .collect(Collectors.toList());
            vo.setCompetentDepartmentList(list);
        }
        //管理归口转换
        String managementCentralization = vo.getManagementCentralization();
        if(!StringUtils.isBlank(managementCentralization)){
@@ -248,7 +237,6 @@
        }
        //分类类型转换
        String importanceType = vo.getImportanceType();
        if (!StringUtils.isBlank(importanceType)) {
            vo.setImportanceTypeList(Arrays.asList(importanceType.split(",")));
business/src/main/java/com/ycl/service/impl/ProjectInfoServiceImpl.java
@@ -355,8 +355,8 @@
            ProjectInfoVO.transform(vo);
            ProjectVO projectVO = new ProjectVO();
            copyToProjectVO(vo, projectVO);
            List<Long> departmentList = vo.getCompetentDepartmentList();
            projectVO.setAuditRole(SecurityUtils.isAdmin(SecurityUtils.getUserId()) || (!CollectionUtils.isEmpty(departmentList) && departmentList.contains(SecurityUtils.getDeptId())));
            String competentDepartment = vo.getCompetentDepartment();
            projectVO.setAuditRole(SecurityUtils.isAdmin(SecurityUtils.getUserId()) || (StringUtils.isNotEmpty(competentDepartment) && competentDepartment.equals(SecurityUtils.getDeptId())));
            // 翻译项目阶段
            String phase = ProjectCategoryEnum.getPhaseByProjectStatus(projectVO.getProjectPhase());
            projectVO.setProjectPhase(phase);
@@ -396,8 +396,8 @@
        ProjectInfo entity = baseMapper.getById(id);
        Assert.notNull(entity, "记录不存在");
        ProjectInfoVO vo = ProjectInfoVO.getVoByEntity(entity, null);
        List<Long> departmentList = vo.getCompetentDepartmentList();
        vo.setAuditRole(SecurityUtils.isAdmin(SecurityUtils.getUserId()) || (!CollectionUtils.isEmpty(departmentList) && departmentList.contains(SecurityUtils.getDeptId())));
        String competentDepartment = vo.getCompetentDepartment();
        vo.setAuditRole(SecurityUtils.isAdmin(SecurityUtils.getUserId()) || (StringUtils.isNotEmpty(competentDepartment) && competentDepartment.equals(SecurityUtils.getDeptId())));
        QueryWrapper<File> fileQueryWrapper = new QueryWrapper<>();
        fileQueryWrapper.eq("type", FileTypeEnum.PROJECT_INFO.getType());
        fileQueryWrapper.eq("bus_id", vo.getId());
business/src/main/resources/mapper/ProjectInfoMapper.xml
@@ -26,6 +26,8 @@
            TPI.project_phase,
            TPI.tag,
            TPI.competent_department,
            TPI.competent_department_phone,
            TPI.competent_department_person,
            TPI.area,
            TPI.management_centralization,
            TPI.project_approval_type,
@@ -194,7 +196,8 @@
    <select id="selectProjectDetailByIds" resultType="com.ycl.domain.vo.ProjectVO">
        select
        TPI.id as id,TPI.project_name,TPI.project_code,TPI.attract_investment,TPI.content,TPI.construction_nature,TPI.project_type,TPI.project_sub_type,TPI.project_status,TPI.fund_type,TPI.invest_type,TPI.project_phase,
        TPI.tag,TPI.competent_department,TPI.area,TPI.management_centralization,TPI.project_approval_type,TPI.importance_type,TPI.year,TPI.year_invest_amount,TPI.create_project_time,TPI.plan_start_time,
        TPI.tag,TPI.competent_department, TPI.competent_department_person, TPI.competent_department_phone,
        TPI.area,TPI.management_centralization,TPI.project_approval_type,TPI.importance_type,TPI.year,TPI.year_invest_amount,TPI.create_project_time,TPI.plan_start_time,
        TPI.plan_complete_time,TPI.win_unit,TPI.win_amount,TPI.win_time,TPI.project_address,TPI.longitude,TPI.latitude,
        TPI.project_owner_unit,TPI.project_contact_person,TPI.contact,TPI.gmt_create,TPI.gmt_update,TPI.update_by,TPI.create_by,
        TPIF.id,TPIF.project_id,TPIF.total_investment,TPIF.principal,TPIF.government_investment_total,TPIF.central_investment_total,TPIF.central_budget_investment,TPIF.central_fiscal_investment,TPIF.central_special_bond_investment,
start/src/main/java/com/ycl/web/controller/system/SysDeptController.java
@@ -151,6 +151,6 @@
    public Result approvalList() {
        SysDept dept = new SysDept();
        dept.setParentId(approvalPortId);
        return deptService.all(dept);
        return Result.ok().data(deptService.selectDeptListNoAuth(dept));
    }
}
system/src/main/java/com/ycl/system/mapper/SysDeptMapper.java
@@ -19,6 +19,8 @@
     */
    public List<SysDept> selectDeptList(SysDept dept);
    public List<SysDept> selectDeptListNoAuth(SysDept dept);
    /**
     * 根据角色ID查询部门树信息
     *
system/src/main/java/com/ycl/system/service/ISysDeptService.java
@@ -23,6 +23,14 @@
    public List<SysDept> selectDeptList(SysDept dept);
    /**
     * 查询部门管理数据-无数据权限
     *
     * @param dept
     * @return
     */
    public List<SysDept> selectDeptListNoAuth(SysDept dept);
    /**
     * 查询部门树结构信息
     *
     * @param dept 部门信息
system/src/main/java/com/ycl/system/service/impl/SysDeptServiceImpl.java
@@ -50,6 +50,11 @@
        return deptMapper.selectDeptList(dept);
    }
    @Override
    public List<SysDept> selectDeptListNoAuth(SysDept dept) {
        return deptMapper.selectDeptListNoAuth(dept);
    }
    /**
     * 查询部门树结构信息
     *
system/src/main/resources/mapper/system/SysDeptMapper.xml
@@ -47,6 +47,18 @@
        order by d.parent_id, d.order_num
    </select>
    <select id="selectDeptListNoAuth" parameterType="SysDept" resultMap="SysDeptResult">
        <include refid="selectDeptVo"/>
        where d.del_flag = '0'
        <if test="parentId != null">
            AND FIND_IN_SET(#{parentId}, ancestors) > 0
        </if>
        <if test="deptName != null and deptName != ''">
            AND dept_name like concat('%', #{deptName}, '%')
        </if>
        order by d.parent_id, d.order_num
    </select>
    <select id="selectDeptListByRoleId" resultType="Long">
        select d.dept_id
        from sys_dept d