zbj//1.大屏中间50条暂降事件按照传入区域id筛选 代码调整
This commit is contained in:
@@ -26,7 +26,7 @@ public interface LargeScreenMapper {
|
|||||||
|
|
||||||
List<Map<String, Object>> getTimeCount(@Param("lineIds") List<String> lineIds, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
List<Map<String, Object>> getTimeCount(@Param("lineIds") List<String> lineIds, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||||
|
|
||||||
List<EventVO> eventLists(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("typeId") String typeId);
|
List<EventVO> eventLists(@Param("lineIds") List<String> lineIds, @Param("startTime") String startTime, @Param("endTime") String endTime, @Param("typeId") String typeId);
|
||||||
|
|
||||||
AllDataVO getFlagCount(@Param("lineIds") List<String> lineIds);
|
AllDataVO getFlagCount(@Param("lineIds") List<String> lineIds);
|
||||||
|
|
||||||
|
|||||||
@@ -350,9 +350,13 @@
|
|||||||
<select id="eventLists" resultType="com.njcn.device.pq.pojo.vo.EventVO">
|
<select id="eventLists" resultType="com.njcn.device.pq.pojo.vo.EventVO">
|
||||||
SELECT
|
SELECT
|
||||||
ed.event_id as eventId, ed.start_time "time",pl.`Name` "name",ed.advance_reason reason,ed.advance_type "type",ed.feature_amplitude amplitude,ed.duration
|
ed.event_id as eventId, ed.start_time "time",pl.`Name` "name",ed.advance_reason reason,ed.advance_type "type",ed.feature_amplitude amplitude,ed.duration
|
||||||
from r_mp_event_detail ed
|
from pq_line pl
|
||||||
left join pq_line pl on pl.id = ed.measurement_point_id
|
left join r_mp_event_detail ed on pl.id = ed.measurement_point_id
|
||||||
<where>
|
<where>
|
||||||
|
ed.measurement_point_id in
|
||||||
|
<foreach collection="lineIds" item="item" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
<if test="startTime != null and startTime != ''">
|
<if test="startTime != null and startTime != ''">
|
||||||
and date_format(ed.start_time,'%y%m%d') >= date_format(#{startTime},'%y%m%d')
|
and date_format(ed.start_time,'%y%m%d') >= date_format(#{startTime},'%y%m%d')
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
@@ -252,8 +252,26 @@ public class LargeScreenServiceImpl implements LargeScreenService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<EventVO> eventLists(LargeScreenParam largeScreenParam) {
|
public List<EventVO> eventLists(LargeScreenParam largeScreenParam) {
|
||||||
|
DeviceInfoParam.BusinessParam deviceInfoParam = new DeviceInfoParam.BusinessParam();
|
||||||
|
//部门索引
|
||||||
|
deviceInfoParam.setDeptIndex(largeScreenParam.getDeptIndex());
|
||||||
|
//统计类型
|
||||||
|
SimpleDTO simpleDTO = new SimpleDTO();
|
||||||
|
simpleDTO.setCode(String.valueOf(StatisticsEnum.POWER_NETWORK));
|
||||||
|
deviceInfoParam.setStatisticalType(simpleDTO);
|
||||||
|
//添加时间
|
||||||
|
deviceInfoParam.setSearchBeginTime(largeScreenParam.getSearchBeginTime());
|
||||||
|
deviceInfoParam.setSearchEndTime(largeScreenParam.getSearchEndTime());
|
||||||
|
//添加服务名
|
||||||
|
deviceInfoParam.setServerName("event-boot");
|
||||||
|
// 获取所有数据
|
||||||
|
List<GeneralDeviceDTO> generalDeviceDTOList = generalDeviceInfoClient.getPracticalAllDeviceInfo(deviceInfoParam).getData();
|
||||||
|
|
||||||
|
//获取所有监测点集合
|
||||||
|
List<String> lineIds = generalDeviceDTOList.stream().flatMap(dto -> dto.getLineIndexes().stream()).collect(Collectors.toList());
|
||||||
|
|
||||||
DictData dictData = dicDataFeignClient.getDicDataByCode(DicDataEnum.VOLTAGE_DIP.getCode()).getData();
|
DictData dictData = dicDataFeignClient.getDicDataByCode(DicDataEnum.VOLTAGE_DIP.getCode()).getData();
|
||||||
return largeScreenMapper.eventLists(largeScreenParam.getSearchBeginTime(), largeScreenParam.getSearchEndTime(), dictData.getId());
|
return largeScreenMapper.eventLists(lineIds, largeScreenParam.getSearchBeginTime(), largeScreenParam.getSearchEndTime(), dictData.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user