| | |
| | | <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.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 query.status != -1"> |
| | | 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 query.status != -1"> |
| | | 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> |