代码调整
This commit is contained in:
@@ -23,5 +23,7 @@ public interface ServerInfo {
|
|||||||
String USER = "user-boot";
|
String USER = "user-boot";
|
||||||
String JOB = "job-admin";
|
String JOB = "job-admin";
|
||||||
String QUALITY = "quality-boot";
|
String QUALITY = "quality-boot";
|
||||||
|
String HARMONIC_PREPARE = "harmonic-prepare";
|
||||||
|
String EVENT_PREPARE = "event-prepare";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,6 +65,10 @@ public interface InfluxDBSqlConstant {
|
|||||||
String QM = "'";
|
String QM = "'";
|
||||||
String LBK = "(";
|
String LBK = "(";
|
||||||
String RBK = ")";
|
String RBK = ")";
|
||||||
|
String GT = ">";
|
||||||
|
String GE = ">=";
|
||||||
|
String LT = "<";
|
||||||
|
String LE = "<=";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* influxDB函数拼接
|
* influxDB函数拼接
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ public class WebConfig {
|
|||||||
* 配置请求对象
|
* 配置请求对象
|
||||||
*/
|
*/
|
||||||
@Bean
|
@Bean
|
||||||
public RestTemplate create() {
|
public RestTemplate restTemplate() {
|
||||||
return new RestTemplate();
|
return new RestTemplate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ public class HistoryResultServiceImpl implements HistoryResultService {
|
|||||||
List<EventDetailVO> eventDetailVOList = new ArrayList<>();
|
List<EventDetailVO> eventDetailVOList = new ArrayList<>();
|
||||||
if (!eventDetailList.isEmpty()) {
|
if (!eventDetailList.isEmpty()) {
|
||||||
for (EventDetail eventdetail : eventDetailList) {
|
for (EventDetail eventdetail : eventDetailList) {
|
||||||
Instant now = eventdetail.getTimeId().plusMillis(TimeUnit.HOURS.toMillis(8));
|
Instant now = eventdetail.getTimeId();
|
||||||
Long time = now.toEpochMilli();
|
Long time = now.toEpochMilli();
|
||||||
String timeText = format.format(time);
|
String timeText = format.format(time);
|
||||||
EventDetailVO eventDetailVO = new EventDetailVO();
|
EventDetailVO eventDetailVO = new EventDetailVO();
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ import java.util.*;
|
|||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* Description:
|
* Description:
|
||||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||||
* Date: 2022/10/13 8:56【需求编号】
|
* Date: 2022/10/13 8:56【需求编号】
|
||||||
@@ -89,16 +88,23 @@ public class PollutionSubstationServiceImpl extends ServiceImpl<RStatPollutionSu
|
|||||||
pollutionSubstationVO.setSubstationId(substationInfo.getId());
|
pollutionSubstationVO.setSubstationId(substationInfo.getId());
|
||||||
pollutionSubstationVO.setSubstationName(substationInfo.getName());
|
pollutionSubstationVO.setSubstationName(substationInfo.getName());
|
||||||
/*todo 添加经纬度接口返回数据暂时没有*/
|
/*todo 添加经纬度接口返回数据暂时没有*/
|
||||||
SubstationDTO substationDTO = locationData.stream ().filter (temp -> Objects.equals (substationInfo.getId ( ), temp.getId ())).
|
SubstationDTO substationDTO = locationData
|
||||||
collect (Collectors.toList ( )).get (0);
|
.stream()
|
||||||
|
.filter(temp -> Objects.equals(substationInfo.getId(), temp.getId()))
|
||||||
|
.collect(Collectors.toList())
|
||||||
|
.get(0);
|
||||||
|
|
||||||
pollutionSubstationVO.setLatitude(substationDTO.getLat());
|
pollutionSubstationVO.setLatitude(substationDTO.getLat());
|
||||||
pollutionSubstationVO.setLongitude(substationDTO.getLng());
|
pollutionSubstationVO.setLongitude(substationDTO.getLng());
|
||||||
|
|
||||||
|
|
||||||
Double value = Optional.ofNullable(
|
Double value = Optional.ofNullable(
|
||||||
rStatPollutionSubstationMList.stream ( ).filter (temp -> Objects.equals (substationInfo.getId ( ), temp.getSubstationId ( ))).
|
rStatPollutionSubstationMList
|
||||||
collect (Collectors.toList ( )).get (0).getValue ( )
|
.stream()
|
||||||
|
.filter(temp -> Objects.equals(substationInfo.getId(), temp.getSubstationId()))
|
||||||
|
.collect(Collectors.toList())
|
||||||
|
.get(0)
|
||||||
|
.getValue()
|
||||||
).orElse(new Double("0.00"));
|
).orElse(new Double("0.00"));
|
||||||
pollutionSubstationVO.setPollutionData(value);
|
pollutionSubstationVO.setPollutionData(value);
|
||||||
pollutionSubstationVO.setPollutionStatis(pollutionSubstationQuryParam.getStatisticalType().getName());
|
pollutionSubstationVO.setPollutionStatis(pollutionSubstationQuryParam.getStatisticalType().getName());
|
||||||
|
|||||||
Reference in New Issue
Block a user