Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
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
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
c0a4bd08
Commit
c0a4bd08
authored
Aug 22, 2023
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改代码
parent
c4524de3
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
22 additions
and
29 deletions
+22
-29
IdxBizPvPointProcessVariableClassificationDto.java
...iz/dto/IdxBizPvPointProcessVariableClassificationDto.java
+1
-1
IdxBizFanHealthIndex.java
...os/boot/module/jxiop/biz/entity/IdxBizFanHealthIndex.java
+1
-1
IdxBizFanHealthLevel.java
...os/boot/module/jxiop/biz/entity/IdxBizFanHealthLevel.java
+2
-1
IdxBizFanWarningRecord.java
.../boot/module/jxiop/biz/entity/IdxBizFanWarningRecord.java
+1
-1
IdxBizPvPointVarCentralValue.java
...module/jxiop/biz/entity/IdxBizPvPointVarCentralValue.java
+3
-10
CommonServiceImpl.java
...boot/module/jxiop/biz/service/impl/CommonServiceImpl.java
+8
-9
HealthStatusIndicatorServiceImpl.java
...op/biz/service/impl/HealthStatusIndicatorServiceImpl.java
+6
-6
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/dto/IdxBizPvPointProcessVariableClassificationDto.java
View file @
c0a4bd08
...
...
@@ -66,7 +66,7 @@ public class IdxBizPvPointProcessVariableClassificationDto {
private
String
tagCode
;
@TableField
(
"POINT_ID"
)
private
Integer
pointId
;
private
String
pointId
;
@ApiModelProperty
(
value
=
"片区"
)
@TableField
(
"ARAE"
)
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/entity/IdxBizFanHealthIndex.java
View file @
c0a4bd08
...
...
@@ -139,7 +139,7 @@ public class IdxBizFanHealthIndex {
*
*/
@TableField
(
"GATEWAY_ID"
)
private
Integer
gatewayId
;
private
String
gatewayId
;
/**
* 点表地址
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/entity/IdxBizFanHealthLevel.java
View file @
c0a4bd08
...
...
@@ -8,6 +8,7 @@ import lombok.EqualsAndHashCode;
import
lombok.experimental.Accessors
;
import
java.time.LocalDateTime
;
import
java.util.Date
;
/**
*
...
...
@@ -39,7 +40,7 @@ public class IdxBizFanHealthLevel{
*
*/
@TableField
(
"REC_DATE"
)
private
LocalDateTim
e
recDate
;
private
Dat
e
recDate
;
/**
*
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/entity/IdxBizFanWarningRecord.java
View file @
c0a4bd08
...
...
@@ -111,7 +111,7 @@ public class IdxBizFanWarningRecord{
* 网关ID
*/
@TableField
(
"GATEWAY_ID"
)
private
Integer
gatewayId
;
private
String
gatewayId
;
/**
* 点表地址
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/entity/IdxBizPvPointVarCentralValue.java
View file @
c0a4bd08
...
...
@@ -8,6 +8,7 @@ import lombok.EqualsAndHashCode;
import
lombok.experimental.Accessors
;
import
java.time.LocalDateTime
;
import
java.util.Date
;
/**
*
...
...
@@ -39,7 +40,7 @@ public class IdxBizPvPointVarCentralValue{
*
*/
@TableField
(
"REC_DATE"
)
private
LocalDateTim
e
recDate
;
private
Dat
e
recDate
;
/**
*
...
...
@@ -147,14 +148,6 @@ public class IdxBizPvPointVarCentralValue{
@TableField
(
"PROCESS3_MIN"
)
private
Double
process3Min
;
@TableField
(
"PROCESS1_MAX"
)
private
Double
process1Max
;
/**
*
*/
@TableField
(
"PROCESS1_MIN"
)
private
Double
process1Min
;
/**
*
*/
...
...
@@ -188,7 +181,7 @@ public class IdxBizPvPointVarCentralValue{
/**
*
*/
@TableField
(
"ANALYSIS_POINT_
ID_
NAME"
)
@TableField
(
"ANALYSIS_POINT_NAME"
)
private
String
analysisPointIdName
;
/**
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/CommonServiceImpl.java
View file @
c0a4bd08
...
...
@@ -913,10 +913,14 @@ public class CommonServiceImpl {
HashMap
<
String
,
Object
>
realParams
=
new
HashMap
<>();
realParams
.
put
(
gkzxzjskey1
,
values
);
String
response
=
HttpUtil
.
createPost
(
baseUrl
+
jkzsjsfjurl
).
body
(
JSON
.
toJSONString
(
realParams
)).
execute
().
body
();
logger
.
info
(
"--------------------repsonse: "
+
response
);
logger
.
info
(
"------------------------------------------调用健康指数计算算法结束----------------------------------------"
);
JSONObject
result
=
JSON
.
parseObject
(
response
).
getJSONObject
(
"result"
);
if
(
null
!=
result
){
JSONObject
jsonObject
=
result
.
getJSONObject
(
"result1"
).
getJSONObject
(
"rows"
);
List
<
JSONObject
>
jsonObjects
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
jsonObject
),
JSONObject
.
class
);
JSONArray
jsonArray
=
result
.
getJSONObject
(
"result1"
).
getJSONArray
(
"rows"
);
List
<
JSONObject
>
jsonObjects
=
jsonArray
.
toJavaList
(
JSONObject
.
class
);
String
s
=
JSON
.
toJSONString
(
result
.
getJSONObject
(
"result1"
).
getString
(
"rows"
));
// List<JSONObject> jsonObjects = JSON.parseArray(s, JSONObject.class);
List
<
String
>
ids
=
new
ArrayList
<>();
jsonObjects
.
stream
().
forEach
(
e
->
ids
.
add
(
e
.
getString
(
"analysisVariableId"
)));
...
...
@@ -928,7 +932,7 @@ public class CommonServiceImpl {
for
(
JSONObject
object
:
jsonObjects
)
{
if
(
obj
.
getSequenceNbr
().
equals
(
object
.
getString
(
"analysisVariableId"
))){
IdxBizFanHealthIndex
idxBizFanHealthIndex
=
new
IdxBizFanHealthIndex
();
BeanUtils
.
copyProperties
(
idxBizFanHealthIndex
,
obj
);
BeanUtils
.
copyProperties
(
obj
,
idxBizFanHealthIndex
);
idxBizFanHealthIndex
.
setHealthIndex
(
object
.
getDouble
(
"indexValue"
));
idxBizFanHealthIndex
.
setAnalysisObjSeq
(
obj
.
getSequenceNbr
());
idxBizFanHealthIndex
.
setRecDate
(
new
Date
());
...
...
@@ -939,6 +943,7 @@ public class CommonServiceImpl {
query
.
le
(
IdxBizFanHealthLevel:
:
getGroupLowerLimit
,
object
.
getDouble
(
"indexValue"
));
query
.
ge
(
IdxBizFanHealthLevel:
:
getGroupUpperLimit
,
object
.
getDouble
(
"indexValue"
));
IdxBizFanHealthLevel
idxBizFanHealthLevel
=
idxBizFanHealthLevelMapper
.
selectOne
(
query
);
idxBizFanHealthIndex
.
setSequenceNbr
(
null
);
idxBizFanHealthIndex
.
setHealthLevel
(
idxBizFanHealthLevel
.
getHealthLevel
());
idxBizFanHealthIndex
.
setAnalysisType
(
"按时刻"
);
idxBizFanHealthIndex
.
setANOMALY
(
object
.
getDouble
(
"scoreValue"
));
...
...
@@ -949,12 +954,6 @@ public class CommonServiceImpl {
idxBizFanHealthIndexService
.
saveBatch
(
idxBizFanHealthIndexs
);
}
try
{
logger
.
info
(
"--------------------repsonse: "
+
response
);
logger
.
info
(
"------------------------------------------调用健康指数计算算法结束----------------------------------------"
);
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
e
);
}
}
}
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/HealthStatusIndicatorServiceImpl.java
View file @
c0a4bd08
...
...
@@ -268,8 +268,8 @@ public class HealthStatusIndicatorServiceImpl {
wrapper
.
orderByDesc
(
IdxBizFanHealthIndex:
:
getRecDate
);
List
<
IdxBizFanHealthIndex
>
healthIndices
=
idxBizFanHealthIndexMapper
.
selectList
(
wrapper
);
Map
<
Integer
,
Map
<
String
,
List
<
IdxBizFanHealthIndex
>>>
gateWayMaps
=
healthIndices
.
stream
().
collect
(
Collectors
.
groupingBy
(
IdxBizFanHealthIndex:
:
getGatewayId
,
Collectors
.
groupingBy
(
IdxBizFanHealthIndex:
:
getIndexAddress
)));
for
(
Integer
gateWayId
:
gateWayMaps
.
keySet
())
{
Map
<
String
,
Map
<
String
,
List
<
IdxBizFanHealthIndex
>>>
gateWayMaps
=
healthIndices
.
stream
().
collect
(
Collectors
.
groupingBy
(
IdxBizFanHealthIndex:
:
getGatewayId
,
Collectors
.
groupingBy
(
IdxBizFanHealthIndex:
:
getIndexAddress
)));
for
(
String
gateWayId
:
gateWayMaps
.
keySet
())
{
Map
<
String
,
List
<
IdxBizFanHealthIndex
>>
healthDataMaps
=
gateWayMaps
.
get
(
gateWayId
);
for
(
String
address
:
healthDataMaps
.
keySet
())
{
List
<
IdxBizFanHealthIndex
>
idxBizFanHealthIndices
=
healthDataMaps
.
get
(
address
);
...
...
@@ -335,8 +335,8 @@ public class HealthStatusIndicatorServiceImpl {
wrapper
.
orderByDesc
(
IdxBizFanHealthIndex:
:
getRecDate
);
List
<
IdxBizFanHealthIndex
>
healthIndices
=
idxBizFanHealthIndexMapper
.
selectList
(
wrapper
);
Map
<
Integer
,
Map
<
String
,
List
<
IdxBizFanHealthIndex
>>>
gateWayMaps
=
healthIndices
.
stream
().
collect
(
Collectors
.
groupingBy
(
IdxBizFanHealthIndex:
:
getGatewayId
,
Collectors
.
groupingBy
(
IdxBizFanHealthIndex:
:
getIndexAddress
)));
for
(
Integer
gateWayId
:
gateWayMaps
.
keySet
())
{
Map
<
String
,
Map
<
String
,
List
<
IdxBizFanHealthIndex
>>>
gateWayMaps
=
healthIndices
.
stream
().
collect
(
Collectors
.
groupingBy
(
IdxBizFanHealthIndex:
:
getGatewayId
,
Collectors
.
groupingBy
(
IdxBizFanHealthIndex:
:
getIndexAddress
)));
for
(
String
gateWayId
:
gateWayMaps
.
keySet
())
{
Map
<
String
,
List
<
IdxBizFanHealthIndex
>>
healthDataMaps
=
gateWayMaps
.
get
(
gateWayId
);
for
(
String
address
:
healthDataMaps
.
keySet
())
{
List
<
IdxBizFanHealthIndex
>
idxBizFanHealthIndices
=
healthDataMaps
.
get
(
address
);
...
...
@@ -403,8 +403,8 @@ public class HealthStatusIndicatorServiceImpl {
wrapper
.
orderByDesc
(
IdxBizFanHealthIndex:
:
getRecDate
);
List
<
IdxBizFanHealthIndex
>
healthIndices
=
idxBizFanHealthIndexMapper
.
selectList
(
wrapper
);
Map
<
Integer
,
Map
<
String
,
List
<
IdxBizFanHealthIndex
>>>
gateWayMaps
=
healthIndices
.
stream
().
collect
(
Collectors
.
groupingBy
(
IdxBizFanHealthIndex:
:
getGatewayId
,
Collectors
.
groupingBy
(
IdxBizFanHealthIndex:
:
getIndexAddress
)));
for
(
Integer
gateWayId
:
gateWayMaps
.
keySet
())
{
Map
<
String
,
Map
<
String
,
List
<
IdxBizFanHealthIndex
>>>
gateWayMaps
=
healthIndices
.
stream
().
collect
(
Collectors
.
groupingBy
(
IdxBizFanHealthIndex:
:
getGatewayId
,
Collectors
.
groupingBy
(
IdxBizFanHealthIndex:
:
getIndexAddress
)));
for
(
String
gateWayId
:
gateWayMaps
.
keySet
())
{
Map
<
String
,
List
<
IdxBizFanHealthIndex
>>
healthDataMaps
=
gateWayMaps
.
get
(
gateWayId
);
for
(
String
address
:
healthDataMaps
.
keySet
())
{
List
<
IdxBizFanHealthIndex
>
idxBizFanHealthIndices
=
healthDataMaps
.
get
(
address
);
...
...
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