| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.gkhy.assess.system.mapper.SysExpertInfoMapper"> |
| | | <mapper namespace="com.gkhy.system.mapper.SysExpertInfoMapper"> |
| | | |
| | | <sql id="selectExpertInfoVo"> |
| | | select id,name,sex,birthday,phone,title,state,electronic_photo,id_card,duty_status, |
| | |
| | | graduation_school,degree,speciality,current_profession,support_direction_safety, |
| | | support_direction_prevention,support_direction_emergency,resume_key,paper_situation_key, |
| | | reward_key,achievement_key,personal_opinion_key,recommend_unit_opinion_key,remark,create_by, |
| | | create_time,big_classify,small_classify,del_flag,source |
| | | create_time,big_classify,small_classify,del_flag,source,rating_level,employment_date_start,employment_date_end,expert_certificate,dept_id |
| | | from sys_expert_info |
| | | </sql> |
| | | |
| | |
| | | </foreach> |
| | | </update> |
| | | |
| | | <select id="expertInfoList" resultType="com.gkhy.assess.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,create_time from sys_expert_info |
| | | <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,create_time,rating_level,employment_date_start,employment_date_end,expert_certificate from sys_expert_info |
| | | <where> |
| | | and del_flag = 0 |
| | | <if test="name != null and name != ''"> |
| | |
| | | </if> |
| | | <if test="bigClassify != null"> |
| | | and big_classify = #{bigClassify} |
| | | </if> |
| | | <if test="ratingLevel != null and ratingLevel != ''"> |
| | | and rating_level = #{ratingLevel} |
| | | </if> |
| | | <if test="smallClassify != null"> |
| | | and small_classify = #{smallClassify} |
| | |
| | | <if test="state != null"> |
| | | and state = #{state} |
| | | </if> |
| | | <if test="deptId != null"> |
| | | and dept_id = #{deptId} |
| | | </if> |
| | | <if test="params.startTime != null "><!-- 开始时间检索 --> |
| | | and date_format(create_time,'%y%m%d') >= date_format(#{params.startTime},'%y%m%d') |
| | | </if> |
| | | <if test="params.endTime != null "><!-- 结束时间检索 --> |
| | | and date_format(create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d') |
| | | </if> |
| | | |
| | | </where> |
| | | order by create_time desc |
| | | </select> |
| | | <select id="checkIdcardUnique" resultType="com.gkhy.assess.system.domain.SysExpertInfo"> |
| | | select id,name from sys_expert_info where id_card=#{idCard} and del_flag=0 limit 1 |
| | | <select id="checkIdcardUnique" resultType="com.gkhy.system.domain.SysExpertInfo"> |
| | | select id,name from sys_expert_info where id_card=#{idCard} and dept_id = #{deptId} and del_flag=0 limit 1 |
| | | </select> |
| | | |
| | | <select id="getExpertInfoById" resultType="com.gkhy.assess.system.domain.SysExpertInfo"> |
| | | <select id="getExpertInfoById" resultType="com.gkhy.system.domain.SysExpertInfo"> |
| | | <include refid="selectExpertInfoVo"/> |
| | | where id=#{expertId} |
| | | </select> |
| | | |
| | | |
| | | <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> |
| | | |
| | | <select id="getExpertRound" parameterType="com.gkhy.system.domain.vo.request.SysExpertInfoRoundReq" |
| | | resultType="com.gkhy.system.domain.vo.response.ProjectExpertSectionResp"> |
| | | select id,name,sex,id_card idCard, |
| | | domain,rating_level ratingLevel from sys_expert_info |
| | | where del_flag = 0 |
| | | <if test="domain != null and domain.size() > 0"> |
| | | and domain in |
| | | <foreach collection="domain" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="ratingLevel != null and ratingLevel.size() > 0"> |
| | | and rating_level in |
| | | <foreach collection="ratingLevel" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | ORDER BY RAND() |
| | | LIMIT #{num} |
| | | </select> |
| | | </mapper> |