From 059a17ed08ef946e921f538dce08bd7258a11fb3 Mon Sep 17 00:00:00 2001
From: heheng <475597332@qq.com>
Date: 星期三, 02 四月 2025 15:44:44 +0800
Subject: [PATCH] 增加专家导出

---
 expert-system/src/main/resources/mapper/system/ProjectManagementMapper.xml |   19 +++++++++++++++++--
 1 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/expert-system/src/main/resources/mapper/system/ProjectManagementMapper.xml b/expert-system/src/main/resources/mapper/system/ProjectManagementMapper.xml
index 8b98a56..1723e09 100644
--- a/expert-system/src/main/resources/mapper/system/ProjectManagementMapper.xml
+++ b/expert-system/src/main/resources/mapper/system/ProjectManagementMapper.xml
@@ -90,14 +90,29 @@
             <if test="version != null "> and version = #{version}</if>
             <if test="state != null "> and state = #{state}</if>
             <if test="step!= null "> and step = #{step}</if>
-            <if test="projectDateStart != null "> and project_date_start = #{projectDateStart}</if>
-            <if test="projectDateEnd != null "> and project_date_end = #{projectDateEnd}</if>
+            <if test="projectDateStart != null "> and date_format(project_date_start,'%Y%m%d') &gt;= date_format(#{projectDateStart},'%Y%m%d')</if>
+            <if test="projectDateEnd != null "> and date_format(project_date_end,'%Y%m%d') &lt;= date_format(#{projectDateEnd},'%Y%m%d')</if>
             <if test="expertCertificate != null  and expertCertificate != ''"> and expert_certificate = #{expertCertificate}</if>
             <if test="evaluationState != null "> and evaluation_state = #{evaluationState}</if>
             <if test="expertNum != null "> and expert_num = #{expertNum}</if>
         </where>
         order by create_time desc
     </select>
+
+    <select id="selectProjectData" parameterType="ProjectManagement" resultType="com.gkhy.system.domain.vo.response.ProjectDataResp">
+        select  a.dept_name deptName,c.name expertName,b.tax_expert_fee expertFee,a.create_time createTime,a.project_name projectName
+        from project_management a
+                 left join project_expert b on a.id = b.project_id and b.del_flag = 0 and b.evaluation_state = 1
+                 left join sys_expert_info c on b.expert_id = c.id
+        where a.del_flag = 0 and a.state = 4 and a.evaluation_state = 1
+        <if test="projectName != null  and projectName != ''"> and a.project_name like concat('%', #{projectName}, '%')</if>
+        <if test="projectCode != null  and projectCode != ''"> and a.project_code like concat('%', #{projectCode}, '%')</if>
+        <if test="deptId != null "> and a.dept_id = #{deptId}</if>
+        <if test="projectDateStart != null "> and date_format(a.project_date_start,'%Y%m%d') &gt;= date_format(#{projectDateStart},'%Y%m%d')</if>
+        <if test="projectDateEnd != null "> and date_format(a.project_date_end,'%Y%m%d') &lt;= date_format(#{projectDateEnd},'%Y%m%d')</if>
+        order BY a.dept_name asc ,c.`name` desc
+    </select>
+
     
     <select id="selectProjectManagementById" parameterType="Long" resultMap="ProjectManagementResult">
         <include refid="selectProjectManagementVo"/>

--
Gitblit v1.9.2