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
a1b75199
Commit
a1b75199
authored
Nov 21, 2022
by
KeYong
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_dl_plan6' into develop_dl_plan6
parents
f637d638
481df91d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
67 additions
and
44 deletions
+67
-44
SupervisionConfigureController.java
...quipmanage/controller/SupervisionConfigureController.java
+29
-7
ConfirmAlarmServiceImpl.java
...oin/equipmanage/service/impl/ConfirmAlarmServiceImpl.java
+2
-1
MqttReceiveServiceImpl.java
...join/equipmanage/service/impl/MqttReceiveServiceImpl.java
+36
-36
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/SupervisionConfigureController.java
View file @
a1b75199
...
...
@@ -62,6 +62,10 @@ public class SupervisionConfigureController extends AbstractBaseController {
if
(
commonPageable
.
getPageNumber
()
==
0
)
{
commonPageable
.
setPageNumber
(
1
);
}
if
(
StringUtils
.
isEmpty
(
bizOrgCode
))
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
bizOrgCode
=
!
ValidationUtil
.
isEmpty
(
reginParams
.
getPersonIdentity
())
&&
StringUtil
.
isNotEmpty
(
reginParams
.
getPersonIdentity
().
getBizOrgCode
())
?
reginParams
.
getPersonIdentity
().
getBizOrgCode
()
:
null
;
}
Page
page
=
new
Page
<>(
commonPageable
.
getPageNumber
(),
commonPageable
.
getPageSize
());
return
CommonResponseUtil
.
success
(
fireFightingSystemMapper
.
getWaterInfoBySuper
(
page
,
bizOrgCode
));
}
...
...
@@ -90,6 +94,10 @@ public class SupervisionConfigureController extends AbstractBaseController {
if
(
commonPageable
.
getPageNumber
()
==
0
)
{
commonPageable
.
setPageNumber
(
1
);
}
if
(
StringUtils
.
isEmpty
(
bizOrgCode
))
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
bizOrgCode
=
!
ValidationUtil
.
isEmpty
(
reginParams
.
getPersonIdentity
())
&&
StringUtil
.
isNotEmpty
(
reginParams
.
getPersonIdentity
().
getBizOrgCode
())
?
reginParams
.
getPersonIdentity
().
getBizOrgCode
()
:
null
;
}
Page
page
=
new
Page
<>(
commonPageable
.
getPageNumber
(),
commonPageable
.
getPageSize
());
return
CommonResponseUtil
.
success
(
fireFightingSystemMapper
.
getPipeNetworkBySuper
(
page
,
bizOrgCode
));
}
...
...
@@ -195,6 +203,7 @@ public class SupervisionConfigureController extends AbstractBaseController {
if
(
commonPageable
.
getPageNumber
()
==
0
)
{
commonPageable
.
setPageNumber
(
1
);
}
ReginParams
reginParams
=
getSelectedOrgInfo
();
List
<
CommonRequest
>
queryRequests
=
new
ArrayList
<>();
CommonRequest
request7
=
new
CommonRequest
();
request7
.
setName
(
"system"
);
...
...
@@ -204,10 +213,12 @@ public class SupervisionConfigureController extends AbstractBaseController {
request8
.
setName
(
"specificIndexKey"
);
request8
.
setValue
(
StringUtil
.
isNotEmpty
(
typeCode
)
?
StringUtils
.
trimToNull
(
typeCode
)
:
null
);
queryRequests
.
add
(
request8
);
CommonRequest
request13
=
new
CommonRequest
();
request13
.
setName
(
"bizOrgCode"
);
request13
.
setValue
(
StringUtil
.
isNotEmpty
(
bizOrgCode
)
?
StringUtils
.
trimToNull
(
typeCode
)
:
null
);
queryRequests
.
add
(
request13
);
if
(!
ValidationUtil
.
isEmpty
(
reginParams
.
getPersonIdentity
()))
{
CommonRequest
request13
=
new
CommonRequest
();
request13
.
setName
(
"bizOrgCode"
);
request13
.
setValue
(
StringUtil
.
isNotEmpty
(
reginParams
.
getPersonIdentity
().
getBizOrgCode
())
?
reginParams
.
getPersonIdentity
().
getBizOrgCode
()
:
null
);
queryRequests
.
add
(
request13
);
}
CommonPageInfoParam
param
=
CommonPageParamUtil
.
fillCommonPageInfoParam
(
queryRequests
,
commonPageable
);
return
CommonResponseUtil
.
success
(
equipmentSpecificAlarmService
.
fireAlarmLogPage
(
param
));
}
...
...
@@ -218,6 +229,10 @@ public class SupervisionConfigureController extends AbstractBaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"报警类型趋势"
,
produces
=
"application/json;charset=UTF-8"
,
notes
=
"报警类型趋势"
)
public
ResponseModel
alarmTrend
(
@RequestParam
(
required
=
false
)
String
bizOrgCode
)
{
if
(
StringUtils
.
isEmpty
(
bizOrgCode
))
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
bizOrgCode
=
!
ValidationUtil
.
isEmpty
(
reginParams
.
getPersonIdentity
())
&&
StringUtil
.
isNotEmpty
(
reginParams
.
getPersonIdentity
().
getBizOrgCode
())
?
reginParams
.
getPersonIdentity
().
getBizOrgCode
()
:
null
;
}
return
CommonResponseUtil
.
success
(
equipmentSpecificAlarmService
.
alarmTrend
(
bizOrgCode
));
}
...
...
@@ -229,10 +244,17 @@ public class SupervisionConfigureController extends AbstractBaseController {
if
(
commonPageable
.
getPageNumber
()
==
0
)
{
commonPageable
.
setPageNumber
(
1
);
}
Page
page
=
new
Page
<>(
commonPageable
.
getPageNumber
(),
commonPageable
.
getPageSize
());
if
(
StringUtils
.
isEmpty
(
bizOrgCode
))
{
return
CommonResponseUtil
.
success
(
null
);
if
(
ObjectUtils
.
isEmpty
(
bizOrgCode
)){
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
.
PersonIdentity
personIdentity
=
reginParams
.
getPersonIdentity
();
if
(!
ValidationUtil
.
isEmpty
(
personIdentity
))
{
bizOrgCode
=
personIdentity
.
getBizOrgCode
();
if
(
bizOrgCode
==
null
)
{
return
CommonResponseUtil
.
success
(
null
);
}
}
}
Page
page
=
new
Page
<>(
commonPageable
.
getPageNumber
(),
commonPageable
.
getPageSize
());
Page
<
Map
<
String
,
Object
>>
pressurePumpInfo
=
fireFightingSystemMapper
.
getPressurePumpInfo
(
page
,
bizOrgCode
,
null
);
List
<
Long
>
ids
=
new
ArrayList
();
pressurePumpInfo
.
getRecords
().
stream
().
map
(
item
->
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/ConfirmAlarmServiceImpl.java
View file @
a1b75199
...
...
@@ -14,6 +14,7 @@ import com.yeejoin.equipmanage.common.entity.vo.AlamVideoVO;
import
com.yeejoin.equipmanage.common.enums.*
;
import
com.yeejoin.equipmanage.common.utils.DateUtils
;
import
com.yeejoin.equipmanage.common.utils.StringUtil
;
import
com.yeejoin.equipmanage.common.utils.UUIDUtils
;
import
com.yeejoin.equipmanage.common.vo.Token
;
import
com.yeejoin.equipmanage.fegin.JcsFeign
;
import
com.yeejoin.equipmanage.fegin.SystemctlFeign
;
...
...
@@ -276,7 +277,7 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
@Override
public
void
afterCommit
()
{
//数字换流站使用
mqttSendGateway
.
sendToMqtt
(
TopicEnum
.
EQZXDT
.
getTopic
(),
""
);
mqttSendGateway
.
sendToMqtt
(
TopicEnum
.
EQZXDT
.
getTopic
(),
UUIDUtils
.
getUUID
()
);
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"seqNo"
,
UUID
.
randomUUID
().
toString
().
replace
(
"-"
,
""
).
toLowerCase
());
mqttSendGateway
.
sendToMqtt
(
TopicEnum
.
ALARM_LOG_INSERT
.
getTopic
(),
jsonObject
.
toString
());
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/MqttReceiveServiceImpl.java
View file @
a1b75199
...
...
@@ -16,6 +16,7 @@ import com.yeejoin.equipmanage.common.entity.vo.*;
import
com.yeejoin.equipmanage.common.enums.*
;
import
com.yeejoin.equipmanage.common.utils.DateUtils
;
import
com.yeejoin.equipmanage.common.utils.StringUtil
;
import
com.yeejoin.equipmanage.common.utils.UUIDUtils
;
import
com.yeejoin.equipmanage.common.vo.*
;
import
com.yeejoin.equipmanage.fegin.SystemctlFeign
;
import
com.yeejoin.equipmanage.mapper.*
;
...
...
@@ -393,43 +394,42 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
jsonObjectXf
.
put
(
"data_class"
,
"realdata"
);
// 遥测
if
(
equipmentSpeIndex
.
getIsTrend
()
==
1
)
{
jsonObjectXf
.
put
(
"data_type"
,
"analog"
);
}
else
{
jsonObjectXf
.
put
(
"data_type"
,
"state"
);
}
String
date
=
DateUtils
.
date2LongStr
(
new
Date
());
jsonObjectXf
.
put
(
"op_type"
,
"subscribe_emergency"
);
JSONObject
jsonObjectCondition
=
new
JSONObject
();
jsonObjectCondition
.
put
(
"station_psr_id"
,
stationCode
);
jsonObjectCondition
.
put
(
"station_name"
,
stationName
);
jsonObjectCondition
.
put
(
"data_upload_time"
,
date
);
jsonObjectXf
.
put
(
"condition"
,
jsonObjectCondition
);
JSONObject
jsonObjectData
=
new
JSONObject
();
jsonObjectData
.
put
(
"psrId"
,
stationCode
);
jsonObjectData
.
put
(
"astId"
,
equipmentSpecificIndex
.
getSpecificCode
());
jsonObjectData
.
put
(
"equipType"
,
equipmentSpecificIndex
.
getEquipmentCode
());
jsonObjectData
.
put
(
"name"
,
equipmentSpecificIndex
.
getEquipmentSpecificName
()+
"-"
+
equipmentSpecificIndex
.
getEquipmentSpecificIndexName
());
if
(
value
.
equals
(
"true"
))
{
jsonObjectData
.
put
(
"value"
,
"1"
);
}
else
if
(
value
.
equals
(
"false"
))
{
jsonObjectData
.
put
(
"value"
,
"0"
);
}
else
{
jsonObjectData
.
put
(
"value"
,
value
);
}
jsonObjectData
.
put
(
"measurementType"
,
equipmentSpecificIndex
.
getEquipmentIndexKey
());
jsonObjectData
.
put
(
"dateTime"
,
date
);
jsonObjectData
.
put
(
"quality"
,
"0"
);
// 量测质量码:0 有效,1 无效
List
<
JSONObject
>
jsonObjects
=
Arrays
.
asList
(
jsonObjectData
);
jsonObjectXf
.
put
(
"data"
,
jsonObjects
);
try
{
emqKeeper
.
getMqttClient
().
publish
(
"emq.xf.created"
,
jsonObjectXf
.
toString
().
getBytes
(),
1
,
false
);
}
catch
(
MqttException
e
)
{
e
.
printStackTrace
();
String
date
=
DateUtils
.
date2LongStr
(
new
Date
());
jsonObjectXf
.
put
(
"op_type"
,
"subscribe_emergency"
);
JSONObject
jsonObjectCondition
=
new
JSONObject
();
jsonObjectCondition
.
put
(
"station_psr_id"
,
stationCode
);
jsonObjectCondition
.
put
(
"station_name"
,
stationName
);
jsonObjectCondition
.
put
(
"data_upload_time"
,
date
);
jsonObjectXf
.
put
(
"condition"
,
jsonObjectCondition
);
JSONObject
jsonObjectData
=
new
JSONObject
();
jsonObjectData
.
put
(
"psrId"
,
stationCode
);
jsonObjectData
.
put
(
"astId"
,
equipmentSpecificIndex
.
getSpecificCode
());
jsonObjectData
.
put
(
"equipType"
,
equipmentSpecificIndex
.
getEquipmentCode
());
jsonObjectData
.
put
(
"name"
,
equipmentSpecificIndex
.
getEquipmentSpecificName
()+
"-"
+
equipmentSpecificIndex
.
getEquipmentSpecificIndexName
());
if
(
value
.
equals
(
"true"
))
{
jsonObjectData
.
put
(
"value"
,
"1"
);
}
else
if
(
value
.
equals
(
"false"
))
{
jsonObjectData
.
put
(
"value"
,
"0"
);
}
else
{
jsonObjectData
.
put
(
"value"
,
value
);
}
jsonObjectData
.
put
(
"measurementType"
,
equipmentSpecificIndex
.
getEquipmentIndexKey
());
jsonObjectData
.
put
(
"dateTime"
,
date
);
jsonObjectData
.
put
(
"quality"
,
"0"
);
// 量测质量码:0 有效,1 无效
List
<
JSONObject
>
jsonObjects
=
Arrays
.
asList
(
jsonObjectData
);
jsonObjectXf
.
put
(
"data"
,
jsonObjects
);
try
{
emqKeeper
.
getMqttClient
().
publish
(
"emq.xf.created"
,
jsonObjectXf
.
toString
().
getBytes
(),
1
,
false
);
log
.
info
(
"遥测遥信数据推送云端kafka成功"
);
}
catch
(
MqttException
e
)
{
log
.
error
(
"遥测遥信数据推送云端kafka失败=====>"
+
e
.
getMessage
());
e
.
printStackTrace
();
}
}
}
}
});
...
...
@@ -1056,7 +1056,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"seqNo"
,
UUID
.
randomUUID
().
toString
().
replace
(
"-"
,
""
).
toLowerCase
());
mqttSendGateway
.
sendToMqtt
(
TopicEnum
.
ALARM_LOG_INSERT
.
getTopic
(),
jsonObject
.
toString
());
mqttSendGateway
.
sendToMqtt
(
TopicEnum
.
EQZXDT
.
getTopic
(),
""
);
mqttSendGateway
.
sendToMqtt
(
TopicEnum
.
EQZXDT
.
getTopic
(),
UUIDUtils
.
getUUID
()
);
// 数字换流站数据处理(高斯库同步及南瑞告警推送)
if
(
syncSwitch
)
{
List
<
FireEquipmentFireAlarm
>
alarmList
=
createFireEquipmentFireAlarmVo
(
equipmentAlarmLogs
);
...
...
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