|
@@ -0,0 +1,29 @@
|
|
|
+<?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="org.jeecg.modules.hsmsStatistics.mapper.HsmsStatisticsMapper">
|
|
|
+
|
|
|
+ <resultMap type="org.jeecg.modules.Statistics.vo.StatisticsVo" id="HsmsStatisticsResult">
|
|
|
+ <result property="equipmentid" column="equipmentid" />
|
|
|
+ <result property="equipmentname" column="equipmentname" />
|
|
|
+ <result property="year" column="year" />
|
|
|
+ <result property="month" column="month" />
|
|
|
+ <result property="week" column="week" />
|
|
|
+ <result property="day" column="day" />
|
|
|
+ <result property="dayofweek" column="dayofweek" />
|
|
|
+ <result property="howManyTimes" column="howManyTimes" />
|
|
|
+ <result property="howManyTimes2" column="howManyTimes2" />
|
|
|
+ <result property="type" column="type" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <!--查询环境信息(仪表盘使用,按设备汇总)-->
|
|
|
+ <select id="selectEnvirInfo" resultMap="HsmsStatisticsResult">
|
|
|
+ select t.id,t.equipmentname,
|
|
|
+ (select tagvalue from tpm_tag where equipmentid=t.id and tagtype in ('0') order by id desc limit 1) as howManyTimes, <!--温度-->
|
|
|
+ (select tagvalue from tpm_tag where equipmentid=t.id and tagtype in ('1') order by id desc limit 1) as howManyTimes2 <!--湿度-->
|
|
|
+ from tpm_equipment as t
|
|
|
+ where t.id in (
|
|
|
+ select equipmentid from tpm_tag where tagtype in ('0','1')
|
|
|
+ )
|
|
|
+ </select>
|
|
|
+
|
|
|
+</mapper>
|