xuhy
2025-04-19 2383a74ccc4027e3d7cf2a829e43328af2e0e388
ruoyi-system/src/main/resources/mapper/system/TExperimentResultReportMapper.xml
@@ -27,5 +27,33 @@
    <sql id="Base_Column_List">
        id, dispatch_id, experiment_result, status, evaluate_one, evaluate_two, evaluate_three, evaluate_four, evaluate_five, evaluate_six, evaluate_person_id, evaluate_time, create_time, update_time, create_by, update_by, disabled
    </sql>
    <select id="pageList" resultType="com.ruoyi.system.vo.TExperimentResultReportVO">
        select terr.id, terr.dispatch_id, terr.experiment_result, terr.status, terr.evaluate_one, terr.evaluate_two, terr.evaluate_three,
               terr.evaluate_four, terr.evaluate_five, terr.evaluate_six, terr.evaluate_person_id, terr.evaluate_time, terr.create_time,
               terr.update_time, terr.create_by, terr.update_by, terr.disabled, tpp.project_name AS projectName,
               ted.experiment_code AS experimentCode, ted.experiment_name AS experimentName
        from t_experiment_result_report terr
        left join t_experiment_dispatch ted on terr.dispatch_id = ted.id
        left join t_project_proposal tpp on ted.project_id = tpp.id
        <where>
            <if test="query.projectName != null and query.projectName != ''">
                and tpp.project_name like concat('%', #{query.projectName}, '%')
            </if>
            <if test="query.experimentCode != null and query.experimentCode != ''">
                and ted.experiment_code like concat('%', #{query.experimentCode}, '%')
            </if>
            <if test="query.experimentName != null and query.experimentName != ''">
                and ted.experiment_name like concat('%', #{query.experimentName}, '%')
            </if>
            <if test="query.status != null">
                and terr.status = #{query.status}
            </if>
            <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''">
                AND terr.create_time BETWEEN #{query.startTime} AND #{query.endTime}
            </if>
            AND terr.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
        </where>
        ORDER BY terr.create_time DESC
    </select>
</mapper>