Commit 59ef65e7 authored by tangwei's avatar tangwei

修改接口

parent f3215d30
...@@ -42,9 +42,9 @@ public class MonitorFanIndicator extends BaseEntity { ...@@ -42,9 +42,9 @@ public class MonitorFanIndicator extends BaseEntity {
@TableField("index_address") @TableField("index_address")
private String indexAddress;// 指标地址 private String indexAddress;// 指标地址
@TableField("address_gateway") @TableField("address_gateway")
private String addressGateway;// 指标地址 private String addressGateway;//地址加网管
@TableField("equipment_number") @TableField("equipment_number")
private String equipmentNumber; private String equipmentNumber; //设备编号
......
...@@ -28,7 +28,7 @@ public interface MonitorFanIndicatorMapper extends BaseMapper<MonitorFanIndicato ...@@ -28,7 +28,7 @@ public interface MonitorFanIndicatorMapper extends BaseMapper<MonitorFanIndicato
@Param("gateway") String gateway, @Param("gateway") String gateway,
@Param("frontModule") String frontModule, @Param("frontModule") String frontModule,
@Param("offset") int offset); @Param("offset") int offset);
Object getIndicatoralueAvage(String gateway,String indicator); Object getIndicatoralueAvage(String gateway,String indicator);
List<RunRecord> queryRunRecord(@Param("size") long size, List<RunRecord> queryRunRecord(@Param("size") long size,
@Param("list") String[] list, @Param("list") String[] list,
...@@ -36,7 +36,6 @@ public interface MonitorFanIndicatorMapper extends BaseMapper<MonitorFanIndicato ...@@ -36,7 +36,6 @@ public interface MonitorFanIndicatorMapper extends BaseMapper<MonitorFanIndicato
int queryRunRecordTotal( @Param("list") String[] list); int queryRunRecordTotal( @Param("list") String[] list);
Object getIndicatoralueTotal(String gateway,String indicator);
Object getIndicatoralueTotal(String gateway,String indicator);
} }
...@@ -73,14 +73,7 @@ ...@@ -73,14 +73,7 @@
indicator like concat('%',#{indicator},'%') indicator like concat('%',#{indicator},'%')
</select> </select>
<select id="queryRunRecord" resultType="com.yeejoin.amos.boot.module.jxiop.api.dto.RunRecord"> <select id="queryRunRecord" resultType="com.yeejoin.amos.boot.module.jxiop.api.dto.RunRecord">
SELECT SELECT
t.equipment_number AS FanName, t.equipment_number AS FanName,
(SELECT indicator_value FROM monitor_fan_indicator WHERE equipment_number=t.equipment_number AND gateway=t.gateway and indicator="有功功率") AS 'power', (SELECT indicator_value FROM monitor_fan_indicator WHERE equipment_number=t.equipment_number AND gateway=t.gateway and indicator="有功功率") AS 'power',
...@@ -94,21 +87,18 @@ ...@@ -94,21 +87,18 @@
<foreach collection="list" index="index" item="item" separator="," open="(" close=")"> <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
#{item} #{item}
</foreach> </foreach>
ORDER BY a.equipment_number ) AS t ORDER BY a.equipment_number ) AS t
limit #{offset}, #{size} limit #{offset}, #{size}
</select> </select>
<select id="queryRunRecordTotal" resultType="java.lang.Integer"> <select id="queryRunRecordTotal" resultType="java.lang.Integer">
select select
count(DISTINCT a.equipment_number) num count(DISTINCT a.equipment_number) num
from monitor_fan_indicator a where a.equipment_number is not null and a.gateway in from monitor_fan_indicator a where a.equipment_number is not null and a.gateway in
<foreach collection="list" index="index" item="item" separator="," open="(" close=")"> <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
#{item} #{item}
</foreach> </foreach>
</select> </select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment