heheng
2024-11-26 c9d2e60f7d1a5cfe9e5b2da93af4d9edeecf5577
部分修改
已重命名1个文件
已修改10个文件
147 ■■■■■ 文件已修改
expert-admin/src/main/java/com/gkhy/web/controller/bussiness/EvaluationController.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
expert-admin/src/main/java/com/gkhy/web/controller/bussiness/ExpertClassifyController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
expert-admin/src/main/java/com/gkhy/web/controller/bussiness/ProjectManagementController.java 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
expert-admin/src/main/resources/application-dev.yml 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
expert-admin/src/main/resources/application.yml 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
expert-system/src/main/java/com/gkhy/system/domain/vo/request/SysExpertInfoRoundReq.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
expert-system/src/main/java/com/gkhy/system/domain/vo/response/SysExpertSearchRep.java 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
expert-system/src/main/java/com/gkhy/system/service/impl/ProjectManagementServiceImpl.java 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
expert-system/src/main/java/com/gkhy/system/service/impl/SysExpertInfoServiceImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
expert-system/src/main/resources/mapper/system/ProjectExpertMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
expert-system/src/main/resources/mapper/system/SysExpertInfoMapper.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
expert-admin/src/main/java/com/gkhy/web/controller/bussiness/EvaluationController.java
@@ -32,7 +32,7 @@
    /**
     * 查询考评管理列表
     */
    @PreAuthorize("@ss.hasPermi('system:evaluation:list')")
    //@PreAuthorize("@ss.hasPermi('system:evaluation:list')")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "query", name = "pageNum", dataType = "int", required = false, value = "当前页,默认1"),
            @ApiImplicitParam(paramType = "query", name = "pageSize", dataType = "int", required = false, value = "每页数目,默认10,最大50")
@@ -49,7 +49,7 @@
    /**
     * 新增考评管理
     */
    @PreAuthorize("@ss.hasPermi('system:evaluation:add')")
    // @PreAuthorize("@ss.hasPermi('system:evaluation:add')")
    @PostMapping("/add")
    @ApiOperation(value = "新增考评管理")
    public AjaxResult add(@Validated @RequestBody Evaluation evaluation) {
@@ -59,7 +59,7 @@
    /**
     * 修改考评管理
     */
    @PreAuthorize("@ss.hasPermi('system:evaluation:edit')")
    //@PreAuthorize("@ss.hasPermi('system:evaluation:edit')")
    @PutMapping("/edit")
    @ApiOperation(value = "修改考评管理")
    public AjaxResult edit(@Validated @RequestBody Evaluation evaluation) {
@@ -69,7 +69,7 @@
    /**
     * 删除考评管理
     */
    @PreAuthorize("@ss.hasPermi('system:evaluation:remove')")
    //@PreAuthorize("@ss.hasPermi('system:evaluation:remove')")
    @DeleteMapping("/{ids}")
    @ApiOperation(value = "删除考评管理")
    public AjaxResult remove(@PathVariable Long[] ids) {
expert-admin/src/main/java/com/gkhy/web/controller/bussiness/ExpertClassifyController.java
@@ -27,7 +27,7 @@
        return AjaxResult.success(expertClassifyService.classifyTree(expertClassify));
    }
    @PreAuthorize("@ss.hasPermi('system:assess:monitor')")
   // @PreAuthorize("@ss.hasPermi('system:assess:monitor')")
    @RepeatSubmit
    @ApiOperation(value = "修改专家分类")
    @PutMapping("/mod")
@@ -35,7 +35,7 @@
        return AjaxResult.success(expertClassifyService.modClassify(expertClassify));
    }
    @PreAuthorize("@ss.hasPermi('system:assess:monitor')")
    // @PreAuthorize("@ss.hasPermi('system:assess:monitor')")
    @RepeatSubmit
    @ApiOperation(value = "删除专家分类")
    @DeleteMapping("/del/{classifyId}")
@@ -44,7 +44,7 @@
    }
    @PreAuthorize("@ss.hasPermi('system:assess:monitor')")
    // @PreAuthorize("@ss.hasPermi('system:assess:monitor')")
    @RepeatSubmit
    @ApiOperation(value = "新增专家分类")
    @PostMapping("/add")
