From 03dc0bda693feaeb2fa684b70db52feea8ea65a7 Mon Sep 17 00:00:00 2001
From: heheng <475597332@qq.com>
Date: 星期二, 06 五月 2025 13:37:01 +0800
Subject: [PATCH] 增加专家导出字段

---
 expert-system/src/main/resources/mapper/system/SysExpertInfoMapper.xml |   70 ++++++++++++++++++++++++++++++++++
 1 files changed, 69 insertions(+), 1 deletions(-)

diff --git a/expert-system/src/main/resources/mapper/system/SysExpertInfoMapper.xml b/expert-system/src/main/resources/mapper/system/SysExpertInfoMapper.xml
index 3ed17c5..b0131ec 100644
--- a/expert-system/src/main/resources/mapper/system/SysExpertInfoMapper.xml
+++ b/expert-system/src/main/resources/mapper/system/SysExpertInfoMapper.xml
@@ -68,8 +68,68 @@
         </where>
         order by create_time desc
     </select>
+
+
+    <select id="expertInfoListV2" resultType="com.gkhy.system.domain.SysExpertInfo">
+        select a.id,a.name,a.sex,a.birthday,a.phone,a.title,a.degree,a.state,a.speciality,a.big_classify bigClassify,a.small_classify smallClassify,a.id_card idCard,a.company_name companyName,a.evidence,
+        a.domain,a.level,a.current_profession currentProfession,a.duty_status dutyStatus,a.support_direction_safety supportDirectionSafety,
+        a.support_direction_prevention supportDirectionPrevention,a.support_direction_emergency supportDirectionEmergency,a.create_time createTime,
+        a.rating_level ratingLevel,a.employment_date_start employmentDateStart,a.employment_date_end employmentDateEnd,a.expert_certificate expertCertificate,a.update_time updateTime ,b.classify_name as bigClassifyName from sys_expert_info a
+         left join  sys_expert_classify b on a.big_classify = b.id
+        <where>
+            and a.del_flag = 0
+            <if test="name != null and name != ''">
+                and a.name like concat('%', #{name}, '%')
+            </if>
+            <if test="phone != null and phone != ''">
+                and a.phone like concat('%', #{phone}, '%')
+            </if>
+            <if test="idCard != null and idCard != ''">
+                and a.id_card like concat('%', #{idCard}, '%')
+            </if>
+            <if test="domain != null and domain != ''">
+                and a.domain  = #{domain}
+            </if>
+            <if test="level != null and level != ''">
+                and a.level  = #{level}
+            </if>
+            <if test="bigClassify != null">
+                and a.big_classify = #{bigClassify}
+            </if>
+            <if test="ratingLevel != null and ratingLevel != ''">
+                and a.rating_level = #{ratingLevel}
+            </if>
+            <if test="smallClassify != null">
+                and a.small_classify = #{smallClassify}
+            </if>
+            <if test="dutyStatus != null">
+                and a.duty_status = #{dutyStatus}
+            </if>
+            <if test="state != null">
+                and a.state = #{state}
+            </if>
+            <if test="deptId != null">
+                and a.dept_id = #{deptId}
+            </if>
+            <if test="params.startTime != null "><!-- 开始时间检索 -->
+                and a.date_format(create_time,'%y%m%d') &gt;= date_format(#{params.startTime},'%y%m%d')
+            </if>
+            <if test="params.endTime != null "><!-- 结束时间检索 -->
+                and a.date_format(create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
+            </if>
+
+        </where>
+        order by a.create_time desc
+    </select>
+
+
+
     <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="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">
@@ -79,7 +139,11 @@
 
 
     <select id="queryApprove" parameterType="com.gkhy.system.domain.vo.request.SysExpertSearchReqDto" resultType="com.gkhy.system.domain.vo.response.SysExpertSearchRep">
-        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 a.name,a.employment_date_start employmentDateStart,a.employment_date_end employmentDateEnd,
+               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.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"
@@ -100,6 +164,10 @@
             #{item}
         </foreach>
         </if>
+        <!--去除掉组长-->
+        <if test="selectedUserId != null">
+            and id != #{selectedUserId}
+        </if>
         ORDER BY RAND()
             LIMIT #{num}
     </select>

--
Gitblit v1.9.2