Commit 133c0b67 authored by wujiang's avatar wujiang

暂留代码

parent d33720ae
package com.yeejoin.amos.boot.module.jxiop.biz.service.impl;
import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
......@@ -17,13 +15,10 @@ import java.util.TimeZone;
import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors;
import javax.annotation.PostConstruct;
import org.eclipse.paho.client.mqttv3.MqttException;
import org.elasticsearch.search.aggregations.Aggregation;
import org.elasticsearch.search.aggregations.Aggregations;
import org.elasticsearch.search.aggregations.bucket.terms.Terms;
import org.elasticsearch.search.aggregations.metrics.ParsedAvg;
import org.elasticsearch.search.aggregations.metrics.ParsedSum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
......@@ -37,12 +32,12 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
import com.yeejoin.amos.boot.module.jxiop.api.entity.StationBasic;
import com.yeejoin.amos.boot.module.jxiop.api.entity.StationPlan;
import com.yeejoin.amos.boot.module.jxiop.api.feign.CoreFeignClient;
import com.yeejoin.amos.boot.module.jxiop.api.mapper.StationBasicMapper;
import com.yeejoin.amos.boot.module.jxiop.api.mapper.StationPlanMapper;
import com.yeejoin.amos.boot.module.jxiop.api.util.Constants;
import com.yeejoin.amos.boot.module.jxiop.api.util.HttpRequestUtil;
import com.yeejoin.amos.boot.module.jxiop.biz.ESDto.ESDailyPowerGeneration;
import com.yeejoin.amos.boot.module.jxiop.biz.ESDto.ESEquipments;
import com.yeejoin.amos.boot.module.jxiop.biz.ESDto.ESMoonPowerGeneration;
import com.yeejoin.amos.boot.module.jxiop.biz.constants.CommonConstans;
import com.yeejoin.amos.boot.module.jxiop.biz.dto.SeriesData;
......@@ -50,6 +45,7 @@ import com.yeejoin.amos.boot.module.jxiop.biz.dto.StationCacheInfoDto;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IndicatorData;
import com.yeejoin.amos.boot.module.jxiop.biz.tdmapper.IndicatorDataMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.utils.DateUtil;
import com.yeejoin.amos.component.feign.model.FeignClientResult;
/**
* @description:
......@@ -75,6 +71,9 @@ public class LargeScreenImpl {
SjglZsjZsbtzServiceImpl SjglZsjZsbtzServiceImpl;
@Autowired
private HttpRequestUtil httpRequestUtil;
@Autowired
private CoreFeignClient coreFeignClient;
private final String SS = "瞬时风速";
private final String ZFS = "WTX-801_25_WTX-801_总辐射";
......@@ -233,7 +232,10 @@ public class LargeScreenImpl {
// Double sumValuen = list1 != null && !list1.isEmpty() ? (Double) list1.get(0).get("sum_value") : 0;
// Double ybfbn = sumValuen > 0 ? mapdta.get("NFD") / sumValue * 100 : 0;
// ybfbn = new BigDecimal(ybfbn).setScale(4, BigDecimal.ROUND_HALF_UP).doubleValue();
// mapdta.put("NJHWC", ybfbn);
// mapdta.put("NJHWC", ybfbn);
FeignClientResult<List<Object>> result = coreFeignClient.getValues("夏造风电场", "平均风速");
try {
emqKeeper.getMqttClient().publish("qg/yxzb", JSON.toJSONString(mapdta).getBytes(), 0, true);
} catch (MqttException e) {
......
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