expert-admin/src/main/java/com/gkhy/web/controller/bussiness/ProjectManagementController.java
@@ -16,7 +16,6 @@
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@@ -40,7 +39,7 @@
     * 查询项目管理列表
     */
    @ApiOperation(value = "查询项目管理列表(分页)")
    @PreAuthorize("@ss.hasPermi('system:management:list')")
    //@PreAuthorize("@ss.hasPermi('system:management:list')")
    @GetMapping("/list")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "query", name = "pageNum", dataType = "int", required = false, value = "当前页,默认1"),
@@ -57,7 +56,7 @@
    /**
     * 获取项目管理详细信息
     */
    @PreAuthorize("@ss.hasPermi('system:management:query')")
    // @PreAuthorize("@ss.hasPermi('system:management:query')")
    @GetMapping(value = "/{id}")
    @ApiOperation(value = "获取项目管理详细信息")
    @ApiImplicitParams({
@@ -71,7 +70,7 @@
    /**
     * 新增项目管理
     */
    @PreAuthorize("@ss.hasPermi('system:management:add')")
    // @PreAuthorize("@ss.hasPermi('system:management:add')")
    @ApiOperation(value = "新增编辑项目管理")
    @PostMapping("/saveProject")
    @RepeatSubmit
@@ -83,7 +82,7 @@
    /**
     * 修改项目管理
     */
    @PreAuthorize("@ss.hasPermi('system:management:edit')")
    //@PreAuthorize("@ss.hasPermi('system:management:edit')")
    @ApiOperation(value = "项目专家选取保存-修改")
    @PostMapping("/projectExpert")
    @RepeatSubmit
@@ -93,7 +92,7 @@
        return R.ok();
    }
    @PreAuthorize("@ss.hasPermi('system:management:info')")
    //@PreAuthorize("@ss.hasPermi('system:management:info')")
    @ApiOperation(value = "获取项目专家审批用(获取项目信息和专家数据)")
    @GetMapping("/projectExpertCheckInfo")
    @ApiImplicitParams({
@@ -104,7 +103,7 @@
        return R.ok(projectManagementService.projectExpertCheckInfo(id));
    }
    @PreAuthorize("@ss.hasPermi('system:management:edit')")
    //@PreAuthorize("@ss.hasPermi('system:management:edit')")
    @ApiOperation(value = "项目专家审批")
    @PostMapping("/projectCheck")
    @RepeatSubmit
@@ -114,7 +113,7 @@
        return R.ok();
    }
    @PreAuthorize("@ss.hasPermi('system:management:edit')")
    //@PreAuthorize("@ss.hasPermi('system:management:edit')")
    @ApiOperation(value = "项目归档")
    @PostMapping("/projectArchive")
    @RepeatSubmit
@@ -127,7 +126,7 @@
    /**
     * 删除项目管理
     */
    @PreAuthorize("@ss.hasPermi('system:management:remove')")
    //@PreAuthorize("@ss.hasPermi('system:management:remove')")
    @DeleteMapping("/{ids}")
    @ApiOperation(value = "删除项目管理")
    @RepeatSubmit
@@ -141,7 +140,7 @@
     * 事后考评列表
     */
    @ApiOperation(value = "事后考评——事后考评(分页)")
    @PreAuthorize("@ss.hasPermi('system:management:list')")
    //@PreAuthorize("@ss.hasPermi('system:management:list')")
    @GetMapping("/projectExpertList")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "query", name = "pageNum", dataType = "int", required = false, value = "当前页,默认1"),
@@ -155,7 +154,7 @@
    }
    @ApiOperation(value = "事后考评——项目专家考评列表(分页)")
    @PreAuthorize("@ss.hasPermi('system:management:list')")
    //@PreAuthorize("@ss.hasPermi('system:management:list')")
    @GetMapping("/projectExpertEvaluationList")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "query", name = "pageNum", dataType = "int", required = false, value = "当前页,默认1"),
@@ -169,7 +168,7 @@
        return getDataTable(projectExpertEvaluationResps);
    }
    @PreAuthorize("@ss.hasPermi('system:management:edit')")
    //@PreAuthorize("@ss.hasPermi('system:management:edit')")
    @ApiOperation(value = "事后考评——项目专家考评")
    @PostMapping("/ProjectExpertDetailSave")
    @RepeatSubmit
