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
5f87d7d8
Commit
5f87d7d8
authored
Oct 20, 2023
by
chenzhao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://39.98.45.134:8090/moa/amos-boot-biz
into developer
parents
46ce4580
24214d63
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
272 additions
and
67 deletions
+272
-67
amos-boot-jcs-system.iml
amos-boot-jcs-system/amos-boot-jcs-system.iml
+0
-0
ClientHandler.java
.../main/java/com/yeejoin/amos/kgd/config/ClientHandler.java
+135
-19
SocketConfig.java
...c/main/java/com/yeejoin/amos/kgd/config/SocketConfig.java
+4
-1
IdxBizFanHealthIndexController.java
.../jxiop/biz/controller/IdxBizFanHealthIndexController.java
+5
-1
KafkaConsumerService.java
...mos/boot/module/jxiop/biz/kafka/KafkaConsumerService.java
+17
-16
IdxBizFanHealthIndexServiceImpl.java
...iop/biz/service/impl/IdxBizFanHealthIndexServiceImpl.java
+43
-23
IndicatorDataMapper.java
...s/boot/module/jxiop/biz/tdmapper/IndicatorDataMapper.java
+1
-1
BigScreenTask.java
...ejoin/amos/boot/module/jxiop/biz/tasks/BigScreenTask.java
+55
-0
application-dev.properties
...gscreen-biz/src/main/resources/application-dev.properties
+3
-0
application-dev.properties
...-system-kgd/src/main/resources/application-dev.properties
+5
-5
application.properties
...boot-system-kgd/src/main/resources/application.properties
+4
-1
No files found.
amos-boot-jcs-system/amos-boot-jcs-system.iml
View file @
5f87d7d8
This diff is collapsed.
Click to expand it.
amos-boot-module/amos-boot-module-api/amos-boot-module-kgd-api/src/main/java/com/yeejoin/amos/kgd/config/ClientHandler.java
View file @
5f87d7d8
This diff is collapsed.
Click to expand it.
amos-boot-module/amos-boot-module-api/amos-boot-module-kgd-api/src/main/java/com/yeejoin/amos/kgd/config/SocketConfig.java
View file @
5f87d7d8
...
@@ -26,6 +26,9 @@ public class SocketConfig {
...
@@ -26,6 +26,9 @@ public class SocketConfig {
@Value
(
"${amos.system.socket.port}"
)
@Value
(
"${amos.system.socket.port}"
)
private
Integer
port
;
private
Integer
port
;
@Value
(
"${amos.system.socket.hostAndPort}"
)
private
String
hostAndPort
;
private
static
final
ThreadPoolExecutor
threadpool
=
new
ThreadPoolExecutor
(
15
,
15
,
private
static
final
ThreadPoolExecutor
threadpool
=
new
ThreadPoolExecutor
(
15
,
15
,
10L
,
TimeUnit
.
SECONDS
,
new
LinkedBlockingQueue
<
Runnable
>());
10L
,
TimeUnit
.
SECONDS
,
new
LinkedBlockingQueue
<
Runnable
>());
...
@@ -46,7 +49,7 @@ public class SocketConfig {
...
@@ -46,7 +49,7 @@ public class SocketConfig {
clientSocket
.
setSoTimeout
(
10000
);
clientSocket
.
setSoTimeout
(
10000
);
// 创建新线程处理连接
// 创建新线程处理连接
log
.
info
(
"接收到客户端socket: {}"
,
clientSocket
.
getRemoteSocketAddress
());
log
.
info
(
"接收到客户端socket: {}"
,
clientSocket
.
getRemoteSocketAddress
());
threadpool
.
execute
(
new
ClientHandler
(
clientSocket
));
threadpool
.
execute
(
new
ClientHandler
(
clientSocket
,
hostAndPort
));
}
}
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
throw
new
RuntimeException
(
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/controller/IdxBizFanHealthIndexController.java
View file @
5f87d7d8
...
@@ -158,6 +158,7 @@ public class IdxBizFanHealthIndexController extends BaseController {
...
@@ -158,6 +158,7 @@ public class IdxBizFanHealthIndexController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"测点运行趋势图"
,
notes
=
"测点运行趋势图"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"测点运行趋势图"
,
notes
=
"测点运行趋势图"
)
@GetMapping
(
value
=
"/getqyt"
)
@GetMapping
(
value
=
"/getqyt"
)
public
ResponseModel
<
Object
>
getqyt
(
public
ResponseModel
<
Object
>
getqyt
(
int
type
,
String
address
,
String
address
,
String
statioName
,
String
statioName
,
String
equipmentName
,
String
equipmentName
,
...
@@ -165,7 +166,10 @@ public class IdxBizFanHealthIndexController extends BaseController {
...
@@ -165,7 +166,10 @@ public class IdxBizFanHealthIndexController extends BaseController {
@RequestParam
(
value
=
"startTime"
,
required
=
false
)
String
startTime
,
@RequestParam
(
value
=
"startTime"
,
required
=
false
)
String
startTime
,
@RequestParam
(
value
=
"endTime"
,
required
=
false
)
String
endTime
@RequestParam
(
value
=
"endTime"
,
required
=
false
)
String
endTime
)
{
)
{
if
(
address
.
isEmpty
()||
statioName
.
isEmpty
()||
equipmentName
.
isEmpty
()||
arae
.
isEmpty
()){
throw
new
RuntimeException
(
"片区,场站,设备名称,子系统,分析变量不能为空"
);
}
return
ResponseHelper
.
buildResponse
(
idxBizFanHealthIndexServiceImpl
.
getqyt
(
address
,
statioName
,
equipmentName
,
arae
,
startTime
,
endTime
));
return
ResponseHelper
.
buildResponse
(
idxBizFanHealthIndexServiceImpl
.
getqyt
(
type
,
address
,
statioName
,
equipmentName
,
arae
,
startTime
,
endTime
));
}
}
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/kafka/KafkaConsumerService.java
View file @
5f87d7d8
...
@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSON;
...
@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSON;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.CollectionUtils
;
import
com.baomidou.mybatisplus.core.toolkit.CollectionUtils
;
import
com.baomidou.mybatisplus.core.toolkit.ObjectUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.*
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.*
;
...
@@ -198,12 +199,12 @@ public class KafkaConsumerService {
...
@@ -198,12 +199,12 @@ public class KafkaConsumerService {
List
<
IdxBizFanPointVarCentralValue
>
insertList
=
new
ArrayList
<>();
List
<
IdxBizFanPointVarCentralValue
>
insertList
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
length
;
i
++)
{
for
(
int
i
=
0
;
i
<
length
;
i
++)
{
IdxBizFanPointVarCentralValue
idxBizFanPointVarCentralValue
=
new
IdxBizFanPointVarCentralValue
();
IdxBizFanPointVarCentralValue
idxBizFanPointVarCentralValue
=
new
IdxBizFanPointVarCentralValue
();
idxBizFanPointVarCentralValue
.
setProcess1Min
(
jsonObject
.
getJSONArray
(
"process1Min"
).
getDoubleValue
(
i
));
idxBizFanPointVarCentralValue
.
setProcess1Min
(
ObjectUtils
.
isNull
(
jsonObject
.
getJSONArray
(
"process1Min"
).
get
(
i
))
?
null
:
jsonObject
.
getJSONArray
(
"process1Min"
).
getDoubleValue
(
i
));
idxBizFanPointVarCentralValue
.
setProcess2Min
(
jsonObject
.
getJSONArray
(
"process2Min"
).
getDoubleValue
(
i
));
idxBizFanPointVarCentralValue
.
setProcess2Min
(
ObjectUtils
.
isNull
(
jsonObject
.
getJSONArray
(
"process2Min"
).
get
(
i
))
?
null
:
jsonObject
.
getJSONArray
(
"process2Min"
).
getDoubleValue
(
i
));
idxBizFanPointVarCentralValue
.
setProcess3Min
(
jsonObject
.
getJSONArray
(
"process3Min"
).
getDoubleValue
(
i
));
idxBizFanPointVarCentralValue
.
setProcess3Min
(
ObjectUtils
.
isNull
(
jsonObject
.
getJSONArray
(
"process3Min"
).
get
(
i
))
?
null
:
jsonObject
.
getJSONArray
(
"process3Min"
).
getDoubleValue
(
i
));
idxBizFanPointVarCentralValue
.
setProcess1Max
(
jsonObject
.
getJSONArray
(
"process1Max"
).
getDoubleValue
(
i
));
idxBizFanPointVarCentralValue
.
setProcess1Max
(
ObjectUtils
.
isNull
(
jsonObject
.
getJSONArray
(
"process1Max"
).
get
(
i
))
?
null
:
jsonObject
.
getJSONArray
(
"process1Max"
).
getDoubleValue
(
i
));
idxBizFanPointVarCentralValue
.
setPorcess2Max
(
jsonObject
.
getJSONArray
(
"process2Max"
).
getDoubleValue
(
i
));
idxBizFanPointVarCentralValue
.
setPorcess2Max
(
ObjectUtils
.
isNull
(
jsonObject
.
getJSONArray
(
"process2Max"
).
get
(
i
))
?
null
:
jsonObject
.
getJSONArray
(
"process2Max"
).
getDoubleValue
(
i
));
idxBizFanPointVarCentralValue
.
setProcess3Max
(
jsonObject
.
getJSONArray
(
"process3Max"
).
getDoubleValue
(
i
));
idxBizFanPointVarCentralValue
.
setProcess3Max
(
ObjectUtils
.
isNull
(
jsonObject
.
getJSONArray
(
"process3Max"
).
get
(
i
))
?
null
:
jsonObject
.
getJSONArray
(
"process3Max"
).
getDoubleValue
(
i
));
idxBizFanPointVarCentralValue
.
setAnalysisPointId
(
analysisVariableId
);
idxBizFanPointVarCentralValue
.
setAnalysisPointId
(
analysisVariableId
);
idxBizFanPointVarCentralValue
.
setAnalysisPointName
(
analysisVariable
.
getPointName
());
idxBizFanPointVarCentralValue
.
setAnalysisPointName
(
analysisVariable
.
getPointName
());
idxBizFanPointVarCentralValue
.
setProcessPoint1Id
(
data1
.
get
(
"processVariable1Id"
).
toString
());
idxBizFanPointVarCentralValue
.
setProcessPoint1Id
(
data1
.
get
(
"processVariable1Id"
).
toString
());
...
@@ -212,8 +213,8 @@ public class KafkaConsumerService {
...
@@ -212,8 +213,8 @@ public class KafkaConsumerService {
idxBizFanPointVarCentralValue
.
setProcessPoint2Name
(
processVariableList
.
get
(
1
).
getPointName
());
idxBizFanPointVarCentralValue
.
setProcessPoint2Name
(
processVariableList
.
get
(
1
).
getPointName
());
idxBizFanPointVarCentralValue
.
setProcessPoint3Id
(
data1
.
get
(
"processVariable3Id"
).
toString
());
idxBizFanPointVarCentralValue
.
setProcessPoint3Id
(
data1
.
get
(
"processVariable3Id"
).
toString
());
idxBizFanPointVarCentralValue
.
setProcessPoint3Name
(
processVariableList
.
get
(
2
).
getPointName
());
idxBizFanPointVarCentralValue
.
setProcessPoint3Name
(
processVariableList
.
get
(
2
).
getPointName
());
idxBizFanPointVarCentralValue
.
setAnalysisStdDev
(
jsonObject
.
getJSONArray
(
"stdDev"
).
getDoubleValue
(
i
));
idxBizFanPointVarCentralValue
.
setAnalysisStdDev
(
ObjectUtils
.
isNull
(
jsonObject
.
getJSONArray
(
"stdDev"
).
get
(
i
))
?
null
:
jsonObject
.
getJSONArray
(
"stdDev"
).
getDoubleValue
(
i
));
idxBizFanPointVarCentralValue
.
setAnalysisCenterValue
(
jsonObject
.
getJSONArray
(
"centerValue"
).
getDoubleValue
(
i
));
idxBizFanPointVarCentralValue
.
setAnalysisCenterValue
(
ObjectUtils
.
isNull
(
jsonObject
.
getJSONArray
(
"centerValue"
).
get
(
i
))
?
null
:
jsonObject
.
getJSONArray
(
"centerValue"
).
getDoubleValue
(
i
));
idxBizFanPointVarCentralValue
.
setArae
(
analysisVariable
.
getArae
());
idxBizFanPointVarCentralValue
.
setArae
(
analysisVariable
.
getArae
());
idxBizFanPointVarCentralValue
.
setStation
(
analysisVariable
.
getStation
());
idxBizFanPointVarCentralValue
.
setStation
(
analysisVariable
.
getStation
());
idxBizFanPointVarCentralValue
.
setSubSystem
(
analysisVariable
.
getSubSystem
());
idxBizFanPointVarCentralValue
.
setSubSystem
(
analysisVariable
.
getSubSystem
());
...
@@ -835,12 +836,12 @@ public class KafkaConsumerService {
...
@@ -835,12 +836,12 @@ public class KafkaConsumerService {
List
<
IdxBizPvPointVarCentralValue
>
insertList
=
new
ArrayList
<>();
List
<
IdxBizPvPointVarCentralValue
>
insertList
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
length
;
i
++)
{
for
(
int
i
=
0
;
i
<
length
;
i
++)
{
IdxBizPvPointVarCentralValue
idxBizPvPointVarCentralValue
=
new
IdxBizPvPointVarCentralValue
();
IdxBizPvPointVarCentralValue
idxBizPvPointVarCentralValue
=
new
IdxBizPvPointVarCentralValue
();
idxBizPvPointVarCentralValue
.
setProcess1Min
(
jsonObject
.
getJSONArray
(
"process1Min"
).
getDoubleValue
(
i
));
idxBizPvPointVarCentralValue
.
setProcess1Min
(
ObjectUtils
.
isNull
(
jsonObject
.
getJSONArray
(
"process1Min"
).
get
(
i
))
?
null
:
jsonObject
.
getJSONArray
(
"process1Min"
).
getDoubleValue
(
i
));
idxBizPvPointVarCentralValue
.
setProcess2Min
(
jsonObject
.
getJSONArray
(
"process2Min"
).
getDoubleValue
(
i
));
idxBizPvPointVarCentralValue
.
setProcess2Min
(
ObjectUtils
.
isNull
(
jsonObject
.
getJSONArray
(
"process2Min"
).
get
(
i
))
?
null
:
jsonObject
.
getJSONArray
(
"process2Min"
).
getDoubleValue
(
i
));
idxBizPvPointVarCentralValue
.
setProcess3Min
(
jsonObject
.
getJSONArray
(
"process3Min"
).
getDoubleValue
(
i
));
idxBizPvPointVarCentralValue
.
setProcess3Min
(
ObjectUtils
.
isNull
(
jsonObject
.
getJSONArray
(
"process3Min"
).
get
(
i
))
?
null
:
jsonObject
.
getJSONArray
(
"process3Min"
).
getDoubleValue
(
i
));
idxBizPvPointVarCentralValue
.
setProcess1Max
(
jsonObject
.
getJSONArray
(
"process1Max"
).
getDoubleValue
(
i
));
idxBizPvPointVarCentralValue
.
setProcess1Max
(
ObjectUtils
.
isNull
(
jsonObject
.
getJSONArray
(
"process1Max"
).
get
(
i
))
?
null
:
jsonObject
.
getJSONArray
(
"process1Max"
).
getDoubleValue
(
i
));
idxBizPvPointVarCentralValue
.
setProcess2Max
(
jsonObject
.
getJSONArray
(
"process2Max"
).
getDoubleValue
(
i
));
idxBizPvPointVarCentralValue
.
setProcess2Max
(
ObjectUtils
.
isNull
(
jsonObject
.
getJSONArray
(
"process2Max"
).
get
(
i
))
?
null
:
jsonObject
.
getJSONArray
(
"process2Max"
).
getDoubleValue
(
i
));
idxBizPvPointVarCentralValue
.
setProcess3Max
(
jsonObject
.
getJSONArray
(
"process3Max"
).
getDoubleValue
(
i
));
idxBizPvPointVarCentralValue
.
setProcess3Max
(
ObjectUtils
.
isNull
(
jsonObject
.
getJSONArray
(
"process3Max"
).
get
(
i
))
?
null
:
jsonObject
.
getJSONArray
(
"process3Max"
).
getDoubleValue
(
i
));
idxBizPvPointVarCentralValue
.
setAnalysisPointId
(
jsonObject
.
getString
(
"analysisVariableId"
));
idxBizPvPointVarCentralValue
.
setAnalysisPointId
(
jsonObject
.
getString
(
"analysisVariableId"
));
idxBizPvPointVarCentralValue
.
setAnalysisPointIdName
(
analysisVariable
.
getPointName
());
idxBizPvPointVarCentralValue
.
setAnalysisPointIdName
(
analysisVariable
.
getPointName
());
idxBizPvPointVarCentralValue
.
setProcessPoint1Id
(
jsonObject
.
getString
(
"processVariable1Id"
));
idxBizPvPointVarCentralValue
.
setProcessPoint1Id
(
jsonObject
.
getString
(
"processVariable1Id"
));
...
@@ -849,8 +850,8 @@ public class KafkaConsumerService {
...
@@ -849,8 +850,8 @@ public class KafkaConsumerService {
idxBizPvPointVarCentralValue
.
setProcessPoint2IdName
(
processVariableList
.
get
(
1
).
getPointName
());
idxBizPvPointVarCentralValue
.
setProcessPoint2IdName
(
processVariableList
.
get
(
1
).
getPointName
());
idxBizPvPointVarCentralValue
.
setProcessPoint3Id
(
jsonObject
.
getString
(
"processVariable3Id"
));
idxBizPvPointVarCentralValue
.
setProcessPoint3Id
(
jsonObject
.
getString
(
"processVariable3Id"
));
idxBizPvPointVarCentralValue
.
setProcessPoint3IdName
(
processVariableList
.
get
(
2
).
getPointName
());
idxBizPvPointVarCentralValue
.
setProcessPoint3IdName
(
processVariableList
.
get
(
2
).
getPointName
());
idxBizPvPointVarCentralValue
.
setAnalysisStdDev
(
jsonObject
.
getJSONArray
(
"stdDev"
).
getDoubleValue
(
i
));
idxBizPvPointVarCentralValue
.
setAnalysisStdDev
(
ObjectUtils
.
isNull
(
jsonObject
.
getJSONArray
(
"stdDev"
).
get
(
i
))
?
null
:
jsonObject
.
getJSONArray
(
"stdDev"
).
getDoubleValue
(
i
));
idxBizPvPointVarCentralValue
.
setAnalysisCenterValue
(
jsonObject
.
getJSONArray
(
"centerValue"
).
getDoubleValue
(
i
));
idxBizPvPointVarCentralValue
.
setAnalysisCenterValue
(
ObjectUtils
.
isNull
(
jsonObject
.
getJSONArray
(
"centerValue"
).
get
(
i
))
?
null
:
jsonObject
.
getJSONArray
(
"centerValue"
).
getDoubleValue
(
i
));
idxBizPvPointVarCentralValue
.
setArae
(
analysisVariable
.
getArae
());
idxBizPvPointVarCentralValue
.
setArae
(
analysisVariable
.
getArae
());
idxBizPvPointVarCentralValue
.
setStation
(
analysisVariable
.
getStation
());
idxBizPvPointVarCentralValue
.
setStation
(
analysisVariable
.
getStation
());
idxBizPvPointVarCentralValue
.
setSubarray
(
analysisVariable
.
getSubarray
());
idxBizPvPointVarCentralValue
.
setSubarray
(
analysisVariable
.
getSubarray
());
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/IdxBizFanHealthIndexServiceImpl.java
View file @
5f87d7d8
...
@@ -5,10 +5,10 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
...
@@ -5,10 +5,10 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizFanHealthIndexDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizFanHealthIndexDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanHealthIndex
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.*
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizUxfv
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IndicatorData
;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizFanHealthIndexMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizFanHealthIndexMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizFanPointProcessVariableClassificationMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizPvPointProcessVariableClassificationMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizUxfvMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizUxfvMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.IIdxBizFanHealthIndexService
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.IIdxBizFanHealthIndexService
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdmapper.IndicatorDataMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.tdmapper.IndicatorDataMapper
;
...
@@ -31,7 +31,10 @@ public class IdxBizFanHealthIndexServiceImpl extends BaseService<IdxBizFanHealth
...
@@ -31,7 +31,10 @@ public class IdxBizFanHealthIndexServiceImpl extends BaseService<IdxBizFanHealth
@Autowired
@Autowired
IdxBizUxfvMapper
idxBizUxfvMapper
;
IdxBizPvPointProcessVariableClassificationMapper
idxBizPvPointProcessVariableClassificationMapper
;
@Autowired
IdxBizFanPointProcessVariableClassificationMapper
idxBizFanPointProcessVariableClassificationMapper
;
@Autowired
@Autowired
IndicatorDataMapper
indicatorDataMapper
;
IndicatorDataMapper
indicatorDataMapper
;
/**
/**
...
@@ -63,18 +66,31 @@ public class IdxBizFanHealthIndexServiceImpl extends BaseService<IdxBizFanHealth
...
@@ -63,18 +66,31 @@ public class IdxBizFanHealthIndexServiceImpl extends BaseService<IdxBizFanHealth
public
Object
getqyt
(
String
address
,
String
statioName
,
String
equipmentName
,
String
arae
,
String
startTime
,
String
endTime
){
public
Object
getqyt
(
int
type
,
String
address
,
String
statioName
,
String
equipmentName
,
String
arae
,
String
startTime
,
String
endTime
){
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
try
{
//获取场站网关
//获取场站网关
IdxBizUxfv
idxBizUxfv
=
idxBizUxfvMapper
.
selectOne
(
String
tdid
=
null
;
new
QueryWrapper
<
IdxBizUxfv
>()
if
(
type
==
1
){
.
eq
(
"INDEX_ADDRESS"
,
address
)
IdxBizPvPointProcessVariableClassification
idxBizPvPointProcessVariableClassification
=
idxBizPvPointProcessVariableClassificationMapper
.
selectOne
(
.
eq
(
"STATION"
,
statioName
)
new
QueryWrapper
<
IdxBizPvPointProcessVariableClassification
>()
.
eq
(
"EQUIPMENT_NAME"
,
equipmentName
)
.
eq
(
"INDEX_ADDRESS"
,
address
)
.
eq
(
"ARAE"
,
arae
)
.
eq
(
"STATION"
,
statioName
)
);
.
eq
(
"EQUIPMENT_NAME"
,
equipmentName
)
.
eq
(
"ARAE"
,
arae
)
String
tdid
=
address
+
"_"
+
idxBizUxfv
.
getGatewayId
();
);
tdid
=
address
+
"_"
+
idxBizPvPointProcessVariableClassification
.
getGatewayId
();
}
else
{
IdxBizFanPointProcessVariableClassification
idxBizFanPointProcessVariableClassification
=
idxBizFanPointProcessVariableClassificationMapper
.
selectOne
(
new
QueryWrapper
<
IdxBizFanPointProcessVariableClassification
>()
.
eq
(
"INDEX_ADDRESS"
,
address
)
.
eq
(
"STATION"
,
statioName
)
.
eq
(
"EQUIPMENT_NAME"
,
equipmentName
)
.
eq
(
"ARAE"
,
arae
)
);
tdid
=
address
+
"_"
+
idxBizFanPointProcessVariableClassification
.
getGatewayId
();
}
SimpleDateFormat
dateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd'T'HH:mm:ss'Z'"
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd'T'HH:mm:ss'Z'"
);
Calendar
calendar
=
Calendar
.
getInstance
(
TimeZone
.
getTimeZone
(
"UTC"
));
Calendar
calendar
=
Calendar
.
getInstance
(
TimeZone
.
getTimeZone
(
"UTC"
));
sdf
.
setTimeZone
(
TimeZone
.
getTimeZone
(
"UTC"
));
sdf
.
setTimeZone
(
TimeZone
.
getTimeZone
(
"UTC"
));
...
@@ -87,8 +103,8 @@ public class IdxBizFanHealthIndexServiceImpl extends BaseService<IdxBizFanHealth
...
@@ -87,8 +103,8 @@ public class IdxBizFanHealthIndexServiceImpl extends BaseService<IdxBizFanHealth
startTime
=
sdf
.
format
(
currentDayStartTime
);
startTime
=
sdf
.
format
(
currentDayStartTime
);
endTime
=
sdf
.
format
(
currentDayEndTime
);
endTime
=
sdf
.
format
(
currentDayEndTime
);
}
else
{
}
else
{
Date
currentDayStartTime
=
new
Dat
e
(
startTime
);
Date
currentDayStartTime
=
dateFormat
.
pars
e
(
startTime
);
Date
currentDayEndTime
=
new
Dat
e
(
endTime
);
Date
currentDayEndTime
=
dateFormat
.
pars
e
(
endTime
);
startTime
=
sdf
.
format
(
currentDayStartTime
);
startTime
=
sdf
.
format
(
currentDayStartTime
);
endTime
=
sdf
.
format
(
currentDayEndTime
);
endTime
=
sdf
.
format
(
currentDayEndTime
);
}
}
...
@@ -100,13 +116,17 @@ public class IdxBizFanHealthIndexServiceImpl extends BaseService<IdxBizFanHealth
...
@@ -100,13 +116,17 @@ public class IdxBizFanHealthIndexServiceImpl extends BaseService<IdxBizFanHealth
activePowers
.
add
(
indicatorDataListActivePowers
.
get
(
i
).
getValue
());
activePowers
.
add
(
indicatorDataListActivePowers
.
get
(
i
).
getValue
());
axisData
.
add
(
DateUtil
.
format
(
indicatorDataListActivePowers
.
get
(
i
).
getCreatedTime
(),
"HH:mm"
));
axisData
.
add
(
DateUtil
.
format
(
indicatorDataListActivePowers
.
get
(
i
).
getCreatedTime
(),
"HH:mm"
));
}
}
List
<
Map
<
String
,
Object
>>
seriesData
=
new
ArrayList
<>();
//
List<Map<String, Object>> seriesData = new ArrayList<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map2
=
new
HashMap
<>();
//
Map<String, Object> map2 = new HashMap<>();
map2
.
put
(
"data"
,
activePowers
);
//
map2.put("data", activePowers);
seriesData
.
add
(
map2
);
//
seriesData.add(map2);
map
.
put
(
"seriesData"
,
seriesData
);
map
.
put
(
"seriesData"
,
activePowers
);
map
.
put
(
"axisData"
,
axisData
);
map
.
put
(
"axisData"
,
axisData
);
}
catch
(
Exception
e
){
e
.
printStackTrace
();
throw
new
RuntimeException
();
}
return
map
;
return
map
;
}
}
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/tdmapper/IndicatorDataMapper.java
View file @
5f87d7d8
...
@@ -41,7 +41,7 @@ public interface IndicatorDataMapper extends BaseMapper<IndicatorData> {
...
@@ -41,7 +41,7 @@ public interface IndicatorDataMapper extends BaseMapper<IndicatorData> {
List
<
IndicatorData
>
selectByIndexNameAndDate
(
@Param
(
"equipmentIndexName"
)
String
equipmentIndexName
,
@Param
(
"gatewayId"
)
String
gatewayId
,
@Param
(
"date"
)
String
date
,
@Param
(
"limitNum"
)
Integer
limitNum
);
List
<
IndicatorData
>
selectByIndexNameAndDate
(
@Param
(
"equipmentIndexName"
)
String
equipmentIndexName
,
@Param
(
"gatewayId"
)
String
gatewayId
,
@Param
(
"date"
)
String
date
,
@Param
(
"limitNum"
)
Integer
limitNum
);
@Select
(
"select `value`, created_time
, `value_f` as valueF
from iot_data.indicator_data where id =#{id} and ts >= #{startTime} and ts <= #{endTime} "
)
@Select
(
"select `value`, created_time from iot_data.indicator_data where id =#{id} and ts >= #{startTime} and ts <= #{endTime} "
)
List
<
IndicatorData
>
selectDataByequipmentIndexNameAndtimeAndEquipmentNumber
(
@Param
(
"id"
)
String
id
,
@Param
(
"startTime"
)
String
startTime
,
@Param
(
"endTime"
)
String
endTime
);
List
<
IndicatorData
>
selectDataByequipmentIndexNameAndtimeAndEquipmentNumber
(
@Param
(
"id"
)
String
id
,
@Param
(
"startTime"
)
String
startTime
,
@Param
(
"endTime"
)
String
endTime
);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/tasks/BigScreenTask.java
0 → 100644
View file @
5f87d7d8
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
tasks
;
import
cn.hutool.http.HttpUtil
;
import
com.yeejoin.amos.boot.module.jxiop.api.dto.StationBasicDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.StationBasicServiceImpl
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.StationDataTaskImpl
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Component
;
import
java.util.List
;
/**
* @description: 定时获取场站最新数据
* @author: tw
* @createDate: 2023/7/3
*/
@Component
@EnableScheduling
@Slf4j
public
class
BigScreenTask
{
@Autowired
StationDataTaskImpl
stationDataTask
;
@Autowired
StationBasicServiceImpl
stationBasicService
;
@Value
(
"${idx.predict.serviceUrl:http://139.9.173.44:8095/jxdj/predict-data}"
)
private
String
predictServiceUrl
;
/**
* 生成预测数据,平台大屏预测折线图使用,原有iframe集成算法预测数据PC端使用,
* 但是大屏也需使用此功能,由于算法折线图样式与大屏风格不一致,故新画页面查询算法的预测表,
* 但是算法服务只有调用查询,才生成数据,所以必须调用,否则大屏查询无预测数据
*/
@Scheduled
(
cron
=
"0 0/20 * * * ?"
)
public
void
predictDataCreate
()
{
List
<
StationBasicDto
>
stations
=
stationBasicService
.
getBaseMapper
().
getStationBasicListAll
();
stations
.
forEach
(
s
->
{
try
{
String
url
=
String
.
format
(
"%s?code=%s"
,
predictServiceUrl
,
s
.
getProjectOrgCode
());
HttpUtil
.
get
(
url
);
}
catch
(
Exception
e
)
{
log
.
error
(
"调用算法定时生成大屏评估预测数据失败:机构{},错误信息:{}"
,
s
.
getProjectOrgCode
(),
e
.
getMessage
());
}
});
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-bigscreen-biz/src/main/resources/application-dev.properties
View file @
5f87d7d8
...
@@ -131,3 +131,6 @@ myqueue=amos.privilege.v1.JXIOP.AQSC_FDGL.userBusiness
...
@@ -131,3 +131,6 @@ myqueue=amos.privilege.v1.JXIOP.AQSC_FDGL.userBusiness
fan.statuts.stattuspath
=
upload/jxiop/device_status
fan.statuts.stattuspath
=
upload/jxiop/device_status
pictureUrl
=
upload/jxiop/syz/
pictureUrl
=
upload/jxiop/syz/
# Ԥ
idx.predict.serviceUrl
=
http://139.9.173.44:8095/jxdj/predict-data
amos-boot-system-kgd/src/main/resources/application-dev.properties
View file @
5f87d7d8
## DB properties:
## DB properties:
spring.datasource.url
=
jdbc:mysql://172.16.3.
18
:3306/amos_idx_biz?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.datasource.url
=
jdbc:mysql://172.16.3.
221
:3306/amos_idx_biz?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.datasource.username
=
root
spring.datasource.username
=
root
spring.datasource.password
=
Yeejoin@2020
spring.datasource.password
=
Yeejoin@2020
## eureka properties:
## eureka properties:
eureka.instance.hostname
=
172.16.3.
18
eureka.instance.hostname
=
172.16.3.
221
eureka.client.serviceUrl.defaultZone
=
http://${eureka.instance.hostname}:10001/eureka/
eureka.client.serviceUrl.defaultZone
=
http://${eureka.instance.hostname}:10001/eureka/
## redis properties:
## redis properties:
spring.redis.database
=
1
spring.redis.database
=
1
spring.redis.host
=
172.16.3.
18
spring.redis.host
=
172.16.3.
221
spring.redis.port
=
6379
spring.redis.port
=
6379
spring.redis.password
=
yeejoin@2020
spring.redis.password
=
yeejoin@2020
...
@@ -43,13 +43,13 @@ lettuce.timeout=10000
...
@@ -43,13 +43,13 @@ lettuce.timeout=10000
emqx.clean-session
=
true
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${random.int[1024,65536]}
emqx.client-id
=
${spring.application.name}-${random.int[1024,65536]}
emqx.broker
=
tcp://172.16.3.
18
:2883
emqx.broker
=
tcp://172.16.3.
221
:2883
emqx.client-user-name
=
super
emqx.client-user-name
=
super
emqx.client-password
=
a123456
emqx.client-password
=
a123456
emqx.max-inflight
=
1000
emqx.max-inflight
=
1000
spring.influx.url
=
http://
39.98.246.3
1:8086
spring.influx.url
=
http://
172.16.3.22
1:8086
spring.influx.password
=
Yeejoin@2020
spring.influx.password
=
Yeejoin@2020
spring.influx.user
=
root
spring.influx.user
=
root
spring.influx.database
=
iot_platform
spring.influx.database
=
iot_platform
...
...
amos-boot-system-kgd/src/main/resources/application.properties
View file @
5f87d7d8
...
@@ -55,8 +55,11 @@ spring.http.encoding.charset=utf-8
...
@@ -55,8 +55,11 @@ spring.http.encoding.charset=utf-8
spring.http.encoding.enabled
=
true
spring.http.encoding.enabled
=
true
spring.http.encoding.force
=
true
spring.http.encoding.force
=
true
amos.system.socket.hostAndPort
=
172.16.3.221:10005
amos.system.socket.port
=
7777
amos.system.socket.port
=
7777
amos.system.user.user-name
=
qms_sys
amos.system.user.user-name
=
kgd_gdd
amos.system.user.password
=
a1234560
amos.system.user.password
=
a1234560
amos.system.user.app-key
=
AMOS_STUDIO
amos.system.user.app-key
=
AMOS_STUDIO
amos.system.user.product
=
AMOS_STUDIO_WEB
amos.system.user.product
=
AMOS_STUDIO_WEB
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