Commit 00e19eff authored by tangwei's avatar tangwei

修改大屏区域接入

parent 675f68aa
......@@ -75,7 +75,7 @@ public class LargeScreenImpl {
Map<String, List<String>> map = new HashMap<>();
map.put("equipmentIndexName.keyword", value);
List<? extends Terms.Bucket> lidate = commonServiceImpl.getgroupavg(map, "valueDouble", "equipmentIndexName.keyword", ESEquipments.class);
List<? extends Terms.Bucket> lidate = commonServiceImpl.getgroupavg(map, "valueF", "equipmentIndexName.keyword", ESEquipments.class);
DecimalFormat format2 = new DecimalFormat("#.0000");
for (Terms.Bucket bucket : lidate) {
Aggregations aggregation = bucket.getAggregations();
......@@ -104,7 +104,7 @@ public class LargeScreenImpl {
value.add(RSD);
value.add(YFD);
value.add(NFD);
List<? extends Terms.Bucket> lidatesum = commonServiceImpl.getgroupsum(map, "valueDouble", "equipmentIndexName.keyword", ESEquipments.class);
List<? extends Terms.Bucket> lidatesum = commonServiceImpl.getgroupsum(map, "valueF", "equipmentIndexName.keyword", ESEquipments.class);
for (Terms.Bucket bucket : lidatesum) {
Aggregations aggregation = bucket.getAggregations();
......@@ -192,7 +192,7 @@ public class LargeScreenImpl {
map.put("equipmentIndexName.keyword", value);
map.put("gatewayId.keyword", gatewayId);
List<? extends Terms.Bucket> lidate = commonServiceImpl.getgroupavg(map, "valueDouble", "equipmentIndexName.keyword", ESEquipments.class);
List<? extends Terms.Bucket> lidate = commonServiceImpl.getgroupavg(map, "valueF", "equipmentIndexName.keyword", ESEquipments.class);
DecimalFormat format2 = new DecimalFormat("#.0000");
for (Terms.Bucket bucket : lidate) {
Aggregations aggregation = bucket.getAggregations();
......@@ -221,7 +221,7 @@ public class LargeScreenImpl {
value.add(RSD);
value.add(YFD);
value.add(NFD);
List<? extends Terms.Bucket> lidatesum = commonServiceImpl.getgroupsum(map, "valueDouble", "equipmentIndexName.keyword", ESEquipments.class);
List<? extends Terms.Bucket> lidatesum = commonServiceImpl.getgroupsum(map, "valueF", "equipmentIndexName.keyword", ESEquipments.class);
for (Terms.Bucket bucket : lidatesum) {
Aggregations aggregation = bucket.getAggregations();
......
......@@ -15,6 +15,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
import org.typroject.tyboot.component.emq.EmqKeeper;
......@@ -781,6 +782,7 @@ public class MonitoringServiceImpl {
return page;
}
@Scheduled(cron = "${large.cron}")
public void getTotalData() {
//计算所有场站年计划完成量
int year = Calendar.getInstance().get(Calendar.YEAR);
......
......@@ -75,12 +75,15 @@ station.section=10
gl.sum.column=日发电量,月发电量,年发电量
gl.avg.column=有功功率,日利用小时,瞬时风速
spring.elasticsearch.rest.uris=http://39.98.224.23:9200
spring.elasticsearch.rest.uris=http://139.9.173.44:9200
spring.elasticsearch.rest.connection-timeout=30000
spring.elasticsearch.rest.username=elastic
spring.elasticsearch.rest.password=123456
spring.elasticsearch.rest.password=Yeejoin@2020
spring.elasticsearch.rest.read-timeout=30000
daily.power.generation.cron=*/30 * * * * ?
moon.power.generation.cron=*/30 * * * * ?
year.power.generation.cron=*/30 * * * * ?
large.cron=0 0/15 * * * ?
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment