查询暂降事件
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
package com.njcn.influx.service;
|
||||
|
||||
import com.njcn.influx.pojo.dto.EventQueryDTO;
|
||||
import com.njcn.influx.pojo.dto.StatisticalDataDTO;
|
||||
import com.njcn.influx.pojo.po.cs.EntData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* Date: 2023/6/2 16:00【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public interface EvtDataService {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @Description: getEventData
|
||||
* @Param:
|
||||
* @return: java.util.List<com.njcn.influx.pojo.po.cs.EntData>
|
||||
* @Author: clam
|
||||
* @Date: 2023/8/30
|
||||
*/
|
||||
List<EntData> getEventData(EventQueryDTO eventQueryDTO);
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.njcn.influx.service.impl;
|
||||
|
||||
import com.njcn.influx.imapper.CommonMapper;
|
||||
import com.njcn.influx.imapper.EvtDataMapper;
|
||||
import com.njcn.influx.pojo.constant.InfluxDBTableConstant;
|
||||
import com.njcn.influx.pojo.dto.EventQueryDTO;
|
||||
import com.njcn.influx.pojo.dto.StatisticalDataDTO;
|
||||
import com.njcn.influx.pojo.po.cs.EntData;
|
||||
import com.njcn.influx.query.InfluxQueryWrapper;
|
||||
import com.njcn.influx.service.EvtDataService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* Date: 2023/8/30 19:08【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class EvtDataServiceImpl implements EvtDataService {
|
||||
private final EvtDataMapper commonMapper;
|
||||
@Override
|
||||
public List<EntData> getEventData(EventQueryDTO eventQueryDTO) {
|
||||
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper("evt_data", EntData.class);
|
||||
influxQueryWrapper.select(EntData::getLineId,EntData::getTarget,EntData::getTime,EntData::getTime,
|
||||
EntData::getEvtVva,EntData::getSec,EntData::getEvtVvaphase,EntData::getEvtVvadepth,
|
||||
EntData::getEvtVvatm)
|
||||
.or(InfluxDBTableConstant.LINE_ID,eventQueryDTO.getLineIds())
|
||||
.or("target",eventQueryDTO.getTarget());
|
||||
|
||||
|
||||
return commonMapper.getEventData(influxQueryWrapper);
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user