|
@@ -69,5 +69,49 @@
|
|
|
<result column="freezingTime" property="freezingTime" />
|
|
|
<result column="dataTime" property="dataTime" />
|
|
|
</resultMap>
|
|
|
+ <select id="selectByEndTime" resultType="com.bizmatics.model.HtAnalogData">
|
|
|
+ select had.id,deviceName,Busot,COS,COSa,COSb,COSc,Demand,DevResetTimes,DeviceTemp,Epn,Epn1,Epn2,Epn3,Epn4,Epp,
|
|
|
+ Epp1,Epp2,Epp3,Epp4,Eqn,Eqp,F,I0,I2,IHa,IHb,IHc,Ia,Ib,Ic,Ir,LastDayMD,LastDayMDt,P,Pa,Pb,Pc,Q,Qa,Qb,Qc,SignalIntensity,
|
|
|
+ T1,T2,T3,T4,THDUa,THDUb,THDUc,Ua,Uab,Ub,Ubc,UblU0,UblU2,Uc,Uca,Udt,Ul,Upt,Ust,freezingTime,dataTime
|
|
|
+ from user_site as us
|
|
|
+ inner join device as d
|
|
|
+ on us.site_id = d.site_id
|
|
|
+ inner join ht_analog_data as had
|
|
|
+ on d.device_code = had.deviceName
|
|
|
+ <where>
|
|
|
+ <if test="userId != null and userId != 0">
|
|
|
+ us.user_id = #{userId}
|
|
|
+ </if>
|
|
|
+ <if test="siteId != null and siteId != 0">
|
|
|
+ us.site_id = #{siteId}
|
|
|
+ </if>
|
|
|
+ <if test="endTime != null">
|
|
|
+ had.dataTime <= #{endTime}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ order dataTime desc limit 0,1
|
|
|
+ </select>
|
|
|
+ <select id="selectByStartTime" resultType="com.bizmatics.model.HtAnalogData">
|
|
|
+ select had.id,deviceName,Busot,COS,COSa,COSb,COSc,Demand,DevResetTimes,DeviceTemp,Epn,Epn1,Epn2,Epn3,Epn4,Epp,
|
|
|
+ Epp1,Epp2,Epp3,Epp4,Eqn,Eqp,F,I0,I2,IHa,IHb,IHc,Ia,Ib,Ic,Ir,LastDayMD,LastDayMDt,P,Pa,Pb,Pc,Q,Qa,Qb,Qc,SignalIntensity,
|
|
|
+ T1,T2,T3,T4,THDUa,THDUb,THDUc,Ua,Uab,Ub,Ubc,UblU0,UblU2,Uc,Uca,Udt,Ul,Upt,Ust,freezingTime,dataTime
|
|
|
+ from user_site as us
|
|
|
+ inner join device as d
|
|
|
+ on us.site_id = d.site_id
|
|
|
+ inner join ht_analog_data as had
|
|
|
+ on d.device_code = had.deviceName
|
|
|
+ <where>
|
|
|
+ <if test="userId != null and userId != 0">
|
|
|
+ us.user_id = #{userId}
|
|
|
+ </if>
|
|
|
+ <if test="siteId != null and siteId != 0">
|
|
|
+ us.site_id = #{siteId}
|
|
|
+ </if>
|
|
|
+ <if test="startTime != null">
|
|
|
+ had.dataTime >= #{startTime}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ order dataTime asc limit 0,1
|
|
|
+ </select>
|
|
|
|
|
|
</mapper>
|