<?xml version="1.0" encoding="UTF-8"?>
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<mapper namespace="com.ruoyi.system.mapper.TExperimentSchemeMapper">
|
|
<!-- 通用查询映射结果 -->
|
<resultMap id="BaseResultMap" type="com.ruoyi.system.model.TExperimentScheme">
|
<id column="id" property="id" />
|
<result column="dispatch_id" property="dispatchId" />
|
<result column="experiment_date" property="experimentDate" />
|
<result column="experiment_objective" property="experimentObjective" />
|
<result column="experiment_param_route" property="experimentParamRoute" />
|
<result column="experiment_material" property="experimentMaterial" />
|
<result column="experiment_device" property="experimentDevice" />
|
<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" />
|
<result column="audit_time" property="auditTime" />
|
<result column="audit_remark" property="auditRemark" />
|
<result column="create_time" property="createTime" />
|
<result column="update_time" property="updateTime" />
|
<result column="create_by" property="createBy" />
|
<result column="update_by" property="updateBy" />
|
<result column="disabled" property="disabled" />
|
</resultMap>
|
|
<!-- 通用查询结果列 -->
|
<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,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.proposal_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>
|
<select id="auditPageList" 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>
|
<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.status IN (2,3,4)
|
AND tes.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
|
</where>
|
ORDER BY tes.create_time DESC
|
</select>
|
|
</mapper>
|