Browse Source

添加查询站点接口

zhongwei
tyty 2 years ago
parent
commit
0415688c24
  1. 7
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/controller/AbnormalAlarmController.java
  2. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/mapper/HistoryAbnormalAlarmMapper.java
  3. 4
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/mapper/HistoryAbnormalAlarmMapper.xml
  4. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/service/HistoryAbnormalAlarmService.java
  5. 5
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/service/impl/HistoryAbnormalAlarmServiceImpl.java

7
hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/controller/AbnormalAlarmController.java

@ -52,6 +52,13 @@ public class AbnormalAlarmController extends BladeController {
return R.data(pages); return R.data(pages);
} }
@GetMapping("/queryStationName")
@ApiOperationSupport(order = 0)
@ApiOperation(value = "查询站点")
public R<List<String>> queryStationName() {
List<String> res = service.queryStationName();
return R.data(res);
}
/** /**
* 详情 * 详情
*/ */

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/mapper/HistoryAbnormalAlarmMapper.java

@ -21,4 +21,6 @@ public interface HistoryAbnormalAlarmMapper extends UserDataScopeBaseMapper<Hist
List<HistoryAbnormalAlarmVo> selectPageList(IPage<HistoryAbnormalAlarmVo> page, String type, List<String> stations); List<HistoryAbnormalAlarmVo> selectPageList(IPage<HistoryAbnormalAlarmVo> page, String type, List<String> stations);
List<HistoryAbnormalAlarmVo> getAlarmEntity(@Param("type") String type,@Param("stationName") String stationName,@Param("startTime") Date startTime,@Param("endTime") Date endTime); List<HistoryAbnormalAlarmVo> getAlarmEntity(@Param("type") String type,@Param("stationName") String stationName,@Param("startTime") Date startTime,@Param("endTime") Date endTime);
List<String> getStationName();
} }

4
hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/mapper/HistoryAbnormalAlarmMapper.xml

@ -23,6 +23,10 @@
</if> </if>
</select> </select>
<select id="getStationName" resultType="java.lang.String">
select distinct STATION_NAME from hzims_history_abnormal_alarm
</select>
<select id="getAlarmEntity" resultType="com.hnac.hzims.operational.station.vo.HistoryAbnormalAlarmVo"> <select id="getAlarmEntity" resultType="com.hnac.hzims.operational.station.vo.HistoryAbnormalAlarmVo">
select * from hzims_history_abnormal_alarm select * from hzims_history_abnormal_alarm
where is_deleted = 0 where is_deleted = 0

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/service/HistoryAbnormalAlarmService.java

@ -32,4 +32,6 @@ public interface HistoryAbnormalAlarmService extends BaseService<HistoryAbnormal
// 告警数据:时间范围-当天 // 告警数据:时间范围-当天
IPage<AlarmVo> alarmData(AlarmDataPageVo page,Query query); IPage<AlarmVo> alarmData(AlarmDataPageVo page,Query query);
List<String> queryStationName();
} }

5
hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/service/impl/HistoryAbnormalAlarmServiceImpl.java

@ -302,6 +302,11 @@ public class HistoryAbnormalAlarmServiceImpl extends BaseServiceImpl<HistoryAbno
return page; return page;
} }
@Override
public List<String> queryStationName() {
return this.baseMapper.getStationName();
}
private Boolean entityIsNull(Object object) { private Boolean entityIsNull(Object object) {
if (null == object) { if (null == object) {

Loading…
Cancel
Save