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
e8146499
Commit
e8146499
authored
Oct 23, 2023
by
suhuiguang
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
f58d93c0
05004896
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
487 additions
and
94 deletions
+487
-94
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
+129
-19
SocketConfig.java
...c/main/java/com/yeejoin/amos/kgd/config/SocketConfig.java
+4
-1
Constant.java
.../src/main/java/com/yeejoin/amos/kgd/message/Constant.java
+3
-0
IdxBizFanHealthIndexController.java
.../jxiop/biz/controller/IdxBizFanHealthIndexController.java
+105
-1
IdxBizFanWarningRecordController.java
...xiop/biz/controller/IdxBizFanWarningRecordController.java
+78
-0
IdxBizPvHealthIndexController.java
...e/jxiop/biz/controller/IdxBizPvHealthIndexController.java
+16
-5
IdxBizFanPointTag.java
.../amos/boot/module/jxiop/biz/entity/IdxBizFanPointTag.java
+8
-3
IdxBizFanWarningRuleSet.java
...boot/module/jxiop/biz/entity/IdxBizFanWarningRuleSet.java
+5
-1
IdxBizPvPointTag.java
...n/amos/boot/module/jxiop/biz/entity/IdxBizPvPointTag.java
+13
-5
IdxBizPvWarningRuleSet.java
.../boot/module/jxiop/biz/entity/IdxBizPvWarningRuleSet.java
+2
-1
KafkaConsumerService.java
...mos/boot/module/jxiop/biz/kafka/KafkaConsumerService.java
+17
-16
IdxBizFanHealthIndexMapper.java
.../module/jxiop/biz/mapper2/IdxBizFanHealthIndexMapper.java
+7
-0
IdxBizPvHealthIndexMapper.java
...t/module/jxiop/biz/mapper2/IdxBizPvHealthIndexMapper.java
+2
-1
CommonServiceImpl.java
...boot/module/jxiop/biz/service/impl/CommonServiceImpl.java
+8
-2
IdxBizFanHealthIndexServiceImpl.java
...iop/biz/service/impl/IdxBizFanHealthIndexServiceImpl.java
+14
-3
IdxBizPvHealthIndexServiceImpl.java
...xiop/biz/service/impl/IdxBizPvHealthIndexServiceImpl.java
+2
-1
IdxBizFanHealthIndexMapper.xml
...n/resources/mapper/cluster/IdxBizFanHealthIndexMapper.xml
+39
-2
IdxBizPvHealthIndexMapper.xml
...in/resources/mapper/cluster/IdxBizPvHealthIndexMapper.xml
+17
-24
DemoController.java
...amos/boot/module/jxiop/biz/controller/DemoController.java
+2
-2
MonitorFanIndicatorImpl.java
...odule/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
+7
-1
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 @
e8146499
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 @
e8146499
package
com
.
yeejoin
.
amos
.
kgd
.
config
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.fasterxml.jackson.databind.node.ObjectNode
;
import
com.yeejoin.amos.boot.core.utils.RestTemplateUtil
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.component.robot.AmosRequestContext
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.kgd.message.Constant
;
import
io.github.classgraph.json.JSONUtils
;
import
io.micrometer.core.instrument.util.JsonUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.cloud.client.loadbalancer.LoadBalanced
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.core.io.InputStreamResource
;
import
org.springframework.core.io.Resource
;
import
org.springframework.http.*
;
import
org.springframework.util.LinkedMultiValueMap
;
import
org.springframework.util.MultiValueMap
;
import
org.springframework.web.client.RestTemplate
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.context.SpringContextHelper
;
import
java.io.*
;
import
java.net.Socket
;
import
java.util.Objects
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
/**
* @Author: xl
* @Description:
* @Date: 2023/10/10 16:21
*/
public
class
ClientHandler
implements
Runnable
{
@SuppressWarnings
(
"UnnecessarySemicolon"
)
public
class
ClientHandler
<
path
>
implements
Runnable
{
private
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
ClientHandler
.
class
);
private
Socket
socket
;
private
final
Socket
socket
;
private
final
String
hostAndPort
;
public
ClientHandler
(
Socket
socket
)
{
public
ClientHandler
(
Socket
socket
,
String
hostAndPort
)
{
this
.
socket
=
socket
;
this
.
hostAndPort
=
hostAndPort
;
}
@Override
public
void
run
()
{
try
{
// 获取输入流和输出流
InputStream
i
nputStream
=
socket
.
getInputStream
();
InputStream
i
ps
=
socket
.
getInputStream
();
// 处理客户端请求
log
.
info
(
"收到客户端数据: "
);
String
path
=
this
.
upload2Maas
(
i
nputStream
);
String
path
=
this
.
upload2Maas
(
i
ps
,
hostAndPort
);
log
.
info
(
"调用maas服务返回结果: {}"
,
path
);
// 关闭连接
byte
[]
bytes
=
path
.
getBytes
();
socket
.
close
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
// 上传maas逻辑写到这⬇⬇⬇⬇⬇⬇⬇,然后把maas返回的资源路径返回,后续作为客户端的回传信息
private
String
upload2Maas
(
InputStream
inputStream
)
{
private
String
upload2Maas
(
InputStream
inputStream
,
String
hostAndPort
)
throws
IOException
{
AmosRequestContext
robotAuthentication
=
SpringContextHelper
.
getBean
(
AmosRequestContext
.
class
);
if
(
Objects
.
nonNull
(
robotAuthentication
))
{
RequestContext
.
setAppKey
(
robotAuthentication
.
getAppKey
());
RequestContext
.
setProduct
(
robotAuthentication
.
getProduct
());
RequestContext
.
setToken
(
robotAuthentication
.
getToken
());
}
String
token
=
robotAuthentication
.
getToken
();
String
product
=
robotAuthentication
.
getProduct
();
String
appKey
=
robotAuthentication
.
getAppKey
();
//上传maas
//upload
String
uploadUrl
=
"http://"
+
hostAndPort
+
"/maas/dsm/excel/upload"
;
MultiValueMap
<
String
,
Object
>
params
=
new
LinkedMultiValueMap
<>();
Resource
resource
=
new
InputStreamResource
(
inputStream
)
{
@Override
public
long
contentLength
()
throws
IOException
{
long
size
=
inputStream
.
available
();
return
size
;
}
@Override
public
String
getFilename
()
{
return
"xlsx"
;
}
};
params
.
add
(
"file"
,
resource
);
HttpEntity
<
MultiValueMap
<
String
,
Object
>>
requestEntity
=
new
HttpEntity
<>(
params
,
getHeader
(
token
,
product
,
appKey
,
hostAndPort
,
true
));
RestTemplate
restTemplate
=
new
RestTemplate
();
ResponseEntity
<
String
>
responseEntity
=
restTemplate
.
exchange
(
uploadUrl
,
HttpMethod
.
POST
,
requestEntity
,
String
.
class
);
String
body
=
responseEntity
.
getBody
();
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
body
);
String
result
=
jsonObject
.
getString
(
"result"
);
String
path
=
jsonObject
.
getString
(
"path"
);
if
(
jsonObject
.
getString
(
"status"
).
equals
(
"200"
)){
log
.
info
(
"路径:"
+
path
+
"/"
+
result
);
}
else
{
throw
new
RuntimeException
(
"返回状态码错误"
);
}
//sheets
String
sheetsUrl
=
"http://"
+
hostAndPort
+
"/maas/dsm/excel/sheets"
;
Map
<
String
,
String
>
sheetsParams
=
new
HashMap
<>();
sheetsParams
.
put
(
"fileName"
,
result
);
HttpEntity
<
Map
<
String
,
String
>>
sheetsRequestEntity
=
new
HttpEntity
<>(
sheetsParams
,
getHeader
(
token
,
product
,
appKey
,
hostAndPort
,
false
));
ResponseEntity
<
String
>
sheetsResponseEntity
=
restTemplate
.
exchange
(
sheetsUrl
,
HttpMethod
.
POST
,
sheetsRequestEntity
,
String
.
class
);
String
sheetsResponseEntityBody
=
sheetsResponseEntity
.
getBody
();
JSONObject
sheetJsonObject
=
JSONObject
.
parseObject
(
sheetsResponseEntityBody
);
JSONArray
sheetArray
=
sheetJsonObject
.
getJSONArray
(
"result"
);
//result可能有多个sheet
String
[]
sheets
=
new
String
[
sheetArray
.
size
()];
for
(
int
i
=
0
;
i
<
sheetArray
.
size
();
i
++)
{
sheets
[
i
]
=
(
String
)
sheetArray
.
getJSONObject
(
i
).
get
(
"sheet"
);
}
log
.
info
(
"sheets的结果是:"
+
sheetsResponseEntityBody
);
// 测试案例,上传maas需要token,用机器人账户登录上传,此处修改为真实请求⬇⬇⬇⬇⬇⬇⬇
FeignClientResult
<
AgencyUserModel
>
getme
=
Privilege
.
agencyUserClient
.
getme
();
System
.
out
.
println
(
JSON
.
toJSONString
(
getme
));
//datasource(name:excel+时间戳)
// 获取当前时间的时间戳
long
timestamp
=
System
.
currentTimeMillis
();
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
String
timestampStr
=
sdf
.
format
(
new
Date
(
timestamp
));
String
datasourceUrl
=
"http://"
+
hostAndPort
+
"/maas/dsm/datasources"
;
JSONObject
all
=
new
JSONObject
();
JSONObject
oneJson
=
new
JSONObject
();
all
.
put
(
"filepath"
,
result
);
for
(
int
i
=
0
;
i
<
sheetArray
.
size
();
i
++)
{
oneJson
.
put
(
sheets
[
i
],
sheetArray
.
get
(
i
));
}
all
.
put
(
"config"
,
oneJson
);
Map
<
String
,
String
>
datasourceParams
=
new
HashMap
<>();
datasourceParams
.
put
(
"detail"
,
all
.
toString
());
datasourceParams
.
put
(
"groupid"
,
"72684d79-5d28-4086-9f21-5b091b6675db"
);
datasourceParams
.
put
(
"subtype"
,
"excel"
);
datasourceParams
.
put
(
"name"
,
"excel"
+
timestampStr
);
datasourceParams
.
put
(
"type"
,
"File"
);
HttpEntity
<
Map
<
String
,
String
>>
datasourceRequestEntity
=
new
HttpEntity
<>(
datasourceParams
,
getHeader
(
token
,
product
,
appKey
,
hostAndPort
,
false
));
ResponseEntity
<
String
>
datasourceResponseEntity
=
restTemplate
.
exchange
(
datasourceUrl
,
HttpMethod
.
POST
,
datasourceRequestEntity
,
String
.
class
);
String
datasourceResponseEntityBody
=
datasourceResponseEntity
.
getBody
();
log
.
info
(
"datasourceResponseEntityBody:"
+
datasourceResponseEntityBody
);
return
path
+
"/"
+
result
;
}
return
null
;
}
private
HttpHeaders
getHeader
(
String
token
,
String
product
,
String
appKey
,
String
hostAndPort
,
Boolean
isUpload
){
HttpHeaders
header
=
new
HttpHeaders
();
header
.
add
(
Constant
.
TOKEN
,
token
);
header
.
add
(
Constant
.
PRODUCT
,
product
);
header
.
add
(
Constant
.
APPKEY
,
appKey
);
if
(
isUpload
){
header
.
setContentType
(
MediaType
.
MULTIPART_FORM_DATA
);
}
else
{
header
.
setContentType
(
MediaType
.
APPLICATION_JSON
);
}
return
header
;
}
public
static
void
main
(
String
[]
args
)
throws
Exception
{
requestInfoToSocketServer
();
}
...
...
@@ -67,10 +172,15 @@ public class ClientHandler implements Runnable {
private
static
void
requestInfoToSocketServer
()
{
try
{
Socket
socket
=
new
Socket
(
"127.0.0.1"
,
7777
);
PrintWriter
out
=
new
PrintWriter
(
socket
.
getOutputStream
(),
true
);
out
.
write
(
"我是客户端"
);
out
.
flush
();
OutputStream
ops
=
socket
.
getOutputStream
();
FileInputStream
fis
=
new
FileInputStream
(
"D:\\SamData\\RecordXLS\\測試\\第一阶段任务与考核指标.xlsx"
);
int
len
=
0
;
byte
[]
bs
=
new
byte
[
20480
];
while
((
len
=
fis
.
read
(
bs
))
!=
-
1
)
{
ops
.
write
(
bs
,
0
,
len
);
}
socket
.
shutdownOutput
();
ops
.
flush
();
//开始接收服务端的消息
BufferedReader
in
=
new
BufferedReader
(
new
InputStreamReader
(
socket
.
getInputStream
()));
log
.
info
(
"接收到服务端的回复:"
+
in
.
readLine
());
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-kgd-api/src/main/java/com/yeejoin/amos/kgd/config/SocketConfig.java
View file @
e8146499
...
...
@@ -26,6 +26,9 @@ public class SocketConfig {
@Value
(
"${amos.system.socket.port}"
)
private
Integer
port
;
@Value
(
"${amos.system.maas.url}"
)
private
String
hostAndPort
;
private
static
final
ThreadPoolExecutor
threadpool
=
new
ThreadPoolExecutor
(
15
,
15
,
10L
,
TimeUnit
.
SECONDS
,
new
LinkedBlockingQueue
<
Runnable
>());
...
...
@@ -46,7 +49,7 @@ public class SocketConfig {
clientSocket
.
setSoTimeout
(
10000
);
// 创建新线程处理连接
log
.
info
(
"接收到客户端socket: {}"
,
clientSocket
.
getRemoteSocketAddress
());
threadpool
.
execute
(
new
ClientHandler
(
clientSocket
));
threadpool
.
execute
(
new
ClientHandler
(
clientSocket
,
hostAndPort
));
}
}
catch
(
IOException
e
)
{
throw
new
RuntimeException
(
e
);
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-kgd-api/src/main/java/com/yeejoin/amos/kgd/message/Constant.java
View file @
e8146499
...
...
@@ -2,4 +2,7 @@ package com.yeejoin.amos.kgd.message;
public
class
Constant
{
public
static
final
String
REGION
=
"REALTIME"
;
public
static
final
String
TOKEN
=
"Token"
;
public
static
final
String
APPKEY
=
"appKey"
;
public
static
final
String
PRODUCT
=
"product"
;
}
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 @
e8146499
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
controller
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizFanHealthIndexDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanPointTag
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanWarningRecord
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvPointTag
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvWarningRecord
;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizFanPointTagMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizPvPointTagMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.IdxBizFanHealthIndexServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -14,6 +22,9 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.ws.rs.POST
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -31,6 +42,10 @@ public class IdxBizFanHealthIndexController extends BaseController {
@Autowired
IdxBizFanHealthIndexServiceImpl
idxBizFanHealthIndexServiceImpl
;
@Autowired
IdxBizFanPointTagMapper
idxBizFanPointTagMapper
;
@Autowired
IdxBizPvPointTagMapper
idxBizPvPointTagMapper
;
/**
* 新增
*
...
...
@@ -154,11 +169,44 @@ public class IdxBizFanHealthIndexController extends BaseController {
return
ResponseHelper
.
buildResponse
(
idxBizFanHealthIndexServiceImpl
.
queryForLeftTableListByPointNum
(
STATION
,
HEALTHLEVEL
,
EQUIPMENTNAME
,
POINTNAME
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"预警监测设备级统计"
,
notes
=
"预警监测设备级统计"
)
@GetMapping
(
value
=
"/queryForPointNum"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
queryForLeftTableListByPointNum
(
@RequestParam
(
required
=
false
)
String
STATION
,
@RequestParam
(
required
=
false
)
String
SUBARRAY
,
@RequestParam
(
required
=
false
)
String
EQUIPMENTNAME
)
{
List
<
IdxBizFanWarningRecord
>
idxBizPvWarningRecordList
=
idxBizFanHealthIndexServiceImpl
.
warningData
(
STATION
,
SUBARRAY
,
EQUIPMENTNAME
);
int
total
=
idxBizFanHealthIndexServiceImpl
.
pointNum
(
STATION
,
SUBARRAY
,
EQUIPMENTNAME
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map1
=
new
HashMap
<>();
Map
<
String
,
Object
>
warningNum
=
new
HashMap
<>();
warningNum
.
put
(
"name"
,
"注意"
);
warningNum
.
put
(
"value"
,
idxBizPvWarningRecordList
.
stream
().
filter
(
e
->
e
.
getWarningName
().
equals
(
"注意"
)).
count
());
map
.
put
(
"name"
,
"警告"
);
map
.
put
(
"value"
,
idxBizPvWarningRecordList
.
stream
().
filter
(
e
->
e
.
getWarningName
().
equals
(
"警告"
)).
count
());
map1
.
put
(
"name"
,
"危险"
);
map1
.
put
(
"value"
,
idxBizPvWarningRecordList
.
stream
().
filter
(
e
->
e
.
getWarningName
().
equals
(
"危险"
)).
count
());
Map
<
String
,
Object
>
pointNum
=
new
HashMap
<>();
pointNum
.
put
(
"name"
,
"正常"
);
pointNum
.
put
(
"value"
,
total
-
idxBizPvWarningRecordList
.
size
());
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
list
.
add
(
pointNum
);
list
.
add
(
map1
);
list
.
add
(
map
);
list
.
add
(
warningNum
);
return
ResponseHelper
.
buildResponse
(
list
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"测点运行趋势图"
,
notes
=
"测点运行趋势图"
)
@GetMapping
(
value
=
"/getqyt"
)
public
ResponseModel
<
Object
>
getqyt
(
int
type
,
String
type
,
String
address
,
String
statioName
,
String
equipmentName
,
...
...
@@ -172,4 +220,60 @@ public class IdxBizFanHealthIndexController extends BaseController {
return
ResponseHelper
.
buildResponse
(
idxBizFanHealthIndexServiceImpl
.
getqyt
(
type
,
address
,
statioName
,
equipmentName
,
arae
,
startTime
,
endTime
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"工况字典详情"
,
notes
=
"工况字典详情"
)
@GetMapping
(
value
=
"/getZDXQ"
)
public
ResponseModel
<
Object
>
getZDXQ
(
String
type
,
String
id
)
{
Object
object
=
null
;
if
(
type
.
equals
(
"1"
)){
object
=
idxBizPvPointTagMapper
.
selectById
(
id
);
}
else
{
object
=
idxBizFanPointTagMapper
.
selectById
(
id
);
}
return
ResponseHelper
.
buildResponse
(
object
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"工况字典修改"
,
notes
=
"工况字典修改"
)
@PostMapping
(
value
=
"/updateZDXQ"
)
public
ResponseModel
<
Object
>
updateZDXQ
(
String
type
,
String
id
,
String
pointDirection
,
String
tagCode
)
{
if
(
type
.
equals
(
"1"
)){
IdxBizPvPointTag
object
=
idxBizPvPointTagMapper
.
selectById
(
id
);
LambdaUpdateWrapper
<
IdxBizPvPointTag
>
UpdateWrapper
=
new
LambdaUpdateWrapper
();
UpdateWrapper
.
eq
(
object
.
getArae
()!=
null
,
IdxBizPvPointTag:
:
getArae
,
object
.
getArae
());
UpdateWrapper
.
eq
(
object
.
getStation
()!=
null
,
IdxBizPvPointTag:
:
getStation
,
object
.
getStation
());
UpdateWrapper
.
eq
(
object
.
getDeviceType
()!=
null
,
IdxBizPvPointTag:
:
getDeviceType
,
object
.
getDeviceType
());
UpdateWrapper
.
eq
(
object
.
getManufacturer
()!=
null
,
IdxBizPvPointTag:
:
getManufacturer
,
object
.
getManufacturer
());
UpdateWrapper
.
eq
(
object
.
getPointName
()!=
null
,
IdxBizPvPointTag:
:
getPointName
,
object
.
getPointName
());
UpdateWrapper
.
set
(
pointDirection
!=
null
,
IdxBizPvPointTag:
:
getPointDirection
,
pointDirection
);
UpdateWrapper
.
set
(
tagCode
!=
null
,
IdxBizPvPointTag:
:
getTagCode
,
tagCode
);
idxBizPvPointTagMapper
.
update
(
null
,
UpdateWrapper
);
}
else
{
IdxBizFanPointTag
object
=
idxBizFanPointTagMapper
.
selectById
(
id
);
LambdaUpdateWrapper
<
IdxBizFanPointTag
>
UpdateWrapper
=
new
LambdaUpdateWrapper
();
UpdateWrapper
.
eq
(
object
.
getArae
()!=
null
,
IdxBizFanPointTag:
:
getArae
,
object
.
getArae
());
UpdateWrapper
.
eq
(
object
.
getStation
()!=
null
,
IdxBizFanPointTag:
:
getStation
,
object
.
getStation
());
UpdateWrapper
.
eq
(
object
.
getNumber
()!=
null
,
IdxBizFanPointTag:
:
getNumber
,
object
.
getNumber
());
UpdateWrapper
.
eq
(
object
.
getPointName
()!=
null
,
IdxBizFanPointTag:
:
getPointName
,
object
.
getPointName
());
UpdateWrapper
.
set
(
pointDirection
!=
null
,
IdxBizFanPointTag:
:
getPointDirection
,
pointDirection
);
UpdateWrapper
.
set
(
tagCode
!=
null
,
IdxBizFanPointTag:
:
getTagCode
,
tagCode
);
idxBizFanPointTagMapper
.
update
(
null
,
UpdateWrapper
);
}
return
ResponseHelper
.
buildResponse
(
null
);
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/IdxBizFanWarningRecordController.java
View file @
e8146499
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
controller
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizFanWarningRecordDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanWarningRecord
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanWarningRuleSet
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.IdxBizFanWarningRecordServiceImpl
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.IdxBizFanWarningRuleSetServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.beanutils.BeanMap
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
...
...
@@ -14,7 +23,9 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
*
...
...
@@ -30,6 +41,9 @@ public class IdxBizFanWarningRecordController extends BaseController {
@Autowired
IdxBizFanWarningRecordServiceImpl
idxBizFanWarningRecordServiceImpl
;
@Autowired
IdxBizFanWarningRuleSetServiceImpl
idxBizFanWarningRuleSetService
;
/**
* 新增
*
...
...
@@ -112,4 +126,68 @@ public class IdxBizFanWarningRecordController extends BaseController {
public
ResponseModel
<
List
<
IdxBizFanWarningRecordDto
>>
selectForList
()
{
return
ResponseHelper
.
buildResponse
(
idxBizFanWarningRecordServiceImpl
.
queryForIdxBizFanWarningRecordList
());
}
/**
* 根据sequenceNbr查询
*
* @param ANALYSISPOINTID 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getInfoByPointId"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据ANALYSIS_POINT_ID查询单个"
,
notes
=
"根据ANALYSIS_POINT_ID查询单个"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getInfoByPointId
(
@RequestParam
String
ANALYSISPOINTID
)
{
LambdaQueryWrapper
<
IdxBizFanWarningRuleSet
>
query
=
new
LambdaQueryWrapper
<>();
query
.
eq
(
IdxBizFanWarningRuleSet:
:
getAnalysisPointId
,
ANALYSISPOINTID
);
List
<
IdxBizFanWarningRuleSet
>
idxBizFanWarningRecordList
=
idxBizFanWarningRuleSetService
.
getBaseMapper
().
selectList
(
query
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
for
(
int
i
=
0
;
i
<
idxBizFanWarningRecordList
.
size
();
i
++)
{
IdxBizFanWarningRuleSet
idxBizFanWarningRecord
=
idxBizFanWarningRecordList
.
get
(
i
);
if
(
idxBizFanWarningRecord
.
getWarningName
().
equals
(
"注意"
)){
map
.
putAll
(
BeanUtil
.
beanToMap
(
idxBizFanWarningRecord
));
}
else
if
(
idxBizFanWarningRecord
.
getWarningName
().
equals
(
"警告"
)){
//警告周期
map
.
put
(
"jgWarningCycle"
,
idxBizFanWarningRecord
.
getWarningCycle
());
map
.
put
(
"jgWarningIf"
,
idxBizFanWarningRecord
.
getWarningIf
());
}
else
if
(
idxBizFanWarningRecord
.
getWarningName
().
equals
(
"危险"
)){
//警告周期
map
.
put
(
"wxWarningCycle"
,
idxBizFanWarningRecord
.
getWarningCycle
());
map
.
put
(
"wxWarningIf"
,
idxBizFanWarningRecord
.
getWarningIf
());
}
}
return
ResponseHelper
.
buildResponse
(
map
);
}
/**
* 根据pointId修改信息
*
* @param analysisInfo 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/updateByPointInfo"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"根据pointId修改信息"
,
notes
=
"根据pointId修改信息"
)
public
ResponseModel
<
Boolean
>
updateByPointInfo
(
@RequestBody
JSONObject
analysisInfo
)
{
LambdaQueryWrapper
<
IdxBizFanWarningRuleSet
>
query
=
new
LambdaQueryWrapper
<>();
query
.
eq
(
IdxBizFanWarningRuleSet:
:
getAnalysisPointId
,
analysisInfo
.
get
(
"analysisPointId"
));
List
<
IdxBizFanWarningRuleSet
>
idxBizFanWarningRecordList
=
idxBizFanWarningRuleSetService
.
getBaseMapper
().
selectList
(
query
);
for
(
IdxBizFanWarningRuleSet
idxBizFanWarningRuleSet
:
idxBizFanWarningRecordList
)
{
BeanUtil
.
copyProperties
(
analysisInfo
,
idxBizFanWarningRuleSet
,
"sequenceNbr"
,
"warningName"
);
if
(
idxBizFanWarningRuleSet
.
getWarningName
().
equals
(
"警告"
))
{
//警告周期
idxBizFanWarningRuleSet
.
setWarningIf
(
analysisInfo
.
get
(
"jgWarningIf"
).
toString
());
idxBizFanWarningRuleSet
.
setWarningCycle
(
analysisInfo
.
get
(
"jgWarningCycle"
).
toString
());
}
else
if
(
idxBizFanWarningRuleSet
.
getWarningName
().
equals
(
"危险"
))
{
//警告周期
idxBizFanWarningRuleSet
.
setWarningIf
(
analysisInfo
.
get
(
"wxWarningIf"
).
toString
());
idxBizFanWarningRuleSet
.
setWarningCycle
(
analysisInfo
.
get
(
"wxWarningCycle"
).
toString
());
}
}
boolean
b
=
idxBizFanWarningRuleSetService
.
updateBatchById
(
idxBizFanWarningRecordList
);
return
ResponseHelper
.
buildResponse
(
b
);
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/IdxBizPvHealthIndexController.java
View file @
e8146499
...
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jxiop.biz.controller;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizPvHealthIndexDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvWarningRecord
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.IdxBizPvHealthIndexServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -166,20 +167,30 @@ public class IdxBizPvHealthIndexController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"预警监测设备级统计"
,
notes
=
"预警监测设备级统计"
)
@GetMapping
(
value
=
"/queryForPointNum"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
queryForLeftTableListByPointNum
(
@RequestParam
(
required
=
false
)
String
STATION
,
@RequestParam
(
required
=
false
)
String
SUBARRAY
,
@RequestParam
(
required
=
false
)
String
EQUIPMENTNAME
)
{
List
<
Map
<
String
,
Object
>>
maps
=
idxBizPvHealthIndexServiceImpl
.
warningData
(
STATION
,
SUBARRAY
,
EQUIPMENTNAME
);
List
<
IdxBizPvWarningRecord
>
idxBizPvWarningRecordList
=
idxBizPvHealthIndexServiceImpl
.
warningData
(
STATION
,
SUBARRAY
,
EQUIPMENTNAME
);
int
total
=
idxBizPvHealthIndexServiceImpl
.
pointNum
(
STATION
,
SUBARRAY
,
EQUIPMENTNAME
);
Map
<
String
,
Object
>
warningNum
=
new
HashMap
<>();
warningNum
.
put
(
"name"
,
"异常"
);
warningNum
.
put
(
"value"
,
maps
.
size
());
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map1
=
new
HashMap
<>();
Map
<
String
,
Object
>
warningNum
=
new
HashMap
<>();
warningNum
.
put
(
"name"
,
"注意"
);
warningNum
.
put
(
"value"
,
idxBizPvWarningRecordList
.
stream
().
filter
(
e
->
e
.
getWarningName
().
equals
(
"注意"
)).
count
());
map
.
put
(
"name"
,
"警告"
);
map
.
put
(
"value"
,
idxBizPvWarningRecordList
.
stream
().
filter
(
e
->
e
.
getWarningName
().
equals
(
"警告"
)).
count
());
map1
.
put
(
"name"
,
"危险"
);
map1
.
put
(
"value"
,
idxBizPvWarningRecordList
.
stream
().
filter
(
e
->
e
.
getWarningName
().
equals
(
"危险"
)).
count
());
Map
<
String
,
Object
>
pointNum
=
new
HashMap
<>();
pointNum
.
put
(
"name"
,
"正常"
);
pointNum
.
put
(
"value"
,
total
-
maps
.
size
());
pointNum
.
put
(
"value"
,
total
-
idxBizPvWarningRecordList
.
size
());
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
list
.
add
(
pointNum
);
list
.
add
(
warningNum
);
list
.
add
(
map1
);
list
.
add
(
map
);
return
ResponseHelper
.
buildResponse
(
list
);
}
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/entity/IdxBizFanPointTag.java
View file @
e8146499
...
...
@@ -90,10 +90,15 @@ public class IdxBizFanPointTag{
@TableField
(
"ARAE"
)
private
String
arae
;
// /**
// * 网关ID
// */
// @TableField("GATEWAY_ID")
// private Integer gatewayId;
/**
*
网关ID
*
变量方向
*/
@TableField
(
"GATEWAY_ID
"
)
private
Integer
gatewayId
;
@TableField
(
"POINT_DIRECTION
"
)
private
Integer
pointDirection
;
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/entity/IdxBizFanWarningRuleSet.java
View file @
e8146499
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
entity
;
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 +28,7 @@ public class IdxBizFanWarningRuleSet{
/**
*
*/
@Table
Fiel
d
(
"SEQUENCE_NBR"
)
@Table
I
d
(
"SEQUENCE_NBR"
)
private
String
sequenceNbr
;
/**
...
...
@@ -120,4 +121,7 @@ public class IdxBizFanWarningRuleSet{
@TableField
(
"EQUIPMENT_NAME"
)
private
String
equipmentName
;
@TableField
(
"POINT_NAME"
)
private
String
pointName
;
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/entity/IdxBizPvPointTag.java
View file @
e8146499
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
entity
;
import
cn.com.vastbase.jdbc.NUMBER
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
...
...
@@ -65,11 +66,11 @@ public class IdxBizPvPointTag{
@TableField
(
"TAG_CODE"
)
private
String
tagCode
;
/**
* 网关ID
*/
@TableField
(
"GATEWAY_ID"
)
private
Integer
gatewayId
;
//
/**
//
* 网关ID
//
*/
//
@TableField("GATEWAY_ID")
//
private Integer gatewayId;
/**
* 测点
...
...
@@ -100,5 +101,12 @@ public class IdxBizPvPointTag{
*/
@TableField
(
"MANUFACTURER"
)
private
String
manufacturer
;
/**
* 变量方向
*/
@TableField
(
"POINT_DIRECTION"
)
private
String
pointDirection
;
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/entity/IdxBizPvWarningRuleSet.java
View file @
e8146499
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
entity
;
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 +28,7 @@ public class IdxBizPvWarningRuleSet{
/**
*
*/
@Table
Fiel
d
(
"SEQUENCE_NBR"
)
@Table
I
d
(
"SEQUENCE_NBR"
)
private
String
sequenceNbr
;
/**
...
...
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 @
e8146499
...
...
@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSON;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
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.RedisUtils
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.*
;
...
...
@@ -198,12 +199,12 @@ public class KafkaConsumerService {
List
<
IdxBizFanPointVarCentralValue
>
insertList
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
length
;
i
++)
{
IdxBizFanPointVarCentralValue
idxBizFanPointVarCentralValue
=
new
IdxBizFanPointVarCentralValue
();
idxBizFanPointVarCentralValue
.
setProcess1Min
(
jsonObject
.
getJSONArray
(
"process1Min"
).
getDoubleValue
(
i
));
idxBizFanPointVarCentralValue
.
setProcess2Min
(
jsonObject
.
getJSONArray
(
"process2Min"
).
getDoubleValue
(
i
));
idxBizFanPointVarCentralValue
.
setProcess3Min
(
jsonObject
.
getJSONArray
(
"process3Min"
).
getDoubleValue
(
i
));
idxBizFanPointVarCentralValue
.
setProcess1Max
(
jsonObject
.
getJSONArray
(
"process1Max"
).
getDoubleValue
(
i
));
idxBizFanPointVarCentralValue
.
setPorcess2Max
(
jsonObject
.
getJSONArray
(
"process2Max"
).
getDoubleValue
(
i
));
idxBizFanPointVarCentralValue
.
setProcess3Max
(
jsonObject
.
getJSONArray
(
"process3Max"
).
getDoubleValue
(
i
));
idxBizFanPointVarCentralValue
.
setProcess1Min
(
ObjectUtils
.
isNull
(
jsonObject
.
getJSONArray
(
"process1Min"
).
get
(
i
))
?
null
:
jsonObject
.
getJSONArray
(
"process1Min"
).
getDoubleValue
(
i
));
idxBizFanPointVarCentralValue
.
setProcess2Min
(
ObjectUtils
.
isNull
(
jsonObject
.
getJSONArray
(
"process2Min"
).
get
(
i
))
?
null
:
jsonObject
.
getJSONArray
(
"process2Min"
).
getDoubleValue
(
i
));
idxBizFanPointVarCentralValue
.
setProcess3Min
(
ObjectUtils
.
isNull
(
jsonObject
.
getJSONArray
(
"process3Min"
).
get
(
i
))
?
null
:
jsonObject
.
getJSONArray
(
"process3Min"
).
getDoubleValue
(
i
));
idxBizFanPointVarCentralValue
.
setProcess1Max
(
ObjectUtils
.
isNull
(
jsonObject
.
getJSONArray
(
"process1Max"
).
get
(
i
))
?
null
:
jsonObject
.
getJSONArray
(
"process1Max"
).
getDoubleValue
(
i
));
idxBizFanPointVarCentralValue
.
setPorcess2Max
(
ObjectUtils
.
isNull
(
jsonObject
.
getJSONArray
(
"process2Max"
).
get
(
i
))
?
null
:
jsonObject
.
getJSONArray
(
"process2Max"
).
getDoubleValue
(
i
));
idxBizFanPointVarCentralValue
.
setProcess3Max
(
ObjectUtils
.
isNull
(
jsonObject
.
getJSONArray
(
"process3Max"
).
get
(
i
))
?
null
:
jsonObject
.
getJSONArray
(
"process3Max"
).
getDoubleValue
(
i
));
idxBizFanPointVarCentralValue
.
setAnalysisPointId
(
analysisVariableId
);
idxBizFanPointVarCentralValue
.
setAnalysisPointName
(
analysisVariable
.
getPointName
());
idxBizFanPointVarCentralValue
.
setProcessPoint1Id
(
data1
.
get
(
"processVariable1Id"
).
toString
());
...
...
@@ -212,8 +213,8 @@ public class KafkaConsumerService {
idxBizFanPointVarCentralValue
.
setProcessPoint2Name
(
processVariableList
.
get
(
1
).
getPointName
());
idxBizFanPointVarCentralValue
.
setProcessPoint3Id
(
data1
.
get
(
"processVariable3Id"
).
toString
());
idxBizFanPointVarCentralValue
.
setProcessPoint3Name
(
processVariableList
.
get
(
2
).
getPointName
());
idxBizFanPointVarCentralValue
.
setAnalysisStdDev
(
jsonObject
.
getJSONArray
(
"stdDev"
).
getDoubleValue
(
i
));
idxBizFanPointVarCentralValue
.
setAnalysisCenterValue
(
jsonObject
.
getJSONArray
(
"centerValue"
).
getDoubleValue
(
i
));
idxBizFanPointVarCentralValue
.
setAnalysisStdDev
(
ObjectUtils
.
isNull
(
jsonObject
.
getJSONArray
(
"stdDev"
).
get
(
i
))
?
null
:
jsonObject
.
getJSONArray
(
"stdDev"
).
getDoubleValue
(
i
));
idxBizFanPointVarCentralValue
.
setAnalysisCenterValue
(
ObjectUtils
.
isNull
(
jsonObject
.
getJSONArray
(
"centerValue"
).
get
(
i
))
?
null
:
jsonObject
.
getJSONArray
(
"centerValue"
).
getDoubleValue
(
i
));
idxBizFanPointVarCentralValue
.
setArae
(
analysisVariable
.
getArae
());
idxBizFanPointVarCentralValue
.
setStation
(
analysisVariable
.
getStation
());
idxBizFanPointVarCentralValue
.
setSubSystem
(
analysisVariable
.
getSubSystem
());
...
...
@@ -835,12 +836,12 @@ public class KafkaConsumerService {
List
<
IdxBizPvPointVarCentralValue
>
insertList
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
length
;
i
++)
{
IdxBizPvPointVarCentralValue
idxBizPvPointVarCentralValue
=
new
IdxBizPvPointVarCentralValue
();
idxBizPvPointVarCentralValue
.
setProcess1Min
(
jsonObject
.
getJSONArray
(
"process1Min"
).
getDoubleValue
(
i
));
idxBizPvPointVarCentralValue
.
setProcess2Min
(
jsonObject
.
getJSONArray
(
"process2Min"
).
getDoubleValue
(
i
));
idxBizPvPointVarCentralValue
.
setProcess3Min
(
jsonObject
.
getJSONArray
(
"process3Min"
).
getDoubleValue
(
i
));
idxBizPvPointVarCentralValue
.
setProcess1Max
(
jsonObject
.
getJSONArray
(
"process1Max"
).
getDoubleValue
(
i
));
idxBizPvPointVarCentralValue
.
setProcess2Max
(
jsonObject
.
getJSONArray
(
"process2Max"
).
getDoubleValue
(
i
));
idxBizPvPointVarCentralValue
.
setProcess3Max
(
jsonObject
.
getJSONArray
(
"process3Max"
).
getDoubleValue
(
i
));
idxBizPvPointVarCentralValue
.
setProcess1Min
(
ObjectUtils
.
isNull
(
jsonObject
.
getJSONArray
(
"process1Min"
).
get
(
i
))
?
null
:
jsonObject
.
getJSONArray
(
"process1Min"
).
getDoubleValue
(
i
));
idxBizPvPointVarCentralValue
.
setProcess2Min
(
ObjectUtils
.
isNull
(
jsonObject
.
getJSONArray
(
"process2Min"
).
get
(
i
))
?
null
:
jsonObject
.
getJSONArray
(
"process2Min"
).
getDoubleValue
(
i
));
idxBizPvPointVarCentralValue
.
setProcess3Min
(
ObjectUtils
.
isNull
(
jsonObject
.
getJSONArray
(
"process3Min"
).
get
(
i
))
?
null
:
jsonObject
.
getJSONArray
(
"process3Min"
).
getDoubleValue
(
i
));
idxBizPvPointVarCentralValue
.
setProcess1Max
(
ObjectUtils
.
isNull
(
jsonObject
.
getJSONArray
(
"process1Max"
).
get
(
i
))
?
null
:
jsonObject
.
getJSONArray
(
"process1Max"
).
getDoubleValue
(
i
));
idxBizPvPointVarCentralValue
.
setProcess2Max
(
ObjectUtils
.
isNull
(
jsonObject
.
getJSONArray
(
"process2Max"
).
get
(
i
))
?
null
:
jsonObject
.
getJSONArray
(
"process2Max"
).
getDoubleValue
(
i
));
idxBizPvPointVarCentralValue
.
setProcess3Max
(
ObjectUtils
.
isNull
(
jsonObject
.
getJSONArray
(
"process3Max"
).
get
(
i
))
?
null
:
jsonObject
.
getJSONArray
(
"process3Max"
).
getDoubleValue
(
i
));
idxBizPvPointVarCentralValue
.
setAnalysisPointId
(
jsonObject
.
getString
(
"analysisVariableId"
));
idxBizPvPointVarCentralValue
.
setAnalysisPointIdName
(
analysisVariable
.
getPointName
());
idxBizPvPointVarCentralValue
.
setProcessPoint1Id
(
jsonObject
.
getString
(
"processVariable1Id"
));
...
...
@@ -849,8 +850,8 @@ public class KafkaConsumerService {
idxBizPvPointVarCentralValue
.
setProcessPoint2IdName
(
processVariableList
.
get
(
1
).
getPointName
());
idxBizPvPointVarCentralValue
.
setProcessPoint3Id
(
jsonObject
.
getString
(
"processVariable3Id"
));
idxBizPvPointVarCentralValue
.
setProcessPoint3IdName
(
processVariableList
.
get
(
2
).
getPointName
());
idxBizPvPointVarCentralValue
.
setAnalysisStdDev
(
jsonObject
.
getJSONArray
(
"stdDev"
).
getDoubleValue
(
i
));
idxBizPvPointVarCentralValue
.
setAnalysisCenterValue
(
jsonObject
.
getJSONArray
(
"centerValue"
).
getDoubleValue
(
i
));
idxBizPvPointVarCentralValue
.
setAnalysisStdDev
(
ObjectUtils
.
isNull
(
jsonObject
.
getJSONArray
(
"stdDev"
).
get
(
i
))
?
null
:
jsonObject
.
getJSONArray
(
"stdDev"
).
getDoubleValue
(
i
));
idxBizPvPointVarCentralValue
.
setAnalysisCenterValue
(
ObjectUtils
.
isNull
(
jsonObject
.
getJSONArray
(
"centerValue"
).
get
(
i
))
?
null
:
jsonObject
.
getJSONArray
(
"centerValue"
).
getDoubleValue
(
i
));
idxBizPvPointVarCentralValue
.
setArae
(
analysisVariable
.
getArae
());
idxBizPvPointVarCentralValue
.
setStation
(
analysisVariable
.
getStation
());
idxBizPvPointVarCentralValue
.
setSubarray
(
analysisVariable
.
getSubarray
());
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/mapper2/IdxBizFanHealthIndexMapper.java
View file @
e8146499
...
...
@@ -5,6 +5,8 @@ import com.yeejoin.amos.boot.module.jxiop.biz.dto.FullViewRecallDataDTO;
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.IdxBizFanHealthLevel
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanWarningRecord
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvWarningRecord
;
import
org.apache.ibatis.annotations.Param
;
import
java.math.BigDecimal
;
...
...
@@ -113,4 +115,9 @@ public interface IdxBizFanHealthIndexMapper extends BaseMapper<IdxBizFanHealthIn
Map
<
String
,
Object
>
queryForLeftTableListByPointNum
(
String
STATION
,
String
HEALTHLEVEL
,
String
EQUIPMENTNAME
,
String
POINTNAME
);
List
<
IdxBizFanWarningRecord
>
warningData
(
String
STATION
,
String
SUBARRAY
,
String
EQUIPMENTNAME
);
Integer
pointNum
(
String
STATION
,
String
SUBARRAY
,
String
EQUIPMENTNAME
);
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/mapper2/IdxBizPvHealthIndexMapper.java
View file @
e8146499
...
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jxiop.biz.mapper2;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizPvHealthIndexDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvHealthIndex
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvWarningRecord
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -27,7 +28,7 @@ public interface IdxBizPvHealthIndexMapper extends BaseMapper<IdxBizPvHealthInde
int
queryForLeftTableListByPointCount
(
String
STATION
,
String
SUBARRAY
,
String
HEALTHLEVEL
,
String
EQUIPMENTNAME
,
String
POINTNAME
);
List
<
Map
<
String
,
Object
>
>
warningData
(
String
STATION
,
String
SUBARRAY
,
String
EQUIPMENTNAME
);
List
<
IdxBizPvWarningRecord
>
warningData
(
String
STATION
,
String
SUBARRAY
,
String
EQUIPMENTNAME
);
Integer
pointNum
(
String
STATION
,
String
SUBARRAY
,
String
EQUIPMENTNAME
);
...
...
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 @
e8146499
...
...
@@ -1529,7 +1529,11 @@ public class CommonServiceImpl {
value4
=
datum
.
getCurrentValue
()
==
null
?
0.0
:
datum
.
getCurrentValue
();
}
}
if
(
idxBizUhef
.
getProcess1Min
()
<=
value1
&&
value1
<=
idxBizUhef
.
getProcess1Max
()
&&
idxBizUhef
.
getProcess2Min
()
<=
value2
&&
value2
<=
idxBizUhef
.
getPorcess2Max
()
&&
idxBizUhef
.
getProcess3Min
()
<=
value3
&&
value3
<=
idxBizUhef
.
getProcess3Max
())
{
if
((
null
==
idxBizUhef
.
getProcess1Min
()
||
idxBizUhef
.
getProcess1Min
()
<=
value1
)
&&
(
value1
<=
idxBizUhef
.
getProcess1Max
()
||
null
==
idxBizUhef
.
getProcess1Max
())
&&(
null
==
idxBizUhef
.
getProcess2Min
()
||
idxBizUhef
.
getProcess2Min
()
<=
value2
)
&&
(
null
==
idxBizUhef
.
getPorcess2Max
()
||
value2
<=
idxBizUhef
.
getPorcess2Max
())
&&(
null
==
idxBizUhef
.
getProcess3Min
()
||
idxBizUhef
.
getProcess3Min
()
<=
value3
)
&&
(
null
==
idxBizUhef
.
getProcess3Max
()
||
value3
<=
idxBizUhef
.
getProcess3Max
()))
{
if
(!
analysisVariableIdList
.
contains
(
idxBizUhef
.
getAnalysisPointId
())){
analysisVariableList
.
add
(
value4
);
stdDevList
.
add
(
idxBizUhef
.
getAnalysisStdDev
());
...
...
@@ -1682,7 +1686,9 @@ public class CommonServiceImpl {
value4
=
datum
.
getCurrentValue
();
}
}
if
(
idxBizUhef
.
getProcess1Min
()
<=
value1
&&
value1
<=
idxBizUhef
.
getProcess1Max
()
&&
idxBizUhef
.
getProcess2Min
()
<=
value2
&&
value2
<=
idxBizUhef
.
getProcess2Max
()
&&
idxBizUhef
.
getProcess3Min
()
<=
value3
&&
value3
<=
idxBizUhef
.
getProcess3Max
())
{
if
((
null
==
idxBizUhef
.
getProcess1Min
()
||
idxBizUhef
.
getProcess1Min
()
<=
value1
)
&&
(
value1
<=
idxBizUhef
.
getProcess1Max
()
||
null
==
idxBizUhef
.
getProcess1Max
())
&&(
null
==
idxBizUhef
.
getProcess2Min
()
||
idxBizUhef
.
getProcess2Min
()
<=
value2
)
&&
(
null
==
idxBizUhef
.
getProcess2Max
()
||
value2
<=
idxBizUhef
.
getProcess2Max
())
&&(
null
==
idxBizUhef
.
getProcess3Min
()
||
idxBizUhef
.
getProcess3Min
()
<=
value3
)
&&
(
null
==
idxBizUhef
.
getProcess3Max
()
||
value3
<=
idxBizUhef
.
getProcess3Max
()))
{
if
(!
analysisVariableIdList
.
contains
(
idxBizUhef
.
getAnalysisPointId
())){
analysisVariableList
.
add
(
value4
);
stdDevList
.
add
(
idxBizUhef
.
getAnalysisStdDev
());
...
...
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 @
e8146499
...
...
@@ -66,18 +66,19 @@ public class IdxBizFanHealthIndexServiceImpl extends BaseService<IdxBizFanHealth
public
Object
getqyt
(
int
type
,
String
address
,
String
statioName
,
String
equipmentName
,
String
arae
,
String
startTime
,
String
endTime
){
public
Object
getqyt
(
String
type
,
String
address
,
String
statioName
,
String
equipmentName
,
String
arae
,
String
startTime
,
String
endTime
){
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
try
{
//获取场站网关
String
tdid
=
null
;
if
(
type
==
1
){
if
(
type
.
equals
(
"1"
)
){
IdxBizPvPointProcessVariableClassification
idxBizPvPointProcessVariableClassification
=
idxBizPvPointProcessVariableClassificationMapper
.
selectOne
(
new
QueryWrapper
<
IdxBizPvPointProcessVariableClassification
>()
.
eq
(
"INDEX_ADDRESS"
,
address
)
.
eq
(
"STATION"
,
statioName
)
.
eq
(
"EQUIPMENT_NAME"
,
equipmentName
)
.
eq
(
"ARAE"
,
arae
)
.
last
(
"limit 1"
)
);
tdid
=
address
+
"_"
+
idxBizPvPointProcessVariableClassification
.
getGatewayId
();
}
else
{
...
...
@@ -87,6 +88,7 @@ public class IdxBizFanHealthIndexServiceImpl extends BaseService<IdxBizFanHealth
.
eq
(
"STATION"
,
statioName
)
.
eq
(
"EQUIPMENT_NAME"
,
equipmentName
)
.
eq
(
"ARAE"
,
arae
)
.
last
(
"limit 1"
)
);
tdid
=
address
+
"_"
+
idxBizFanPointProcessVariableClassification
.
getGatewayId
();
}
...
...
@@ -114,7 +116,7 @@ public class IdxBizFanHealthIndexServiceImpl extends BaseService<IdxBizFanHealth
List
<
String
>
activePowers
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
indicatorDataListActivePowers
.
size
();
i
++)
{
activePowers
.
add
(
indicatorDataListActivePowers
.
get
(
i
).
getValue
());
axisData
.
add
(
DateUtil
.
format
(
indicatorDataListActivePowers
.
get
(
i
).
getCreatedTime
(),
"
HH:mm
"
));
axisData
.
add
(
DateUtil
.
format
(
indicatorDataListActivePowers
.
get
(
i
).
getCreatedTime
(),
"
yyyy-MM-dd HH:mm:ss
"
));
}
// List<Map<String, Object>> seriesData = new ArrayList<>();
...
...
@@ -144,6 +146,14 @@ public class IdxBizFanHealthIndexServiceImpl extends BaseService<IdxBizFanHealth
return
this
.
getBaseMapper
().
queryForLeftTableListByPointNum
(
STATION
,
HEALTHLEVEL
,
EQUIPMENTNAME
,
POINTNAME
);
}
public
int
pointNum
(
String
STATION
,
String
SUBARRAY
,
String
EQUIPMENTNAME
)
{
return
this
.
getBaseMapper
().
pointNum
(
STATION
,
SUBARRAY
,
EQUIPMENTNAME
);
}
public
List
<
IdxBizFanWarningRecord
>
warningData
(
String
STATION
,
String
SUBARRAY
,
String
EQUIPMENTNAME
)
{
return
this
.
getBaseMapper
().
warningData
(
STATION
,
SUBARRAY
,
EQUIPMENTNAME
);
}
}
\ No newline at end of file
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/IdxBizPvHealthIndexServiceImpl.java
View file @
e8146499
...
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jxiop.biz.service.impl;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizPvHealthIndexDto
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvHealthIndex
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvWarningRecord
;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizPvHealthIndexMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.IIdxBizPvHealthIndexService
;
import
org.springframework.stereotype.Service
;
...
...
@@ -61,7 +62,7 @@ public class IdxBizPvHealthIndexServiceImpl extends BaseService<IdxBizPvHealthIn
return
this
.
getBaseMapper
().
pointNum
(
STATION
,
SUBARRAY
,
EQUIPMENTNAME
);
}
public
List
<
Map
<
String
,
Object
>
>
warningData
(
String
STATION
,
String
SUBARRAY
,
String
EQUIPMENTNAME
)
{
public
List
<
IdxBizPvWarningRecord
>
warningData
(
String
STATION
,
String
SUBARRAY
,
String
EQUIPMENTNAME
)
{
return
this
.
getBaseMapper
().
warningData
(
STATION
,
SUBARRAY
,
EQUIPMENTNAME
);
}
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/cluster/IdxBizFanHealthIndexMapper.xml
View file @
e8146499
...
...
@@ -231,7 +231,7 @@
<select
id=
"getHealthInfoByStation"
resultType=
"java.util.Map"
>
SELECT
a.STATION as station,
avg( a.avgHealthIndex
) AS healthIndex
CEILING(avg( a.avgHealthIndex )
) AS healthIndex
FROM
(
SELECT
...
...
@@ -593,7 +593,7 @@
<select
id=
"getPvSubSystemInfo"
resultType=
"java.util.Map"
>
SELECT
IFNULL( AVG( HEALTH_INDEX ), 0
) AS avgHealthIndex,
CEILING(IFNULL( AVG( HEALTH_INDEX ), 100 )
) AS avgHealthIndex,
EQUIPMENT_NAME AS equipmentName
FROM
idx_biz_pv_health_index
...
...
@@ -1171,4 +1171,41 @@
</where>
</select>
<select
id=
"warningData"
resultType=
"com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanWarningRecord"
>
SELECT
*
FROM
idx_biz_fan_warning_record re
WHERE
re.`STATUS` = 0
<if
test=
"EQUIPMENTNAME != '' and EQUIPMENTNAME != null"
>
AND re.EQUIPMENT_NAME = #{EQUIPMENTNAME}
</if>
<if
test=
"SUBARRAY != null and SUBARRAY != '' "
>
AND re.SUBARRAY = #{SUBARRAY}
</if>
<if
test=
"STATION != null and STATION != '' "
>
AND re.STATION = #{STATION}
</if>
</select>
<select
id=
"pointNum"
resultType=
"int"
>
SELECT
count(1)
FROM
idx_biz_fan_point_process_variable_classification cl
WHERE
cl.TAG_CODE = '分析变量'
<if
test=
"EQUIPMENTNAME != '' and EQUIPMENTNAME != null"
>
AND cl.EQUIPMENT_NAME = #{EQUIPMENTNAME}
</if>
<if
test=
"SUBARRAY != null and SUBARRAY != '' "
>
AND cl.SUBARRAY = #{SUBARRAY}
</if>
<if
test=
"STATION != null and STATION != '' "
>
AND cl.STATION = #{STATION}
</if>
</select>
</mapper>
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/cluster/IdxBizPvHealthIndexMapper.xml
View file @
e8146499
...
...
@@ -239,38 +239,31 @@
</select>
<select
id=
"warningData"
resultType=
"map"
>
SELECT * FROM (SELECT
cl. STATION,
cl. SUBARRAY,
cl.EQUIPMENT_NAME
<select
id=
"warningData"
resultType=
"com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvWarningRecord"
>
SELECT
*
FROM
idx_biz_pv_point_process_variable_classification cl
INNER JOIN idx_biz_pv_warning_record re ON re.EQUIPMENT_NAME = cl.EQUIPMENT_NAME AND re.STATION = cl.STATION AND re.SUBARRAY = cl.SUBARRAY
AND re.`STATUS` = 0
idx_biz_pv_warning_record re
WHERE
cl.TAG_CODE = '分析变量'
GROUP BY cl.EQUIPMENT_NAME) a
<where>
<if
test=
"EQUIPMENTNAME != '' and EQUIPMENTNAME != null"
>
AND a.EQUIPMENT_NAME = #{EQUIPMENTNAME}
</if>
<if
test=
"SUBARRAY != null and SUBARRAY != '' "
>
AND a.SUBARRAY = #{SUBARRAY}
</if>
<if
test=
"STATION != null and STATION != '' "
>
AND a.STATION = #{STATION}
</if>
</where>
re.`STATUS` = 0
<if
test=
"EQUIPMENTNAME != '' and EQUIPMENTNAME != null"
>
AND re.EQUIPMENT_NAME = #{EQUIPMENTNAME}
</if>
<if
test=
"SUBARRAY != null and SUBARRAY != '' "
>
AND re.SUBARRAY = #{SUBARRAY}
</if>
<if
test=
"STATION != null and STATION != '' "
>
AND re.STATION = #{STATION}
</if>
</select>
<select
id=
"pointNum"
resultType=
"int"
>
SELECT
count(1)
count(1)
FROM
idx_biz_pv_point_process_variable_classification cl
idx_biz_pv_point_process_variable_classification cl
WHERE
cl.TAG_CODE = '分析变量'
cl.TAG_CODE = '分析变量'
<if
test=
"EQUIPMENTNAME != '' and EQUIPMENTNAME != null"
>
AND cl.EQUIPMENT_NAME = #{EQUIPMENTNAME}
</if>
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/DemoController.java
View file @
e8146499
...
...
@@ -259,12 +259,12 @@ public class DemoController extends BaseController {
equipmentsJxiopDocMysqlList
.
forEach
(
equipmentsJxiopDocMysql
->
{
ESEquipments
esEquipments
=
equipmentsRepository
.
findById
(
equipmentsJxiopDocMysql
.
getId
()).
get
();
//更新模块
if
(
equipmentsJxiopDocMysql
.
getFrontModule
().
contains
(
pointImportDto
.
getFrontModule
()))
{
if
(
!
equipmentsJxiopDocMysql
.
getFrontModule
().
contains
(
pointImportDto
.
getFrontModule
()))
{
equipmentsJxiopDocMysql
.
setFrontModule
(
equipmentsJxiopDocMysql
.
getFrontModule
()
+
","
+
pointImportDto
.
getFrontModule
());
esEquipments
.
setFrontModule
(
equipmentsJxiopDocMysql
.
getFrontModule
()
+
","
+
pointImportDto
.
getFrontModule
());
}
//更新类型
if
(
equipmentsJxiopDocMysql
.
getSystemType
().
contains
(
pointImportDto
.
getSystemType
()))
{
if
(
!
equipmentsJxiopDocMysql
.
getSystemType
().
contains
(
pointImportDto
.
getSystemType
()))
{
equipmentsJxiopDocMysql
.
setSystemType
(
equipmentsJxiopDocMysql
.
getSystemType
()+
","
+
pointImportDto
.
getSystemType
());
esEquipments
.
setSystemType
(
equipmentsJxiopDocMysql
.
getSystemType
()+
","
+
pointImportDto
.
getSystemType
());
}
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-monitor-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/MonitorFanIndicatorImpl.java
View file @
e8146499
...
...
@@ -1378,8 +1378,9 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
Map
<
String
,
List
<
String
>>
queryCodtion
=
new
HashMap
<>();
Map
<
String
,
String
>
likeMap
=
new
HashMap
<>();
queryCodtion
.
put
(
CommonConstans
.
QueryStringGateWayId
,
Arrays
.
asList
(
gatewayId
));
queryCodtion
.
put
(
CommonConstans
.
QueryStringSystemTypeKeyword
,
Arrays
.
asList
(
"模拟量"
));
//
queryCodtion.put(CommonConstans.QueryStringSystemTypeKeyword, Arrays.asList("模拟量"));
likeMap
.
put
(
CommonConstans
.
QueryStringFrontMoudle
,
map
.
get
(
"boosterName"
));
likeMap
.
put
(
CommonConstans
.
QueryStringSystemTypeKeyword
,
"模拟量"
);
if
(
"1主变高压侧"
.
equals
(
map
.
get
(
"boosterName"
))
||
"1主变低压侧"
.
equals
(
map
.
get
(
"boosterName"
)))
{
likeMap
.
put
(
CommonConstans
.
QueryStringFrontMoudle
,
"压侧"
);
List
<
ESEquipments
>
listData
=
commonServiceImpl
.
getListDataByCondtions
(
queryCodtion
,
null
,
ESEquipments
.
class
,
likeMap
);
...
...
@@ -1407,6 +1408,11 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
}
}
else
{
List
<
ESEquipments
>
listData
=
commonServiceImpl
.
getListDataByCondtions
(
queryCodtion
,
null
,
ESEquipments
.
class
,
likeMap
);
Integer
traceIdCount
=
listData
.
stream
().
filter
(
esEquipments
->
!
StringUtils
.
isEmpty
(
esEquipments
.
getTraceId
())).
collect
(
Collectors
.
toList
()).
size
();
if
(
traceIdCount
>
0
)
{
listData
=
listData
.
stream
().
filter
(
esEquipments
->
!
StringUtils
.
isEmpty
(
esEquipments
.
getTraceId
())).
collect
(
Collectors
.
toList
());
listData
.
sort
(
Comparator
.
comparing
(
ESEquipments:
:
getTraceId
,
Comparator
.
comparingInt
(
Integer:
:
parseInt
)));
}
ArrayList
<
Map
<
String
,
String
>>
resultList
=
new
ArrayList
<>();
listData
.
forEach
(
item
->
{
HashMap
<
String
,
String
>
stringStringHashMap
=
new
HashMap
<>();
...
...
amos-boot-system-kgd/src/main/resources/application-dev.properties
View file @
e8146499
## 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.password
=
Yeejoin@2020
## 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/
## redis properties:
spring.redis.database
=
1
spring.redis.host
=
172.16.3.
18
spring.redis.host
=
172.16.3.
221
spring.redis.port
=
6379
spring.redis.password
=
yeejoin@2020
...
...
@@ -43,13 +43,13 @@ lettuce.timeout=10000
emqx.clean-session
=
true
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-password
=
a123456
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.user
=
root
spring.influx.database
=
iot_platform
...
...
amos-boot-system-kgd/src/main/resources/application.properties
View file @
e8146499
...
...
@@ -55,8 +55,11 @@ spring.http.encoding.charset=utf-8
spring.http.encoding.enabled
=
true
spring.http.encoding.force
=
true
amos.system.socket.port
=
7777
amos.system.user.user-name
=
qms_sys
amos.system.maas.url
=
172.16.3.221:10005
amos.system.user.user-name
=
kgd_gdd
amos.system.user.password
=
a1234560
amos.system.user.app-key
=
AMOS_STUDIO
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