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
ccbf7349
Commit
ccbf7349
authored
Aug 22, 2023
by
tangwei
Browse files
Options
Browse Files
Download
Plain Diff
解决冲突
parents
53304062
b672f5d5
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
32 additions
and
27 deletions
+32
-27
IdxBizPvPointProcessVariableClassificationDto.java
...iz/dto/IdxBizPvPointProcessVariableClassificationDto.java
+1
-1
IdxBizFanHealthIndex.java
...os/boot/module/jxiop/biz/entity/IdxBizFanHealthIndex.java
+4
-2
IdxBizFanHealthLevel.java
...os/boot/module/jxiop/biz/entity/IdxBizFanHealthLevel.java
+2
-1
IdxBizFanPointProcessVariableClassification.java
...z/entity/IdxBizFanPointProcessVariableClassification.java
+1
-1
IdxBizFanWarningRecord.java
.../boot/module/jxiop/biz/entity/IdxBizFanWarningRecord.java
+1
-1
IdxBizPvHealthIndex.java
...mos/boot/module/jxiop/biz/entity/IdxBizPvHealthIndex.java
+5
-3
IdxBizPvPointProcessVariableClassification.java
...iz/entity/IdxBizPvPointProcessVariableClassification.java
+1
-1
IdxBizPvPointVarCentralValue.java
...module/jxiop/biz/entity/IdxBizPvPointVarCentralValue.java
+3
-2
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 @
ccbf7349
...
...
@@ -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 @
ccbf7349
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
...
...
@@ -24,7 +26,7 @@ public class IdxBizFanHealthIndex {
/**
*
*/
@TableField
(
"SEQUENCE_NBR"
)
@TableId
(
value
=
"SEQUENCE_NBR"
,
type
=
IdType
.
ID_WORKER_STR
)
private
String
sequenceNbr
;
/**
...
...
@@ -139,7 +141,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 @
ccbf7349
...
...
@@ -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/IdxBizFanPointProcessVariableClassification.java
View file @
ccbf7349
...
...
@@ -142,7 +142,7 @@ public class IdxBizFanPointProcessVariableClassification{
*
*/
@TableField
(
"GATEWAY_ID"
)
private
Lo
ng
gatewayId
;
private
Stri
ng
gatewayId
;
/**
* 点表地址
...
...
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 @
ccbf7349
...
...
@@ -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/IdxBizPvHealthIndex.java
View file @
ccbf7349
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
lombok.Data
;
...
...
@@ -27,7 +29,7 @@ public class IdxBizPvHealthIndex{
/**
*
*/
@TableField
(
"SEQUENCE_NBR"
)
@TableId
(
value
=
"SEQUENCE_NBR"
,
type
=
IdType
.
ID_WORKER_STR
)
private
String
sequenceNbr
;
/**
...
...
@@ -100,13 +102,13 @@ public class IdxBizPvHealthIndex{
*
*/
@TableField
(
"ANALYSIS_START_TIME"
)
private
LocalDateTim
e
analysisStartTime
;
private
Dat
e
analysisStartTime
;
/**
*
*/
@TableField
(
"ANALYSIS_END_TIME"
)
private
LocalDateTim
e
analysisEndTime
;
private
Dat
e
analysisEndTime
;
/**
* 片区
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/entity/IdxBizPvPointProcessVariableClassification.java
View file @
ccbf7349
...
...
@@ -150,7 +150,7 @@ public class IdxBizPvPointProcessVariableClassification{
*
*/
@TableField
(
"GATEWAY_ID"
)
private
Lo
ng
gatewayId
;
private
Stri
ng
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 @
ccbf7349
...
...
@@ -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
;
/**
*
...
...
@@ -180,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 @
ccbf7349
...
...
@@ -990,10 +990,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"
)));
...
...
@@ -1005,10 +1009,11 @@ 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
());
idxBizFanHealthIndex
.
setSequenceNbr
(
null
);
//获取健康指数对应等级
LambdaQueryWrapper
<
IdxBizFanHealthLevel
>
query
=
new
LambdaQueryWrapper
<>();
query
.
eq
(
IdxBizFanHealthLevel:
:
getAnalysisObjType
,
"设备"
);
...
...
@@ -1026,12 +1031,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 @
ccbf7349
...
...
@@ -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