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
90908b5e
Commit
90908b5e
authored
Oct 14, 2023
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化健康指数接口
parent
42a432aa
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
22 deletions
+42
-22
BigScreenAnalyseController.java
...dule/jxiop/biz/controller/BigScreenAnalyseController.java
+0
-1
IdxBizFanWarningRecord.java
.../boot/module/jxiop/biz/entity/IdxBizFanWarningRecord.java
+3
-1
IdxBizPvWarningRecord.java
...s/boot/module/jxiop/biz/entity/IdxBizPvWarningRecord.java
+3
-1
CommonServiceImpl.java
...boot/module/jxiop/biz/service/impl/CommonServiceImpl.java
+36
-19
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/BigScreenAnalyseController.java
View file @
90908b5e
...
@@ -25,7 +25,6 @@ import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.CommonServiceImpl;
...
@@ -25,7 +25,6 @@ import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.CommonServiceImpl;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdmapper.IndicatorDataMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdmapper.IndicatorDataMapper
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
...
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 @
90908b5e
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
entity
;
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.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
...
@@ -29,7 +31,7 @@ public class IdxBizFanWarningRecord{
...
@@ -29,7 +31,7 @@ public class IdxBizFanWarningRecord{
/**
/**
*
*
*/
*/
@TableField
(
"SEQUENCE_NBR"
)
@TableId
(
value
=
"SEQUENCE_NBR"
,
type
=
IdType
.
ID_WORKER_STR
)
private
String
sequenceNbr
;
private
String
sequenceNbr
;
/**
/**
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/entity/IdxBizPvWarningRecord.java
View file @
90908b5e
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
entity
;
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.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -26,7 +28,7 @@ public class IdxBizPvWarningRecord{
...
@@ -26,7 +28,7 @@ public class IdxBizPvWarningRecord{
/**
/**
*
*
*/
*/
@TableField
(
"SEQUENCE_NBR"
)
@TableId
(
value
=
"SEQUENCE_NBR"
,
type
=
IdType
.
ID_WORKER_STR
)
private
String
sequenceNbr
;
private
String
sequenceNbr
;
/**
/**
...
...
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 @
90908b5e
...
@@ -1556,25 +1556,32 @@ public class CommonServiceImpl {
...
@@ -1556,25 +1556,32 @@ public class CommonServiceImpl {
queryWrapper
.
in
(
IdxBizFanPointProcessVariableClassification:
:
getSequenceNbr
,
jsonArrayToStringList
);
queryWrapper
.
in
(
IdxBizFanPointProcessVariableClassification:
:
getSequenceNbr
,
jsonArrayToStringList
);
List
<
IdxBizFanPointProcessVariableClassification
>
list
=
idxBizFanPointProcessVariableClassificationMapper
.
selectList
(
queryWrapper
);
List
<
IdxBizFanPointProcessVariableClassification
>
list
=
idxBizFanPointProcessVariableClassificationMapper
.
selectList
(
queryWrapper
);
List
<
IdxBizFanHealthIndex
>
idxBizFanHealthIndexs
=
new
ArrayList
<>();
List
<
IdxBizFanHealthIndex
>
idxBizFanHealthIndexs
=
new
ArrayList
<>();
Set
<
String
>
stations
=
list
.
stream
().
map
(
IdxBizFanPointProcessVariableClassification:
:
getStation
).
collect
(
Collectors
.
toSet
());
LambdaQueryWrapper
<
IdxBizFanHealthLevel
>
query
=
new
LambdaQueryWrapper
<>();
query
.
eq
(
IdxBizFanHealthLevel:
:
getAnalysisObjType
,
"测点"
);
query
.
in
(
IdxBizFanHealthLevel:
:
getStatus
,
stations
);
List
<
IdxBizFanHealthLevel
>
idxBizFanHealthLevels
=
idxBizFanHealthLevelMapper
.
selectList
(
query
);
for
(
IdxBizFanPointProcessVariableClassification
obj
:
list
)
{
for
(
IdxBizFanPointProcessVariableClassification
obj
:
list
)
{
for
(
int
i
=
0
;
i
<
analysisVariableIdArray
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
analysisVariableIdArray
.
size
();
i
++)
{
if
(
analysisVariableIdArray
.
get
(
i
).
toString
().
equals
(
obj
.
getSequenceNbr
())){
if
(
analysisVariableIdArray
.
get
(
i
).
toString
().
equals
(
obj
.
getSequenceNbr
())){
IdxBizFanHealthIndex
idxBizFanHealthIndex
=
new
IdxBizFanHealthIndex
();
IdxBizFanHealthIndex
idxBizFanHealthIndex
=
new
IdxBizFanHealthIndex
();
BeanUtils
.
copyProperties
(
obj
,
idxBizFanHealthIndex
);
BeanUtils
.
copyProperties
(
obj
,
idxBizFanHealthIndex
,
"sequenceNbr"
);
idxBizFanHealthIndex
.
setHealthIndex
(
indexValueArray
.
getDoubleValue
(
i
)<
0
?
0
:
indexValueArray
.
getDoubleValue
(
i
));
idxBizFanHealthIndex
.
setHealthIndex
(
indexValueArray
.
getDoubleValue
(
i
)<
0
?
0
:
indexValueArray
.
getDoubleValue
(
i
));
idxBizFanHealthIndex
.
setAnalysisObjSeq
(
obj
.
getSequenceNbr
());
idxBizFanHealthIndex
.
setAnalysisObjSeq
(
obj
.
getSequenceNbr
());
idxBizFanHealthIndex
.
setRecDate
(
time
);
idxBizFanHealthIndex
.
setRecDate
(
time
);
idxBizFanHealthIndex
.
setSequenceNbr
(
null
);
// idxBizFanHealthIndex.setSequenceNbr(null);
idxBizFanHealthIndex
.
setRecDate
(
new
Date
());
idxBizFanHealthIndex
.
setWeigth
(
1.0
);
idxBizFanHealthIndex
.
setWeigth
(
1.0
);
//获取健康指数对应等级
//获取健康指数对应等级
LambdaQueryWrapper
<
IdxBizFanHealthLevel
>
query
=
new
LambdaQueryWrapper
<>();
for
(
IdxBizFanHealthLevel
idxBizFanHealthLevel
:
idxBizFanHealthLevels
)
{
query
.
eq
(
IdxBizFanHealthLevel:
:
getAnalysisObjType
,
"测点"
);
if
(
indexValueArray
.
getDoubleValue
(
i
)
<=
idxBizFanHealthLevel
.
getGroupUpperLimit
()
query
.
eq
(
IdxBizFanHealthLevel:
:
getStatus
,
obj
.
getStation
());
&&
indexValueArray
.
getDoubleValue
(
i
)
>=
idxBizFanHealthLevel
.
getGroupLowerLimit
()){
query
.
le
(
IdxBizFanHealthLevel:
:
getGroupLowerLimit
,
indexValueArray
.
getDoubleValue
(
i
)<
0
?
0
:
indexValueArray
.
getDoubleValue
(
i
));
idxBizFanHealthIndex
.
setHealthLevel
(
idxBizFanHealthLevel
.
getHealthLevel
(
));
query
.
ge
(
IdxBizFanHealthLevel:
:
getGroupUpperLimit
,
indexValueArray
.
getDoubleValue
(
i
)<
0
?
0
:
indexValueArray
.
getDoubleValue
(
i
));
IdxBizFanHealthLevel
idxBizFanHealthLevel
=
idxBizFanHealthLevelMapper
.
selectOne
(
query
);
}
idxBizFanHealthIndex
.
setHealthLevel
(
idxBizFanHealthLevel
.
getHealthLevel
());
}
idxBizFanHealthIndex
.
setAnalysisType
(
"按时刻"
);
idxBizFanHealthIndex
.
setAnalysisType
(
"按时刻"
);
idxBizFanHealthIndex
.
setAnalysisObjType
(
"测点"
);
idxBizFanHealthIndex
.
setAnalysisObjType
(
"测点"
);
if
(
ObjectUtils
.
isEmpty
(
scoreValueArray
.
getDoubleValue
(
i
))){
if
(
ObjectUtils
.
isEmpty
(
scoreValueArray
.
getDoubleValue
(
i
))){
...
@@ -1692,25 +1699,35 @@ public class CommonServiceImpl {
...
@@ -1692,25 +1699,35 @@ public class CommonServiceImpl {
LambdaQueryWrapper
<
IdxBizPvPointProcessVariableClassification
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
IdxBizPvPointProcessVariableClassification
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
in
(
IdxBizPvPointProcessVariableClassification:
:
getSequenceNbr
,
jsonArrayToStringList
);
queryWrapper
.
in
(
IdxBizPvPointProcessVariableClassification:
:
getSequenceNbr
,
jsonArrayToStringList
);
List
<
IdxBizPvPointProcessVariableClassification
>
list
=
idxBizPvPointProcessVariableClassificationMapper
.
selectList
(
queryWrapper
);
List
<
IdxBizPvPointProcessVariableClassification
>
list
=
idxBizPvPointProcessVariableClassificationMapper
.
selectList
(
queryWrapper
);
Set
<
String
>
stations
=
list
.
stream
().
map
(
IdxBizPvPointProcessVariableClassification:
:
getStation
).
collect
(
Collectors
.
toSet
());
LambdaQueryWrapper
<
IdxBizPvHealthLevel
>
query
=
new
LambdaQueryWrapper
<>();
query
.
eq
(
IdxBizPvHealthLevel:
:
getAnalysisObjType
,
"测点"
);
query
.
in
(
IdxBizPvHealthLevel:
:
getStatus
,
stations
);
List
<
IdxBizPvHealthLevel
>
idxBizFanHealthLevels
=
idxBizPvHealthLevelMapper
.
selectList
(
query
);
List
<
IdxBizPvHealthIndex
>
idxBizPvHealthIndexs
=
new
ArrayList
<>();
List
<
IdxBizPvHealthIndex
>
idxBizPvHealthIndexs
=
new
ArrayList
<>();
for
(
IdxBizPvPointProcessVariableClassification
obj
:
list
)
{
for
(
IdxBizPvPointProcessVariableClassification
obj
:
list
)
{
for
(
int
i
=
0
;
i
<
analysisVariableIdArray
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
analysisVariableIdArray
.
size
();
i
++)
{
if
(
analysisVariableIdArray
.
get
(
i
).
toString
().
equals
(
obj
.
getSequenceNbr
())){
if
(
analysisVariableIdArray
.
get
(
i
).
toString
().
equals
(
obj
.
getSequenceNbr
())){
IdxBizPvHealthIndex
idxBizPvHealthIndex
=
new
IdxBizPvHealthIndex
();
IdxBizPvHealthIndex
idxBizPvHealthIndex
=
new
IdxBizPvHealthIndex
();
BeanUtils
.
copyProperties
(
obj
,
idxBizPvHealthIndex
);
BeanUtils
.
copyProperties
(
obj
,
idxBizPvHealthIndex
,
"sequenceNbr"
);
idxBizPvHealthIndex
.
setSequenceNbr
(
null
);
//
idxBizPvHealthIndex.setSequenceNbr(null);
idxBizPvHealthIndex
.
setHealthIndex
(
indexValueArray
.
getDoubleValue
(
i
)<
0
?
0
:
indexValueArray
.
getDoubleValue
(
i
));
idxBizPvHealthIndex
.
setHealthIndex
(
indexValueArray
.
getDoubleValue
(
i
)<
0
?
0
:
indexValueArray
.
getDoubleValue
(
i
));
idxBizPvHealthIndex
.
setAnalysisObjSeq
(
obj
.
getSequenceNbr
());
idxBizPvHealthIndex
.
setAnalysisObjSeq
(
obj
.
getSequenceNbr
());
idxBizPvHealthIndex
.
setRecDate
(
time
);
idxBizPvHealthIndex
.
setRecDate
(
time
);
idxBizPvHealthIndex
.
setWeigth
(
1.0
);
idxBizPvHealthIndex
.
setWeigth
(
1.0
);
//获取健康指数对应等级
//获取健康指数对应等级
LambdaQueryWrapper
<
IdxBizPvHealthLevel
>
query
=
new
LambdaQueryWrapper
<>();
query
.
eq
(
IdxBizPvHealthLevel:
:
getAnalysisObjType
,
"测点"
);
for
(
IdxBizPvHealthLevel
idxBizFanHealthLevel
:
idxBizFanHealthLevels
)
{
query
.
eq
(
IdxBizPvHealthLevel:
:
getStatus
,
obj
.
getStation
());
if
(
indexValueArray
.
getDoubleValue
(
i
)
<=
idxBizFanHealthLevel
.
getGroupUpperLimit
()
query
.
le
(
IdxBizPvHealthLevel:
:
getGroupLowerLimit
,
indexValueArray
.
getDoubleValue
(
i
)
<
0
?
0
:
indexValueArray
.
getDoubleValue
(
i
));
&&
indexValueArray
.
getDoubleValue
(
i
)
>=
idxBizFanHealthLevel
.
getGroupLowerLimit
()){
query
.
ge
(
IdxBizPvHealthLevel:
:
getGroupUpperLimit
,
indexValueArray
.
getDoubleValue
(
i
)
<
0
?
0
:
indexValueArray
.
getDoubleValue
(
i
)
);
idxBizPvHealthIndex
.
setHealthLevel
(
idxBizFanHealthLevel
.
getHealthLevel
());
IdxBizPvHealthLevel
idxBizFanHealthLevel
=
idxBizPvHealthLevelMapper
.
selectOne
(
query
);
idxBizPvHealthIndex
.
setHealthLevel
(
idxBizFanHealthLevel
.
getHealthLevel
());
}
}
idxBizPvHealthIndex
.
setAnalysisType
(
"按时刻"
);
idxBizPvHealthIndex
.
setAnalysisType
(
"按时刻"
);
idxBizPvHealthIndex
.
setAnalysisObjType
(
"测点"
);
idxBizPvHealthIndex
.
setAnalysisObjType
(
"测点"
);
idxBizPvHealthIndex
.
setANOMALY
(
scoreValueArray
.
getDoubleValue
(
i
));
idxBizPvHealthIndex
.
setANOMALY
(
scoreValueArray
.
getDoubleValue
(
i
));
...
...
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