heheng
2024-11-27 3c633caa438147d94cbc37993b818766de06aafb
部分修改
已修改8个文件
已添加1个文件
73 ■■■■ 文件已修改
expert-common/src/main/java/com/gkhy/common/enums/DeleteFlagEnum.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
expert-common/src/main/java/com/gkhy/common/enums/StepFlagEnum.java 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
expert-system/src/main/java/com/gkhy/system/domain/vo/request/ProjectExpertStateReq.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
expert-system/src/main/java/com/gkhy/system/domain/vo/request/SysProjectExpertReq.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
expert-system/src/main/java/com/gkhy/system/service/impl/ProjectManagementServiceImpl.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
expert-system/src/main/java/com/gkhy/system/service/impl/SysExpertClassifyServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
expert-system/src/main/java/com/gkhy/system/service/impl/SysExpertInfoServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
expert-system/src/main/resources/mapper/system/ProjectExpertMapper.xml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
expert-system/src/main/resources/mapper/system/ProjectManagementMapper.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
expert-common/src/main/java/com/gkhy/common/enums/DeleteFlagEnum.java
@@ -6,18 +6,18 @@
 */
public enum DeleteFlagEnum
{
    UN_DELETE(0, "未删除"), DELETED(1, "已删除");
    UN_DELETE(0L, "未删除"), DELETED(1L, "已删除");
    private final Integer code;
    private final Long code;
    private final String info;
    DeleteFlagEnum(Integer code, String info)
    DeleteFlagEnum(Long code, String info)
    {
        this.code = code;
        this.info = info;
    }
    public Integer getCode()
    public Long getCode()
    {
        return code;
    }
expert-common/src/main/java/com/gkhy/common/enums/StepFlagEnum.java
对比新文件
@@ -0,0 +1,29 @@
package com.gkhy.common.enums;
/**
 * 删除状态
 *
 */
public enum StepFlagEnum
{
    SAVE(1L, "暂存"), SELECTION(2L, "选取专家"), CHECK(3L, "审核"), FINISH(4L, "完结");
    private final Long code;
    private final String info;
    StepFlagEnum(Long code, String info)
    {
        this.code = code;
        this.info = info;
    }
    public Long getCode()
    {
        return code;
    }
    public String getInfo()
    {
        return info;
    }
}
expert-system/src/main/java/com/gkhy/system/domain/vo/request/ProjectExpertStateReq.java
@@ -23,5 +23,8 @@
    @ApiModelProperty(value = "评估状态0未评估1已评估")
    private Long evaluationState;
    @ApiModelProperty(value = "部门处室",hidden = true)
    private Long deptId;
}
expert-system/src/main/java/com/gkhy/system/domain/vo/request/SysProjectExpertReq.java
@@ -32,4 +32,7 @@
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty( "评审结束日期")
    private Date endTime;
    @ApiModelProperty(value = "部门处室",hidden = true)
    private Long deptId;
}
expert-system/src/main/java/com/gkhy/system/service/impl/ProjectManagementServiceImpl.java
@@ -3,6 +3,7 @@
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gkhy.common.enums.DeleteFlagEnum;
import com.gkhy.common.exception.ServiceException;
import com.gkhy.common.utils.DateUtils;
import com.gkhy.common.utils.SecurityUtils;
@@ -86,7 +87,7 @@
        if (SecurityUtils.isAdmin(SecurityUtils.getUserId())){
            throw new ServiceException("无权新增");
        }
        projectManagementSave.setDelFlag(0L);
        projectManagementSave.setDelFlag(DeleteFlagEnum.UN_DELETE.getCode());
        BeanUtil.copyProperties(projectManagement, projectManagementSave);
        if (projectManagement.getId() != null){
            checkDataPer(projectManagement.getId());
@@ -132,12 +133,12 @@
        if (hasDuplicateExpertId(saveData)){
            throw new ServiceException("专家重复!");
        }
        long count = saveData.stream()
                .filter(dto -> dto.getSelectionMode() == 1)
                .count();
        if (count < 1){
            throw new ServiceException("固定专家不能为空!");
        }
//        long count = saveData.stream()
//                .filter(dto -> dto.getSelectionMode() == 1)
//                .count();
//        if (count < 1){
//            throw new ServiceException("固定专家不能为空!");
//        }
        if ((projectManagement1.getStep() == 1 || projectManagement1.getStep() == 2) && (projectManagement.getStep() == 2 ) ){
            projectManagementSave.setStep(2L);
@@ -342,6 +343,10 @@
    @Override
    public List<ProjectExpertStateResp> getProjectExpertSate(ProjectExpertStateReq req) {
        if (!SecurityUtils.isAdmin(SecurityUtils.getUserId())){
            req.setDeptId(SecurityUtils.getDeptId());
        }
        return projectManagementMapper.getProjectExpertSate(req);
    }
@@ -420,6 +425,9 @@
    @Override
    public List<ProjectExpertResp> projectExpertEvaList(SysProjectExpertReq req) {
        if (!SecurityUtils.isAdmin(SecurityUtils.getUserId())){
            req.setDeptId(SecurityUtils.getDeptId());
        }
        return projectExpertMapper.projectExpertEvaList(req);
    }
expert-system/src/main/java/com/gkhy/system/service/impl/SysExpertClassifyServiceImpl.java
@@ -65,7 +65,7 @@
    public int delClassify(Long classifyId) {
        SysExpertClassify classify = new SysExpertClassify();
        classify.setId(classifyId);
        classify.setDelFlag(DeleteFlagEnum.DELETED.getCode());
        classify.setDelFlag(DeleteFlagEnum.DELETED.getCode().intValue());
        classify.setUpdateBy(SecurityUtils.getUsername());
        boolean b=updateById(classify);
        if(!b){
expert-system/src/main/java/com/gkhy/system/service/impl/SysExpertInfoServiceImpl.java
@@ -67,7 +67,7 @@
    public int delExpertInfo(Long expertId) {
        SysExpertInfo expertInfo = new SysExpertInfo();
        expertInfo.setId(expertId);
        expertInfo.setDelFlag(DeleteFlagEnum.DELETED.getCode());
        expertInfo.setDelFlag(DeleteFlagEnum.DELETED.getCode().intValue());
        expertInfo.setUpdateBy(SecurityUtils.getUsername());
        boolean b= updateById(expertInfo);
        if(!b){
expert-system/src/main/resources/mapper/system/ProjectExpertMapper.xml
@@ -146,7 +146,8 @@
        from project_management a
                 left join project_expert b on a.id = b.project_id and b.del_flag = 0
                 left join sys_expert_info c on b.expert_id = c.id
        where 1=1
        where 1=1 and b.evaluation_state = 1
        <if test="deptId != null "> and a.dept_id = #{deptId}</if>
        <if test="projectName != null  and projectName != ''"> and a.project_name like concat('%', #{projectName}, '%')</if>
        <if test="name != null and name != ''">
            and c.name like concat('%', #{name}, '%')
expert-system/src/main/resources/mapper/system/ProjectManagementMapper.xml
@@ -198,6 +198,7 @@
        select a.id, a.project_name, a.evaluation_state, a.project_check_time, a.project_end_time, a.dept_name, a.expert_num
        from project_management a
        where a.del_flag = 0 and a.state = 4
        <if test="deptId != null "> and a.dept_id = #{deptId}</if>
        <if test="projectCheckTime != null "> and a.project_check_time = #{projectCheckTime}</if>
        <if test="projectName != null  and projectName != ''"> and a.project_name like concat('%', #{projectName}, '%')</if>
        <if test="evaluationState != null "> and a.evaluation_state = #{evaluationState}</if>