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/ProjectManagementMapper.xml | 26 +++++++++++++++++++++----- 1 files changed, 21 insertions(+), 5 deletions(-) diff --git a/expert-system/src/main/resources/mapper/system/ProjectManagementMapper.xml b/expert-system/src/main/resources/mapper/system/ProjectManagementMapper.xml index 395a7ac..2eeb029 100644 --- a/expert-system/src/main/resources/mapper/system/ProjectManagementMapper.xml +++ b/expert-system/src/main/resources/mapper/system/ProjectManagementMapper.xml @@ -45,6 +45,7 @@ <result property="step" column="step" /> <result property="jobCategory" column="job_category" /> <result property="projectAddress" column="project_address" /> + <result property="expertNum" column="expert_num" /> <!-- <result property="deptUserName" column="dept_user_name" />--> <result property="projectDateStart" column="project_date_start" /> <result property="projectDateEnd" column="project_date_end" /> @@ -89,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') >= date_format(#{projectDateStart},'%Y%m%d')</if> + <if test="projectDateEnd != null "> and date_format(project_date_end,'%Y%m%d') <= 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,b.major_dangers majorDangers,b.general_hazards generalHazards + 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') >= date_format(#{projectDateStart},'%Y%m%d')</if> + <if test="projectDateEnd != null "> and date_format(a.project_date_end,'%Y%m%d') <= 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"/> @@ -176,7 +192,7 @@ <if test="evaluationState != null">evaluation_state = #{evaluationState},</if> <if test="expertNum != null">expert_num = #{expertNum},</if> <if test="expertId != null">expert_id = #{expertId},</if> - <if test="expertName != null and expertName != ''">expert_name = #{expertName},</if> + <if test="expertName != null">expert_name = #{expertName},</if> <if test="projectEndTime != null">project_end_time = #{projectEndTime},</if> <if test="desc != null and desc != ''">`desc` = #{desc},</if> <if test="delFlag != null">del_flag = #{delFlag},</if> @@ -202,12 +218,12 @@ <select id="projectExpertCheckInfo" parameterType="Long" resultMap="ProjectManagementInfoResult"> select a.id,a.step, a.project_name, a.dept_name, a.job_category, a.project_address, a.project_date_start, a.project_date_end, a.remark,a.project_check_time,a.state, b.id project_expert_id,b.expert_id expert_id_info,c.name,c.sex,c.id_card,c.domain,c.rating_level,b.selection_mode,b.team_leader, - c.company_name,c.phone,a.create_time selection_time,c.remark expert_remark,a.project_code + c.company_name,c.phone,a.create_time selection_time,c.remark expert_remark,a.project_code,a.expert_num from project_management a left join project_expert b on a.id = b.project_id and b.del_flag = 0 left join sys_expert_info c on b.expert_id = c.id where a.id = #{id} - order by b.team_leader asc , b.create_time desc + order by b.team_leader desc , b.create_time desc </select> <select id="getProjectExpertSate" parameterType="com.gkhy.system.domain.vo.request.ProjectExpertStateReq" resultType="com.gkhy.system.domain.vo.response.ProjectExpertStateResp"> select a.id, a.project_name, a.evaluation_state, a.project_check_time, a.project_end_time, a.dept_name, a.expert_num -- Gitblit v1.9.2