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
8aa291c4
Commit
8aa291c4
authored
Oct 13, 2023
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改代码 健康指数相关
parent
b6147d66
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
39 deletions
+30
-39
IdxBizFanPointProcessVariableClassificationMapper.xml
...ter/IdxBizFanPointProcessVariableClassificationMapper.xml
+6
-16
IdxBizFanHealthIndex.java
...os/boot/module/jxiop/biz/entity/IdxBizFanHealthIndex.java
+3
-0
IdxBizPvHealthIndex.java
...mos/boot/module/jxiop/biz/entity/IdxBizPvHealthIndex.java
+3
-0
CommonServiceImpl.java
...boot/module/jxiop/biz/service/impl/CommonServiceImpl.java
+15
-8
IdxBizFanPointProcessVariableClassificationMapper.xml
...ter/IdxBizFanPointProcessVariableClassificationMapper.xml
+3
-15
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/bin/src/main/resources/mapper/cluster/IdxBizFanPointProcessVariableClassificationMapper.xml
View file @
8aa291c4
...
@@ -20,11 +20,10 @@
...
@@ -20,11 +20,10 @@
idx_biz_fan_point_var_central_value ibfpvcv
idx_biz_fan_point_var_central_value ibfpvcv
WHERE
WHERE
b.SEQUENCE_NBR = ibfpvcv.PROCESS_POINT1_ID
b.SEQUENCE_NBR = ibfpvcv.PROCESS_POINT1_ID
OR b.SEQUENCE_NBR = ibfpvcv.PROCESS_POINT2_ID
OR b.SEQUENCE_NBR = ibfpvcv.PROCESS_POINT3_ID
OR b.SEQUENCE_NBR = ibfpvcv.ANALYSIS_POINT_ID
GROUP BY
GROUP BY
b.SEQUENCE_NBR UNION ALL
b.SEQUENCE_NBR
UNION ALL
SELECT
SELECT
b.*,
b.*,
ibfpvcv.PROCESS_POINT1_ID AS pointOneId,
ibfpvcv.PROCESS_POINT1_ID AS pointOneId,
...
@@ -42,10 +41,7 @@
...
@@ -42,10 +41,7 @@
) AS b,
) AS b,
idx_biz_fan_point_var_central_value ibfpvcv
idx_biz_fan_point_var_central_value ibfpvcv
WHERE
WHERE
b.SEQUENCE_NBR = ibfpvcv.PROCESS_POINT1_ID
b.SEQUENCE_NBR = ibfpvcv.PROCESS_POINT2_ID
OR b.SEQUENCE_NBR = ibfpvcv.PROCESS_POINT2_ID
OR b.SEQUENCE_NBR = ibfpvcv.PROCESS_POINT3_ID
OR b.SEQUENCE_NBR = ibfpvcv.ANALYSIS_POINT_ID
GROUP BY
GROUP BY
b.SEQUENCE_NBR UNION ALL
b.SEQUENCE_NBR UNION ALL
SELECT
SELECT
...
@@ -65,10 +61,7 @@
...
@@ -65,10 +61,7 @@
) AS b,
) AS b,
idx_biz_fan_point_var_central_value ibfpvcv
idx_biz_fan_point_var_central_value ibfpvcv
WHERE
WHERE
b.SEQUENCE_NBR = ibfpvcv.PROCESS_POINT1_ID
b.SEQUENCE_NBR = ibfpvcv.PROCESS_POINT3_ID
OR b.SEQUENCE_NBR = ibfpvcv.PROCESS_POINT2_ID
OR b.SEQUENCE_NBR = ibfpvcv.PROCESS_POINT3_ID
OR b.SEQUENCE_NBR = ibfpvcv.ANALYSIS_POINT_ID
GROUP BY
GROUP BY
b.SEQUENCE_NBR UNION ALL
b.SEQUENCE_NBR UNION ALL
SELECT
SELECT
...
@@ -88,10 +81,7 @@
...
@@ -88,10 +81,7 @@
) AS b,
) AS b,
idx_biz_fan_point_var_central_value ibfpvcv
idx_biz_fan_point_var_central_value ibfpvcv
WHERE
WHERE
b.SEQUENCE_NBR = ibfpvcv.PROCESS_POINT1_ID
b.SEQUENCE_NBR = ibfpvcv.ANALYSIS_POINT_ID
OR b.SEQUENCE_NBR = ibfpvcv.PROCESS_POINT2_ID
OR b.SEQUENCE_NBR = ibfpvcv.PROCESS_POINT3_ID
OR b.SEQUENCE_NBR = ibfpvcv.ANALYSIS_POINT_ID
GROUP BY
GROUP BY
b.SEQUENCE_NBR
b.SEQUENCE_NBR
</select>
</select>
...
...
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 @
8aa291c4
...
@@ -159,4 +159,7 @@ public class IdxBizFanHealthIndex {
...
@@ -159,4 +159,7 @@ public class IdxBizFanHealthIndex {
@TableField
(
"POINT_NAME"
)
@TableField
(
"POINT_NAME"
)
private
String
pointName
;
private
String
pointName
;
@TableField
(
"ANALYSIS_TIME"
)
private
String
ANALYSISTIME
;
}
}
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 @
8aa291c4
...
@@ -169,4 +169,7 @@ public class IdxBizPvHealthIndex{
...
@@ -169,4 +169,7 @@ public class IdxBizPvHealthIndex{
@TableField
(
"POINT_NAME"
)
@TableField
(
"POINT_NAME"
)
private
String
pointName
;
private
String
pointName
;
@TableField
(
"ANALYSIS_TIME"
)
private
String
ANALYSISTIME
;
}
}
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 @
8aa291c4
...
@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSONArray;
...
@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSONArray;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.module.jxiop.biz.ESDto.ESEquipments
;
import
com.yeejoin.amos.boot.module.jxiop.biz.ESDto.ESEquipments
;
import
com.yeejoin.amos.boot.module.jxiop.biz.Enum.SmartAnalyseEnum
;
import
com.yeejoin.amos.boot.module.jxiop.biz.Enum.SmartAnalyseEnum
;
import
com.yeejoin.amos.boot.module.jxiop.biz.Thread.MyServiceThread
;
import
com.yeejoin.amos.boot.module.jxiop.biz.Thread.MyServiceThread
;
...
@@ -18,6 +19,7 @@ import com.yeejoin.amos.component.influxdb.InfluxdbUtil;
...
@@ -18,6 +19,7 @@ import com.yeejoin.amos.component.influxdb.InfluxdbUtil;
import
org.elasticsearch.index.query.BoolQueryBuilder
;
import
org.elasticsearch.index.query.BoolQueryBuilder
;
import
org.elasticsearch.index.query.QueryBuilder
;
import
org.elasticsearch.index.query.QueryBuilder
;
import
org.elasticsearch.index.query.QueryBuilders
;
import
org.elasticsearch.index.query.QueryBuilders
;
import
org.joda.time.DateTimeUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
...
@@ -32,6 +34,7 @@ import org.springframework.data.elasticsearch.core.query.Query;
...
@@ -32,6 +34,7 @@ import org.springframework.data.elasticsearch.core.query.Query;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.utils.DateTimeUtil
;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
...
@@ -1552,22 +1555,24 @@ public class CommonServiceImpl {
...
@@ -1552,22 +1555,24 @@ public class CommonServiceImpl {
for
(
int
i
=
0
;
i
<
analysisVariableIdArray
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
analysisVariableIdArray
.
size
();
i
++)
{
IdxBizFanHealthIndex
idxBizFanHealthIndex
=
new
IdxBizFanHealthIndex
();
IdxBizFanHealthIndex
idxBizFanHealthIndex
=
new
IdxBizFanHealthIndex
();
BeanUtils
.
copyProperties
(
obj
,
idxBizFanHealthIndex
);
BeanUtils
.
copyProperties
(
obj
,
idxBizFanHealthIndex
);
idxBizFanHealthIndex
.
setHealthIndex
(
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
.
setRecDate
(
new
Date
());
idxBizFanHealthIndex
.
setWeigth
(
1.0
);
//获取健康指数对应等级
//获取健康指数对应等级
LambdaQueryWrapper
<
IdxBizFanHealthLevel
>
query
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
IdxBizFanHealthLevel
>
query
=
new
LambdaQueryWrapper
<>();
query
.
eq
(
IdxBizFanHealthLevel:
:
getAnalysisObjType
,
"
设备
"
);
query
.
eq
(
IdxBizFanHealthLevel:
:
getAnalysisObjType
,
"
测点
"
);
query
.
eq
(
IdxBizFanHealthLevel:
:
getStatus
,
obj
.
getStation
());
query
.
eq
(
IdxBizFanHealthLevel:
:
getStatus
,
obj
.
getStation
());
query
.
le
(
IdxBizFanHealthLevel:
:
getGroupLowerLimit
,
indexValueArray
.
getDoubleValue
(
i
));
query
.
le
(
IdxBizFanHealthLevel:
:
getGroupLowerLimit
,
indexValueArray
.
getDoubleValue
(
i
)
<
0
?
0
:
indexValueArray
.
getDoubleValue
(
i
)
);
query
.
ge
(
IdxBizFanHealthLevel:
:
getGroupUpperLimit
,
indexValueArray
.
getDoubleValue
(
i
));
query
.
ge
(
IdxBizFanHealthLevel:
:
getGroupUpperLimit
,
indexValueArray
.
getDoubleValue
(
i
)
<
0
?
0
:
indexValueArray
.
getDoubleValue
(
i
)
);
IdxBizFanHealthLevel
idxBizFanHealthLevel
=
idxBizFanHealthLevelMapper
.
selectOne
(
query
);
IdxBizFanHealthLevel
idxBizFanHealthLevel
=
idxBizFanHealthLevelMapper
.
selectOne
(
query
);
idxBizFanHealthIndex
.
setHealthLevel
(
idxBizFanHealthLevel
.
getHealthLevel
());
idxBizFanHealthIndex
.
setHealthLevel
(
idxBizFanHealthLevel
.
getHealthLevel
());
idxBizFanHealthIndex
.
setAnalysisType
(
"按时刻"
);
idxBizFanHealthIndex
.
setAnalysisType
(
"按时刻"
);
idxBizFanHealthIndex
.
setAnalysisObjType
(
"测点"
);
idxBizFanHealthIndex
.
setAnalysisObjType
(
"测点"
);
idxBizFanHealthIndex
.
setANOMALY
(
scoreValueArray
.
getDoubleValue
(
i
));
idxBizFanHealthIndex
.
setANOMALY
(
scoreValueArray
.
getDoubleValue
(
i
));
idxBizFanHealthIndex
.
setANALYSISTIME
(
DateUtils
.
getDateNowString
());
idxBizFanHealthIndexs
.
add
(
idxBizFanHealthIndex
);
idxBizFanHealthIndexs
.
add
(
idxBizFanHealthIndex
);
}
}
}
}
...
@@ -1674,20 +1679,22 @@ public class CommonServiceImpl {
...
@@ -1674,20 +1679,22 @@ public class CommonServiceImpl {
for
(
int
i
=
0
;
i
<
analysisVariableIdArray
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
analysisVariableIdArray
.
size
();
i
++)
{
IdxBizPvHealthIndex
idxBizPvHealthIndex
=
new
IdxBizPvHealthIndex
();
IdxBizPvHealthIndex
idxBizPvHealthIndex
=
new
IdxBizPvHealthIndex
();
BeanUtils
.
copyProperties
(
obj
,
idxBizPvHealthIndex
);
BeanUtils
.
copyProperties
(
obj
,
idxBizPvHealthIndex
);
idxBizPvHealthIndex
.
setHealthIndex
(
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
);
//获取健康指数对应等级
//获取健康指数对应等级
LambdaQueryWrapper
<
IdxBizPvHealthLevel
>
query
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
IdxBizPvHealthLevel
>
query
=
new
LambdaQueryWrapper
<>();
query
.
eq
(
IdxBizPvHealthLevel:
:
getAnalysisObjType
,
"
设备
"
);
query
.
eq
(
IdxBizPvHealthLevel:
:
getAnalysisObjType
,
"
测点
"
);
query
.
eq
(
IdxBizPvHealthLevel:
:
getStatus
,
obj
.
getStation
());
query
.
eq
(
IdxBizPvHealthLevel:
:
getStatus
,
obj
.
getStation
());
query
.
le
(
IdxBizPvHealthLevel:
:
getGroupLowerLimit
,
indexValueArray
.
getDoubleValue
(
i
));
query
.
le
(
IdxBizPvHealthLevel:
:
getGroupLowerLimit
,
indexValueArray
.
getDoubleValue
(
i
)
<
0
?
0
:
indexValueArray
.
getDoubleValue
(
i
)
);
query
.
ge
(
IdxBizPvHealthLevel:
:
getGroupUpperLimit
,
indexValueArray
.
getDoubleValue
(
i
));
query
.
ge
(
IdxBizPvHealthLevel:
:
getGroupUpperLimit
,
indexValueArray
.
getDoubleValue
(
i
)
<
0
?
0
:
indexValueArray
.
getDoubleValue
(
i
)
);
IdxBizPvHealthLevel
idxBizFanHealthLevel
=
idxBizPvHealthLevelMapper
.
selectOne
(
query
);
IdxBizPvHealthLevel
idxBizFanHealthLevel
=
idxBizPvHealthLevelMapper
.
selectOne
(
query
);
idxBizPvHealthIndex
.
setHealthLevel
(
idxBizFanHealthLevel
.
getHealthLevel
());
idxBizPvHealthIndex
.
setHealthLevel
(
idxBizFanHealthLevel
.
getHealthLevel
());
idxBizPvHealthIndex
.
setAnalysisType
(
"按时刻"
);
idxBizPvHealthIndex
.
setAnalysisType
(
"按时刻"
);
idxBizPvHealthIndex
.
setAnalysisObjType
(
"测点"
);
idxBizPvHealthIndex
.
setAnalysisObjType
(
"测点"
);
idxBizPvHealthIndex
.
setANOMALY
(
scoreValueArray
.
getDoubleValue
(
i
));
idxBizPvHealthIndex
.
setANOMALY
(
scoreValueArray
.
getDoubleValue
(
i
));
idxBizPvHealthIndex
.
setANALYSISTIME
(
DateUtils
.
getDateNowString
());
idxBizPvHealthIndexs
.
add
(
idxBizPvHealthIndex
);
idxBizPvHealthIndexs
.
add
(
idxBizPvHealthIndex
);
}
}
}
}
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/cluster/IdxBizFanPointProcessVariableClassificationMapper.xml
View file @
8aa291c4
...
@@ -20,9 +20,6 @@
...
@@ -20,9 +20,6 @@
idx_biz_fan_point_var_central_value ibfpvcv
idx_biz_fan_point_var_central_value ibfpvcv
WHERE
WHERE
b.SEQUENCE_NBR = ibfpvcv.PROCESS_POINT1_ID
b.SEQUENCE_NBR = ibfpvcv.PROCESS_POINT1_ID
OR b.SEQUENCE_NBR = ibfpvcv.PROCESS_POINT2_ID
OR b.SEQUENCE_NBR = ibfpvcv.PROCESS_POINT3_ID
OR b.SEQUENCE_NBR = ibfpvcv.ANALYSIS_POINT_ID
GROUP BY
GROUP BY
b.SEQUENCE_NBR UNION ALL
b.SEQUENCE_NBR UNION ALL
SELECT
SELECT
...
@@ -42,10 +39,7 @@
...
@@ -42,10 +39,7 @@
) AS b,
) AS b,
idx_biz_fan_point_var_central_value ibfpvcv
idx_biz_fan_point_var_central_value ibfpvcv
WHERE
WHERE
b.SEQUENCE_NBR = ibfpvcv.PROCESS_POINT1_ID
b.SEQUENCE_NBR = ibfpvcv.PROCESS_POINT2_ID
OR b.SEQUENCE_NBR = ibfpvcv.PROCESS_POINT2_ID
OR b.SEQUENCE_NBR = ibfpvcv.PROCESS_POINT3_ID
OR b.SEQUENCE_NBR = ibfpvcv.ANALYSIS_POINT_ID
GROUP BY
GROUP BY
b.SEQUENCE_NBR UNION ALL
b.SEQUENCE_NBR UNION ALL
SELECT
SELECT
...
@@ -65,10 +59,7 @@
...
@@ -65,10 +59,7 @@
) AS b,
) AS b,
idx_biz_fan_point_var_central_value ibfpvcv
idx_biz_fan_point_var_central_value ibfpvcv
WHERE
WHERE
b.SEQUENCE_NBR = ibfpvcv.PROCESS_POINT1_ID
b.SEQUENCE_NBR = ibfpvcv.PROCESS_POINT3_ID
OR b.SEQUENCE_NBR = ibfpvcv.PROCESS_POINT2_ID
OR b.SEQUENCE_NBR = ibfpvcv.PROCESS_POINT3_ID
OR b.SEQUENCE_NBR = ibfpvcv.ANALYSIS_POINT_ID
GROUP BY
GROUP BY
b.SEQUENCE_NBR UNION ALL
b.SEQUENCE_NBR UNION ALL
SELECT
SELECT
...
@@ -88,10 +79,7 @@
...
@@ -88,10 +79,7 @@
) AS b,
) AS b,
idx_biz_fan_point_var_central_value ibfpvcv
idx_biz_fan_point_var_central_value ibfpvcv
WHERE
WHERE
b.SEQUENCE_NBR = ibfpvcv.PROCESS_POINT1_ID
b.SEQUENCE_NBR = ibfpvcv.ANALYSIS_POINT_ID
OR b.SEQUENCE_NBR = ibfpvcv.PROCESS_POINT2_ID
OR b.SEQUENCE_NBR = ibfpvcv.PROCESS_POINT3_ID
OR b.SEQUENCE_NBR = ibfpvcv.ANALYSIS_POINT_ID
GROUP BY
GROUP BY
b.SEQUENCE_NBR
b.SEQUENCE_NBR
</select>
</select>
...
...
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