xuhy
2025-09-02 5d2d6fdff67f8f9a7e65abdbb4b87dba07dcb32b
ruoyi-system/src/main/resources/mapper/system/TExperimentResultReportMapper.xml
@@ -27,5 +27,80 @@
    <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.proposal_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>
            <if test="query.dispatchIds != null and query.dispatchIds.size() > 0">
                AND terr.dispatch_id IN
                <foreach collection="query.dispatchIds" item="item" index="index" open="(" close=")" separator=",">
                    #{item}
                </foreach>
            </if>
            <if test="query.status == null">
                and terr.status != -1
            </if>
            <if test="query.roleType != null and (query.roleType == 3 or query.roleType == 4 or query.roleType == 5)">
                AND terr.status != 4
            </if>
            AND terr.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
        </where>
        ORDER BY terr.create_time DESC
    </select>
    <select id="evaluatePageList" 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.proposal_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>
            <if test="query.dispatchIds != null and query.dispatchIds.size() > 0">
                AND terr.dispatch_id IN
                <foreach collection="query.dispatchIds" item="item" index="index" open="(" close=")" separator=",">
                    #{item}
                </foreach>
            </if>
            AND terr.status IN (2,3,4,5)
            AND terr.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
        </where>
        ORDER BY terr.create_time DESC
    </select>
</mapper>