heheng
2024-12-10 0ee9cf0938174798af956fc6ae301ef149fd8b6a
修改业务逻辑
已修改5个文件
27 ■■■■■ 文件已修改
expert-admin/src/main/resources/application.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
expert-system/src/main/java/com/gkhy/system/domain/vo/request/SysExpertSearchReqDto.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
expert-system/src/main/java/com/gkhy/system/mapper/SysExpertInfoMapper.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
expert-system/src/main/java/com/gkhy/system/service/impl/SysExpertInfoServiceImpl.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
expert-system/src/main/resources/mapper/system/SysExpertInfoMapper.xml 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
expert-admin/src/main/resources/application.yml
@@ -54,7 +54,7 @@
  servlet:
    multipart:
      # 单个文件大小
      max-file-size: 50MB
      max-file-size: 20MB
      # 设置总上传的文件大小
      max-request-size: 100MB
  # 服务模块
expert-system/src/main/java/com/gkhy/system/domain/vo/request/SysExpertSearchReqDto.java
@@ -6,7 +6,6 @@
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
@@ -29,7 +28,11 @@
    @ApiModelProperty("身份证号码")
    private String idCard;
    @NotNull(message ="业务处室不能为空" )
    @ApiModelProperty("业务处室")
    private Long deptId;
//    @NotNull(message ="业务处室不能为空" )
//    @ApiModelProperty("业务处室")
//    private Long deptId;
    @NotBlank(message ="专业领域不能为空" )
    @ApiModelProperty("专业领域")
    private String domain;
}
expert-system/src/main/java/com/gkhy/system/mapper/SysExpertInfoMapper.java
@@ -36,6 +36,8 @@
     */
    SysExpertInfo checkIdcardUnique(@Param("idCard") String idCard,@Param("deptId") Long deptId);
    SysExpertInfo checkIdCardDomainUnique(@Param("phone") String phone,@Param("idCard") String idCard,@Param("domain") String domain);
    /**
     * 批量删除专家信息
     * @param expertIds
expert-system/src/main/java/com/gkhy/system/service/impl/SysExpertInfoServiceImpl.java
@@ -40,7 +40,7 @@
    @Override
    public int addExpertInfo(SysExpertInfo expertInfo) {
        if(!checkIdCardUnique(new SysExpertInfo().setIdCard(expertInfo.getIdCard()))){
        if(!checkIdCardUnique(expertInfo)){
            throw new ServiceException("该业务处室申请数据已存在");
        }
        if(StringUtils.isEmpty(expertInfo.getPersonalOpinionKey()) && StringUtils.isEmpty(expertInfo.getRecommendUnitOpinionKey())){
@@ -57,7 +57,7 @@
    @Override
    public int modExpertInfo(SysExpertInfo expertInfo) {
        if(!checkIdCardUnique(expertInfo)){
            throw new ServiceException("该业务处室申请数据已存在");
            throw new ServiceException("该业务处室专业领域申请数据已存在");
        }
        checkHavePer(expertInfo.getId());
        expertInfo.setUpdateBy(SecurityUtils.getUsername());
@@ -154,7 +154,7 @@
    public boolean checkIdCardUnique(SysExpertInfo expertInfo){
        Long expertId = expertInfo.getId()==null? -1L : expertInfo.getId();
        SysExpertInfo info = baseMapper.checkIdcardUnique(expertInfo.getIdCard(),expertInfo.getDeptId());
        SysExpertInfo info = baseMapper.checkIdCardDomainUnique(expertInfo.getPhone(),expertInfo.getIdCard(),expertInfo.getDomain());
        if (info!=null && info.getId().longValue() != expertId.longValue())
        {
            return false;
expert-system/src/main/resources/mapper/system/SysExpertInfoMapper.xml
@@ -128,6 +128,10 @@
        select id,name from sys_expert_info where id_card=#{idCard} and dept_id = #{deptId} and del_flag=0 limit 1
    </select>
    <select id="checkIdCardDomainUnique" resultType="com.gkhy.system.domain.SysExpertInfo">
        select id,name from sys_expert_info where id_card=#{idCard} and domain=#{domain} and phone = #{phone} and del_flag=0 limit 1
    </select>
    <select id="getExpertInfoById" resultType="com.gkhy.system.domain.SysExpertInfo">
        <include refid="selectExpertInfoVo"/>
        where id=#{expertId}
@@ -139,7 +143,7 @@
               a.update_time updateTime,a.state,b.classify_name bigClassifyName,a.id,a.domain
        from sys_expert_info a
        left join sys_expert_classify b on a.big_classify = b.id
        where a.id_card=#{idCard} and a.dept_id = #{deptId} and a.phone = #{phone} and a.del_flag=0 limit 1
        where a.id_card=#{idCard} and a.domain=#{domain} and a.phone = #{phone} and a.del_flag=0 limit 1
    </select>
    <select id="getExpertRound" parameterType="com.gkhy.system.domain.vo.request.SysExpertInfoRoundReq"