Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-zx-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
项目统一框架
一体化_户用光伏项目代码
amos-boot-zx-biz
Commits
d96a2d90
Commit
d96a2d90
authored
Jul 01, 2025
by
wujiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
c3999003
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
189 additions
and
142 deletions
+189
-142
IcbcWithholdController.java
...ot/module/hygf/biz/controller/IcbcWithholdController.java
+0
-2
IcbcWithholdServiceImpl.java
...module/hygf/biz/service/impl/IcbcWithholdServiceImpl.java
+0
-1
MonitoringMapController.java
.../module/jxiop/biz/controller/MonitoringMapController.java
+0
-2
EnergyAccessServiceImpl.java
...odule/jxiop/biz/service/impl/EnergyAccessServiceImpl.java
+115
-96
LargeScreenImpl.java
...s/boot/module/jxiop/biz/service/impl/LargeScreenImpl.java
+32
-24
MonitorServiceImpl.java
...oot/module/jxiop/biz/service/impl/MonitorServiceImpl.java
+31
-7
application-kingbase8.properties
...n-biz/src/main/resources/application-kingbase8.properties
+9
-9
application.properties
...p-bigscreen-biz/src/main/resources/application.properties
+2
-1
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/IcbcWithholdController.java
View file @
d96a2d90
...
...
@@ -184,9 +184,7 @@ public class IcbcWithholdController extends BaseController {
@PostMapping
(
value
=
"/fileGenerations"
)
@Transactional
public
ResponseModel
fileGenerationS
(
@RequestBody
IcbcWithholdDto
model
)
throws
Exception
{
icbcWithholdServiceImpl
.
fileGenerations
(
model
.
getIds
());
return
CommonResponseNewUtil
.
success
();
}
/**
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/IcbcWithholdServiceImpl.java
View file @
d96a2d90
...
...
@@ -900,7 +900,6 @@ public class IcbcWithholdServiceImpl extends BaseService<IcbcWithholdDto,IcbcWit
try
{
fileGeneration
(
icbcWithhold
);
System
.
out
.
println
(
"bbbbbbbbbbbbbbbbbbb"
+
String
.
valueOf
(
System
.
currentTimeMillis
()-
l
)
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/MonitoringMapController.java
View file @
d96a2d90
...
...
@@ -288,9 +288,7 @@ public class MonitoringMapController extends BaseController {
@ApiOperation
(
value
=
"大屏首页- 全国发电量趋势完成率"
)
@GetMapping
(
"/getSeriesDataqg"
)
public
ResponseModel
<
SeriesData
>
getSeriesDataqg
()
{
SeriesData
map
=
monitorService
.
getSeriesDataqg
();
return
ResponseHelper
.
buildResponse
(
map
);
}
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/EnergyAccessServiceImpl.java
View file @
d96a2d90
...
...
@@ -106,58 +106,59 @@ public class EnergyAccessServiceImpl implements EnergyAccessService {
@Override
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
);
LocalDate
currentDate
=
LocalDate
.
now
();
DateTimeFormatter
formatter
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
);
String
formattedDate
=
currentDate
.
format
(
formatter
);
requestUrl
.
append
(
"&reporting_data="
).
append
(
formattedDate
);
if
(
StringUtils
.
isNotEmpty
(
code
))
{
requestUrl
.
append
(
"&code="
).
append
(
code
);
}
if
(
StringUtils
.
isNotEmpty
(
sourceStationId
))
{
requestUrl
.
append
(
"&source_station_id="
).
append
(
sourceStationId
);
}
if
(
StringUtils
.
isNotEmpty
(
tp
))
{
requestUrl
.
append
(
"&tp="
).
append
(
tp
);
}
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
>>
finalList
=
new
ArrayList
<>();
//tp=1,代表是根据片区查询,需要根据本地查询的结果数据取交集
if
(
"1"
.
equals
(
tp
))
{
List
<
Map
<
String
,
Object
>>
currentList
=
energyAccessMapper
.
getStationInfo
(
code
);
logger
.
info
(
"获取片区指标完成情况查询本地返回结果:{}"
,
currentList
.
toString
());
if
(!
CollectionUtils
.
isEmpty
(
currentList
)){
finalList
=
currentList
.
stream
().
map
(
e1
->
returnList
.
stream
()
.
filter
(
e2
->
e1
.
get
(
"station_name"
).
equals
(
e2
.
get
(
"station_name"
)))
.
findFirst
()
.
map
(
e2
->
{
e1
.
put
(
"name"
,
String
.
valueOf
(
e2
.
get
(
"station_name"
)));
e1
.
put
(
"quota"
,
String
.
valueOf
(
e2
.
get
(
"quota"
)));
e1
.
put
(
"generating_capacity"
,
e2
.
get
(
"generating_capacity"
));
e1
.
put
(
"rate"
,
String
.
valueOf
(
e2
.
get
(
"rate"
)));
return
e1
;
}).
orElseGet
(()
->
{
e1
.
put
(
"name"
,
e1
.
get
(
"station_name"
));
e1
.
put
(
"quota"
,
"0"
);
e1
.
put
(
"generating_capacity"
,
"0"
);
e1
.
put
(
"rate"
,
"0"
);
return
e1
;
})
).
collect
(
Collectors
.
toList
());
}
}
else
{
finalList
.
addAll
(
returnList
);
}
//rate的值去掉百分号,名称字段名统一用name代替
// StringBuilder requestUrl = new StringBuilder(budunBaseURL).append("?").append(Constants.get_quota_complate_info);
// LocalDate currentDate = LocalDate.now();
// DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
// String formattedDate = currentDate.format(formatter);
// requestUrl.append("&reporting_data=").append(formattedDate);
// if (StringUtils.isNotEmpty(code)) {
// requestUrl.append("&code=").append(code);
// }
//
// if (StringUtils.isNotEmpty(sourceStationId)) {
// requestUrl.append("&source_station_id=").append(sourceStationId);
// }
//
// if (StringUtils.isNotEmpty(tp)) {
// requestUrl.append("&tp=").append(tp);
// }
//
// 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>> finalList = new ArrayList<>();
//
// //tp=1,代表是根据片区查询,需要根据本地查询的结果数据取交集
// if ("1".equals(tp)) {
// List<Map<String, Object>> currentList = energyAccessMapper.getStationInfo(code);
// logger.info("获取片区指标完成情况查询本地返回结果:{}", currentList.toString());
// if(!CollectionUtils.isEmpty(currentList)){
// finalList = currentList.stream().map(e1 ->
// returnList.stream()
// .filter(e2 -> e1.get("station_name").equals(e2.get("station_name")))
// .findFirst()
// .map(e2 -> {
// e1.put("name", String.valueOf(e2.get("station_name")));
// e1.put("quota", String.valueOf(e2.get("quota")));
// e1.put("generating_capacity", e2.get("generating_capacity"));
// e1.put("rate", String.valueOf(e2.get("rate")));
// return e1;
// }).orElseGet(() -> {
// e1.put("name", e1.get("station_name"));
// e1.put("quota", "0");
// e1.put("generating_capacity", "0");
// e1.put("rate", "0");
// return e1;
// })
// ).collect(Collectors.toList());
// }
// } else {
// finalList.addAll(returnList);
// }
//
// //rate的值去掉百分号,名称字段名统一用name代替
Page
<
Map
<
String
,
Object
>>
pageIPage
;
int
newCurrent
=
Integer
.
parseInt
(
current
);
int
newPageSize
=
Integer
.
parseInt
(
pageSize
);
...
...
@@ -166,50 +167,68 @@ public class EnergyAccessServiceImpl implements EnergyAccessService {
}
else
{
pageIPage
=
new
Page
<>(
newCurrent
,
newPageSize
);
}
if
(
CollectionUtils
.
isEmpty
(
finalList
))
{
return
pageIPage
;
}
finalList
.
forEach
(
result
->
{
String
oldName
=
""
;
String
rate
=
String
.
valueOf
(
result
.
get
(
"rate"
));
String
newRate
=
""
;
if
(
StringUtils
.
isNotEmpty
(
rate
))
{
newRate
=
rate
.
replace
(
"%"
,
""
);
BigDecimal
bd
=
new
BigDecimal
(
newRate
);
result
.
put
(
"rate"
,
bd
.
setScale
(
4
,
BigDecimal
.
ROUND_HALF_UP
));
}
String
quota
=
String
.
valueOf
(
result
.
get
(
"quota"
));
if
(
StringUtils
.
isNotEmpty
(
quota
))
{
BigDecimal
bd
=
new
BigDecimal
(
quota
);
result
.
put
(
"quota"
,
bd
.
setScale
(
4
,
BigDecimal
.
ROUND_HALF_UP
));
}
String
generatingCapacity
=
String
.
valueOf
(
result
.
get
(
"generating_capacity"
));
if
(
StringUtils
.
isNotEmpty
(
generatingCapacity
))
{
BigDecimal
bd
=
new
BigDecimal
(
generatingCapacity
);
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
))
:
0
D
);
result
.
put
(
"axisData"
,
Arrays
.
asList
(
"RATE"
));
if
(
"1"
.
equals
(
tp
))
{
oldName
=
String
.
valueOf
(
result
.
get
(
"station_name"
));
result
.
remove
(
"station_name"
);
}
else
{
oldName
=
String
.
valueOf
(
result
.
get
(
"area_name"
));
result
.
remove
(
"area_name"
);
}
result
.
put
(
"name"
,
oldName
);
});
pageIPage
.
setTotal
(
returnList
.
size
());
int
endIndex
=
newCurrent
*
newPageSize
;
if
(
finalList
.
size
()
>
endIndex
)
{
pageIPage
.
setRecords
(
finalList
.
subList
(((
newCurrent
-
1
)
*
newPageSize
),
endIndex
));
}
else
{
pageIPage
.
setRecords
(
finalList
.
subList
(((
newCurrent
-
1
)
*
newPageSize
),
finalList
.
size
()));
}
// if (CollectionUtils.isEmpty(finalList)) {
// return pageIPage;
// }
// finalList.forEach(result -> {
// String oldName = "";
// String rate = String.valueOf(result.get("rate"));
// String newRate = "";
// if (StringUtils.isNotEmpty(rate)) {
// newRate = rate.replace("%", "");
// BigDecimal bd = new BigDecimal(newRate);
// result.put("rate", bd.setScale(4, BigDecimal.ROUND_HALF_UP));
// }
//
// String quota = String.valueOf(result.get("quota"));
// if (StringUtils.isNotEmpty(quota)) {
// BigDecimal bd = new BigDecimal(quota);
// result.put("quota", bd.setScale(4, BigDecimal.ROUND_HALF_UP));
// }
//
// String generatingCapacity = String.valueOf(result.get("generating_capacity"));
// if (StringUtils.isNotEmpty(generatingCapacity)) {
// BigDecimal bd = new BigDecimal(generatingCapacity);
// 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("axisData", Arrays.asList("RATE"));
// if ("1".equals(tp)) {
// oldName = String.valueOf(result.get("station_name"));
// result.remove("station_name");
// } else {
// oldName = String.valueOf(result.get("area_name"));
// result.remove("area_name");
// }
// result.put("name", oldName);
//
// });
// pageIPage.setTotal(returnList.size());
// int endIndex = newCurrent * newPageSize;
// if (finalList.size() > endIndex) {
// pageIPage.setRecords(finalList.subList(((newCurrent - 1) * newPageSize), endIndex));
// } else {
// 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
());
return
pageIPage
;
}
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/LargeScreenImpl.java
View file @
d96a2d90
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
service
.
impl
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.text.DecimalFormat
;
import
java.text.SimpleDateFormat
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
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
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Objects
;
import
java.util.TimeZone
;
import
java.util.*
;
import
java.util.concurrent.atomic.AtomicReference
;
import
java.util.stream.Collectors
;
...
...
@@ -105,7 +99,7 @@ public class LargeScreenImpl {
* 全国
*/
@Scheduled
(
cron
=
"0/10 * * * * ?"
)
//
@PostConstruct
@PostConstruct
public
Map
<
String
,
Double
>
getqg
()
{
Map
<
String
,
Double
>
mapdta
=
new
HashMap
<>();
mapdta
.
put
(
"SS"
,
0
d
);
...
...
@@ -150,14 +144,14 @@ public class LargeScreenImpl {
// }
// 改为部盾接口
String
requestUrl
=
budunBaseURL
+
"?"
+
Constants
.
get_quota_info
;
LocalDate
currentDate
=
LocalDate
.
now
();
DateTimeFormatter
formatter
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
);
LocalDate
yesterday
=
currentDate
.
minusDays
(
1
);
String
formattedDate
=
yesterday
.
format
(
formatter
);
JSONObject
data
=
httpRequestUtil
.
getResPonse
(
requestUrl
+
"&reporting_data="
+
formattedDate
,
Constants
.
REQUEST_GET
,
""
,
Constants
.
resovleRule_data
);
if
(
data
!=
null
)
{
//
String requestUrl = budunBaseURL + "?" + Constants.get_quota_info;
//
LocalDate currentDate = LocalDate.now();
//
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
//
LocalDate yesterday = currentDate.minusDays(1);
//
String formattedDate = yesterday.format(formatter);
//
JSONObject data = httpRequestUtil.getResPonse(requestUrl + "&reporting_data=" + formattedDate,
//
Constants.REQUEST_GET, "", Constants.resovleRule_data);
//
if (data != null) {
// // 部盾每天十二点才填报,如果十二点前没有数据则获取前一天的数据
// if (data.getDouble("sum_irradiance") != null && data.getDouble("sum_irradiance") == 0) {
// // 计算昨天日期
...
...
@@ -166,14 +160,29 @@ public class LargeScreenImpl {
// data = httpRequestUtil.getResPonse(requestUrl + "&reporting_data=" + formattedDate,
// 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("ZFSLJ", data.getDouble("sum_irradiance"));
}
//
}
//平均辐照度和利用小时数采用合成测点的值
Map
<
String
,
Double
>
pointValue
=
getPointValue
();
mapdta
.
put
(
"ZFS"
,
pointValue
.
get
(
"ZFS"
));
mapdta
.
put
(
"ZFSLJ"
,
pointValue
.
get
(
"ZFSLJ"
));
// Map<String, Double> pointValue = getPointValue();
// mapdta.put("ZFS", pointValue.get("ZFS"));
// 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);
// //月发电量
...
...
@@ -901,7 +910,6 @@ public class LargeScreenImpl {
}
// 区域发电完成趋势
@Scheduled
(
cron
=
"0/10 * * * * ?"
)
public
void
sendQYFDLMqttyfdqs
()
{
List
<
StationCacheInfoDto
>
listStationCacheInfoDto
=
commonServiceImpl
.
getListStationCacheInfoDto
();
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/MonitorServiceImpl.java
View file @
d96a2d90
...
...
@@ -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
lombok.RequiredArgsConstructor
;
import
org.apache.commons.io.IOUtils
;
import
org.checkerframework.checker.units.qual.A
;
import
org.eclipse.paho.client.mqttv3.MqttException
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.core.io.Resource
;
...
...
@@ -39,6 +40,8 @@ import java.io.IOException;
import
java.math.BigDecimal
;
import
java.nio.charset.StandardCharsets
;
import
java.time.LocalDate
;
import
java.time.YearMonth
;
import
java.time.format.DateTimeFormatter
;
import
java.util.*
;
import
java.util.concurrent.atomic.AtomicReference
;
import
java.util.stream.Collectors
;
...
...
@@ -281,18 +284,26 @@ public class MonitorServiceImpl implements MonitorService {
@Override
public
SeriesData
getSeriesDataqg
()
{
String
requestUrl
=
budunBaseURL
+
"?"
+
Constants
.
get_day_generation_trend
;
List
<
BudunDayGenTrendDto
>
budunDayGenTrendDtoList
=
httpRequestUtil
.
getResPonse
(
requestUrl
,
Constants
.
REQUEST_GET
,
""
,
Constants
.
resovleRule_data
,
BudunDayGenTrendDto
.
class
);
//
String requestUrl = budunBaseURL + "?" + Constants.get_day_generation_trend;
//
List<BudunDayGenTrendDto> budunDayGenTrendDtoList = httpRequestUtil.getResPonse(requestUrl, Constants.REQUEST_GET, "", Constants.resovleRule_data, BudunDayGenTrendDto.class);
List
<
Map
<
String
,
Object
>>
list
=
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
>
listqn
=
new
ArrayList
<>();
String
currentYear
=
LocalDate
.
now
().
getYear
()
+
"-"
;
budunDayGenTrendDtoList
.
forEach
(
bundunDayGenTrendDto
->
{
listjn
.
add
(
bundunDayGenTrendDto
.
getCurrent_generating_capacity
());
listqn
.
add
(
bundunDayGenTrendDto
.
getLast_generating_capacity
());
listdate
.
add
(
bundunDayGenTrendDto
.
getReporting_date
().
replace
(
currentYear
,
""
));
});
// budunDayGenTrendDtoList.forEach(bundunDayGenTrendDto -> {
// listjn.add(bundunDayGenTrendDto.getCurrent_generating_capacity());
// listqn.add(bundunDayGenTrendDto.getLast_generating_capacity());
// 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
<>();
mapjn
.
put
(
"data"
,
listjn
);
mapjn
.
put
(
"name"
,
"当前值"
);
...
...
@@ -315,6 +326,19 @@ public class MonitorServiceImpl implements MonitorService {
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
public
SeriesData
getSeriesDataqy
(
String
areaCode
)
{
MapRegion
mapRegion
=
mapRegionMapper
.
selectOne
(
new
QueryWrapper
<
MapRegion
>().
eq
(
"area_code"
,
areaCode
));
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/resources/application-kingbase8.properties
View file @
d96a2d90
## DB properties:
## db1-production database
spring.db1.datasource.type
:
com.alibaba.druid.pool.DruidDataSource
spring.db1.datasource.url
=
jdbc:kingbase8://1
0.20.1.176
:54321/production?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8¤tSchema=root
spring.db1.datasource.url
=
jdbc:kingbase8://1
92.168.0.68
:54321/production?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8¤tSchema=root
spring.db1.datasource.username
=
root
spring.db1.datasource.password
=
Yeejoin@2020
spring.db1.datasource.driver-class-name
=
com.kingbase8.Driver
## db2-sync_data
spring.db2.datasource.type
:
com.alibaba.druid.pool.DruidDataSource
spring.db2.datasource.url
=
jdbc:kingbase8://1
0.20.1.176
:54321/jxiop_sync_data?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8¤tSchema=root
spring.db2.datasource.url
=
jdbc:kingbase8://1
92.168.0.68
:54321/jxiop_sync_data?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8¤tSchema=root
spring.db2.datasource.username
=
root
spring.db2.datasource.password
=
Yeejoin@2020
spring.db2.datasource.driver-class-name
=
com.kingbase8.Driver
spring.db3.datasource.url
=
jdbc:TAOS-RS://1
0.20.0.203
:6041/iot_data?user=root&password=taosdata&timezone=GMT%2b8&allowMultiQueries=true
spring.db3.datasource.url
=
jdbc:TAOS-RS://1
92.168.0.61
:6041/iot_data?user=root&password=taosdata&timezone=GMT%2b8&allowMultiQueries=true
spring.db3.datasource.username
=
root
spring.db3.datasource.password
=
taosdata
spring.db3.datasource.driver-class-name
:
com.taosdata.jdbc.rs.RestfulDriver
spring.db4.datasource.url
=
jdbc:TAOS-RS://1
0.20.0.203
:6041/analysis_data?user=root&password=taosdata&timezone=GMT%2b8&allowMultiQueries=true
spring.db4.datasource.url
=
jdbc:TAOS-RS://1
92.168.0.61
:6041/analysis_data?user=root&password=taosdata&timezone=GMT%2b8&allowMultiQueries=true
spring.db4.datasource.username
=
root
spring.db4.datasource.password
=
taosdata
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.instance.hostname=139.9.173.44
eureka.instance.prefer-ip-address
=
true
eureka.client.serviceUrl.defaultZone
=
http://admin:a1234560@1
0.20.1.160
:10001/eureka/
eureka.client.serviceUrl.defaultZone
=
http://admin:a1234560@1
92.168.0.46
:10001/eureka/
## redis properties:
spring.redis.database
=
1
spring.redis.host
=
1
0.20.1.21
0
spring.redis.host
=
1
92.168.0.7
0
spring.redis.port
=
6379
spring.redis.password
=
yeejoin@2020
...
...
@@ -68,10 +68,10 @@ emqx.clean-session=true
emqx.client-id
=
AMOS-JXIOP-BIGSCREEN
emqx.client-user-name
=
emqx.client-password
=
emqx.broker
=
tcp://1
0.20.1.21
0:2883
emqx.broker
=
tcp://1
92.168.0.7
0:2883
emqx.user-name
=
admin
emqx.password
=
Yeejoin@2020
mqtt.scene.host
=
mqtt://1
0.20.1.21
0:8083/mqtt
mqtt.scene.host
=
mqtt://1
92.168.0.7
0:8083/mqtt
mqtt.client.product.id
=
mqtt
mqtt.topic
=
topic_mqtt
spring.mqtt.completionTimeout
=
3000
...
...
@@ -130,7 +130,7 @@ amos.secret.key=qaz
#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.password
=
admin
spring.jms.pub-sub-domain
=
false
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/resources/application.properties
View file @
d96a2d90
...
...
@@ -84,6 +84,6 @@ year.power.generation.cron=0 0/1 * * * ?
large.cron
=
0 0/5 * * * ?
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
\
og
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment