Commit a313256c authored by wujiang's avatar wujiang

提交修改

parent 2379e2c7
...@@ -89,7 +89,7 @@ public class AmosJxiopAnalyseApplication { ...@@ -89,7 +89,7 @@ public class AmosJxiopAnalyseApplication {
return; return;
} }
// 订阅固化周期性数据成功的消息 // 订阅固化周期性数据成功的消息
emqKeeper.subscript("sync_esdata_to_tdengine_notice1", 1, syncESDataToTdengineMqttListener); emqKeeper.subscript("sync_esdata_to_tdengine_notice", 1, syncESDataToTdengineMqttListener);
// 订阅业务固化同步数据成功消息 // 订阅业务固化同步数据成功消息
//emqKeeper.subscript("sync_iotdata_to_tdengine_notice", 1, syncDasSuccessMqttListener); //emqKeeper.subscript("sync_iotdata_to_tdengine_notice", 1, syncDasSuccessMqttListener);
} }
......
...@@ -70,7 +70,7 @@ public class Constants { ...@@ -70,7 +70,7 @@ public class Constants {
*/ */
public static final String JXIOP_DICT_CERTIFICATES = "jxIop:dict:certificates"; public static final String JXIOP_DICT_CERTIFICATES = "jxIop:dict:certificates";
public static final String BASE_URL = "http://iiet-jepcc.powerchina.cn:8088/screen_api"; //public static final String BASE_URL = "http://iiet-jepcc.powerchina.cn:8088/screen_api";
public static final String REQUEST_GET="GET"; public static final String REQUEST_GET="GET";
public static final String REQUEST_POST="POST"; public static final String REQUEST_POST="POST";
public static final String get_province_item_url="method=scene_screen.data_interface.get_province_item"; public static final String get_province_item_url="method=scene_screen.data_interface.get_province_item";
......
...@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.util.Map; import java.util.Map;
public interface EnergyAccessService { public interface EnergyAccessService {
Page<Map<String, Object>> getInstalledCapacity(String current, String pageSize, String code, String sourceStationId, String tp) throws Exception; Page<Map<String, Object>> getInstalledCapacity(String current, String pageSize, String code, String sourceStationId, String tp) throws Exception;
Page<Map<String, Object>> getQuotaCompleteInfo(String current, String pageSize, String code, String sourceStationId, String tp); Page<Map<String, Object>> getQuotaCompleteInfo(String current, String pageSize, String code, String sourceStationId, String tp);
......
...@@ -6,12 +6,13 @@ import com.alibaba.fastjson.TypeReference; ...@@ -6,12 +6,13 @@ import com.alibaba.fastjson.TypeReference;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.jxiop.api.util.Constants; 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.api.util.HttpRequestUtil;
import com.yeejoin.amos.boot.module.jxiop.api.mapper.EnergyAccessMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.service.EnergyAccessService; import com.yeejoin.amos.boot.module.jxiop.biz.service.EnergyAccessService;
import com.yeejoin.amos.boot.module.jxiop.api.mapper.EnergyAccessMapper;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
...@@ -32,6 +33,9 @@ public class EnergyAccessServiceImpl implements EnergyAccessService { ...@@ -32,6 +33,9 @@ public class EnergyAccessServiceImpl implements EnergyAccessService {
private final Logger logger = LoggerFactory.getLogger(EnergyAccessServiceImpl.class); private final Logger logger = LoggerFactory.getLogger(EnergyAccessServiceImpl.class);
@Value("${budun.baseurl:http://iiet-jepcc.powerchina.cn:8088/screen_api}")
private String budunBaseURL;
@Override @Override
public Page<Map<String, Object>> getInstalledCapacity(String current, String pageSize, String code, String sourceStationId, String tp) { public Page<Map<String, Object>> getInstalledCapacity(String current, String pageSize, String code, String sourceStationId, String tp) {
...@@ -45,7 +49,7 @@ public class EnergyAccessServiceImpl implements EnergyAccessService { ...@@ -45,7 +49,7 @@ public class EnergyAccessServiceImpl implements EnergyAccessService {
logger.info("获取并网容量接口查询本地返回结果:{}", returnList.toString()); logger.info("获取并网容量接口查询本地返回结果:{}", returnList.toString());
} else { } else {
//改为部盾接口 //改为部盾接口
StringBuilder requestUrl = new StringBuilder(Constants.BASE_URL).append("?").append(Constants.get_station_actual_installed_capacity); StringBuilder requestUrl = new StringBuilder(budunBaseURL).append("?").append(Constants.get_station_actual_installed_capacity);
if (StringUtils.isNotEmpty(code)) { if (StringUtils.isNotEmpty(code)) {
requestUrl.append("&code=").append(code); requestUrl.append("&code=").append(code);
} }
...@@ -102,7 +106,7 @@ public class EnergyAccessServiceImpl implements EnergyAccessService { ...@@ -102,7 +106,7 @@ public class EnergyAccessServiceImpl implements EnergyAccessService {
@Override @Override
public Page<Map<String, Object>> getQuotaCompleteInfo(String current, String pageSize, String code, String sourceStationId, String tp) { public Page<Map<String, Object>> getQuotaCompleteInfo(String current, String pageSize, String code, String sourceStationId, String tp) {
//改为部盾接口 //改为部盾接口
StringBuilder requestUrl = new StringBuilder(Constants.BASE_URL).append("?").append(Constants.get_quota_complate_info); StringBuilder requestUrl = new StringBuilder(budunBaseURL).append("?").append(Constants.get_quota_complate_info);
LocalDate currentDate = LocalDate.now(); LocalDate currentDate = LocalDate.now();
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
String formattedDate = currentDate.format(formatter); String formattedDate = currentDate.format(formatter);
......
...@@ -30,6 +30,7 @@ import org.elasticsearch.search.aggregations.bucket.terms.Terms; ...@@ -30,6 +30,7 @@ import org.elasticsearch.search.aggregations.bucket.terms.Terms;
import org.elasticsearch.search.aggregations.metrics.ParsedAvg; import org.elasticsearch.search.aggregations.metrics.ParsedAvg;
import org.elasticsearch.search.aggregations.metrics.ParsedSum; import org.elasticsearch.search.aggregations.metrics.ParsedSum;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.*; import org.springframework.http.*;
import org.springframework.scheduling.annotation.Scheduled; import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -95,6 +96,9 @@ public class LargeScreenImpl { ...@@ -95,6 +96,9 @@ public class LargeScreenImpl {
private final String YFD = "月发电量"; private final String YFD = "月发电量";
private final String NFD = "年发电量"; private final String NFD = "年发电量";
@Value("${budun.baseurl:http://iiet-jepcc.powerchina.cn:8088/screen_api}")
private String budunBaseURL;
/** /**
* 全国 * 全国
*/ */
...@@ -144,7 +148,7 @@ public class LargeScreenImpl { ...@@ -144,7 +148,7 @@ public class LargeScreenImpl {
// } // }
// 改为部盾接口 // 改为部盾接口
String requestUrl = Constants.BASE_URL + "?" + Constants.get_quota_info; String requestUrl = budunBaseURL + "?" + Constants.get_quota_info;
LocalDate currentDate = LocalDate.now(); LocalDate currentDate = LocalDate.now();
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
LocalDate yesterday = currentDate.minusDays(1); LocalDate yesterday = currentDate.minusDays(1);
...@@ -474,7 +478,7 @@ public class LargeScreenImpl { ...@@ -474,7 +478,7 @@ public class LargeScreenImpl {
// mapdta.put("NJHWC", ybfbn); // mapdta.put("NJHWC", ybfbn);
// 改为部盾接口 // 改为部盾接口
String requestUrl = Constants.BASE_URL + "?" + Constants.get_quota_info; String requestUrl = budunBaseURL + "?" + Constants.get_quota_info;
LocalDate currentDate = LocalDate.now(); LocalDate currentDate = LocalDate.now();
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
LocalDate yesterday = currentDate.minusDays(1); LocalDate yesterday = currentDate.minusDays(1);
......
...@@ -60,6 +60,8 @@ public class MonitorServiceImpl implements MonitorService { ...@@ -60,6 +60,8 @@ public class MonitorServiceImpl implements MonitorService {
private Resource overview; private Resource overview;
@Value("classpath:/json/overviewGF.json") @Value("classpath:/json/overviewGF.json")
private Resource overviewGF; private Resource overviewGF;
@Value("${budun.baseurl:http://iiet-jepcc.powerchina.cn:8088/screen_api}")
private String budunBaseURL;
@Override @Override
public IPage<Map<String, Object>> operationData(String areaCode,String platformStationId) { public IPage<Map<String, Object>> operationData(String areaCode,String platformStationId) {
...@@ -175,7 +177,7 @@ public class MonitorServiceImpl implements MonitorService { ...@@ -175,7 +177,7 @@ public class MonitorServiceImpl implements MonitorService {
areaName = Constants.areaChinese; areaName = Constants.areaChinese;
} }
String requestUrl = Constants.BASE_URL + "?" + Constants.get_month_generation_trend_url + "&areaName=" + areaName; String requestUrl = budunBaseURL + "?" + Constants.get_month_generation_trend_url + "&areaName=" + areaName;
List<String> list = new ArrayList<>(); List<String> list = new ArrayList<>();
List<Double> listData = new ArrayList<>(); List<Double> listData = new ArrayList<>();
List<BudunMonthTrendDto> budunMonthTrendDtos = httpRequestUtil.getResPonse(requestUrl, Constants.REQUEST_GET, "", Constants.resovleRule_data, BudunMonthTrendDto.class); List<BudunMonthTrendDto> budunMonthTrendDtos = httpRequestUtil.getResPonse(requestUrl, Constants.REQUEST_GET, "", Constants.resovleRule_data, BudunMonthTrendDto.class);
...@@ -200,7 +202,7 @@ public class MonitorServiceImpl implements MonitorService { ...@@ -200,7 +202,7 @@ public class MonitorServiceImpl implements MonitorService {
@Override @Override
public Map<String, Object> gettimedateyfdqs() { public Map<String, Object> gettimedateyfdqs() {
String requestUrl = Constants.BASE_URL + "?" + Constants.get_generated_quota_trend; String requestUrl = budunBaseURL + "?" + Constants.get_generated_quota_trend;
List<BundunCompleteDto> bundunCompleteDtoList = httpRequestUtil.getResPonse(requestUrl, Constants.REQUEST_GET, "", Constants.resovleRule_data, BundunCompleteDto.class); List<BundunCompleteDto> bundunCompleteDtoList = httpRequestUtil.getResPonse(requestUrl, Constants.REQUEST_GET, "", Constants.resovleRule_data, BundunCompleteDto.class);
Map<String, Object> mapjn = new HashMap<>(); Map<String, Object> mapjn = new HashMap<>();
...@@ -223,7 +225,7 @@ public class MonitorServiceImpl implements MonitorService { ...@@ -223,7 +225,7 @@ public class MonitorServiceImpl implements MonitorService {
public Map<String, Object> gettimedateyfd() { public Map<String, Object> gettimedateyfd() {
String requestUrl = Constants.BASE_URL + "?" + Constants.get_month_generation_trend_url; String requestUrl = budunBaseURL + "?" + Constants.get_month_generation_trend_url;
List<String> list = new ArrayList<>(); List<String> list = new ArrayList<>();
List<Double> listData = new ArrayList<>(); List<Double> listData = new ArrayList<>();
List<BudunMonthTrendDto> budunMonthTrendDtos = httpRequestUtil.getResPonse(requestUrl, Constants.REQUEST_GET, "", Constants.resovleRule_data, BudunMonthTrendDto.class); List<BudunMonthTrendDto> budunMonthTrendDtos = httpRequestUtil.getResPonse(requestUrl, Constants.REQUEST_GET, "", Constants.resovleRule_data, BudunMonthTrendDto.class);
...@@ -248,7 +250,7 @@ public class MonitorServiceImpl implements MonitorService { ...@@ -248,7 +250,7 @@ public class MonitorServiceImpl implements MonitorService {
@Override @Override
public Map<String, Object> gettimedateqyyfd(String areaName) { public Map<String, Object> gettimedateqyyfd(String areaName) {
String requestUrl = Constants.BASE_URL + "?" + Constants.get_generated_quota_trend; String requestUrl = budunBaseURL + "?" + Constants.get_generated_quota_trend;
MapRegion mapRegion = mapRegionMapper.selectOne(new QueryWrapper<MapRegion>().eq("name", areaName)); MapRegion mapRegion = mapRegionMapper.selectOne(new QueryWrapper<MapRegion>().eq("name", areaName));
if (!areaName.contains(Constants.areaChinese)) { if (!areaName.contains(Constants.areaChinese)) {
areaName = areaName + Constants.areaChinese; areaName = areaName + Constants.areaChinese;
...@@ -279,7 +281,7 @@ public class MonitorServiceImpl implements MonitorService { ...@@ -279,7 +281,7 @@ public class MonitorServiceImpl implements MonitorService {
@Override @Override
public SeriesData getSeriesDataqg() { public SeriesData getSeriesDataqg() {
String requestUrl = Constants.BASE_URL + "?" + Constants.get_day_generation_trend; String requestUrl = budunBaseURL + "?" + Constants.get_day_generation_trend;
List<BudunDayGenTrendDto> budunDayGenTrendDtoList = httpRequestUtil.getResPonse(requestUrl, Constants.REQUEST_GET, "", Constants.resovleRule_data, BudunDayGenTrendDto.class); List<BudunDayGenTrendDto> budunDayGenTrendDtoList = httpRequestUtil.getResPonse(requestUrl, Constants.REQUEST_GET, "", Constants.resovleRule_data, BudunDayGenTrendDto.class);
List<Map<String, Object>> list = new ArrayList<>(); List<Map<String, Object>> list = new ArrayList<>();
List<String> listdate = new ArrayList<>(); List<String> listdate = new ArrayList<>();
...@@ -320,7 +322,7 @@ public class MonitorServiceImpl implements MonitorService { ...@@ -320,7 +322,7 @@ public class MonitorServiceImpl implements MonitorService {
if (!ObjectUtils.isEmpty(mapRegion) && !ObjectUtils.isEmpty(mapRegion.getName()) && !mapRegion.getName().contains(Constants.areaChinese)) { if (!ObjectUtils.isEmpty(mapRegion) && !ObjectUtils.isEmpty(mapRegion.getName()) && !mapRegion.getName().contains(Constants.areaChinese)) {
areaName = mapRegion.getName() + Constants.areaChinese; areaName = mapRegion.getName() + Constants.areaChinese;
} }
String requestUrl = Constants.BASE_URL + "?" + Constants.get_day_generation_trend + "&areaName=" + areaName; String requestUrl = budunBaseURL + "?" + Constants.get_day_generation_trend + "&areaName=" + areaName;
List<BudunDayGenTrendDto> budunDayGenTrendDtoList = httpRequestUtil.getResPonse(requestUrl, Constants.REQUEST_GET, "", Constants.resovleRule_data, BudunDayGenTrendDto.class); List<BudunDayGenTrendDto> budunDayGenTrendDtoList = httpRequestUtil.getResPonse(requestUrl, Constants.REQUEST_GET, "", Constants.resovleRule_data, BudunDayGenTrendDto.class);
List<Map<String, Object>> list = new ArrayList<>(); List<Map<String, Object>> list = new ArrayList<>();
List<String> listdate = new ArrayList<>(); List<String> listdate = new ArrayList<>();
...@@ -360,7 +362,7 @@ public class MonitorServiceImpl implements MonitorService { ...@@ -360,7 +362,7 @@ public class MonitorServiceImpl implements MonitorService {
if (!ObjectUtils.isEmpty(mapRegion) && !ObjectUtils.isEmpty(mapRegion.getName()) && !mapRegion.getName().contains(Constants.areaChinese)) { if (!ObjectUtils.isEmpty(mapRegion) && !ObjectUtils.isEmpty(mapRegion.getName()) && !mapRegion.getName().contains(Constants.areaChinese)) {
areaName = mapRegion.getName() + Constants.areaChinese; areaName = mapRegion.getName() + Constants.areaChinese;
} }
String requestUrl = Constants.BASE_URL + "?" + Constants.get_area_item_url; String requestUrl = budunBaseURL + "?" + Constants.get_area_item_url;
if (areaCode != null) { if (areaCode != null) {
requestUrl = requestUrl + "&areaName=" + areaName; requestUrl = requestUrl + "&areaName=" + areaName;
} }
...@@ -393,7 +395,7 @@ public class MonitorServiceImpl implements MonitorService { ...@@ -393,7 +395,7 @@ public class MonitorServiceImpl implements MonitorService {
@Override @Override
public Page<Map<String, Object>> stationRanking(String day, String type, String areaCode) { public Page<Map<String, Object>> stationRanking(String day, String type, String areaCode) {
String areaName = ""; String areaName = "";
String requestUrl = Constants.BASE_URL + "?" + Constants.get_hours_num_top + "&topValue=5&tabValue=" + day; String requestUrl = budunBaseURL + "?" + Constants.get_hours_num_top + "&topValue=5&tabValue=" + day;
if (areaCode != null) { if (areaCode != null) {
MapRegion mapRegion = mapRegionMapper.selectOne(new QueryWrapper<MapRegion>().eq("area_code", areaCode)); MapRegion mapRegion = mapRegionMapper.selectOne(new QueryWrapper<MapRegion>().eq("area_code", areaCode));
if (!ObjectUtils.isEmpty(mapRegion) && !ObjectUtils.isEmpty(mapRegion.getName()) && !mapRegion.getName().contains(Constants.areaChinese)) { if (!ObjectUtils.isEmpty(mapRegion) && !ObjectUtils.isEmpty(mapRegion.getName()) && !mapRegion.getName().contains(Constants.areaChinese)) {
...@@ -444,7 +446,7 @@ public class MonitorServiceImpl implements MonitorService { ...@@ -444,7 +446,7 @@ public class MonitorServiceImpl implements MonitorService {
coreValuesDtoList = coreCommonService.getValuesByStationNamesAndPointsNames(stringNames.stream().collect(Collectors.joining(",")), CommonConstans.ACTIVE_POWER); coreValuesDtoList = coreCommonService.getValuesByStationNamesAndPointsNames(stringNames.stream().collect(Collectors.joining(",")), CommonConstans.ACTIVE_POWER);
// 获取风场详情信息 // 获取风场详情信息
String requestUrl = Constants.BASE_URL + "?" + Constants.get_province_station_item + "&stationId=" + stationId; String requestUrl = budunBaseURL + "?" + Constants.get_province_station_item + "&stationId=" + stationId;
List<BuDunStationDetailInfo> buDunStationDetailInfos = httpRequestUtil.getResPonse(requestUrl, Constants.REQUEST_GET, "", Constants.resovleRule_data, BuDunStationDetailInfo.class); List<BuDunStationDetailInfo> buDunStationDetailInfos = httpRequestUtil.getResPonse(requestUrl, Constants.REQUEST_GET, "", Constants.resovleRule_data, BuDunStationDetailInfo.class);
BuDunStationDetailInfo buDunStationDetailInfo = buDunStationDetailInfos.stream().filter(buDunStationDetailInfo1 -> stationBasic.getStationName().contains(buDunStationDetailInfo1.getStation_name().replace("电场", "").replace("电站", ""))).findFirst().orElse(null); BuDunStationDetailInfo buDunStationDetailInfo = buDunStationDetailInfos.stream().filter(buDunStationDetailInfo1 -> stationBasic.getStationName().contains(buDunStationDetailInfo1.getStation_name().replace("电场", "").replace("电站", ""))).findFirst().orElse(null);
Map<String, Object> columnMap = new HashMap<>(); Map<String, Object> columnMap = new HashMap<>();
...@@ -497,7 +499,7 @@ public class MonitorServiceImpl implements MonitorService { ...@@ -497,7 +499,7 @@ public class MonitorServiceImpl implements MonitorService {
coreValuesDtoList = coreCommonService.getValuesByStationNamesAndPointsNames(stringNames.stream().collect(Collectors.joining(",")), CommonConstans.ACTIVE_POWER + "," + CommonConstans.TOTAL_RADIATION_SUM); coreValuesDtoList = coreCommonService.getValuesByStationNamesAndPointsNames(stringNames.stream().collect(Collectors.joining(",")), CommonConstans.ACTIVE_POWER + "," + CommonConstans.TOTAL_RADIATION_SUM);
// 获取风场详情信息 // 获取风场详情信息
String requestUrl = Constants.BASE_URL + "?" + Constants.get_province_station_item + "&stationId=" + stationId; String requestUrl = budunBaseURL + "?" + Constants.get_province_station_item + "&stationId=" + stationId;
List<BuDunStationDetailInfo> buDunStationDetailInfos = httpRequestUtil.getResPonse(requestUrl, Constants.REQUEST_GET, "", Constants.resovleRule_data, BuDunStationDetailInfo.class); List<BuDunStationDetailInfo> buDunStationDetailInfos = httpRequestUtil.getResPonse(requestUrl, Constants.REQUEST_GET, "", Constants.resovleRule_data, BuDunStationDetailInfo.class);
BuDunStationDetailInfo buDunStationDetailInfo = buDunStationDetailInfos.stream().filter(buDunStationDetailInfo1 -> stationBasic.getStationName().contains(buDunStationDetailInfo1.getStation_name().replace("电场", "").replace("电站", ""))).findFirst().orElse(null); BuDunStationDetailInfo buDunStationDetailInfo = buDunStationDetailInfos.stream().filter(buDunStationDetailInfo1 -> stationBasic.getStationName().contains(buDunStationDetailInfo1.getStation_name().replace("电场", "").replace("电站", ""))).findFirst().orElse(null);
Map<String, Object> columnMap = new HashMap<>(); Map<String, Object> columnMap = new HashMap<>();
...@@ -587,7 +589,7 @@ public class MonitorServiceImpl implements MonitorService { ...@@ -587,7 +589,7 @@ public class MonitorServiceImpl implements MonitorService {
// List<CoreValuesDto> coreValuesDtos = new ArrayList<>(); // List<CoreValuesDto> coreValuesDtos = new ArrayList<>();
// coreValuesDtos = coreCommonService.getValuesByStationNamesAndPointsNames(null, null); // coreValuesDtos = coreCommonService.getValuesByStationNamesAndPointsNames(null, null);
// // 构建请求URL并发起HTTP GET请求,获取相关数据 // // 构建请求URL并发起HTTP GET请求,获取相关数据
// String requestUrl = Constants.BASE_URL + "?" + Constants.get_area_item_url; // String requestUrl = budunBaseURL + "?" + Constants.get_area_item_url;
// List<BuDunGenDto> buDunGenDtos = httpRequestUtil.getResPonse(requestUrl, Constants.REQUEST_GET, "", Constants.resovleRule_data, BuDunGenDto.class); // List<BuDunGenDto> buDunGenDtos = httpRequestUtil.getResPonse(requestUrl, Constants.REQUEST_GET, "", Constants.resovleRule_data, BuDunGenDto.class);
// // 如果有获取到数据,则更新map中的相应数据 // // 如果有获取到数据,则更新map中的相应数据
// if (buDunGenDtos.size() > 0) { // if (buDunGenDtos.size() > 0) {
...@@ -645,7 +647,7 @@ public class MonitorServiceImpl implements MonitorService { ...@@ -645,7 +647,7 @@ public class MonitorServiceImpl implements MonitorService {
mapdta.put("YJHWC", 0d); mapdta.put("YJHWC", 0d);
mapdta.put("NJHWC", 0d); mapdta.put("NJHWC", 0d);
// 构建请求URL并发起HTTP GET请求,获取相关数据 // 构建请求URL并发起HTTP GET请求,获取相关数据
String requestUrl = Constants.BASE_URL + "?" + Constants.get_area_item_url; String requestUrl = budunBaseURL + "?" + Constants.get_area_item_url;
List<BuDunGenDto> buDunGenDtos = httpRequestUtil.getResPonse(requestUrl, Constants.REQUEST_GET, "", Constants.resovleRule_data, BuDunGenDto.class); List<BuDunGenDto> buDunGenDtos = httpRequestUtil.getResPonse(requestUrl, Constants.REQUEST_GET, "", Constants.resovleRule_data, BuDunGenDto.class);
// 如果有获取到数据,则更新map中的相应数据 // 如果有获取到数据,则更新map中的相应数据
if (buDunGenDtos.size() > 0) { if (buDunGenDtos.size() > 0) {
...@@ -800,11 +802,11 @@ public class MonitorServiceImpl implements MonitorService { ...@@ -800,11 +802,11 @@ public class MonitorServiceImpl implements MonitorService {
Double useHoursOfAnnualGF = 0.00; Double useHoursOfAnnualGF = 0.00;
//获取全国数据 //获取全国数据
String nationalUrl = Constants.BASE_URL + "?" + Constants.get_province_item_url; String nationalUrl = budunBaseURL + "?" + Constants.get_province_item_url;
//获取风电 //获取风电
String nationalFanUrl = Constants.BASE_URL + "?" + Constants.get_province_item_url + "&type=fan"; String nationalFanUrl = budunBaseURL + "?" + Constants.get_province_item_url + "&type=fan";
//获取光伏 //获取光伏
String nationalPVUrl = Constants.BASE_URL + "?" + Constants.get_province_item_url + "&type=pv"; String nationalPVUrl = budunBaseURL + "?" + Constants.get_province_item_url + "&type=pv";
List<BuDunGenDto> nationalGendto = httpRequestUtil.getResPonse(nationalPVUrl, Constants.REQUEST_GET, "", Constants.resovleRule_data, BuDunGenDto.class); List<BuDunGenDto> nationalGendto = httpRequestUtil.getResPonse(nationalPVUrl, Constants.REQUEST_GET, "", Constants.resovleRule_data, BuDunGenDto.class);
List<BuDunGenDto> fanGendto = httpRequestUtil.getResPonse(nationalPVUrl, Constants.REQUEST_GET, "", Constants.resovleRule_data, BuDunGenDto.class); List<BuDunGenDto> fanGendto = httpRequestUtil.getResPonse(nationalPVUrl, Constants.REQUEST_GET, "", Constants.resovleRule_data, BuDunGenDto.class);
List<BuDunGenDto> pvGendto = httpRequestUtil.getResPonse(nationalPVUrl, Constants.REQUEST_GET, "", Constants.resovleRule_data, BuDunGenDto.class); List<BuDunGenDto> pvGendto = httpRequestUtil.getResPonse(nationalPVUrl, Constants.REQUEST_GET, "", Constants.resovleRule_data, BuDunGenDto.class);
......
...@@ -84,6 +84,8 @@ public class MonitoringServiceImpl { ...@@ -84,6 +84,8 @@ public class MonitoringServiceImpl {
@Autowired @Autowired
private HttpRequestUtil httpRequestUtil; private HttpRequestUtil httpRequestUtil;
@Value("${budun.baseurl:http://iiet-jepcc.powerchina.cn:8088/screen_api}")
private String budunBaseURL;
/** /**
* 根据场站编号获取该场站的装机容量 * 根据场站编号获取该场站的装机容量
* *
...@@ -1107,7 +1109,7 @@ public class MonitoringServiceImpl { ...@@ -1107,7 +1109,7 @@ public class MonitoringServiceImpl {
//改为部盾接口 //改为部盾接口
String requestUrl = Constants.BASE_URL + "?" + Constants.get_quota_info; String requestUrl = budunBaseURL + "?" + Constants.get_quota_info;
LocalDate currentDate = LocalDate.now(); LocalDate currentDate = LocalDate.now();
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
LocalDate yesterday = currentDate.minusDays(1); LocalDate yesterday = currentDate.minusDays(1);
......
...@@ -84,3 +84,4 @@ year.power.generation.cron=0 0/1 * * * ? ...@@ -84,3 +84,4 @@ year.power.generation.cron=0 0/1 * * * ?
large.cron=0 0/5 * * * ? large.cron=0 0/5 * * * ?
forecast.url=http://10.20.1.29:8095/offline/time-series/decomposition forecast.url=http://10.20.1.29:8095/offline/time-series/decomposition
budun.baseurl=http://iiet-jepcc.powerchina.cn:8088/screen_api
\ No newline at end of file
...@@ -674,11 +674,10 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator { ...@@ -674,11 +674,10 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
if ("FDZ".equals(stationBasic.getStationType())) { if ("FDZ".equals(stationBasic.getStationType())) {
values.add(String.format(CommonConstans.Twodecimalplaces, indicatorData.getValueF())); values.add(String.format(CommonConstans.Twodecimalplaces, indicatorData.getValueF()));
Double value = groupMap.get(indicatorData.getCreatedTime()); Double value = groupMap.get(indicatorData.getCreatedTime());
if (Objects.isNull(value)){ if (Objects.isNull(value)) {
value= 0.0; value = 0.0;
} }
valueList.add( valueList.add(String.format(CommonConstans.Twodecimalplaces, value));
String.format(CommonConstans.Twodecimalplaces,value));
} else { } else {
values.add(String.format(CommonConstans.Twodecimalplaces, values.add(String.format(CommonConstans.Twodecimalplaces,
indicatorData.getValueF() * CommonConstans.kwToMv)); indicatorData.getValueF() * CommonConstans.kwToMv));
...@@ -834,6 +833,9 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator { ...@@ -834,6 +833,9 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
public void schedAddAlarmEventData(String gatewayId, String stationId, String stationName, long currentsort) { public void schedAddAlarmEventData(String gatewayId, String stationId, String stationName, long currentsort) {
Map<String, List<String>> queryCondtion = new HashMap<>(); Map<String, List<String>> queryCondtion = new HashMap<>();
if (gatewayId == null) {
return;
}
queryCondtion.put(CommonConstans.QueryStringGateWayId, Arrays.asList(gatewayId)); queryCondtion.put(CommonConstans.QueryStringGateWayId, Arrays.asList(gatewayId));
queryCondtion.put(CommonConstans.QueryStringSystemTypeKeyword, Arrays.asList("光字牌")); queryCondtion.put(CommonConstans.QueryStringSystemTypeKeyword, Arrays.asList("光字牌"));
queryCondtion.put(CommonConstans.QueryStringValueKeyword, Arrays.asList("false")); queryCondtion.put(CommonConstans.QueryStringValueKeyword, Arrays.asList("false"));
...@@ -841,7 +843,9 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator { ...@@ -841,7 +843,9 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
ESEquipments.class); ESEquipments.class);
List<AlarmEvent> newAlarmEvents = new ArrayList<>(); List<AlarmEvent> newAlarmEvents = new ArrayList<>();
List<String> alarmsNames = new ArrayList<>(); List<String> alarmsNames = new ArrayList<>();
if (indicatorsDtoList == null) {
return;
}
for (ESEquipments esEquipments : indicatorsDtoList) { for (ESEquipments esEquipments : indicatorsDtoList) {
AlarmEvent alarmEvent = new AlarmEvent(); AlarmEvent alarmEvent = new AlarmEvent();
alarmEvent.setEventDesc(esEquipments.getEquipmentIndexName()); alarmEvent.setEventDesc(esEquipments.getEquipmentIndexName());
...@@ -1198,8 +1202,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator { ...@@ -1198,8 +1202,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
} }
public void getListByFJ(String gatewayId, String werks, String stationId) { public void getListByFJ(String gatewayId, String werks, String stationId) {
if(werks==null||StringUtils.isEmpty(werks)) if (werks == null || StringUtils.isEmpty(werks)) {
{
return; return;
} }
HashMap<String, String> fanstatutsHashMap = new HashMap<>(); HashMap<String, String> fanstatutsHashMap = new HashMap<>();
...@@ -1209,8 +1212,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator { ...@@ -1209,8 +1212,7 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
queryCondtion.put(CommonConstans.QueryStringGateWayId, Arrays.asList(gatewayId)); queryCondtion.put(CommonConstans.QueryStringGateWayId, Arrays.asList(gatewayId));
List<ESEquipments> listDataAll = commonServiceImpl.getListDataByCondtions(queryCondtion, null, List<ESEquipments> listDataAll = commonServiceImpl.getListDataByCondtions(queryCondtion, null,
ESEquipments.class); ESEquipments.class);
if(listDataAll==null||listDataAll.isEmpty()) if (listDataAll == null || listDataAll.isEmpty()) {
{
return; return;
} }
Map<String, Object> listDataWindSpeed = listDataAll.stream() Map<String, Object> listDataWindSpeed = listDataAll.stream()
...@@ -1224,20 +1226,18 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator { ...@@ -1224,20 +1226,18 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
// List<Map<String, Object>> dataMaps = sjglZsjZsbtzServiceImpl.sjglZsjZsbtzMapper // List<Map<String, Object>> dataMaps = sjglZsjZsbtzServiceImpl.sjglZsjZsbtzMapper
// .getStationInfoMapByStationWerks(werks, tpriDmpDatabook.getDataid().toString()); // .getStationInfoMapByStationWerks(werks, tpriDmpDatabook.getDataid().toString());
List<Map<String, Object>> dataMapss = sjglZsjZsbtzServiceImpl.sjglZsjZsbtzMapper List<Map<String, Object>> dataMapss = sjglZsjZsbtzServiceImpl.sjglZsjZsbtzMapper
.getStationInfoMapByStationWerksNew(werks, tpriDmpDatabook.getDataid().toString()); .getStationInfoMapByStationWerksNew(werks, tpriDmpDatabook.getDataid().toString());
Map<String, List<Map<String, Object>>> dataResult = dataMapss.stream().collect(Collectors.groupingBy(map -> (String) map.get("name"))); Map<String, List<Map<String, Object>>> dataResult = dataMapss.stream()
.collect(Collectors.groupingBy(map -> (String) map.get("name")));
List<Map<String, Object>> dataMaps = new ArrayList<>(); List<Map<String, Object>> dataMaps = new ArrayList<>();
dataResult.keySet().forEach(m->{ dataResult.keySet().forEach(m -> {
String equipNum = dataResult.get(m).stream() String equipNum = dataResult.get(m).stream().map(map -> map.get("equipNum").toString().replace(m + "#", ""))
.map(map ->map.get("equipNum").toString().replace(m+"#","")) .reduce((a, b) -> a + "," + b).orElse("");
.reduce((a, b) -> a + "," + b)
.orElse("");
Map<String, Object> hashMap = new HashMap<>(); Map<String, Object> hashMap = new HashMap<>();
hashMap.put("name",m.replace("#","")); hashMap.put("name", m.replace("#", ""));
hashMap.put("equipNum",equipNum); hashMap.put("equipNum", equipNum);
dataMaps.add(hashMap); dataMaps.add(hashMap);
}); });
...@@ -2141,6 +2141,9 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator { ...@@ -2141,6 +2141,9 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
public void getEquipSwitchStatus(StationBasic stationBasic) { public void getEquipSwitchStatus(StationBasic stationBasic) {
String gatewayId = stationBasic.getFanGatewayId(); String gatewayId = stationBasic.getFanGatewayId();
if (gatewayId == null) {
return;
}
Long stationId = stationBasic.getSequenceNbr(); Long stationId = stationBasic.getSequenceNbr();
Map<String, List<String>> queryConditon = new HashMap<>(); Map<String, List<String>> queryConditon = new HashMap<>();
queryConditon.put(CommonConstans.QueryStringGateWayId, Arrays.asList(gatewayId)); queryConditon.put(CommonConstans.QueryStringGateWayId, Arrays.asList(gatewayId));
...@@ -2329,6 +2332,9 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator { ...@@ -2329,6 +2332,9 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
} }
public void getListByNbq(String gatewayId, String werks, String stationId) { public void getListByNbq(String gatewayId, String werks, String stationId) {
if (gatewayId == null) {
return;
}
HashMap<String, String> equipStatesMap = getPvNBQStationBy(gatewayId); HashMap<String, String> equipStatesMap = getPvNBQStationBy(gatewayId);
ArrayList<Map<String, Object>> resultList = new ArrayList<>(); ArrayList<Map<String, Object>> resultList = new ArrayList<>();
Map<String, List<String>> queryConditon = new HashMap<>(); Map<String, List<String>> queryConditon = new HashMap<>();
...@@ -2376,24 +2382,20 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator { ...@@ -2376,24 +2382,20 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
// .getStationInfoMapByStationGFWerks(werks, "集电线"); // .getStationInfoMapByStationGFWerks(werks, "集电线");
List<Map<String, Object>> dataMapss = sjglZsjZsbtzServiceImpl.sjglZsjZsbtzMapper List<Map<String, Object>> dataMapss = sjglZsjZsbtzServiceImpl.sjglZsjZsbtzMapper
.getStationInfoMapByStationGFWerksNew(werks,"集电线"); .getStationInfoMapByStationGFWerksNew(werks, "集电线");
Map<String, List<Map<String, Object>>> dataResult = dataMapss.stream().collect(Collectors.groupingBy(map -> (String) map.get("name"))); Map<String, List<Map<String, Object>>> dataResult = dataMapss.stream()
.collect(Collectors.groupingBy(map -> (String) map.get("name")));
List<Map<String, Object>> dataMaps = new ArrayList<>(); List<Map<String, Object>> dataMaps = new ArrayList<>();
dataResult.keySet().forEach(m->{ dataResult.keySet().forEach(m -> {
String equipNum = dataResult.get(m).stream() String equipNum = dataResult.get(m).stream().map(map -> map.get("equipNum").toString().replace(m, ""))
.map(map ->map.get("equipNum").toString().replace(m,"")) .reduce((a, b) -> a + "," + b).orElse("");
.reduce((a, b) -> a + "," + b)
.orElse("");
Map<String, Object> hashMap = new HashMap<>(); Map<String, Object> hashMap = new HashMap<>();
hashMap.put("name",m.replace("#","")); hashMap.put("name", m.replace("#", ""));
hashMap.put("equipNum",equipNum); hashMap.put("equipNum", equipNum);
dataMaps.add(hashMap); dataMaps.add(hashMap);
}); });
int i = 0; int i = 0;
// 逆变器需要根据所属集电线分类组装 下面循环是将同一子阵下的不同逆变器组装为消息数据 // 逆变器需要根据所属集电线分类组装 下面循环是将同一子阵下的不同逆变器组装为消息数据
for (Map<String, Object> dataMap : dataMaps) { for (Map<String, Object> dataMap : dataMaps) {
...@@ -2793,6 +2795,9 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator { ...@@ -2793,6 +2795,9 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
public HashMap<String, String> getPvNBQStationBy(String gatewayId) { public HashMap<String, String> getPvNBQStationBy(String gatewayId) {
HashMap<String, String> result = new HashMap<>(); HashMap<String, String> result = new HashMap<>();
if (gatewayId == null) {
return result;
}
Map<String, List<String>> queryCondition = new HashMap<>(); Map<String, List<String>> queryCondition = new HashMap<>();
queryCondition.put(CommonConstans.QueryStringEquipmentIndexName, Arrays.asList("运行")); queryCondition.put(CommonConstans.QueryStringEquipmentIndexName, Arrays.asList("运行"));
queryCondition.put(CommonConstans.QueryStringGateWayId, Arrays.asList(gatewayId)); queryCondition.put(CommonConstans.QueryStringGateWayId, Arrays.asList(gatewayId));
......
...@@ -16,11 +16,14 @@ import com.yeejoin.amos.boot.module.jxiop.biz.service.CoreCommonService; ...@@ -16,11 +16,14 @@ import com.yeejoin.amos.boot.module.jxiop.biz.service.CoreCommonService;
import com.yeejoin.amos.boot.module.jxiop.biz.service.MonitorService; import com.yeejoin.amos.boot.module.jxiop.biz.service.MonitorService;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.checkerframework.checker.optional.qual.Present;
import org.eclipse.paho.client.mqttv3.MqttException; import org.eclipse.paho.client.mqttv3.MqttException;
import org.elasticsearch.search.aggregations.Aggregation; import org.elasticsearch.search.aggregations.Aggregation;
import org.elasticsearch.search.aggregations.Aggregations; import org.elasticsearch.search.aggregations.Aggregations;
import org.elasticsearch.search.aggregations.bucket.terms.Terms; import org.elasticsearch.search.aggregations.bucket.terms.Terms;
import org.elasticsearch.search.aggregations.metrics.ParsedSum; import org.elasticsearch.search.aggregations.metrics.ParsedSum;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Scheduled; import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
...@@ -46,6 +49,9 @@ public class MonitorServiceImpl implements MonitorService { ...@@ -46,6 +49,9 @@ public class MonitorServiceImpl implements MonitorService {
private final MapRegionMapper mapRegionMapper; private final MapRegionMapper mapRegionMapper;
private final HttpRequestUtil httpRequestUtil; private final HttpRequestUtil httpRequestUtil;
@Value("${budun.baseurl:http://iiet-jepcc.powerchina.cn:8088/screen_api}")
private String budunBaseURL;
@Override @Override
public void getTotalData() { public void getTotalData() {
// 获取所有的场站数据 // 获取所有的场站数据
...@@ -121,11 +127,11 @@ public class MonitorServiceImpl implements MonitorService { ...@@ -121,11 +127,11 @@ public class MonitorServiceImpl implements MonitorService {
Double useHoursOfAnnualGF = 0.00; Double useHoursOfAnnualGF = 0.00;
// 获取全国数据 // 获取全国数据
String nationalUrl = Constants.BASE_URL + "?" + Constants.get_province_item_url; String nationalUrl = budunBaseURL + "?" + Constants.get_province_item_url;
// 获取风电 // 获取风电
String nationalFanUrl = Constants.BASE_URL + "?" + Constants.get_province_item_url + "&type=fan"; String nationalFanUrl = budunBaseURL + "?" + Constants.get_province_item_url + "&type=fan";
// 获取光伏 // 获取光伏
String nationalPVUrl = Constants.BASE_URL + "?" + Constants.get_province_item_url + "&type=pv"; String nationalPVUrl = budunBaseURL + "?" + Constants.get_province_item_url + "&type=pv";
List<BuDunGenDto> nationalGendto = httpRequestUtil.getResPonse(nationalUrl, Constants.REQUEST_GET, "", List<BuDunGenDto> nationalGendto = httpRequestUtil.getResPonse(nationalUrl, Constants.REQUEST_GET, "",
Constants.resovleRule_data, BuDunGenDto.class); Constants.resovleRule_data, BuDunGenDto.class);
List<BuDunGenDto> fanGendto = httpRequestUtil.getResPonse(nationalFanUrl, Constants.REQUEST_GET, "", List<BuDunGenDto> fanGendto = httpRequestUtil.getResPonse(nationalFanUrl, Constants.REQUEST_GET, "",
...@@ -286,7 +292,7 @@ public class MonitorServiceImpl implements MonitorService { ...@@ -286,7 +292,7 @@ public class MonitorServiceImpl implements MonitorService {
} }
} }
String requestUrl = Constants.BASE_URL + "?" + Constants.get_province_station_item + "&provinceName" String requestUrl = budunBaseURL + "?" + Constants.get_province_station_item + "&provinceName"
+ provinceName; + provinceName;
List<BuDunStationDetailInfo> buDunStationDetailInfos = httpRequestUtil.getResPonse(requestUrl, List<BuDunStationDetailInfo> buDunStationDetailInfos = httpRequestUtil.getResPonse(requestUrl,
Constants.REQUEST_GET, "", Constants.resovleRule_data, BuDunStationDetailInfo.class); Constants.REQUEST_GET, "", Constants.resovleRule_data, BuDunStationDetailInfo.class);
...@@ -450,7 +456,7 @@ public class MonitorServiceImpl implements MonitorService { ...@@ -450,7 +456,7 @@ public class MonitorServiceImpl implements MonitorService {
AtomicReference<Double> fdzannualPower = new AtomicReference<>(0.0); AtomicReference<Double> fdzannualPower = new AtomicReference<>(0.0);
AtomicReference<Double> gfzannualPower = new AtomicReference<>(0.0); AtomicReference<Double> gfzannualPower = new AtomicReference<>(0.0);
List<CoreValuesDto> coreValuesDtos = coreCommonService.getValuesByStationNamesAndPointsNames(null, null); List<CoreValuesDto> coreValuesDtos = coreCommonService.getValuesByStationNamesAndPointsNames(null, null);
String requestUrl = Constants.BASE_URL + "?" + Constants.get_province_station_item + "&provinceName=" String requestUrl = budunBaseURL + "?" + Constants.get_province_station_item + "&provinceName="
+ provinceName; + provinceName;
List<BuDunStationDetailInfo> buDunStationDetailInfos = httpRequestUtil.getResPonse(requestUrl, List<BuDunStationDetailInfo> buDunStationDetailInfos = httpRequestUtil.getResPonse(requestUrl,
Constants.REQUEST_GET, "", Constants.resovleRule_data, BuDunStationDetailInfo.class); Constants.REQUEST_GET, "", Constants.resovleRule_data, BuDunStationDetailInfo.class);
...@@ -489,7 +495,7 @@ public class MonitorServiceImpl implements MonitorService { ...@@ -489,7 +495,7 @@ public class MonitorServiceImpl implements MonitorService {
completionOfPowerIndicatorsDtoList.add(completionOfPowerIndicatorsDto); completionOfPowerIndicatorsDtoList.add(completionOfPowerIndicatorsDto);
}); });
} }
String provincelUrl = Constants.BASE_URL + "?" + Constants.get_province_item_url + "&provinceName=" String provincelUrl = budunBaseURL + "?" + Constants.get_province_item_url + "&provinceName="
+ provinceName; + provinceName;
List<BuDunGenDto> provinceDtos = httpRequestUtil.getResPonse(provincelUrl, Constants.REQUEST_GET, "", List<BuDunGenDto> provinceDtos = httpRequestUtil.getResPonse(provincelUrl, Constants.REQUEST_GET, "",
Constants.resovleRule_data, BuDunGenDto.class); Constants.resovleRule_data, BuDunGenDto.class);
...@@ -615,7 +621,7 @@ public class MonitorServiceImpl implements MonitorService { ...@@ -615,7 +621,7 @@ public class MonitorServiceImpl implements MonitorService {
Page<HashMap<String, String>> hashMapPage = new Page<>(1, 99); Page<HashMap<String, String>> hashMapPage = new Page<>(1, 99);
List<HashMap<String, String>> hashMapList = new ArrayList<>(); List<HashMap<String, String>> hashMapList = new ArrayList<>();
List<StationCacheInfoDto> stationCacheInfoDtoList = new ArrayList<>(); List<StationCacheInfoDto> stationCacheInfoDtoList = new ArrayList<>();
String requestUrl = Constants.BASE_URL + "?" + Constants.get_area_item_url; String requestUrl = budunBaseURL + "?" + Constants.get_area_item_url;
if (!ObjectUtils.isEmpty(areaName)) { if (!ObjectUtils.isEmpty(areaName)) {
if (!areaName.contains(Constants.areaChinese)) { if (!areaName.contains(Constants.areaChinese)) {
areaName = areaName + Constants.areaChinese; areaName = areaName + Constants.areaChinese;
...@@ -660,7 +666,7 @@ public class MonitorServiceImpl implements MonitorService { ...@@ -660,7 +666,7 @@ public class MonitorServiceImpl implements MonitorService {
public Page<SocialContributionDto> getSocialContributionDtoList(String areaName, String stationId) { public Page<SocialContributionDto> getSocialContributionDtoList(String areaName, String stationId) {
AtomicReference<Double> total = new AtomicReference<>(0.0); AtomicReference<Double> total = new AtomicReference<>(0.0);
List<StationBasic> stationBasicListAll = new ArrayList<>(); List<StationBasic> stationBasicListAll = new ArrayList<>();
String requestUrl = Constants.BASE_URL + "?" + Constants.get_area_item_url; String requestUrl = budunBaseURL + "?" + Constants.get_area_item_url;
if (!ObjectUtils.isEmpty(stationId)) { if (!ObjectUtils.isEmpty(stationId)) {
stationBasicListAll.add(stationBasicMapper.selectById(stationId)); stationBasicListAll.add(stationBasicMapper.selectById(stationId));
} else if (!ObjectUtils.isEmpty(areaName)) { } else if (!ObjectUtils.isEmpty(areaName)) {
...@@ -716,7 +722,7 @@ public class MonitorServiceImpl implements MonitorService { ...@@ -716,7 +722,7 @@ public class MonitorServiceImpl implements MonitorService {
public Page<HashMap<String, String>> getPowerGenerationTrendsOfCompletionTopFive(String areaName) { public Page<HashMap<String, String>> getPowerGenerationTrendsOfCompletionTopFive(String areaName) {
Page<HashMap<String, String>> hashMapPage = new Page<>(1, 5); Page<HashMap<String, String>> hashMapPage = new Page<>(1, 5);
List<HashMap<String, String>> mapList = new ArrayList<>(); List<HashMap<String, String>> mapList = new ArrayList<>();
String requestUrl = Constants.BASE_URL + "?" + Constants.get_month_top_url + "&topValue=5"; String requestUrl = budunBaseURL + "?" + Constants.get_month_top_url + "&topValue=5";
if (!ObjectUtils.isEmpty(areaName)) { if (!ObjectUtils.isEmpty(areaName)) {
if (!areaName.contains(Constants.areaChinese)) { if (!areaName.contains(Constants.areaChinese)) {
areaName = areaName + Constants.areaChinese; areaName = areaName + Constants.areaChinese;
...@@ -782,7 +788,7 @@ public class MonitorServiceImpl implements MonitorService { ...@@ -782,7 +788,7 @@ public class MonitorServiceImpl implements MonitorService {
List<HashMap<String, String>> mapList = new ArrayList<>(); List<HashMap<String, String>> mapList = new ArrayList<>();
List<StationBasic> fdzList = new ArrayList<>(); List<StationBasic> fdzList = new ArrayList<>();
List<StationBasic> gfdzlist = new ArrayList<>(); List<StationBasic> gfdzlist = new ArrayList<>();
String requestUrl = Constants.BASE_URL + "?" + Constants.get_hours_num_top + "&topValue=3&tabValue=" + tabValue; String requestUrl = budunBaseURL + "?" + Constants.get_hours_num_top + "&topValue=3&tabValue=" + tabValue;
if (!ObjectUtils.isEmpty(areaName)) { if (!ObjectUtils.isEmpty(areaName)) {
if (!areaName.contains(Constants.areaChinese)) { if (!areaName.contains(Constants.areaChinese)) {
areaName = areaName + Constants.areaChinese; areaName = areaName + Constants.areaChinese;
......
...@@ -31,6 +31,8 @@ import java.util.*; ...@@ -31,6 +31,8 @@ import java.util.*;
import java.util.concurrent.atomic.AtomicReference; import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import javax.annotation.PostConstruct;
@Service @Service
public class MonitoringServiceImpl { public class MonitoringServiceImpl {
Logger logger = LoggerFactory.getLogger(MonitoringServiceImpl.class); Logger logger = LoggerFactory.getLogger(MonitoringServiceImpl.class);
......
...@@ -2,7 +2,7 @@ spring.application.name=AMOS-JXIOP-MONITOR-CT ...@@ -2,7 +2,7 @@ spring.application.name=AMOS-JXIOP-MONITOR-CT
server.servlet.context-path=/jxiop-monitor server.servlet.context-path=/jxiop-monitor
server.port=33200 server.port=33200
server.uri-encoding=UTF-8 server.uri-encoding=UTF-8
spring.profiles.active=dev1 spring.profiles.active=dev2
spring.jackson.time-zone=GMT+8 spring.jackson.time-zone=GMT+8
spring.jackson.date-format=yyyy-MM-dd HH:mm:ss spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
#logging.config=classpath:logback-${spring.profiles.active}.xml #logging.config=classpath:logback-${spring.profiles.active}.xml
...@@ -95,3 +95,5 @@ amos.system.user.user-name=cz ...@@ -95,3 +95,5 @@ amos.system.user.user-name=cz
amos.system.user.password=a1234567 amos.system.user.password=a1234567
amos.system.user.product=AMOS_STUDIO_WEB amos.system.user.product=AMOS_STUDIO_WEB
amos.system.user.app-key=AMOS_STUDIO amos.system.user.app-key=AMOS_STUDIO
budun.baseurl=http://iiet-jepcc.powerchina.cn:8088/screen_api
\ No newline at end of file
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