2025-09-28 09:54:42 +08:00
|
|
|
<?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.klp.ems.mapper.EmsMeterMapper">
|
|
|
|
|
|
|
|
|
|
<resultMap type="com.klp.ems.domain.EmsMeter" id="EmsMeterResult">
|
|
|
|
|
<result property="meterId" column="meter_id"/>
|
|
|
|
|
<result property="meterCode" column="meter_code"/>
|
|
|
|
|
<result property="energyTypeId" column="energy_type_id"/>
|
|
|
|
|
<result property="locationId" column="location_id"/>
|
|
|
|
|
<result property="model" column="model"/>
|
|
|
|
|
<result property="manufacturer" column="manufacturer"/>
|
|
|
|
|
<result property="installDate" column="install_date"/>
|
|
|
|
|
<result property="status" column="status"/>
|
|
|
|
|
<result property="lastCalibrationDate" column="last_calibration_date"/>
|
|
|
|
|
<result property="thresholdValue" column="threshold_value"/>
|
|
|
|
|
<result property="createBy" column="create_by"/>
|
|
|
|
|
<result property="updateBy" column="update_by"/>
|
|
|
|
|
<result property="createTime" column="create_time"/>
|
|
|
|
|
<result property="updateTime" column="update_time"/>
|
|
|
|
|
<result property="delFlag" column="del_flag"/>
|
|
|
|
|
<result property="remark" column="remark"/>
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
2025-09-30 18:46:57 +08:00
|
|
|
<select id="selectMeterIds" parameterType="com.klp.ems.domain.bo.MeterFilterBo" resultType="java.lang.Long">
|
|
|
|
|
SELECT meter_id
|
|
|
|
|
FROM ems_meter
|
|
|
|
|
WHERE del_flag = '0'
|
|
|
|
|
<if test="meterId != null">
|
|
|
|
|
AND meter_id = #{meterId}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="energyTypeId != null">
|
|
|
|
|
AND energy_type_id = #{energyTypeId}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="locationIds != null and locationIds.size() > 0">
|
|
|
|
|
AND location_id IN
|
|
|
|
|
<foreach collection="locationIds" item="id" open="(" separator="," close=")">
|
|
|
|
|
#{id}
|
|
|
|
|
</foreach>
|
|
|
|
|
</if>
|
|
|
|
|
</select>
|
2025-09-28 09:54:42 +08:00
|
|
|
</mapper>
|