|
|
|
@ -67,6 +67,39 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="monitorHierarchy != null "> and monitor_hierarchy = #{monitorHierarchy}</if>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
<select id="selectEmsBaseMonitorInfoList1" parameterType="EmsBaseMonitorInfo" resultMap="EmsBaseMonitorInfoResult">
|
|
|
|
|
select objId obj_id, parent_id, monitor_id monitor_code, monitor_name, monitor_addr, monitor_type, monitor_status, collect_device_id, ancestors, grade, meter_type_id, correct_value, pt, ct, is_ammeter, is_key_monitor, is_circuit, create_by, create_time, update_by, update_time, public_share_type, monitor_hierarchy from base_monitor_info
|
|
|
|
|
<where>
|
|
|
|
|
<if test="parentId != null "> and parent_id = #{parentId}</if>
|
|
|
|
|
<if test="monitorId != null and monitorId != ''"> and monitor_id = #{monitorId}</if>
|
|
|
|
|
<if test="monitorName != null and monitorName != ''"> and monitor_name like concat('%', #{monitorName}, '%')</if>
|
|
|
|
|
<if test="monitorTypeList != null and monitorTypeList.size > 0">
|
|
|
|
|
and monitor_type IN
|
|
|
|
|
<foreach item="monitorId" collection="monitorTypeList" open="(" separator="," close=")">
|
|
|
|
|
#{monitorId}
|
|
|
|
|
</foreach>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="monitorAddr != null and monitorAddr != ''"> and monitor_addr = #{monitorAddr}</if>
|
|
|
|
|
<if test="monitorType != null "> and monitor_type = #{monitorType}</if>
|
|
|
|
|
<if test="monitorStatus != null "> and monitor_status = #{monitorStatus}</if>
|
|
|
|
|
<if test="collectDeviceId != null and collectDeviceId != ''"> and collect_device_id = #{collectDeviceId}</if>
|
|
|
|
|
<if test="ancestors != null and ancestors != ''"> and ancestors = #{ancestors}</if>
|
|
|
|
|
<if test="grade != null "> and grade = #{grade}</if>
|
|
|
|
|
<if test="meterTypeId != null and meterTypeId != ''"> and meter_type_id = #{meterTypeId}</if>
|
|
|
|
|
<if test="correctValue != null "> and correct_value = #{correctValue}</if>
|
|
|
|
|
<if test="pt != null "> and pt = #{pt}</if>
|
|
|
|
|
<if test="ct != null "> and ct = #{ct}</if>
|
|
|
|
|
<if test="isAmmeter != null and isAmmeter != ''"> and is_ammeter = #{isAmmeter}</if>
|
|
|
|
|
<if test="isKeyMonitor != null "> and is_key_monitor = #{isKeyMonitor}</if>
|
|
|
|
|
<if test="isCircuit != null "> and is_circuit = #{isCircuit}</if>
|
|
|
|
|
<if test="createBy != null and createBy != ''"> and create_by = #{createBy}</if>
|
|
|
|
|
<if test="createTime != null "> and create_time = #{createTime}</if>
|
|
|
|
|
<if test="updateBy != null and updateBy != ''"> and update_by = #{updateBy}</if>
|
|
|
|
|
<if test="updateTime != null "> and update_time = #{updateTime}</if>
|
|
|
|
|
<if test="publicShareType != null "> and public_share_type = #{publicShareType}</if>
|
|
|
|
|
<if test="monitorHierarchy != null "> and monitor_hierarchy = #{monitorHierarchy}</if>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectEmsBaseMonitorInfoByObjId" parameterType="Long" resultMap="EmsBaseMonitorInfoResult">
|
|
|
|
|
<include refid="selectEmsBaseMonitorInfoVo"/>
|
|
|
|
@ -75,8 +108,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
|
|
|
|
<select id="selectEmsBaseMonitorTypeByMonitorCode" parameterType="String">
|
|
|
|
|
select monitor_type
|
|
|
|
|
from ems_base_monitor_info
|
|
|
|
|
where monitor_code = #{monitorType}
|
|
|
|
|
from base_monitor_info
|
|
|
|
|
where monitor_id = #{monitorType}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|