From 5d2d6fdff67f8f9a7e65abdbb4b87dba07dcb32b Mon Sep 17 00:00:00 2001 From: xuhy <3313886187@qq.com> Date: 星期二, 02 九月 2025 10:23:02 +0800 Subject: [PATCH] 上传修改 --- ruoyi-system/src/main/resources/mapper/system/TFeasibilityStudyReportMapper.xml | 96 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 96 insertions(+), 0 deletions(-) diff --git a/ruoyi-system/src/main/resources/mapper/system/TFeasibilityStudyReportMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TFeasibilityStudyReportMapper.xml index eb78ed3..d9fc4ce 100644 --- a/ruoyi-system/src/main/resources/mapper/system/TFeasibilityStudyReportMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/TFeasibilityStudyReportMapper.xml @@ -47,12 +47,108 @@ <if test="query.status != null"> and tfsr.status = #{query.status} </if> + <if test="query.status == null"> + and tfsr.status != -1 + </if> + <if test="query.reportType != null"> + and tfsr.report_type = #{query.reportType} + </if> <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''"> AND tfsr.create_time BETWEEN #{query.startTime} AND #{query.endTime} </if> + <if test="query.teamIds != null and query.teamIds.size() > 0"> + and tfsr.team_id in + <foreach item="teamId" collection="query.teamIds" separator="," open="(" close=")" index=""> + #{teamId} + </foreach> + </if> + AND tfsr.status in (1,2,3) AND tfsr.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} </where> ORDER BY tfsr.create_time DESC </select> + <select id="evaluatePageList" resultType="com.ruoyi.system.vo.TFeasibilityStudyReportVO"> + select tfsr.id, tfsr.team_id, tfsr.report_code, tfsr.report_name, tfsr.report_text, tfsr.report_type, tfsr.status, + tfsr.audit_person_id, tfsr.audit_time, tfsr.audit_remark, tfsr.evaluate_person_id, tfsr.evaluate_time, tfsr.evaluate_score, + tfsr.create_time, tfsr.update_time, tfsr.create_by, tfsr.update_by, tfsr.disabled, tpt.team_name as teamName + from t_feasibility_study_report tfsr + left join t_project_team tpt on tpt.id = tfsr.team_id + <where> + <if test="query.reportName != null and query.reportName != ''"> + and tfsr.report_name like concat('%', #{query.reportName}, '%') + </if> + <if test="query.reportCode != null and query.reportCode != ''"> + and tfsr.report_code like concat('%', #{query.reportCode}, '%') + </if> + <if test="query.teamName != null and query.teamName != ''"> + and tpt.team_name like concat('%', #{query.teamName}) + </if> + <if test="query.status != null"> + and tfsr.status = #{query.status} + </if> + <if test="query.status == null"> + and tfsr.status != -1 + </if> + <if test="query.reportType != null"> + and tfsr.report_type = #{query.reportType} + </if> + <if test="query.createBy != null and query.createBy != ''"> + and tfsr.createBy like concat('%', #{query.createBy}) + </if> + <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''"> + AND tfsr.create_time BETWEEN #{query.startTime} AND #{query.endTime} + </if> + <if test="query.teamIds != null and query.teamIds.size() > 0"> + and tfsr.team_id in + <foreach item="teamId" collection="query.teamIds" separator="," open="(" close=")" index=""> + #{teamId} + </foreach> + </if> + and tfsr.status in (2,3) + AND tfsr.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} + </where> + ORDER BY tfsr.create_time DESC + </select> + <select id="evaluateCount" resultType="java.util.Map"> + select + COUNT(tfsr.id) as totalCount, + SUM(CASE WHEN tfsr.status = 2 THEN 1 ELSE 0 END) AS toEvaluatedCount, + SUM(CASE WHEN tfsr.status = 3 THEN 1 ELSE 0 END) AS evaluatedCount + from t_feasibility_study_report tfsr + left join t_project_team tpt on tpt.id = tfsr.team_id + <where> + <if test="query.reportName != null and query.reportName != ''"> + and tfsr.report_name like concat('%', #{query.reportName}, '%') + </if> + <if test="query.reportCode != null and query.reportCode != ''"> + and tfsr.report_code like concat('%', #{query.reportCode}, '%') + </if> + <if test="query.teamName != null and query.teamName != ''"> + and tpt.team_name like concat('%', #{query.teamName}) + </if> + <if test="query.status != null"> + and tfsr.status = #{query.status} + </if> + <if test="query.status == null"> + and tfsr.status != -1 + </if> + <if test="query.reportType != null"> + and tfsr.report_type = #{query.reportType} + </if> + <if test="query.createBy != null and query.createBy != ''"> + and tfsr.createBy like concat('%', #{query.createBy}) + </if> + <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''"> + AND tfsr.create_time BETWEEN #{query.startTime} AND #{query.endTime} + </if> + <if test="query.teamIds != null and query.teamIds.size() > 0"> + and tfsr.team_id in + <foreach item="teamId" collection="query.teamIds" separator="," open="(" close=")" index=""> + #{teamId} + </foreach> + </if> + AND tfsr.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} + </where> + </select> </mapper> -- Gitblit v1.7.1