From 5d2d6fdff67f8f9a7e65abdbb4b87dba07dcb32b Mon Sep 17 00:00:00 2001 From: xuhy <3313886187@qq.com> Date: 星期二, 02 九月 2025 10:23:02 +0800 Subject: [PATCH] 上传修改 --- ruoyi-system/src/main/resources/mapper/system/TExperimentSchemeMapper.xml | 41 ++++++++++++++++++++++++++++++++++++----- 1 files changed, 36 insertions(+), 5 deletions(-) diff --git a/ruoyi-system/src/main/resources/mapper/system/TExperimentSchemeMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TExperimentSchemeMapper.xml index 12e5a1b..974bd14 100644 --- a/ruoyi-system/src/main/resources/mapper/system/TExperimentSchemeMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/TExperimentSchemeMapper.xml @@ -46,17 +46,29 @@ <if test="query.status != null"> and tes.status = #{query.status} </if> - <if test="query.status == null"> - and tes.status != -1 - </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}, '%') + 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 tes.create_time BETWEEN #{query.startTime} AND #{query.endTime} + </if> + <if test="query.dispatchIds != null and query.dispatchIds.size() > 0"> + and tes.dispatch_id in + <foreach item="item" collection="query.dispatchIds" separator="," close=")" index="index" open="("> + #{item} + </foreach> + </if> + <if test="query.roleType != null and (query.roleType == 3 or query.roleType == 4 or query.roleType == 5)"> + AND tes.status != 5 + </if> + <if test="query.roleType != null and query.roleType == 5"> + AND tes.status != 6 + </if> + <if test="query.status == null"> + and tes.status != -1 </if> AND tes.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} </where> @@ -79,15 +91,34 @@ 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}, '%') + 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 tes.create_time BETWEEN #{query.startTime} AND #{query.endTime} + </if> + <if test="query.dispatchIds != null and query.dispatchIds.size() > 0"> + and tes.dispatch_id in + <foreach item="item" collection="query.dispatchIds" separator="," close=")" index="index" open="("> + #{item} + </foreach> </if> AND tes.status IN (2,3,4) AND tes.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} </where> ORDER BY tes.create_time DESC </select> + <select id="getList" 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.proposal_id = tpp.id + WHERE tes.dispatch_id = #{dispatchId} + AND tes.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} + ORDER BY tes.create_time DESC + </select> </mapper> -- Gitblit v1.7.1