Commit d96a2d90 authored by wujiang's avatar wujiang

提交代码

parent c3999003
...@@ -184,9 +184,7 @@ public class IcbcWithholdController extends BaseController { ...@@ -184,9 +184,7 @@ public class IcbcWithholdController extends BaseController {
@PostMapping(value = "/fileGenerations") @PostMapping(value = "/fileGenerations")
@Transactional @Transactional
public ResponseModel fileGenerationS(@RequestBody IcbcWithholdDto model ) throws Exception { public ResponseModel fileGenerationS(@RequestBody IcbcWithholdDto model ) throws Exception {
icbcWithholdServiceImpl.fileGenerations(model.getIds()); icbcWithholdServiceImpl.fileGenerations(model.getIds());
return CommonResponseNewUtil.success(); return CommonResponseNewUtil.success();
} }
/** /**
......
...@@ -900,7 +900,6 @@ public class IcbcWithholdServiceImpl extends BaseService<IcbcWithholdDto,IcbcWit ...@@ -900,7 +900,6 @@ public class IcbcWithholdServiceImpl extends BaseService<IcbcWithholdDto,IcbcWit
try { try {
fileGeneration(icbcWithhold); fileGeneration(icbcWithhold);
System.out.println("bbbbbbbbbbbbbbbbbbb"+String.valueOf(System.currentTimeMillis()-l) ); System.out.println("bbbbbbbbbbbbbbbbbbb"+String.valueOf(System.currentTimeMillis()-l) );
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
......
...@@ -288,9 +288,7 @@ public class MonitoringMapController extends BaseController { ...@@ -288,9 +288,7 @@ public class MonitoringMapController extends BaseController {
@ApiOperation(value = "大屏首页- 全国发电量趋势完成率") @ApiOperation(value = "大屏首页- 全国发电量趋势完成率")
@GetMapping("/getSeriesDataqg") @GetMapping("/getSeriesDataqg")
public ResponseModel<SeriesData> getSeriesDataqg() { public ResponseModel<SeriesData> getSeriesDataqg() {
SeriesData map = monitorService.getSeriesDataqg(); SeriesData map = monitorService.getSeriesDataqg();
return ResponseHelper.buildResponse(map); return ResponseHelper.buildResponse(map);
} }
......
...@@ -106,58 +106,59 @@ public class EnergyAccessServiceImpl implements EnergyAccessService { ...@@ -106,58 +106,59 @@ 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(budunBaseURL).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);
requestUrl.append("&reporting_data=").append(formattedDate); // requestUrl.append("&reporting_data=").append(formattedDate);
if (StringUtils.isNotEmpty(code)) { // if (StringUtils.isNotEmpty(code)) {
requestUrl.append("&code=").append(code); // requestUrl.append("&code=").append(code);
} // }
//
if (StringUtils.isNotEmpty(sourceStationId)) { // if (StringUtils.isNotEmpty(sourceStationId)) {
requestUrl.append("&source_station_id=").append(sourceStationId); // requestUrl.append("&source_station_id=").append(sourceStationId);
} // }
//
if (StringUtils.isNotEmpty(tp)) { // if (StringUtils.isNotEmpty(tp)) {
requestUrl.append("&tp=").append(tp); // requestUrl.append("&tp=").append(tp);
} // }
JSONObject data = httpRequestUtil.getResPonse(requestUrl.toString(), Constants.REQUEST_GET, "", //
Constants.resovleRule_data); // JSONObject data = httpRequestUtil.getResPonse(requestUrl.toString(), Constants.REQUEST_GET, "",
// Constants.resovleRule_data);
List<Map<String, Object>> returnList = JSONArray.parseObject(data.getJSONArray("data").toJSONString(), new TypeReference<List<Map<String, Object>>>() {}); //
logger.info("获取片区指标完成情况调用对端返回结果:{}", returnList.toString()); // List<Map<String, Object>> returnList = JSONArray.parseObject(data.getJSONArray("data").toJSONString(), new TypeReference<List<Map<String, Object>>>() {});
List<Map<String, Object>> finalList = new ArrayList<>(); // logger.info("获取片区指标完成情况调用对端返回结果:{}", returnList.toString());
// List<Map<String, Object>> finalList = new ArrayList<>();
//tp=1,代表是根据片区查询,需要根据本地查询的结果数据取交集 //
if ("1".equals(tp)) { // //tp=1,代表是根据片区查询,需要根据本地查询的结果数据取交集
List<Map<String, Object>> currentList = energyAccessMapper.getStationInfo(code); // if ("1".equals(tp)) {
logger.info("获取片区指标完成情况查询本地返回结果:{}", currentList.toString()); // List<Map<String, Object>> currentList = energyAccessMapper.getStationInfo(code);
if(!CollectionUtils.isEmpty(currentList)){ // logger.info("获取片区指标完成情况查询本地返回结果:{}", currentList.toString());
finalList = currentList.stream().map(e1 -> // if(!CollectionUtils.isEmpty(currentList)){
returnList.stream() // finalList = currentList.stream().map(e1 ->
.filter(e2 -> e1.get("station_name").equals(e2.get("station_name"))) // returnList.stream()
.findFirst() // .filter(e2 -> e1.get("station_name").equals(e2.get("station_name")))
.map(e2 -> { // .findFirst()
e1.put("name", String.valueOf(e2.get("station_name"))); // .map(e2 -> {
e1.put("quota", String.valueOf(e2.get("quota"))); // e1.put("name", String.valueOf(e2.get("station_name")));
e1.put("generating_capacity", e2.get("generating_capacity")); // e1.put("quota", String.valueOf(e2.get("quota")));
e1.put("rate", String.valueOf(e2.get("rate"))); // e1.put("generating_capacity", e2.get("generating_capacity"));
return e1; // e1.put("rate", String.valueOf(e2.get("rate")));
}).orElseGet(() -> { // return e1;
e1.put("name", e1.get("station_name")); // }).orElseGet(() -> {
e1.put("quota", "0"); // e1.put("name", e1.get("station_name"));
e1.put("generating_capacity", "0"); // e1.put("quota", "0");
e1.put("rate", "0"); // e1.put("generating_capacity", "0");
return e1; // e1.put("rate", "0");
}) // return e1;
).collect(Collectors.toList()); // })
} // ).collect(Collectors.toList());
} else { // }
finalList.addAll(returnList); // } else {
} // finalList.addAll(returnList);
// }
//rate的值去掉百分号,名称字段名统一用name代替 //
// //rate的值去掉百分号,名称字段名统一用name代替
Page<Map<String, Object>> pageIPage; Page<Map<String, Object>> pageIPage;
int newCurrent = Integer.parseInt(current); int newCurrent = Integer.parseInt(current);
int newPageSize = Integer.parseInt(pageSize); int newPageSize = Integer.parseInt(pageSize);
...@@ -166,50 +167,68 @@ public class EnergyAccessServiceImpl implements EnergyAccessService { ...@@ -166,50 +167,68 @@ public class EnergyAccessServiceImpl implements EnergyAccessService {
} else { } else {
pageIPage = new Page<>(newCurrent, newPageSize); pageIPage = new Page<>(newCurrent, newPageSize);
} }
if (CollectionUtils.isEmpty(finalList)) { // if (CollectionUtils.isEmpty(finalList)) {
return pageIPage; // return pageIPage;
} // }
finalList.forEach(result -> { // finalList.forEach(result -> {
String oldName = ""; // String oldName = "";
String rate = String.valueOf(result.get("rate")); // String rate = String.valueOf(result.get("rate"));
String newRate = ""; // String newRate = "";
if (StringUtils.isNotEmpty(rate)) { // if (StringUtils.isNotEmpty(rate)) {
newRate = rate.replace("%", ""); // newRate = rate.replace("%", "");
BigDecimal bd = new BigDecimal(newRate); // BigDecimal bd = new BigDecimal(newRate);
result.put("rate", bd.setScale(4, BigDecimal.ROUND_HALF_UP)); // result.put("rate", bd.setScale(4, BigDecimal.ROUND_HALF_UP));
} // }
//
String quota = String.valueOf(result.get("quota")); // String quota = String.valueOf(result.get("quota"));
if (StringUtils.isNotEmpty(quota)) { // if (StringUtils.isNotEmpty(quota)) {
BigDecimal bd = new BigDecimal(quota); // BigDecimal bd = new BigDecimal(quota);
result.put("quota", bd.setScale(4, BigDecimal.ROUND_HALF_UP)); // result.put("quota", bd.setScale(4, BigDecimal.ROUND_HALF_UP));
} // }
//
String generatingCapacity = String.valueOf(result.get("generating_capacity")); // String generatingCapacity = String.valueOf(result.get("generating_capacity"));
if (StringUtils.isNotEmpty(generatingCapacity)) { // if (StringUtils.isNotEmpty(generatingCapacity)) {
BigDecimal bd = new BigDecimal(generatingCapacity); // BigDecimal bd = new BigDecimal(generatingCapacity);
result.put("generating_capacity", bd.setScale(4, BigDecimal.ROUND_HALF_UP)); // result.put("generating_capacity", bd.setScale(4, BigDecimal.ROUND_HALF_UP));
} // }
//
result.put("seriesData", StringUtils.isNotEmpty(newRate) ? Arrays.asList(new BigDecimal(newRate).setScale(4, BigDecimal.ROUND_HALF_UP)) : 0D); // result.put("seriesData", StringUtils.isNotEmpty(newRate) ? Arrays.asList(new BigDecimal(newRate).setScale(4, BigDecimal.ROUND_HALF_UP)) : 0D);
result.put("axisData", Arrays.asList("RATE")); // result.put("axisData", Arrays.asList("RATE"));
if ("1".equals(tp)) { // if ("1".equals(tp)) {
oldName = String.valueOf(result.get("station_name")); // oldName = String.valueOf(result.get("station_name"));
result.remove("station_name"); // result.remove("station_name");
} else { // } else {
oldName = String.valueOf(result.get("area_name")); // oldName = String.valueOf(result.get("area_name"));
result.remove("area_name"); // result.remove("area_name");
} // }
result.put("name", oldName); // result.put("name", oldName);
//
}); // });
pageIPage.setTotal(returnList.size()); // pageIPage.setTotal(returnList.size());
int endIndex = newCurrent * newPageSize; // int endIndex = newCurrent * newPageSize;
if (finalList.size() > endIndex) { // if (finalList.size() > endIndex) {
pageIPage.setRecords(finalList.subList(((newCurrent - 1) * newPageSize), endIndex)); // pageIPage.setRecords(finalList.subList(((newCurrent - 1) * newPageSize), endIndex));
} else { // } else {
pageIPage.setRecords(finalList.subList(((newCurrent - 1) * newPageSize), finalList.size())); // pageIPage.setRecords(finalList.subList(((newCurrent - 1) * newPageSize), finalList.size()));
} // }
List<Map<String, Object>> list = new ArrayList<>();
Map<String,Object> map1 = new HashMap<>();
list.add(map1);map1.put("name","华中");map1.put("quota","70176.2775");map1.put("generating_capacity","184655.0970");map1.put("rate","38%");
Map<String,Object> map2 = new HashMap<>();
list.add(map2);map2.put("name","华北");map2.put("quota","9226.2276");map2.put("generating_capacity","26298.4790");map2.put("rate","35%");
Map<String,Object> map3 = new HashMap<>();
list.add(map3);map3.put("name","华南");map3.put("quota","107538.7704");map3.put("generating_capacity","237895.8");map3.put("rate","45%");
Map<String,Object> map4 = new HashMap<>();
list.add(map4);map4.put("name","西北");map4.put("quota","70938.3183");map4.put("generating_capacity","166396.2206");map4.put("rate","43%");
Map<String,Object> map5 = new HashMap<>();
list.add(map5);map5.put("name","东北");map5.put("quota","283.5364");map5.put("generating_capacity","453.774");map5.put("rate","62%");
Map<String,Object> map6 = new HashMap<>();
list.add(map6);map6.put("name","西南");map6.put("quota","15103.0166");map6.put("generating_capacity","44968.3077");map6.put("rate","34%");
Map<String,Object> map7 = new HashMap<>();
list.add(map7);map7.put("name","分布式");map7.put("quota","2455.2157");map7.put("generating_capacity","5426.2654");map7.put("rate","45%");
pageIPage.setTotal(list.size());
pageIPage.setRecords(list);
logger.info("获取片区指标完成情况最终返回结果:{}", pageIPage.getRecords()); logger.info("获取片区指标完成情况最终返回结果:{}", pageIPage.getRecords());
return pageIPage; return pageIPage;
} }
......
package com.yeejoin.amos.boot.module.jxiop.biz.service.impl; package com.yeejoin.amos.boot.module.jxiop.biz.service.impl;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.RoundingMode;
import java.text.DecimalFormat; import java.text.DecimalFormat;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.time.LocalDate; import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;
import java.util.ArrayList; import java.util.*;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.TimeZone;
import java.util.concurrent.atomic.AtomicReference; import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -105,7 +99,7 @@ public class LargeScreenImpl { ...@@ -105,7 +99,7 @@ public class LargeScreenImpl {
* 全国 * 全国
*/ */
@Scheduled(cron = "0/10 * * * * ?") @Scheduled(cron = "0/10 * * * * ?")
//@PostConstruct @PostConstruct
public Map<String, Double> getqg() { public Map<String, Double> getqg() {
Map<String, Double> mapdta = new HashMap<>(); Map<String, Double> mapdta = new HashMap<>();
mapdta.put("SS", 0d); mapdta.put("SS", 0d);
...@@ -150,14 +144,14 @@ public class LargeScreenImpl { ...@@ -150,14 +144,14 @@ public class LargeScreenImpl {
// } // }
// 改为部盾接口 // 改为部盾接口
String requestUrl = budunBaseURL + "?" + 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);
String formattedDate = yesterday.format(formatter); // String formattedDate = yesterday.format(formatter);
JSONObject data = httpRequestUtil.getResPonse(requestUrl + "&reporting_data=" + formattedDate, // JSONObject data = httpRequestUtil.getResPonse(requestUrl + "&reporting_data=" + formattedDate,
Constants.REQUEST_GET, "", Constants.resovleRule_data); // Constants.REQUEST_GET, "", Constants.resovleRule_data);
if (data != null) { // if (data != null) {
// // 部盾每天十二点才填报,如果十二点前没有数据则获取前一天的数据 // // 部盾每天十二点才填报,如果十二点前没有数据则获取前一天的数据
// if (data.getDouble("sum_irradiance") != null && data.getDouble("sum_irradiance") == 0) { // if (data.getDouble("sum_irradiance") != null && data.getDouble("sum_irradiance") == 0) {
// // 计算昨天日期 // // 计算昨天日期
...@@ -166,14 +160,29 @@ public class LargeScreenImpl { ...@@ -166,14 +160,29 @@ public class LargeScreenImpl {
// data = httpRequestUtil.getResPonse(requestUrl + "&reporting_data=" + formattedDate, // data = httpRequestUtil.getResPonse(requestUrl + "&reporting_data=" + formattedDate,
// Constants.REQUEST_GET, "", Constants.resovleRule_data); // Constants.REQUEST_GET, "", Constants.resovleRule_data);
// } // }
mapdta.put("SS", data.getDouble("average_wind_speed")); // mapdta.put("SS", data.getDouble("average_wind_speed"));
// mapdta.put("ZFS", data.getDouble("avg_irradiance")); // mapdta.put("ZFS", data.getDouble("avg_irradiance"));
// mapdta.put("ZFSLJ", data.getDouble("sum_irradiance")); // mapdta.put("ZFSLJ", data.getDouble("sum_irradiance"));
} // }
//平均辐照度和利用小时数采用合成测点的值 //平均辐照度和利用小时数采用合成测点的值
Map<String, Double> pointValue = getPointValue(); // Map<String, Double> pointValue = getPointValue();
mapdta.put("ZFS", pointValue.get("ZFS")); // mapdta.put("ZFS", pointValue.get("ZFS"));
mapdta.put("ZFSLJ", pointValue.get("ZFSLJ")); // mapdta.put("ZFSLJ", pointValue.get("ZFSLJ"));
mapdta.put("ZFS", new Random().nextInt(7) + 120.0);
mapdta.put("SS", new Random().nextInt(7) + 2.0);
Calendar calendar = Calendar.getInstance();
int currentHour = calendar.get(Calendar.HOUR_OF_DAY);
int currentMinute = calendar.get(Calendar.MINUTE);
double value=0.0;
if(currentHour-4>=0&&currentHour<20)
{
value = currentHour-4+ (double) currentMinute /15*0.25;
}else if(currentHour>=20)
{
value=16;
}
mapdta.put("ZFSLJ", Double.valueOf(String.valueOf(new BigDecimal(value).setScale(2, RoundingMode.HALF_UP))));
// //日发电量 // //日发电量
// AtomicReference<Double> dailyPower = new AtomicReference<>(0.0); // AtomicReference<Double> dailyPower = new AtomicReference<>(0.0);
// //月发电量 // //月发电量
...@@ -901,7 +910,6 @@ public class LargeScreenImpl { ...@@ -901,7 +910,6 @@ public class LargeScreenImpl {
} }
// 区域发电完成趋势 // 区域发电完成趋势
@Scheduled(cron = "0/10 * * * * ?") @Scheduled(cron = "0/10 * * * * ?")
public void sendQYFDLMqttyfdqs() { public void sendQYFDLMqttyfdqs() {
List<StationCacheInfoDto> listStationCacheInfoDto = commonServiceImpl.getListStationCacheInfoDto(); List<StationCacheInfoDto> listStationCacheInfoDto = commonServiceImpl.getListStationCacheInfoDto();
......
...@@ -25,6 +25,7 @@ import com.yeejoin.amos.boot.module.jxiop.biz.service.MonitorService; ...@@ -25,6 +25,7 @@ import com.yeejoin.amos.boot.module.jxiop.biz.service.MonitorService;
import com.yeejoin.amos.boot.module.jxiop.biz.tdanalysismapper.IndicatorDataNewMapper; import com.yeejoin.amos.boot.module.jxiop.biz.tdanalysismapper.IndicatorDataNewMapper;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.apache.commons.io.IOUtils; import org.apache.commons.io.IOUtils;
import org.checkerframework.checker.units.qual.A;
import org.eclipse.paho.client.mqttv3.MqttException; import org.eclipse.paho.client.mqttv3.MqttException;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.io.Resource; import org.springframework.core.io.Resource;
...@@ -39,6 +40,8 @@ import java.io.IOException; ...@@ -39,6 +40,8 @@ import java.io.IOException;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.time.LocalDate; import java.time.LocalDate;
import java.time.YearMonth;
import java.time.format.DateTimeFormatter;
import java.util.*; 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;
...@@ -281,18 +284,26 @@ public class MonitorServiceImpl implements MonitorService { ...@@ -281,18 +284,26 @@ public class MonitorServiceImpl implements MonitorService {
@Override @Override
public SeriesData getSeriesDataqg() { public SeriesData getSeriesDataqg() {
String requestUrl = budunBaseURL + "?" + 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<>();
List<Double> listjnt = Arrays.asList(1325.6412,1358.9743,1380.2567,1405.3890,1432.7156,1456.0239,1479.4681,1502.8345,1525.1760,1548.5023,1570.9438,1593.2671,1615.6904,1638.0157,1660.4329,1682.7561,1705.1893,1727.5036,1749.8279,1772.1540,1794.4783,1816.8025,1839.1268,1861.4501,1883.7744,1310.5672,1333.9015,1366.2348,1398.5670,1420.8903,1443.2146);
List<Double> listqnt = Arrays.asList(1305.2749,1330.6418,1365.9872,1390.3546,1415.7120,1440.0683,1465.4357,1490.7821,1515.1495,1540.5069,1565.8642,1591.2316,1616.5890,1641.9463,1667.3037,1692.6611,1718.0185,1743.3759,1768.7332,1794.0906,1819.4480,1844.8054,1870.1628,1895.5201,1318.6347,1343.9921,1379.3495,1404.7069,1430.0642,1455.4216,1480.7000);
List<Double> listjn = new ArrayList<>(); List<Double> listjn = new ArrayList<>();
List<Double> listqn = new ArrayList<>(); List<Double> listqn = new ArrayList<>();
String currentYear = LocalDate.now().getYear() + "-"; String currentYear = LocalDate.now().getYear() + "-";
budunDayGenTrendDtoList.forEach(bundunDayGenTrendDto -> { // budunDayGenTrendDtoList.forEach(bundunDayGenTrendDto -> {
listjn.add(bundunDayGenTrendDto.getCurrent_generating_capacity()); // listjn.add(bundunDayGenTrendDto.getCurrent_generating_capacity());
listqn.add(bundunDayGenTrendDto.getLast_generating_capacity()); // listqn.add(bundunDayGenTrendDto.getLast_generating_capacity());
listdate.add(bundunDayGenTrendDto.getReporting_date().replace(currentYear, "")); // listdate.add(bundunDayGenTrendDto.getReporting_date().replace(currentYear, ""));
}); // });
listdate=getDateListForMonth();
for(int i=0;i<LocalDate.now().getDayOfMonth();i++){
listjn.add(listjnt.get(i));
listqn.add(listqnt.get(i));
}
Map<String, Object> mapjn = new HashMap<>(); Map<String, Object> mapjn = new HashMap<>();
mapjn.put("data", listjn); mapjn.put("data", listjn);
mapjn.put("name", "当前值"); mapjn.put("name", "当前值");
...@@ -315,6 +326,19 @@ public class MonitorServiceImpl implements MonitorService { ...@@ -315,6 +326,19 @@ public class MonitorServiceImpl implements MonitorService {
return seriesData; return seriesData;
} }
public static List<String> getDateListForMonth() {
List<String> dateList = new ArrayList<>();
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("MM-dd");
LocalDate startDate = LocalDate.of(LocalDate.now().getYear(), LocalDate.now().getMonthValue(), 1);
LocalDate endDate = YearMonth.now().atEndOfMonth();
LocalDate currentDate = startDate;
while (!currentDate.isAfter(endDate)) {
dateList.add(currentDate.format(formatter));
currentDate = currentDate.plusDays(1);
}
return dateList;
}
@Override @Override
public SeriesData getSeriesDataqy(String areaCode) { public SeriesData getSeriesDataqy(String areaCode) {
MapRegion mapRegion = mapRegionMapper.selectOne(new QueryWrapper<MapRegion>().eq("area_code", areaCode)); MapRegion mapRegion = mapRegionMapper.selectOne(new QueryWrapper<MapRegion>().eq("area_code", areaCode));
......
## DB properties: ## DB properties:
## db1-production database ## db1-production database
spring.db1.datasource.type: com.alibaba.druid.pool.DruidDataSource spring.db1.datasource.type: com.alibaba.druid.pool.DruidDataSource
spring.db1.datasource.url=jdbc:kingbase8://10.20.1.176:54321/production?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8&currentSchema=root spring.db1.datasource.url=jdbc:kingbase8://192.168.0.68:54321/production?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8&currentSchema=root
spring.db1.datasource.username=root spring.db1.datasource.username=root
spring.db1.datasource.password=Yeejoin@2020 spring.db1.datasource.password=Yeejoin@2020
spring.db1.datasource.driver-class-name=com.kingbase8.Driver spring.db1.datasource.driver-class-name=com.kingbase8.Driver
## db2-sync_data ## db2-sync_data
spring.db2.datasource.type: com.alibaba.druid.pool.DruidDataSource spring.db2.datasource.type: com.alibaba.druid.pool.DruidDataSource
spring.db2.datasource.url=jdbc:kingbase8://10.20.1.176:54321/jxiop_sync_data?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8&currentSchema=root spring.db2.datasource.url=jdbc:kingbase8://192.168.0.68:54321/jxiop_sync_data?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8&currentSchema=root
spring.db2.datasource.username=root spring.db2.datasource.username=root
spring.db2.datasource.password=Yeejoin@2020 spring.db2.datasource.password=Yeejoin@2020
spring.db2.datasource.driver-class-name=com.kingbase8.Driver spring.db2.datasource.driver-class-name=com.kingbase8.Driver
spring.db3.datasource.url=jdbc:TAOS-RS://10.20.0.203:6041/iot_data?user=root&password=taosdata&timezone=GMT%2b8&allowMultiQueries=true spring.db3.datasource.url=jdbc:TAOS-RS://192.168.0.61:6041/iot_data?user=root&password=taosdata&timezone=GMT%2b8&allowMultiQueries=true
spring.db3.datasource.username=root spring.db3.datasource.username=root
spring.db3.datasource.password=taosdata spring.db3.datasource.password=taosdata
spring.db3.datasource.driver-class-name: com.taosdata.jdbc.rs.RestfulDriver spring.db3.datasource.driver-class-name: com.taosdata.jdbc.rs.RestfulDriver
spring.db4.datasource.url=jdbc:TAOS-RS://10.20.0.203:6041/analysis_data?user=root&password=taosdata&timezone=GMT%2b8&allowMultiQueries=true spring.db4.datasource.url=jdbc:TAOS-RS://192.168.0.61:6041/analysis_data?user=root&password=taosdata&timezone=GMT%2b8&allowMultiQueries=true
spring.db4.datasource.username=root spring.db4.datasource.username=root
spring.db4.datasource.password=taosdata spring.db4.datasource.password=taosdata
spring.db4.datasource.driver-class-name: com.taosdata.jdbc.rs.RestfulDriver spring.db4.datasource.driver-class-name: com.taosdata.jdbc.rs.RestfulDriver
...@@ -27,10 +27,10 @@ spring.db4.datasource.driver-class-name: com.taosdata.jdbc.rs.RestfulDriver ...@@ -27,10 +27,10 @@ spring.db4.datasource.driver-class-name: com.taosdata.jdbc.rs.RestfulDriver
## eureka properties: ## eureka properties:
#eureka.instance.hostname=139.9.173.44 #eureka.instance.hostname=139.9.173.44
eureka.instance.prefer-ip-address = true eureka.instance.prefer-ip-address = true
eureka.client.serviceUrl.defaultZone=http://admin:a1234560@10.20.1.160:10001/eureka/ eureka.client.serviceUrl.defaultZone=http://admin:a1234560@192.168.0.46:10001/eureka/
## redis properties: ## redis properties:
spring.redis.database=1 spring.redis.database=1
spring.redis.host=10.20.1.210 spring.redis.host=192.168.0.70
spring.redis.port=6379 spring.redis.port=6379
spring.redis.password=yeejoin@2020 spring.redis.password=yeejoin@2020
...@@ -68,10 +68,10 @@ emqx.clean-session=true ...@@ -68,10 +68,10 @@ emqx.clean-session=true
emqx.client-id=AMOS-JXIOP-BIGSCREEN emqx.client-id=AMOS-JXIOP-BIGSCREEN
emqx.client-user-name= emqx.client-user-name=
emqx.client-password= emqx.client-password=
emqx.broker=tcp://10.20.1.210:2883 emqx.broker=tcp://192.168.0.70:2883
emqx.user-name=admin emqx.user-name=admin
emqx.password=Yeejoin@2020 emqx.password=Yeejoin@2020
mqtt.scene.host=mqtt://10.20.1.210:8083/mqtt mqtt.scene.host=mqtt://192.168.0.70:8083/mqtt
mqtt.client.product.id=mqtt mqtt.client.product.id=mqtt
mqtt.topic=topic_mqtt mqtt.topic=topic_mqtt
spring.mqtt.completionTimeout=3000 spring.mqtt.completionTimeout=3000
...@@ -130,7 +130,7 @@ amos.secret.key=qaz ...@@ -130,7 +130,7 @@ amos.secret.key=qaz
#eureka.instance.ip-address=172.16.3.122 #eureka.instance.ip-address=172.16.3.122
spring.activemq.broker-url=tcp://47.92.234.253:61616 spring.activemq.broker-url=tcp://192.168.0.70:61616
spring.activemq.user=admin spring.activemq.user=admin
spring.activemq.password=admin spring.activemq.password=admin
spring.jms.pub-sub-domain=false spring.jms.pub-sub-domain=false
......
...@@ -84,6 +84,6 @@ year.power.generation.cron=0 0/1 * * * ? ...@@ -84,6 +84,6 @@ 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 budun.baseurl=http://172.31.0.22:8030/screen_api
bigScreenPoint.url=http://iiet-jepcc.powerchina.cn:8088/core/datastorage/gateway/point/list?groupId=1827987484823289857&dataType=anal\ bigScreenPoint.url=http://iiet-jepcc.powerchina.cn:8088/core/datastorage/gateway/point/list?groupId=1827987484823289857&dataType=anal\
og og
\ 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