|
@@ -159,13 +159,14 @@
|
|
|
</select>
|
|
|
|
|
|
|
|
|
- <!-- 联锁总历史数据表-分页列表查询(各种逻辑状态) 添加权限-->
|
|
|
- <select id="getPageByUser" resultType="org.jeecg.modules.history.vo.InterlockSummaryHistoryVO">
|
|
|
+ <!-- 联锁总历史数据表-分页列表查询(各种逻辑状态) 添加权限 普通用户权限-->
|
|
|
+ <select id="getPageByPtUser" resultType="org.jeecg.modules.history.vo.InterlockSummaryHistoryLimitVO">
|
|
|
select d.id, d.summaryid, d.interlockname, d.interlock_condition, d.interlock_condition_tag, d.instrument_status, d.control_system_status,
|
|
|
s.interlock_status, s.loop_health_level, d.bypass, s.tag_time, d.summary_origin_id, s.interlock_apparatus_id, s.interlock_system_id,
|
|
|
h1.interlock_status_name, h2.bypass_name,
|
|
|
h3.instrument_status_name, h4.control_system_status_name,
|
|
|
- h.instrument_status_normal, h.bypass_yes, h.interlock_status_ty, h.control_system_status_normal
|
|
|
+ h.instrument_status_normal, h.bypass_yes, h.interlock_status_ty, h.control_system_status_normal,
|
|
|
+ h.interlock_name as interlock_system_name, h5.interlock_name as interlock_apparatus_name
|
|
|
from interlock_detail_history d
|
|
|
left join interlock_summary_history s on d.summaryid = s.id
|
|
|
left join interlock_base_hy h1 on h1.interlock_status = s.interlock_status and h1.interlock_system_id = s.interlock_system_id
|
|
@@ -173,6 +174,7 @@
|
|
|
left join interlock_base_hy h3 on h3.instrument_status = d.instrument_status and h3.interlock_system_id = s.interlock_system_id
|
|
|
left join interlock_base_hy h4 on h4.control_system_status = d.control_system_status and h4.interlock_system_id = s.interlock_system_id
|
|
|
left join interlock_base h on h.id = s.interlock_system_id
|
|
|
+ left join interlock_base h5 on h5.id = s.interlock_apparatus_id
|
|
|
left join (select l.* from interlock_system_limit l where l.interlock_user_id in
|
|
|
(select u.id from interlock_user u where u.username=#{wiseUser})) qxnr on qxnr.interlock_system_id = s.interlock_system_id
|
|
|
<where>
|
|
@@ -194,4 +196,38 @@
|
|
|
order by s.tag_time desc
|
|
|
</select>
|
|
|
|
|
|
+ <!-- 联锁总历史数据表-分页列表查询(各种逻辑状态) 添加权限 系统管理员权限-->
|
|
|
+ <select id="getPageByAdminUser" resultType="org.jeecg.modules.history.vo.InterlockSummaryHistoryLimitVO">
|
|
|
+ select d.id, d.summaryid, d.interlockname, d.interlock_condition, d.interlock_condition_tag, d.instrument_status, d.control_system_status,
|
|
|
+ s.interlock_status, s.loop_health_level, d.bypass, s.tag_time, d.summary_origin_id, s.interlock_apparatus_id, s.interlock_system_id,
|
|
|
+ h1.interlock_status_name, h2.bypass_name,
|
|
|
+ h3.instrument_status_name, h4.control_system_status_name,
|
|
|
+ h.instrument_status_normal, h.bypass_yes, h.interlock_status_ty, h.control_system_status_normal,
|
|
|
+ h.interlock_name as interlock_system_name, h5.interlock_name as interlock_apparatus_name
|
|
|
+ from interlock_detail_history d
|
|
|
+ left join interlock_summary_history s on d.summaryid = s.id
|
|
|
+ left join interlock_base_hy h1 on h1.interlock_status = s.interlock_status and h1.interlock_system_id = s.interlock_system_id
|
|
|
+ left join interlock_base_hy h2 on h2.bypass = d.bypass and h2.interlock_system_id = s.interlock_system_id
|
|
|
+ left join interlock_base_hy h3 on h3.instrument_status = d.instrument_status and h3.interlock_system_id = s.interlock_system_id
|
|
|
+ left join interlock_base_hy h4 on h4.control_system_status = d.control_system_status and h4.interlock_system_id = s.interlock_system_id
|
|
|
+ left join interlock_base h on h.id = s.interlock_system_id
|
|
|
+ left join interlock_base h5 on h5.id = s.interlock_apparatus_id
|
|
|
+ <where>
|
|
|
+ <if test="dto.interlockSystemId != null and dto.interlockSystemId != ''"> and s.interlock_system_id = #{dto.interlockSystemId}</if>
|
|
|
+ <if test="dto.interlockApparatusId != null and dto.interlockApparatusId != ''"> and s.interlock_apparatus_id = #{dto.interlockApparatusId}</if>
|
|
|
+
|
|
|
+ <if test="dto.interlockname != null and dto.interlockname != ''"> and d.interlockname like concat('%', #{dto.interlockname}, '%')</if>
|
|
|
+ <if test="dto.interlockCondition != null and dto.interlockCondition != ''"> and d.interlock_condition = #{dto.interlockCondition}</if>
|
|
|
+ <if test="dto.interlockConditionTag != null and dto.interlockConditionTag != ''"> and d.interlock_condition_tag like concat('%',#{dto.interlockConditionTag},'%')</if>
|
|
|
+ <if test="dto.instrumentStatus != null and dto.instrumentStatus != ''"> and d.instrument_status = #{dto.instrumentStatus}</if>
|
|
|
+ <if test="dto.controlSystemStatus != null and dto.controlSystemStatus != ''"> and d.control_system_status = #{dto.controlSystemStatus}</if>
|
|
|
+ <if test="dto.interlockStatus != null and dto.interlockStatus != ''"> and s.interlock_status = #{dto.interlockStatus}</if>
|
|
|
+ <if test="dto.loopHealthLevel != null and dto.loopHealthLevel != ''"> and s.loop_health_level = #{dto.loopHealthLevel}</if>
|
|
|
+ <if test="dto.beginTime != null"> and s.tag_time > #{dto.beginTime} </if>
|
|
|
+ <if test="dto.endTime != null"> and s.tag_time < #{dto.endTime} </if>
|
|
|
+ <if test="dto.bypass != null and dto.bypass != ''"> and d.bypass = #{dto.bypass}</if>
|
|
|
+ </where>
|
|
|
+ order by s.tag_time desc
|
|
|
+ </select>
|
|
|
+
|
|
|
</mapper>
|