xuhy
2025-04-19 2383a74ccc4027e3d7cf2a829e43328af2e0e388
ruoyi-system/src/main/resources/mapper/system/TInspectionReportMapper.xml
@@ -20,5 +20,33 @@
    <sql id="Base_Column_List">
        id, dispatch_id, test_result, test_reason, status, create_time, update_time, create_by, update_by, disabled
    </sql>
    <select id="pageList" resultType="com.ruoyi.system.vo.TInspectionReportVO">
        select id, dispatch_id, test_result, test_reason, status, create_time, update_time, create_by, update_by, disabled
        from t_inspection_report tir
        left join t_experiment_dispatch ted on ted.id = tir.dispatch_id
        left join t_project_proposal tpp on tpp.id = ted.project_id
        <where>
            <if test="query.projectName != null and query.projectName != ''">
                and tpp.project_name like concat('%', #{query.projectName}, '%')
            </if>
            <if test="query.experimentName != null and query.experimentName != ''">
                and ted.experiment_name like concat('%', #{query.experimentName}, '%')
            </if>
            <if test="query.experimentCode != null and query.experimentCode !=''">
                and ted.experiment_code like concat('%', #{query.experimentCode}, '%')
            </if>
            <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''">
                AND tir.create_time BETWEEN #{query.startTime} AND #{query.endTime}
            </if>
            <if test="query.status != null">
                and tir.status = #{query.status}
            </if>
            <if test="query.createBy != null and query.createBy != ''">
                and tir.create_by = #{query.createBy}
            </if>
            and tir.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
        </where>
        ORDER BY tir.create_time DESC
    </select>
</mapper>