Commit 23236db2 authored by caotao's avatar caotao

1.监盘全国地图、区域地图图钉接口调整。

parent fd48fe02
......@@ -118,4 +118,22 @@ public class CommonConstans {
public static final String taiheIrradiationPonit = "WTX-801_25_WTX-801_总辐射";
public static final String xiazaoActivePowerPoint = "220kV夏雩线212线路测控装置PCS-9705TA有功功率一次值";
public static final String xiazaoWindSpeedrPoint = "瞬时风速";
//------------------监盘服务改造新增常量开始------------------------------
//日发电量
public static final String DAY_POWER_GENERATION = "日发电量总和";
//月发电量
public static final String MONTH_POWER_GENERATION = "月发电量总和";
//年发电量
public static final String YEAR_POWER_GENERATION = "年发电量总和";
//年发电量完成率
public static final String YEAR_GEN_ATTAINMENT_RATE = "年计划完成率";
//年利用小时数
public static final String YEAR_GEN_HOURS = "年利用小时数";
public static final String WIND_SPEED_THIRTY_SECONDS = "30秒平均风速";
public static final String TOTAL_RADIATION = "辐照度";
public static final String ACTIVE_POWER = "有功功率";
//------------------监盘服务改造新增常量结束------------------------------
}
......@@ -12,6 +12,7 @@ import com.yeejoin.amos.boot.module.jxiop.biz.ESDto.ESEquipments;
import com.yeejoin.amos.boot.module.jxiop.biz.constants.CommonConstans;
import com.yeejoin.amos.boot.module.jxiop.biz.dto.*;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IndicatorData;
import com.yeejoin.amos.boot.module.jxiop.biz.service.CoreCommonService;
import com.yeejoin.amos.boot.module.jxiop.biz.tdmapper.IndicatorDataMapper;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
......@@ -23,6 +24,7 @@ import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
import org.typroject.tyboot.component.emq.EmqKeeper;
import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
import org.unbescape.css.CssIdentifierEscapeLevel;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
......@@ -70,6 +72,8 @@ public class MonitoringServiceImpl {
@Autowired
EmqKeeper emqKeeper;
@Autowired
CoreCommonService coreCommonService;
// @Autowired
// InfluxdbUtil influxdbUtil;
......@@ -90,25 +94,30 @@ public class MonitoringServiceImpl {
*
*/
public Map<String, String> getStationfs(StationBasic stationBasic) {
String requestStationName =null;
List<String> pointNames = Arrays.asList(CommonConstans.WIND_SPEED_THIRTY_SECONDS,CommonConstans.ACTIVE_POWER);
String requestPointNames = pointNames.stream().collect(Collectors.joining(","));
List<String> stationNames = new ArrayList<>();
if(!ObjectUtils.isEmpty(stationBasic.getStationCoreName())){
stationNames.add(stationBasic.getStationCoreName());
}
if(!ObjectUtils.isEmpty(stationBasic.getBoosterCoreName())){
stationNames.add(stationBasic.getBoosterCoreName());
}
if(stationNames.size()>1){
requestStationName =stationNames.stream().collect(Collectors.joining(","));
}
List<CoreValuesDto> coreValuesDtoList = coreCommonService.getValuesByStationNamesAndPointsNames(requestStationName,requestPointNames);
String value = "0";
Map<String, String> map = new HashMap<>();
Map<String, List<String>> queryCondtion = new HashMap<>();
if (stationBasic.getStationType().equals("FDZ")) {
String gatewayId = stationBasic.getFanGatewayId();
queryCondtion.put(CommonConstans.QueryStringEquipmentIndexName, Arrays.asList("30秒平均风速"));
queryCondtion.put(CommonConstans.QueryStringGateWayId, Arrays.asList(gatewayId));
List<ESEquipments> result2 = commonServiceImpl.getListDataByCondtions(queryCondtion, null,
ESEquipments.class);
value = String.format("%.2f", commonServiceImpl.getAvagerByEquipmentIndxName(result2, "30秒平均风速"));
value = String.format("%.2f", coreCommonService.getAverageOfByPointName(coreValuesDtoList, CommonConstans.WIND_SPEED_THIRTY_SECONDS));
map.put("name", "风速/辐照度");
map.put("value", value + "m/s");
} else {
queryCondtion.put(CommonConstans.QueryStringEquipmentIndexName, Arrays.asList("WTX-801_25_WTX-801_总辐射"));
queryCondtion.put(CommonConstans.QueryStringGateWayId, Arrays.asList(stationBasic.getBoosterGatewayId()));
List<ESEquipments> result1 = commonServiceImpl.getListDataByCondtions(queryCondtion, null,
ESEquipments.class);
value = String.format("%.2f",
commonServiceImpl.getSumByEquipmentIndxName(result1, "WTX-801_25_WTX-801_总辐射"));
coreCommonService.getAverageOfByPointName(coreValuesDtoList, "WTX-801_25_WTX-801_总辐射"));
map.put("name", "风速/辐照度");
map.put("value", value + "W/㎡");
}
......@@ -121,9 +130,7 @@ public class MonitoringServiceImpl {
*/
public Map<String, String> getStationrl(StationBasic stationBasic) {
Double installCapacity = 0.0;
installCapacity = this.SjglZsjZsbtzServiceImpl
.getStationCapactityByStationWerks(stationBasic.getStationNumber());
String value = ObjectUtils.isEmpty(installCapacity) ? "0.00" : String.format("%.2f", installCapacity);
String value = ObjectUtils.isEmpty(stationBasic.getInstalledCapacity()) ? "0.00" : String.format("%.2f", stationBasic.getInstalledCapacity());
Map<String, String> map = new HashMap<>();
map.put("name", "容量");
map.put("value", value + "MW");
......@@ -132,8 +139,6 @@ public class MonitoringServiceImpl {
/**
* 根据省份名称查询电站详情
*
* @param provinceName
* @return
*/
// public List<RegionNationWideDto> getNationWideInfo(String provinceName, String type) {
......@@ -659,7 +664,6 @@ public class MonitoringServiceImpl {
/**
* @param areaName 片区名称
* @param stationId 场站id
* @return 社会贡献列表
* @deprecated 如果areaName 与 stationID 都不传 则查全国、如果areaName传了 staionID没有传则查片区 如果
* areaName 与stationId都传 则取场站id
......
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