微调
This commit is contained in:
@@ -85,7 +85,7 @@ public class IDataOnlineRateServiceImpl implements IDataOnlineRateService {
|
|||||||
Map<String, List<LineDevGetDTO>> LineDevGetMap = devList.stream()
|
Map<String, List<LineDevGetDTO>> LineDevGetMap = devList.stream()
|
||||||
.filter(x -> devIdList.contains(x.getDevId()))
|
.filter(x -> devIdList.contains(x.getDevId()))
|
||||||
.collect(Collectors.groupingBy(LineDevGetDTO::getDevId));
|
.collect(Collectors.groupingBy(LineDevGetDTO::getDevId));
|
||||||
if (ObjectUtil.isNotNull(calculatedParam.getType())&&calculatedParam.getType() == 1) {
|
if (ObjectUtil.isNotNull(calculatedParam.getType()) && calculatedParam.getType() == 1) {
|
||||||
LineDevGetMap.forEach((key, value) -> {
|
LineDevGetMap.forEach((key, value) -> {
|
||||||
DataOnlineRateDto.Detail onlineRateDpo = new DataOnlineRateDto.Detail();
|
DataOnlineRateDto.Detail onlineRateDpo = new DataOnlineRateDto.Detail();
|
||||||
List<String> collect = value.stream().map(LineDevGetDTO::getPointId).collect(Collectors.toList());
|
List<String> collect = value.stream().map(LineDevGetDTO::getPointId).collect(Collectors.toList());
|
||||||
@@ -130,9 +130,9 @@ public class IDataOnlineRateServiceImpl implements IDataOnlineRateService {
|
|||||||
List<String> lineIds = value.stream().map(LineDevGetDTO::getPointId).collect(Collectors.toList());
|
List<String> lineIds = value.stream().map(LineDevGetDTO::getPointId).collect(Collectors.toList());
|
||||||
lineParam.setLineId(lineIds);
|
lineParam.setLineId(lineIds);
|
||||||
List<DataIntegrityDto> integrityDS = dataIntegrityFeignClient.getRawData(lineParam).getData();
|
List<DataIntegrityDto> integrityDS = dataIntegrityFeignClient.getRawData(lineParam).getData();
|
||||||
Double max=0.0;
|
Double max = 0.0;
|
||||||
if(CollUtil.isNotEmpty(integrityDS)){
|
if (CollUtil.isNotEmpty(integrityDS)) {
|
||||||
List<Double> info=new ArrayList<>();
|
List<Double> info = new ArrayList<>();
|
||||||
for (DataIntegrityDto integrityD : integrityDS) {
|
for (DataIntegrityDto integrityD : integrityDS) {
|
||||||
double realTime = integrityD.getRealTime();
|
double realTime = integrityD.getRealTime();
|
||||||
double dueTime = integrityD.getDueTime();
|
double dueTime = integrityD.getDueTime();
|
||||||
@@ -144,7 +144,7 @@ public class IDataOnlineRateServiceImpl implements IDataOnlineRateService {
|
|||||||
}
|
}
|
||||||
max = info.stream().max(Comparator.naturalOrder()).orElse(0.0);
|
max = info.stream().max(Comparator.naturalOrder()).orElse(0.0);
|
||||||
}
|
}
|
||||||
int v = (int)Math.ceil(InfluxDBPublicParam.DAY_MINUTE * max);
|
int v = (int) Math.ceil(InfluxDBPublicParam.DAY_MINUTE * max);
|
||||||
onlineRateDpo.setOnlineMin(v);
|
onlineRateDpo.setOnlineMin(v);
|
||||||
onlineRateDpo.setOfflineMin(InfluxDBPublicParam.DAY_MINUTE - v);
|
onlineRateDpo.setOfflineMin(InfluxDBPublicParam.DAY_MINUTE - v);
|
||||||
list.add(onlineRateDpo);
|
list.add(onlineRateDpo);
|
||||||
@@ -247,6 +247,8 @@ public class IDataOnlineRateServiceImpl implements IDataOnlineRateService {
|
|||||||
long differ = DateUtil.between(date, newDate, DateUnit.MINUTE);
|
long differ = DateUtil.between(date, newDate, DateUnit.MINUTE);
|
||||||
if (online.equals(type)) {
|
if (online.equals(type)) {
|
||||||
minute = InfluxDBPublicParam.DAY_MINUTE - (int) differ;
|
minute = InfluxDBPublicParam.DAY_MINUTE - (int) differ;
|
||||||
|
} else {
|
||||||
|
minute = (int) differ;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
List<PqsCommunicateDto> communicateDataOld = communicateFeignClient.getRawDataEnd(lineParam).getData();
|
List<PqsCommunicateDto> communicateDataOld = communicateFeignClient.getRawDataEnd(lineParam).getData();
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ public class PqsCommunicateDto {
|
|||||||
|
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
|
//1是在线 0是离线
|
||||||
private Integer type;
|
private Integer type;
|
||||||
//是否更新updateTime标志;数据上送更新1,状态翻转不更新0
|
//是否更新updateTime标志;数据上送更新1,状态翻转不更新0
|
||||||
private Integer flag=0;
|
private Integer flag=0;
|
||||||
|
|||||||
@@ -19,16 +19,13 @@ spring:
|
|||||||
cloud:
|
cloud:
|
||||||
nacos:
|
nacos:
|
||||||
discovery:
|
discovery:
|
||||||
ip: @service.server.url@
|
|
||||||
server-addr: @nacos.url@
|
server-addr: @nacos.url@
|
||||||
namespace: @nacos.namespace@
|
namespace: @nacos.namespace@
|
||||||
username: @nacos.username@
|
|
||||||
password: @nacos.password@
|
|
||||||
config:
|
config:
|
||||||
server-addr: @nacos.url@
|
|
||||||
namespace: @nacos.namespace@
|
|
||||||
username: @nacos.username@
|
username: @nacos.username@
|
||||||
password: @nacos.password@
|
password: @nacos.password@
|
||||||
|
server-addr: @nacos.url@
|
||||||
|
namespace: @nacos.namespace@
|
||||||
file-extension: yaml
|
file-extension: yaml
|
||||||
shared-configs:
|
shared-configs:
|
||||||
- data-id: share-config.yaml
|
- data-id: share-config.yaml
|
||||||
|
|||||||
Reference in New Issue
Block a user