@@ -180,7 +179,7 @@
    }
    @ApiOperation(value = "专家考评记录——专家考评记录列表(分页)")
    @PreAuthorize("@ss.hasPermi('system:management:list')")
    //@PreAuthorize("@ss.hasPermi('system:management:list')")
    @GetMapping("/projectExpertEvaList")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "query", name = "pageNum", dataType = "int", required = false, value = "当前页,默认1"),
@@ -194,7 +193,7 @@
    }
    @ApiOperation(value = "专家考评记录——专家考评记明细")
    @PreAuthorize("@ss.hasPermi('system:management:list')")
    //@PreAuthorize("@ss.hasPermi('system:management:list')")
    @GetMapping("/selectProjectExpertDetailList")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "query", name = "projectExpertId", dataType = "long", required = true, value = "项目专家id")
expert-admin/src/main/resources/application-dev.yml
文件名从 expert-admin/src/main/resources/application-druid.yml 修改
@@ -58,4 +58,26 @@
                    merge-sql: true
                wall:
                    config:
                        multi-statement-allow: true
                        multi-statement-allow: true
    # redis 配置
    redis:
        # 地址
        host: localhost
        # 端口,默认为6379
        port: 6379
        # 数据库索引
        database: 0
        # 密码
        #password:
        # 连接超时时间
        timeout: 10s
        lettuce:
            pool:
                # 连接池中的最小空闲连接
                min-idle: 0
                # 连接池中的最大空闲连接
                max-idle: 8
                # 连接池的最大数据库连接数
                max-active: 8
                # #连接池最大阻塞等待时间(使用负值表示没有限制)
                max-wait: -1ms
expert-admin/src/main/resources/application.yml
@@ -52,41 +52,20 @@
    # 国际化资源文件路径
    basename: i18n/messages
  profiles:
    active: druid
    active: dev
  # 文件上传
  servlet:
    multipart:
      # 单个文件大小
      max-file-size: 10MB
      max-file-size: 50MB
      # 设置总上传的文件大小
      max-request-size: 20MB
      max-request-size: 100MB
  # 服务模块
  devtools:
    restart:
      # 热部署开关
      enabled: true
  # redis 配置
  redis:
    # 地址
    host: localhost
    # 端口,默认为6379
    port: 6379
    # 数据库索引
    database: 0
    # 密码
    #password:
    # 连接超时时间
    timeout: 10s
    lettuce:
      pool:
        # 连接池中的最小空闲连接
        min-idle: 0
        # 连接池中的最大空闲连接
        max-idle: 8
        # 连接池的最大数据库连接数
        max-active: 8
        # #连接池最大阻塞等待时间(使用负值表示没有限制)
        max-wait: -1ms
# token配置
token:
expert-system/src/main/java/com/gkhy/system/domain/vo/request/SysExpertInfoRoundReq.java
@@ -22,4 +22,7 @@
    @ApiModelProperty("评定等级1、一级,2、二级,3、三级")
    private List<String> ratingLevel;
    @ApiModelProperty("处室")
    private Long deptId;
}
expert-system/src/main/java/com/gkhy/system/domain/vo/response/SysExpertSearchRep.java
@@ -1,10 +1,12 @@
package com.gkhy.system.domain.vo.response;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
 * @author admin
@@ -14,9 +16,22 @@
public class SysExpertSearchRep  implements Serializable {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty("专家证书")
    private String expertCertificate;
    @ApiModelProperty("专家名称")
    private String name;
    @ApiModelProperty("审批状态(0申请提交,1待审核,2审批通过,3审批不通过,4专家库)")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty("聘书有效开始时间")
    private Date employmentDateStart;
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty("聘书有效结束时间")
    private Date employmentDateEnd;
    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("审核-更新日期")
    private Date updateTime;
    @ApiModelProperty("审批状态(0申请提交,1待审核,2审批通过,3审批不通过)")
    private Integer state;
}
expert-system/src/main/java/com/gkhy/system/service/impl/ProjectManagementServiceImpl.java
@@ -68,6 +68,9 @@
     */
    @Override
    public List<ProjectManagement> selectProjectManagementList(ProjectManagement projectManagement) {
        if (!SecurityUtils.isAdmin(SecurityUtils.getUserId())){
           projectManagement.setDeptId(SecurityUtils.getDeptId());
        }
        return projectManagementMapper.selectProjectManagementList(projectManagement);
    }
