|
@@ -2,73 +2,6 @@
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.bizmatics.persistence.mapper.RtAnalogDataMapper">
|
|
|
|
|
|
- <!-- 通用查询映射结果 -->
|
|
|
- <resultMap id="BaseResultMap" type="com.bizmatics.model.RtAnalogData">
|
|
|
- <id column="id" property="id" />
|
|
|
- <result column="deviceName" property="deviceName" />
|
|
|
- <result column="Busot" property="Busot" />
|
|
|
- <result column="COS" property="cos" />
|
|
|
- <result column="COSa" property="COSa" />
|
|
|
- <result column="COSb" property="COSb" />
|
|
|
- <result column="COSc" property="COSc" />
|
|
|
- <result column="Demand" property="Demand" />
|
|
|
- <result column="DevResetTimes" property="DevResetTimes" />
|
|
|
- <result column="DeviceTemp" property="DeviceTemp" />
|
|
|
- <result column="Epn" property="Epn" />
|
|
|
- <result column="Epn1" property="Epn1" />
|
|
|
- <result column="Epn2" property="Epn2" />
|
|
|
- <result column="Epn3" property="Epn3" />
|
|
|
- <result column="Epn4" property="Epn4" />
|
|
|
- <result column="Epp" property="Epp" />
|
|
|
- <result column="Epp1" property="Epp1" />
|
|
|
- <result column="Epp2" property="Epp2" />
|
|
|
- <result column="Epp3" property="Epp3" />
|
|
|
- <result column="Epp4" property="Epp4" />
|
|
|
- <result column="Eqn" property="Eqn" />
|
|
|
- <result column="Eqp" property="Eqp" />
|
|
|
- <result column="F" property="f" />
|
|
|
- <result column="I0" property="i0" />
|
|
|
- <result column="I2" property="i2" />
|
|
|
- <result column="IHa" property="IHa" />
|
|
|
- <result column="IHb" property="IHb" />
|
|
|
- <result column="IHc" property="IHc" />
|
|
|
- <result column="Ia" property="Ia" />
|
|
|
- <result column="Ib" property="Ib" />
|
|
|
- <result column="Ic" property="Ic" />
|
|
|
- <result column="Ir" property="Ir" />
|
|
|
- <result column="LastDayMD" property="LastDayMD" />
|
|
|
- <result column="LastDayMDt" property="LastDayMDt" />
|
|
|
- <result column="P" property="p" />
|
|
|
- <result column="Pa" property="Pa" />
|
|
|
- <result column="Pb" property="Pb" />
|
|
|
- <result column="Pc" property="Pc" />
|
|
|
- <result column="Q" property="q" />
|
|
|
- <result column="Qa" property="Qa" />
|
|
|
- <result column="Qb" property="Qb" />
|
|
|
- <result column="Qc" property="Qc" />
|
|
|
- <result column="SignalIntensity" property="SignalIntensity" />
|
|
|
- <result column="T1" property="t1" />
|
|
|
- <result column="T2" property="t2" />
|
|
|
- <result column="T3" property="t3" />
|
|
|
- <result column="T4" property="t4" />
|
|
|
- <result column="THDUa" property="THDUa" />
|
|
|
- <result column="THDUb" property="THDUb" />
|
|
|
- <result column="THDUc" property="THDUc" />
|
|
|
- <result column="Ua" property="Ua" />
|
|
|
- <result column="Uab" property="Uab" />
|
|
|
- <result column="Ub" property="Ub" />
|
|
|
- <result column="Ubc" property="Ubc" />
|
|
|
- <result column="UblU0" property="UblU0" />
|
|
|
- <result column="UblU2" property="UblU2" />
|
|
|
- <result column="Uc" property="Uc" />
|
|
|
- <result column="Uca" property="Uca" />
|
|
|
- <result column="Udt" property="Udt" />
|
|
|
- <result column="Ul" property="Ul" />
|
|
|
- <result column="Upt" property="Upt" />
|
|
|
- <result column="Ust" property="Ust" />
|
|
|
- <result column="freezingTime" property="freezingTime" />
|
|
|
- <result column="dataTime" property="dataTime" />
|
|
|
- </resultMap>
|
|
|
<select id="selectTotalLoad" resultType="java.lang.Double">
|
|
|
select COALESCE(SUM(P),0)
|
|
|
from user_site as us
|
|
@@ -85,5 +18,82 @@
|
|
|
</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
+ <select id="getOneMap" resultType="java.util.Map">
|
|
|
+ select
|
|
|
+ rad.`id` as '伍继电力test_183消费组模拟量实时数据表ID',
|
|
|
+ `deviceName` as '阿里云平台设备名称',
|
|
|
+ `Busot` as '母线停电次数',
|
|
|
+ `COS` as '三相功率因数',
|
|
|
+ `COSa` as 'A相功率因数',
|
|
|
+ `COSb` as 'B相功率因数',
|
|
|
+ `COSc` as 'C相功率因数',
|
|
|
+ `Demand` as '实时有功需量',
|
|
|
+ `DevResetTimes` as '设备复位次数',
|
|
|
+ `DeviceTemp` as '设备温度',
|
|
|
+ `Epn` as '三相反向有功电度',
|
|
|
+ `Epn1` as '尖段反向有功电度',
|
|
|
+ `Epn2` as '峰段反向有功电度',
|
|
|
+ `Epn3` as '平段反向有功电度',
|
|
|
+ `Epn4` as '谷段反向有功电度',
|
|
|
+ `Epp` as '三相正向有功电度',
|
|
|
+ `Epp1` as '尖段正向有功电度',
|
|
|
+ `Epp2` as '峰段正向有功电度',
|
|
|
+ `Epp3` as '平段正向有功电度',
|
|
|
+ `Epp4` as '谷段正向有功电度',
|
|
|
+ `Eqn` as '三相反向无功电度',
|
|
|
+ `Eqp` as '三相正向无功电度',
|
|
|
+ `F` as '频率',
|
|
|
+ `I0` as '零序电流',
|
|
|
+ `I2` as '负序电流',
|
|
|
+ `IHa` as 'A相总谐波电流',
|
|
|
+ `IHb` as 'B相总谐波电流',
|
|
|
+ `IHc` as 'C相总谐波电流',
|
|
|
+ `Ia` as 'A相电流',
|
|
|
+ `Ib` as 'B相电流',
|
|
|
+ `Ic` as 'C相电流',
|
|
|
+ `Ir` as '剩余电流',
|
|
|
+ `LastDayMD` as '昨日有功最大需量',
|
|
|
+ `LastDayMDt` as '昨日有功最大需量发生时间',
|
|
|
+ `P` as '三相总有功功率',
|
|
|
+ `Pa` as 'A相有功功率',
|
|
|
+ `Pb` as 'B相有功功率',
|
|
|
+ `Pc` as 'C相有功功率',
|
|
|
+ `Q` as '三相总无功功率',
|
|
|
+ `Qa` as 'A相无功功率',
|
|
|
+ `Qb` as 'B相无功功率',
|
|
|
+ `Qc` as 'C相无功功率',
|
|
|
+ `SignalIntensity` as '信号强度',
|
|
|
+ `T1` as '第1路温度',
|
|
|
+ `T2` as '第2路温度',
|
|
|
+ `T3` as '第3路温度',
|
|
|
+ `T4` as '第4路温度',
|
|
|
+ `THDUa` as 'A相电压THD',
|
|
|
+ `THDUb` as 'B相电压THD',
|
|
|
+ `THDUc` as 'C相电压THD',
|
|
|
+ `Ua` as 'A相电压',
|
|
|
+ `Uab` as 'AB线电压',
|
|
|
+ `Ub` as 'B相电压',
|
|
|
+ `Ubc` as 'BC线电压',
|
|
|
+ `UblU0` as '零序电压不平衡度',
|
|
|
+ `UblU2` as '负序电压不平衡度',
|
|
|
+ `Uc` as 'C相电压',
|
|
|
+ `Uca` as 'CA线电压',
|
|
|
+ `Udt` as '电压暂降次数',
|
|
|
+ `Ul` as '线路侧电压',
|
|
|
+ `Upt` as '电压暂升次数',
|
|
|
+ `Ust` as '电压短时中断次数',
|
|
|
+ `freezingTime` as '冻结时间',
|
|
|
+ `dataTime` as '上报时间'
|
|
|
+ from user_site as us
|
|
|
+ inner join device as d
|
|
|
+ on us.site_id = d.site_id
|
|
|
+ inner join rt_analog_data as rad
|
|
|
+ on d.device_code = rad.deviceName
|
|
|
+ <where>
|
|
|
+ <if test="siteId != null and siteId != 0">
|
|
|
+ and us.site_id = #{siteId}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
|
|
|
</mapper>
|