xuhy
2025-04-15 b73dbbbdc124ff255631059f156567a75df80165
ruoyi-system/src/main/resources/mapper/system/TExperimentSchemeMapper.xml
@@ -14,6 +14,7 @@
        <result column="experiment_step_record" property="experimentStepRecord" />
        <result column="stop_reason" property="stopReason" />
        <result column="stop_file" property="stopFile" />
        <result column="stop_file_name" property="stopFileName" />
        <result column="commit_sign" property="commitSign" />
        <result column="status" property="status" />
        <result column="audit_person_id" property="auditPersonId" />
@@ -28,7 +29,35 @@
    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, dispatch_id, experiment_date, experiment_objective, experiment_param_route, experiment_material, experiment_device, experiment_step_record, stop_reason, stop_file, commit_sign, status, audit_person_id, audit_time, audit_remark, create_time, update_time, create_by, update_by, disabled
        id, dispatch_id, experiment_date, experiment_objective, experiment_param_route, experiment_material, experiment_device,
          experiment_step_record, stop_reason, stop_file,stop_file_name, commit_sign, status, audit_person_id, audit_time, audit_remark,
          create_time, update_time, create_by, update_by, disabled
    </sql>
    <select id="pageList" resultType="com.ruoyi.system.vo.TExperimentSchemeVO">
        select tes.id, tes.dispatch_id, tes.experiment_date, tes.experiment_objective, tes.experiment_param_route,
        tes.experiment_material, tes.experiment_device, tes.experiment_step_record, tes.stop_reason, tes.stop_file,tes.stop_file_name,
        tes.commit_sign, tes.status, tes.audit_person_id, tes.audit_time, tes.audit_remark, tes.create_time, tes.update_time,
        tes.create_by, tes.update_by, tes.disabled, tpp.project_name as projectName,ted.experiment_code as experimentCode,
        ted.experiment_name as experimentName
        from t_experiment_scheme tes
        left join t_experiment_dispatch ted on tes.dispatch_id = ted.id
        left join t_project_proposal tpp on ted.project_id = tpp.id
        <where>
            <if test="query.status != null">
                and tes.status = #{query.status}
            </if>
            <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 tes.experiment_code like concat('%', #{query.experimentCode}, '%')
            </if>
            <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''">
                AND tes.create_time BETWEEN #{query.startTime} AND #{query.endTime}
            </if>
            AND tes.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
        </where>
        ORDER BY tes.create_time DESC
    </select>
</mapper>