@@ -80,7 +83,9 @@
    @Override
    public Long insertProjectManagement(ProjectManageSaveReq projectManagement) {
        ProjectManagement projectManagementSave = new ProjectManagement();
        if (SecurityUtils.isAdmin(SecurityUtils.getUserId())){
            throw new ServiceException("无权新增");
        }
        projectManagementSave.setDelFlag(0L);
        BeanUtil.copyProperties(projectManagement, projectManagementSave);
        if (projectManagement.getId() != null){
@@ -222,13 +227,7 @@
                .collect(Collectors.groupingBy(ProjectExpertSaveReqDto::getExpertId, Collectors.counting()));
        // 检查是否有任何 expertId 的频率大于 1
        boolean hasDuplicates = frequencyMap.values().stream().anyMatch(count -> count > 1);
        if (hasDuplicates) {
           return true;
        }
        return false;
       return  frequencyMap.values().stream().anyMatch(count -> count > 1);
    }
    /**
@@ -239,7 +238,7 @@
     */
    @Override
    public int deleteProjectManagementByIds(Long[] ids) {
        //todo 校验
        // 校验
        for (Long id : ids) {
            checkDataPer(id);
        }
@@ -450,8 +449,8 @@
        if (!StringUtils.isEmpty(dataNum)){
            Map<Integer, Long> statusCounts = dataNum.stream()
                    .collect(Collectors.groupingBy(
                            status -> status,  // 分组键
                            Collectors.counting()  // 计数
                            status -> status,
                            Collectors.counting()
                    ));
            projectNumResp.setTotal(dataNum.size());
            projectNumResp.setApproval(statusCounts.get(3)  == null ? 0 : statusCounts.get(3).intValue());
expert-system/src/main/java/com/gkhy/system/service/impl/SysExpertInfoServiceImpl.java
@@ -120,6 +120,7 @@
    @Override
    public List<ProjectExpertSectionResp> getExpertRound(SysExpertInfoRoundReq req) {
        req.setDeptId(SecurityUtils.getDeptId());
        return baseMapper.getExpertRound(req);
    }
expert-system/src/main/resources/mapper/system/ProjectExpertMapper.xml
@@ -134,7 +134,7 @@
               b.selection_mode selectionMode,b.team_leader teamLeader,b.score,b.evaluation_state evaluationState
        from  project_expert b
                 left join sys_expert_info c on b.expert_id = c.id
        where b.project_id = #{projectId}
        where b.del_flag = 0 and  b.project_id = #{projectId}
        order by b.team_leader asc , b.selection_mode asc, b.create_time desc
    </select>
expert-system/src/main/resources/mapper/system/SysExpertInfoMapper.xml
@@ -22,7 +22,7 @@
    <select id="expertInfoList" resultType="com.gkhy.system.domain.SysExpertInfo">
        select id,name,sex,birthday,phone,title,degree,state,speciality,big_classify,small_classify,id_card,company_name,
            domain,level,current_profession,duty_status,support_direction_safety,support_direction_prevention,support_direction_emergency,create_time,
            rating_level,employment_date_start,employment_date_end,expert_certificate from sys_expert_info
            rating_level,employment_date_start,employment_date_end,expert_certificate,update_time from sys_expert_info
        <where>
            and del_flag = 0
            <if test="name != null and name != ''">
@@ -79,7 +79,7 @@
    <select id="queryApprove" parameterType="com.gkhy.system.domain.vo.request.SysExpertSearchReqDto" resultType="com.gkhy.system.domain.vo.response.SysExpertSearchRep">
        select expert_certificate,state from sys_expert_info where id_card=#{idCard} and dept_id = #{deptId} and phone = #{phone} and del_flag=0 limit 1
        select name,employment_date_start,employment_date_end,update_time,state from sys_expert_info where id_card=#{idCard} and dept_id = #{deptId} and phone = #{phone} and del_flag=0 limit 1
    </select>
    <select id="getExpertRound" parameterType="com.gkhy.system.domain.vo.request.SysExpertInfoRoundReq"
@@ -87,6 +87,7 @@
        select id,name,sex,id_card idCard,
            domain,rating_level ratingLevel from sys_expert_info
        where del_flag = 0
            <if test="deptId != null "> and dept_id = #{deptId}</if>
            <if test="domain != null and domain.size() > 0">
                and domain in
                <foreach collection="domain" item="item" open="(" separator="," close=")">