|
@@ -20,6 +20,41 @@
|
|
|
<result property="dayofweek" column="dayofweek" />
|
|
|
</resultMap>
|
|
|
|
|
|
+ <resultMap type="org.jeecg.modules.Statistics.vo.StatisticsVo" id="TpmStatisticsResult">
|
|
|
+ <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="selectEquipmentStatus" resultMap="TpmStatisticsResult">
|
|
|
+ select 'normal' as type, count(*) as howManyTimes
|
|
|
+ from tpm_equipment_status
|
|
|
+ where status in ('0')
|
|
|
+ union
|
|
|
+ select 'run' as type, count(*) as howManyTimes
|
|
|
+ from tpm_equipment_status
|
|
|
+ where status in ('1')
|
|
|
+ union
|
|
|
+ select 'standby' as type, count(*) as howManyTimes
|
|
|
+ from tpm_equipment_status
|
|
|
+ where status in ('2')
|
|
|
+ union
|
|
|
+ select 'stop' as type, count(*) as howManyTimes
|
|
|
+ from tpm_equipment_status
|
|
|
+ where status in ('3')
|
|
|
+ union
|
|
|
+ select 'all' as type, count(*) as howManyTimes
|
|
|
+ from tpm_equipment_status
|
|
|
+ </select>
|
|
|
+
|
|
|
<!--依据设备ID和日期查询 实时数据-翻页(日期段)-->
|
|
|
<select id="selectDataPagesBySectionDay" resultMap="StatisticsResult">
|
|
|
select *
|
|
@@ -52,4 +87,4 @@
|
|
|
order by id asc
|
|
|
</select>
|
|
|
|
|
|
-</mapper>
|
|
|
+</mapper>
|