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
7982ff55
Commit
7982ff55
authored
Apr 10, 2024
by
KeYong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改告警确认逻辑
parent
17a0c4c5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
212 additions
and
157 deletions
+212
-157
ConfirmAlarmServiceImpl.java
...oin/equipmanage/service/impl/ConfirmAlarmServiceImpl.java
+208
-153
MqttReceiveServiceImpl.java
...join/equipmanage/service/impl/MqttReceiveServiceImpl.java
+4
-4
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/ConfirmAlarmServiceImpl.java
View file @
7982ff55
...
@@ -38,6 +38,7 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
...
@@ -38,6 +38,7 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
@Service
@Service
public
class
ConfirmAlarmServiceImpl
extends
ServiceImpl
<
ConfirmAlarmMapper
,
EquipmentSpecificAlarm
>
implements
IConfirmAlarmService
{
public
class
ConfirmAlarmServiceImpl
extends
ServiceImpl
<
ConfirmAlarmMapper
,
EquipmentSpecificAlarm
>
implements
IConfirmAlarmService
{
...
@@ -50,14 +51,16 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
...
@@ -50,14 +51,16 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
private
RemoteSecurityService
remoteSecurityService
;
private
RemoteSecurityService
remoteSecurityService
;
static
ConfirmAlarmMapper
confirmAlarmMapper
;
static
ConfirmAlarmMapper
confirmAlarmMapper
;
@Autowired
@Autowired
public
void
setConfirmAlarmMapper
(
ConfirmAlarmMapper
confirmAlarmMapper
){
public
void
setConfirmAlarmMapper
(
ConfirmAlarmMapper
confirmAlarmMapper
)
{
ConfirmAlarmServiceImpl
.
confirmAlarmMapper
=
confirmAlarmMapper
;
ConfirmAlarmServiceImpl
.
confirmAlarmMapper
=
confirmAlarmMapper
;
}
}
private
static
JcsFeign
jcsFeign
;
private
static
JcsFeign
jcsFeign
;
@Autowired
@Autowired
public
void
setJcsFeign
(
JcsFeign
jcsFeign
){
public
void
setJcsFeign
(
JcsFeign
jcsFeign
)
{
ConfirmAlarmServiceImpl
.
jcsFeign
=
jcsFeign
;
ConfirmAlarmServiceImpl
.
jcsFeign
=
jcsFeign
;
}
}
...
@@ -78,9 +81,10 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
...
@@ -78,9 +81,10 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
private
IEquipmentSpecificAlarmLogService
equipmentSpecificAlarmLogService
;
private
IEquipmentSpecificAlarmLogService
equipmentSpecificAlarmLogService
;
private
static
IEquipmentSpecificSerivce
equipmentSpecificSerivce
;
private
static
IEquipmentSpecificSerivce
equipmentSpecificSerivce
;
@Autowired
@Autowired
@Lazy
@Lazy
public
void
setIEquipmentSpecificIndexSerivce
(
IEquipmentSpecificSerivce
equipmentSpecificSerivce
){
public
void
setIEquipmentSpecificIndexSerivce
(
IEquipmentSpecificSerivce
equipmentSpecificSerivce
)
{
ConfirmAlarmServiceImpl
.
equipmentSpecificSerivce
=
equipmentSpecificSerivce
;
ConfirmAlarmServiceImpl
.
equipmentSpecificSerivce
=
equipmentSpecificSerivce
;
}
}
...
@@ -99,9 +103,13 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
...
@@ -99,9 +103,13 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
@Autowired
@Autowired
private
SystemctlFeign
systemctlFeign
;
private
SystemctlFeign
systemctlFeign
;
@Autowired
private
IEquipmentSpecificAlarmService
equipmentSpecificAlarmService
;
private
static
RuleConfirmAlarmService
ruleConfirmAlamService
;
private
static
RuleConfirmAlarmService
ruleConfirmAlamService
;
@Autowired
@Autowired
public
void
setRuleConfirmAlamService
(
RuleConfirmAlarmService
ruleConfirmAlamService
){
public
void
setRuleConfirmAlamService
(
RuleConfirmAlarmService
ruleConfirmAlamService
)
{
ConfirmAlarmServiceImpl
.
ruleConfirmAlamService
=
ruleConfirmAlamService
;
ConfirmAlarmServiceImpl
.
ruleConfirmAlamService
=
ruleConfirmAlamService
;
}
}
...
@@ -113,7 +121,7 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
...
@@ -113,7 +121,7 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
@Autowired
@Autowired
private
EquipmentSpecificAlarmMapper
equipmentSpecificAlarmMapper
;
private
EquipmentSpecificAlarmMapper
equipmentSpecificAlarmMapper
;
@Autowired
@Autowired
private
EquipmentSpecificAlarmLogMapper
equipmentSpecificAlarmLogMapper
;
private
EquipmentSpecificAlarmLogMapper
equipmentSpecificAlarmLogMapper
;
...
@@ -121,8 +129,9 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
...
@@ -121,8 +129,9 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
private
ISignalClassifyService
signalClassifyService
;
private
ISignalClassifyService
signalClassifyService
;
private
static
IFormInstanceService
instanceService
;
private
static
IFormInstanceService
instanceService
;
@Autowired
@Autowired
public
void
setInstanceService
(
IFormInstanceService
instanceService
){
public
void
setInstanceService
(
IFormInstanceService
instanceService
)
{
ConfirmAlarmServiceImpl
.
instanceService
=
instanceService
;
ConfirmAlarmServiceImpl
.
instanceService
=
instanceService
;
}
}
...
@@ -165,14 +174,14 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
...
@@ -165,14 +174,14 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
}
}
@Override
@Override
public
Map
<
String
,
Integer
>
videoList
(
List
<
String
>
list
)
{
public
Map
<
String
,
Integer
>
videoList
(
List
<
String
>
list
)
{
Map
<
String
,
Integer
>
map
=
new
HashMap
<>();
Map
<
String
,
Integer
>
map
=
new
HashMap
<>();
for
(
String
s
:
list
)
{
for
(
String
s
:
list
)
{
List
<
AlamVideoVO
>
video
=
videoMapper
.
getVideoBySpeId
(
Long
.
valueOf
(
s
));
List
<
AlamVideoVO
>
video
=
videoMapper
.
getVideoBySpeId
(
Long
.
valueOf
(
s
));
if
(
video
!=
null
&&
video
.
size
()>
0
)
{
if
(
video
!=
null
&&
video
.
size
()
>
0
)
{
map
.
put
(
s
,
video
.
size
());
map
.
put
(
s
,
video
.
size
());
}
else
{
}
else
{
map
.
put
(
s
,
0
);
map
.
put
(
s
,
0
);
}
}
}
}
return
map
;
return
map
;
...
@@ -196,37 +205,37 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
...
@@ -196,37 +205,37 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
ent
.
setEquipmentSpecificId
(
alarmLog
.
getEquipmentSpecificId
());
ent
.
setEquipmentSpecificId
(
alarmLog
.
getEquipmentSpecificId
());
ent
.
setEquipmentSpecificIndexKey
(
alarmLog
.
getEquipmentSpecificIndexKey
());
ent
.
setEquipmentSpecificIndexKey
(
alarmLog
.
getEquipmentSpecificIndexKey
());
ent
.
setEquipmentSpecificIndexName
(
alarmLog
.
getEquipmentSpecificIndexName
());
ent
.
setEquipmentSpecificIndexName
(
alarmLog
.
getEquipmentSpecificIndexName
());
Equipment
equipment
=
equipmentSpecificMapper
.
getEquipmentBySpecificId
(
alarmLog
.
getEquipmentSpecificId
());
//
Equipment equipment = equipmentSpecificMapper.getEquipmentBySpecificId(alarmLog.getEquipmentSpecificId());
if
(!
StringUtil
.
isNotEmpty
(
equipment
.
getCleanType
()))
{
//
if (!StringUtil.isNotEmpty(equipment.getCleanType())) {
// 若此装备未定义消除策略,默认设置为复位信号自动消除
// 若此装备未定义消除策略,默认设置为复位信号自动消除
equipment
.
setCleanType
(
AlarmCleanTypeEnum
.
ZDXC
.
getCode
());
//
equipment.setCleanType(AlarmCleanTypeEnum.ZDXC.getCode());
equipmentMapper
.
updateById
(
equipment
);
//
equipmentMapper.updateById(equipment);
}
//
}
if
(
StringUtil
.
isNotEmpty
(
equipment
.
getCleanType
())
&&
AlarmCleanTypeEnum
.
QRXC
.
getCode
().
equals
(
equipment
.
getCleanType
()))
{
//
if (StringUtil.isNotEmpty(equipment.getCleanType()) && AlarmCleanTypeEnum.QRXC.getCode().equals(equipment.getCleanType())) {
EquipmentSpecificAlarm
alarm
=
equipmentSpecificAlarmMapper
.
selectById
(
alarmLog
.
getEquipmentSpecificAlarmId
());
//
EquipmentSpecificAlarm alarm = equipmentSpecificAlarmMapper.selectById(alarmLog.getEquipmentSpecificAlarmId());
alarm
.
setStatus
(
AlarmStatusEnum
.
HF
.
getCode
());
//
alarm.setStatus(AlarmStatusEnum.HF.getCode());
equipmentSpecificAlarmMapper
.
updateById
(
alarm
);
//
equipmentSpecificAlarmMapper.updateById(alarm);
// 警情处理确认后消除更新value 为false,否则灯还在闪
//
// 警情处理确认后消除更新value 为false,否则灯还在闪
LambdaUpdateWrapper
<
EquipmentSpecificIndex
>
updateWrapper
=
new
LambdaUpdateWrapper
<
EquipmentSpecificIndex
>().
// LambdaUpdateWrapper<EquipmentSpecificIndex> updateWrapper =
new LambdaUpdateWrapper<EquipmentSpecificIndex>().
set
(
EquipmentSpecificIndex:
:
getValue
,
"false"
).
// set(EquipmentSpecificIndex::getValue,
"false").
set
(
EquipmentSpecificIndex:
:
getUpdateDate
,
new
Date
()).
//
set(EquipmentSpecificIndex::getUpdateDate, new Date()).
eq
(
EquipmentSpecificIndex:
:
getEquipmentSpecificId
,
alarm
.
getEquipmentSpecificId
()).
// eq(EquipmentSpecificIndex::getEquipmentSpecificId,
alarm.getEquipmentSpecificId()).
eq
(
EquipmentSpecificIndex:
:
getEquipmentIndexKey
,
alarm
.
getEquipmentSpecificIndexKey
());
// eq(EquipmentSpecificIndex::getEquipmentIndexKey,
alarm.getEquipmentSpecificIndexKey());
iEquipmentSpecificIndexSerivce
.
update
(
updateWrapper
);
//
iEquipmentSpecificIndexSerivce.update(updateWrapper);
//指标图标显示根据 EquipmentSpecific 表中的 RealtimeIotIndexValue 判断 同步修改
//
//指标图标显示根据 EquipmentSpecific 表中的 RealtimeIotIndexValue 判断 同步修改
LambdaUpdateWrapper
<
EquipmentSpecific
>
wrapper
=
new
LambdaUpdateWrapper
<
EquipmentSpecific
>().
// LambdaUpdateWrapper<EquipmentSpecific> wrapper =
new LambdaUpdateWrapper<EquipmentSpecific>().
set
(
EquipmentSpecific:
:
getRealtimeIotIndexValue
,
"false"
).
// set(EquipmentSpecific::getRealtimeIotIndexValue,
"false").
set
(
EquipmentSpecific:
:
getRealtimeIotIndexUpdateDate
,
new
Date
()).
// set(EquipmentSpecific::getRealtimeIotIndexUpdateDate,
new Date()).
eq
(
EquipmentSpecific:
:
getId
,
alarm
.
getEquipmentSpecificId
());
// eq(EquipmentSpecific::getId,
alarm.getEquipmentSpecificId());
equipmentSpecificSerivce
.
update
(
wrapper
);
//
equipmentSpecificSerivce.update(wrapper);
MqttReceiveServiceImpl
.
upAlarmLogStatus
(
alarmLog
.
getIotCode
(),
alarmLog
.
getEquipmentSpecificIndexKey
(),
null
,
equipmentSpecificAlarmLogService
,
true
,
""
);
//
MqttReceiveServiceImpl.upAlarmLogStatus(alarmLog.getIotCode(), alarmLog.getEquipmentSpecificIndexKey(), null, equipmentSpecificAlarmLogService, true, "");
}
//
}
// 如果是批量确警,先查询,再确警,用于批量消息推送
// 如果是批量确警,先查询,再确警,用于批量消息推送
isBatch
=
ent
.
getIsBatch
();
//
isBatch = ent.getIsBatch();
if
(
isBatch
==
1
)
{
//
if (isBatch == 1) {
list
=
equipmentSpecificAlarmLogService
.
getIsConfirmByAlarmId
(
alarmLog
.
getEquipmentSpecificId
(),
alarmLog
.
getEquipmentSpecificIndexKey
(),
"0"
);
//
list = equipmentSpecificAlarmLogService.getIsConfirmByAlarmId(alarmLog.getEquipmentSpecificId(), alarmLog.getEquipmentSpecificIndexKey(), "0");
}
//
}
}
}
if
(
ent
.
getType
()
!=
null
)
{
if
(
ent
.
getType
()
!=
null
)
{
ent
.
setType
(
ConfirmAlamEnum
.
getEnumByName
(
ent
.
getType
())
==
null
?
" "
:
ConfirmAlamEnum
.
getEnumByName
(
ent
.
getType
()));
ent
.
setType
(
ConfirmAlamEnum
.
getEnumByName
(
ent
.
getType
())
==
null
?
" "
:
ConfirmAlamEnum
.
getEnumByName
(
ent
.
getType
()));
...
@@ -234,7 +243,7 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
...
@@ -234,7 +243,7 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
ent
.
setUpdateDate
(
new
Date
());
ent
.
setUpdateDate
(
new
Date
());
ent
.
setConfirmDate
(
new
Date
());
ent
.
setConfirmDate
(
new
Date
());
int
i
=
0
;
// int i = 0
;
ent
.
setConfirmTypeName
(
ConfirmAlamEnum
.
getTypeByCode
(
ent
.
getConfirmType
()));
ent
.
setConfirmTypeName
(
ConfirmAlamEnum
.
getTypeByCode
(
ent
.
getConfirmType
()));
Date
date
=
new
Date
();
Date
date
=
new
Date
();
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
...
@@ -245,91 +254,136 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
...
@@ -245,91 +254,136 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
}
else
{
}
else
{
ent
.
setResolveResult
(
dateString
+
" "
+
userModel
.
getRealName
()
+
" 进行警情确认处理。"
);
ent
.
setResolveResult
(
dateString
+
" "
+
userModel
.
getRealName
()
+
" 进行警情确认处理。"
);
}
}
if
(
ent
.
getIsBatch
()
==
0
){
// if (ent.getIsBatch() == 0){
if
(
StringUtils
.
isNotEmpty
(
handleConfirm
)
&&
HandleBatchConfirmEnum
.
SINGLE
.
getCode
().
equalsIgnoreCase
(
handleConfirm
))
{
// if (StringUtils.isNotEmpty(handleConfirm) && HandleBatchConfirmEnum.SINGLE.getCode().equalsIgnoreCase(handleConfirm)) {
QueryWrapper
<
EquipmentSpecificAlarmLog
>
wrapper
=
new
QueryWrapper
<>();
// QueryWrapper<EquipmentSpecificAlarmLog> wrapper = new QueryWrapper<>();
wrapper
.
eq
(
"equipment_specific_id"
,
ent
.
getEquipmentSpecificId
()).
isNull
(
"confirm_date"
);
// wrapper.eq("equipment_specific_id", ent.getEquipmentSpecificId()).isNull("confirm_date");
List
<
EquipmentSpecificAlarmLog
>
logs
=
equipmentSpecificAlarmLogMapper
.
selectList
(
wrapper
);
// List<EquipmentSpecificAlarmLog> logs = equipmentSpecificAlarmLogMapper.selectList(wrapper);
if
(
0
<
logs
.
size
())
{
// if (0 < logs.size()) {
for
(
EquipmentSpecificAlarmLog
x
:
logs
)
{
// for (EquipmentSpecificAlarmLog x : logs) {
x
.
setConfirmType
(
ent
.
getConfirmType
());
// x.setConfirmType(ent.getConfirmType());
x
.
setConfirmTypeName
(
ent
.
getConfirmTypeName
());
// x.setConfirmTypeName(ent.getConfirmTypeName());
x
.
setConfirmDate
(
new
Date
());
// x.setConfirmDate(new Date());
x
.
setConfirmUser
(
ent
.
getConfirmUser
());
// x.setConfirmUser(ent.getConfirmUser());
x
.
setConfirmUserName
(
ent
.
getConfirmUserName
());
// x.setConfirmUserName(ent.getConfirmUserName());
x
.
setType
(
ent
.
getType
());
// x.setType(ent.getType());
x
.
setResolveResult
(
ent
.
getResolveResult
());
// x.setResolveResult(ent.getResolveResult());
x
.
setAlarmReason
(
ent
.
getAlarmReason
());
// x.setAlarmReason(ent.getAlarmReason());
}
// }
equipmentSpecificAlarmLogService
.
updateBatchById
(
logs
);
// equipmentSpecificAlarmLogService.updateBatchById(logs);
}
// }
}
else
if
(
StringUtils
.
isNotEmpty
(
handleConfirm
)
&&
HandleBatchConfirmEnum
.
ALL
.
getCode
().
equalsIgnoreCase
(
handleConfirm
))
{
// } else if (StringUtils.isNotEmpty(handleConfirm) && HandleBatchConfirmEnum.ALL.getCode().equalsIgnoreCase(handleConfirm)) {
QueryWrapper
<
EquipmentSpecificAlarmLog
>
logQueryWrapper
=
new
QueryWrapper
<>();
// QueryWrapper<EquipmentSpecificAlarmLog> logQueryWrapper = new QueryWrapper<>();
logQueryWrapper
.
isNull
(
"confirm_date"
);
// logQueryWrapper.isNull("confirm_date");
List
<
EquipmentSpecificAlarmLog
>
logList
=
equipmentSpecificAlarmLogMapper
.
selectList
(
logQueryWrapper
);
// List<EquipmentSpecificAlarmLog> logList = equipmentSpecificAlarmLogMapper.selectList(logQueryWrapper);
if
(
0
<
logList
.
size
())
{
// if (0 < logList.size()) {
for
(
EquipmentSpecificAlarmLog
x
:
logList
)
{
// for (EquipmentSpecificAlarmLog x : logList) {
x
.
setConfirmType
(
ent
.
getConfirmType
());
// x.setConfirmType(ent.getConfirmType());
x
.
setConfirmTypeName
(
ent
.
getConfirmTypeName
());
// x.setConfirmTypeName(ent.getConfirmTypeName());
x
.
setConfirmDate
(
new
Date
());
// x.setConfirmDate(new Date());
x
.
setConfirmUser
(
ent
.
getConfirmUser
());
// x.setConfirmUser(ent.getConfirmUser());
x
.
setConfirmUserName
(
ent
.
getConfirmUserName
());
// x.setConfirmUserName(ent.getConfirmUserName());
x
.
setType
(
ent
.
getType
());
// x.setType(ent.getType());
x
.
setResolveResult
(
ent
.
getResolveResult
());
// x.setResolveResult(ent.getResolveResult());
x
.
setAlarmReason
(
ent
.
getAlarmReason
());
// x.setAlarmReason(ent.getAlarmReason());
}
// }
equipmentSpecificAlarmLogService
.
updateBatchById
(
logList
);
// equipmentSpecificAlarmLogService.updateBatchById(logList);
}
// }
}
else
{
// } else {
i
=
equipmentSpecificAlarmLogMapper
.
updateById
(
ent
);
// i = equipmentSpecificAlarmLogMapper.updateById(ent);
// }
// } else {
if
(
StringUtils
.
isNotEmpty
(
handleConfirm
)
&&
HandleBatchConfirmEnum
.
SINGLE
.
getCode
().
equalsIgnoreCase
(
handleConfirm
))
{
QueryWrapper
<
EquipmentSpecificAlarm
>
alarmWrapper
=
new
QueryWrapper
<>();
alarmWrapper
.
eq
(
"equipment_specific_id"
,
ent
.
getEquipmentSpecificId
()).
eq
(
"status"
,
1
);
List
<
EquipmentSpecificAlarm
>
alarms
=
equipmentSpecificAlarmMapper
.
selectList
(
alarmWrapper
);
if
(
CollectionUtils
.
isNotEmpty
(
alarms
))
{
List
<
EquipmentSpecificAlarm
>
alarms1
=
alarms
.
stream
().
map
(
x
->
x
.
setStatus
(
AlarmStatusEnum
.
HF
.
getCode
())).
collect
(
Collectors
.
toList
());
equipmentSpecificAlarmService
.
updateBatchById
(
alarms1
);
}
}
}
else
{
// 警情处理确认后消除更新value 为false,否则灯还在闪
if
(
StringUtils
.
isNotEmpty
(
handleConfirm
)
&&
HandleBatchConfirmEnum
.
SINGLE
.
getCode
().
equalsIgnoreCase
(
handleConfirm
))
{
LambdaUpdateWrapper
<
EquipmentSpecificIndex
>
updateWrapper
=
new
LambdaUpdateWrapper
<
EquipmentSpecificIndex
>().
QueryWrapper
<
EquipmentSpecificAlarmLog
>
wrapper
=
new
QueryWrapper
<>();
set
(
EquipmentSpecificIndex:
:
getValue
,
"false"
).
wrapper
.
eq
(
"equipment_specific_id"
,
ent
.
getEquipmentSpecificId
()).
isNull
(
"confirm_date"
);
set
(
EquipmentSpecificIndex:
:
getUpdateDate
,
new
Date
()).
List
<
EquipmentSpecificAlarmLog
>
logs
=
equipmentSpecificAlarmLogMapper
.
selectList
(
wrapper
);
eq
(
EquipmentSpecificIndex:
:
getEquipmentSpecificId
,
ent
.
getEquipmentSpecificId
()).
if
(
0
<
logs
.
size
())
{
eq
(
EquipmentSpecificIndex:
:
getEquipmentIndexKey
,
ent
.
getEquipmentSpecificIndexKey
());
for
(
EquipmentSpecificAlarmLog
x
:
logs
)
{
iEquipmentSpecificIndexSerivce
.
update
(
updateWrapper
);
x
.
setConfirmType
(
ent
.
getConfirmType
());
//指标图标显示根据 EquipmentSpecific 表中的 RealtimeIotIndexValue 判断 同步修改
x
.
setConfirmTypeName
(
ent
.
getConfirmTypeName
());
LambdaUpdateWrapper
<
EquipmentSpecific
>
speWrapper
=
new
LambdaUpdateWrapper
<
EquipmentSpecific
>().
x
.
setConfirmDate
(
new
Date
());
set
(
EquipmentSpecific:
:
getRealtimeIotIndexValue
,
"false"
).
x
.
setConfirmUser
(
ent
.
getConfirmUser
());
set
(
EquipmentSpecific:
:
getRealtimeIotIndexUpdateDate
,
new
Date
()).
x
.
setConfirmUserName
(
ent
.
getConfirmUserName
());
eq
(
EquipmentSpecific:
:
getId
,
ent
.
getEquipmentSpecificId
());
x
.
setType
(
ent
.
getType
());
equipmentSpecificSerivce
.
update
(
speWrapper
);
x
.
setResolveResult
(
ent
.
getResolveResult
());
x
.
setAlarmReason
(
ent
.
getAlarmReason
());
QueryWrapper
<
EquipmentSpecificAlarmLog
>
logWrapper
=
new
QueryWrapper
<>();
}
logWrapper
.
eq
(
"equipment_specific_id"
,
ent
.
getEquipmentSpecificId
()).
isNull
(
"confirm_date"
);
equipmentSpecificAlarmLogService
.
updateBatchById
(
logs
);
list
=
equipmentSpecificAlarmLogMapper
.
selectList
(
logWrapper
);
if
(
0
<
list
.
size
())
{
for
(
EquipmentSpecificAlarmLog
x
:
list
)
{
x
.
setConfirmType
(
ent
.
getConfirmType
());
x
.
setConfirmTypeName
(
ent
.
getConfirmTypeName
());
x
.
setConfirmDate
(
new
Date
());
x
.
setConfirmUser
(
ent
.
getConfirmUser
());
x
.
setConfirmUserName
(
ent
.
getConfirmUserName
());
x
.
setType
(
ent
.
getType
());
x
.
setResolveResult
(
ent
.
getResolveResult
());
x
.
setAlarmReason
(
ent
.
getAlarmReason
());
x
.
setCleanTime
(
date
);
}
}
}
else
if
(
StringUtils
.
isNotEmpty
(
handleConfirm
)
&&
HandleBatchConfirmEnum
.
ALL
.
getCode
().
equalsIgnoreCase
(
handleConfirm
))
{
equipmentSpecificAlarmLogService
.
updateBatchById
(
list
);
QueryWrapper
<
EquipmentSpecificAlarmLog
>
logQueryWrapper
=
new
QueryWrapper
<>();
}
logQueryWrapper
.
isNull
(
"confirm_date"
);
}
else
if
(
StringUtils
.
isNotEmpty
(
handleConfirm
)
&&
HandleBatchConfirmEnum
.
ALL
.
getCode
().
equalsIgnoreCase
(
handleConfirm
))
{
List
<
EquipmentSpecificAlarmLog
>
logList
=
equipmentSpecificAlarmLogMapper
.
selectList
(
logQueryWrapper
);
QueryWrapper
<
EquipmentSpecificAlarm
>
alarmWrapper
=
new
QueryWrapper
<>();
if
(
0
<
logList
.
size
())
{
alarmWrapper
.
eq
(
"equipment_specific_id"
,
ent
.
getEquipmentSpecificId
()).
eq
(
"status"
,
1
);
for
(
EquipmentSpecificAlarmLog
x
:
logList
)
{
List
<
EquipmentSpecificAlarm
>
alarms
=
equipmentSpecificAlarmMapper
.
selectList
(
alarmWrapper
);
x
.
setConfirmType
(
ent
.
getConfirmType
());
if
(
CollectionUtils
.
isNotEmpty
(
alarms
))
{
x
.
setConfirmTypeName
(
ent
.
getConfirmTypeName
());
List
<
EquipmentSpecificAlarm
>
alarms1
=
alarms
.
stream
().
map
(
x
->
x
.
setStatus
(
AlarmStatusEnum
.
HF
.
getCode
())).
collect
(
Collectors
.
toList
());
x
.
setConfirmDate
(
new
Date
());
equipmentSpecificAlarmService
.
updateBatchById
(
alarms1
);
x
.
setConfirmUser
(
ent
.
getConfirmUser
());
}
x
.
setConfirmUserName
(
ent
.
getConfirmUserName
());
// 警情处理确认后消除更新value 为false,否则灯还在闪
x
.
setType
(
ent
.
getType
());
LambdaUpdateWrapper
<
EquipmentSpecificIndex
>
updateWrapper
=
new
LambdaUpdateWrapper
<
EquipmentSpecificIndex
>().
x
.
setResolveResult
(
ent
.
getResolveResult
());
set
(
EquipmentSpecificIndex:
:
getValue
,
"false"
).
x
.
setAlarmReason
(
ent
.
getAlarmReason
());
set
(
EquipmentSpecificIndex:
:
getUpdateDate
,
new
Date
()).
}
eq
(
EquipmentSpecificIndex:
:
getEquipmentSpecificId
,
ent
.
getEquipmentSpecificId
()).
equipmentSpecificAlarmLogService
.
updateBatchById
(
logList
);
eq
(
EquipmentSpecificIndex:
:
getEquipmentIndexKey
,
ent
.
getEquipmentSpecificIndexKey
());
iEquipmentSpecificIndexSerivce
.
update
(
updateWrapper
);
//指标图标显示根据 EquipmentSpecific 表中的 RealtimeIotIndexValue 判断 同步修改
LambdaUpdateWrapper
<
EquipmentSpecific
>
speWrapper
=
new
LambdaUpdateWrapper
<
EquipmentSpecific
>().
set
(
EquipmentSpecific:
:
getRealtimeIotIndexValue
,
"false"
).
set
(
EquipmentSpecific:
:
getRealtimeIotIndexUpdateDate
,
new
Date
()).
eq
(
EquipmentSpecific:
:
getId
,
ent
.
getEquipmentSpecificId
());
equipmentSpecificSerivce
.
update
(
speWrapper
);
QueryWrapper
<
EquipmentSpecificAlarmLog
>
logQueryWrapper
=
new
QueryWrapper
<>();
logQueryWrapper
.
isNull
(
"confirm_date"
);
list
=
equipmentSpecificAlarmLogMapper
.
selectList
(
logQueryWrapper
);
if
(
0
<
list
.
size
())
{
for
(
EquipmentSpecificAlarmLog
x
:
list
)
{
x
.
setConfirmType
(
ent
.
getConfirmType
());
x
.
setConfirmTypeName
(
ent
.
getConfirmTypeName
());
x
.
setConfirmDate
(
new
Date
());
x
.
setConfirmUser
(
ent
.
getConfirmUser
());
x
.
setConfirmUserName
(
ent
.
getConfirmUserName
());
x
.
setType
(
ent
.
getType
());
x
.
setResolveResult
(
ent
.
getResolveResult
());
x
.
setAlarmReason
(
ent
.
getAlarmReason
());
x
.
setCleanTime
(
date
);
}
}
}
else
{
equipmentSpecificAlarmLogService
.
updateBatchById
(
list
);
LambdaUpdateWrapper
<
EquipmentSpecificAlarmLog
>
updateWrapper
=
new
LambdaUpdateWrapper
<
EquipmentSpecificAlarmLog
>().
eq
(
EquipmentSpecificAlarmLog:
:
getEquipmentSpecificId
,
ent
.
getEquipmentSpecificId
()).
eq
(
EquipmentSpecificAlarmLog:
:
getEquipmentSpecificIndexKey
,
ent
.
getEquipmentSpecificIndexKey
())
.
isNull
(
EquipmentSpecificAlarmLog:
:
getConfirmDate
);
i
=
equipmentSpecificAlarmLogMapper
.
update
(
ent
,
updateWrapper
);
}
}
}
}
// else {
// LambdaUpdateWrapper<EquipmentSpecificAlarmLog> updateWrapper = new LambdaUpdateWrapper<EquipmentSpecificAlarmLog>().
// eq(EquipmentSpecificAlarmLog::getEquipmentSpecificId, ent.getEquipmentSpecificId()).
// eq(EquipmentSpecificAlarmLog::getEquipmentSpecificIndexKey, ent.getEquipmentSpecificIndexKey())
// .isNull(EquipmentSpecificAlarmLog::getConfirmDate);
// i = equipmentSpecificAlarmLogMapper.update(ent, updateWrapper);
// }
// }
//int i = confirmAlarmMapper.confirmAlam(ent);
//int i = confirmAlarmMapper.confirmAlam(ent);
if
(
i
>
0
)
{
//
if (i > 0) {
if
(
jcsSwitch
&&
AlarmTypeEnum
.
HZGJ
.
getCode
().
equals
(
ent
.
getConfirmType
()))
{
if
(
jcsSwitch
&&
AlarmTypeEnum
.
HZGJ
.
getCode
().
equals
(
ent
.
getConfirmType
()))
{
// 确警消息发送
// 确警消息发送
if
(
StringUtils
.
isNotBlank
(
userId
))
{
if
(
StringUtils
.
isNotBlank
(
userId
))
{
...
@@ -346,10 +400,11 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
...
@@ -346,10 +400,11 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
}).
start
();
}).
start
();
}
}
}
}
if
(
isBatch
==
1
&&
CollectionUtils
.
isNotEmpty
(
list
))
{
// if (isBatch == 1 && CollectionUtils.isNotEmpty(list)) {
list
.
stream
().
forEach
(
x
->{
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
list
.
stream
().
forEach
(
x
->
{
webMqttHandler
.
publish
(
TopicEnum
.
EQYQR
.
getTopic
(),
JSON
.
parseObject
(
JSON
.
toJSONString
(
x
),
HashMap
.
class
));
webMqttHandler
.
publish
(
TopicEnum
.
EQYQR
.
getTopic
(),
JSON
.
parseObject
(
JSON
.
toJSONString
(
x
),
HashMap
.
class
));
x
.
setAlarmReason
(
ent
.
getAlarmReason
());
//
x.setAlarmReason(ent.getAlarmReason());
// syncConfirmAlarmMsgToSystemctl(x);
// syncConfirmAlarmMsgToSystemctl(x);
});
});
}
else
{
}
else
{
...
@@ -358,7 +413,7 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
...
@@ -358,7 +413,7 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
// syncConfirmAlarmMsgToSystemctl(ent);
// syncConfirmAlarmMsgToSystemctl(ent);
}
}
// syncDataService.syncCreatedSendAlarmReport(ent);
// syncDataService.syncCreatedSendAlarmReport(ent);
}
//
}
TransactionSynchronizationManager
.
registerSynchronization
(
new
TransactionSynchronization
()
{
TransactionSynchronizationManager
.
registerSynchronization
(
new
TransactionSynchronization
()
{
@Override
@Override
public
void
afterCommit
()
{
public
void
afterCommit
()
{
...
@@ -391,7 +446,7 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
...
@@ -391,7 +446,7 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
DateUtils
.
date2LongStr
(
equipmentSpecificAlarmLog
.
getCreateDate
()));
DateUtils
.
date2LongStr
(
equipmentSpecificAlarmLog
.
getCreateDate
()));
model
.
setBody
(
body
);
model
.
setBody
(
body
);
model
.
setMsgType
(
"iotMonitor"
);
model
.
setMsgType
(
"iotMonitor"
);
if
(
isSendApp
){
if
(
isSendApp
)
{
model
.
setIsSendApp
(
true
);
model
.
setIsSendApp
(
true
);
model
.
setTerminal
(
"APP/WEB"
);
model
.
setTerminal
(
"APP/WEB"
);
}
else
{
}
else
{
...
@@ -500,73 +555,73 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
...
@@ -500,73 +555,73 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
//查询当前建筑是否是 最顶级建筑
//查询当前建筑是否是 最顶级建筑
public
static
List
<
FormInstance
>
selectBuildingById
(
List
<
FormInstance
>
formInstances
){
public
static
List
<
FormInstance
>
selectBuildingById
(
List
<
FormInstance
>
formInstances
)
{
if
(
formInstances
.
get
(
0
).
getGroupType
().
equals
(
"building"
)){
if
(
formInstances
.
get
(
0
).
getGroupType
().
equals
(
"building"
))
{
return
formInstances
;
return
formInstances
;
}
}
String
parentId
=
null
;
String
parentId
=
null
;
for
(
FormInstance
formInstance
:
formInstances
)
{
for
(
FormInstance
formInstance
:
formInstances
)
{
if
(
formInstance
.
getFieldName
().
equals
(
"parentId"
)){
if
(
formInstance
.
getFieldName
().
equals
(
"parentId"
))
{
parentId
=
formInstance
.
getFieldValue
();
parentId
=
formInstance
.
getFieldValue
();
}
}
}
}
LambdaQueryWrapper
<
FormInstance
>
wrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
FormInstance
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
FormInstance:
:
getInstanceId
,
parentId
);
wrapper
.
eq
(
FormInstance:
:
getInstanceId
,
parentId
);
formInstances
=
instanceService
.
getBaseMapper
().
selectList
(
wrapper
);
formInstances
=
instanceService
.
getBaseMapper
().
selectList
(
wrapper
);
return
selectBuildingById
(
formInstances
);
return
selectBuildingById
(
formInstances
);
}
}
public
static
void
sendIotSystemAlarm
(
EquipmentSpecificAlarmLog
ent
,
String
userId
,
String
appKey
,
String
product
,
String
token
){
public
static
void
sendIotSystemAlarm
(
EquipmentSpecificAlarmLog
ent
,
String
userId
,
String
appKey
,
String
product
,
String
token
)
{
// Token serverToken = remoteSecurityService.getServerToken();
// Token serverToken = remoteSecurityService.getServerToken();
IotSystemAlarmRo
confirmAlamVo
=
new
IotSystemAlarmRo
();
IotSystemAlarmRo
confirmAlamVo
=
new
IotSystemAlarmRo
();
confirmAlamVo
.
setId
(
ent
.
getId
());
confirmAlamVo
.
setId
(
ent
.
getId
());
ent
=
confirmAlarmMapper
.
getDetailsById
(
String
.
valueOf
(
ent
.
getId
()),
null
);
ent
=
confirmAlarmMapper
.
getDetailsById
(
String
.
valueOf
(
ent
.
getId
()),
null
);
EquipmentSpecific
equipmentSpecific
=
equipmentSpecificSerivce
.
getById
(
ent
.
getEquipmentSpecificId
());
EquipmentSpecific
equipmentSpecific
=
equipmentSpecificSerivce
.
getById
(
ent
.
getEquipmentSpecificId
());
List
<
FormInstance
>
formInstances
=
new
ArrayList
<>();
List
<
FormInstance
>
formInstances
=
new
ArrayList
<>();
//现在需要返回设备的所在建筑及经纬度 查询当前设备所在建筑
//现在需要返回设备的所在建筑及经纬度 查询当前设备所在建筑
if
(!
ValidationUtil
.
isEmpty
(
equipmentSpecific
.
getWarehouseStructureId
()))
{
if
(!
ValidationUtil
.
isEmpty
(
equipmentSpecific
.
getWarehouseStructureId
()))
{
LambdaQueryWrapper
<
FormInstance
>
wrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
FormInstance
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
FormInstance:
:
getInstanceId
,
equipmentSpecific
.
getWarehouseStructureId
());
wrapper
.
eq
(
FormInstance:
:
getInstanceId
,
equipmentSpecific
.
getWarehouseStructureId
());
formInstances
=
instanceService
.
getBaseMapper
().
selectList
(
wrapper
);
formInstances
=
instanceService
.
getBaseMapper
().
selectList
(
wrapper
);
}
}
//判断所在建筑是否是顶级建筑 房间及楼层是没有经纬度的 向上查询
//判断所在建筑是否是顶级建筑 房间及楼层是没有经纬度的 向上查询
if
(!
ValidationUtil
.
isEmpty
(
formInstances
)){
if
(!
ValidationUtil
.
isEmpty
(
formInstances
))
{
formInstances
=
selectBuildingById
(
formInstances
);
formInstances
=
selectBuildingById
(
formInstances
);
}
}
String
address
=
null
;
String
address
=
null
;
String
latitude
=
null
;
String
latitude
=
null
;
String
longitude
=
null
;
String
longitude
=
null
;
if
(!
ValidationUtil
.
isEmpty
(
formInstances
)){
if
(!
ValidationUtil
.
isEmpty
(
formInstances
))
{
for
(
FormInstance
formInstance
:
formInstances
)
{
for
(
FormInstance
formInstance
:
formInstances
)
{
if
(
formInstance
.
getFieldName
().
equals
(
"address"
)){
if
(
formInstance
.
getFieldName
().
equals
(
"address"
))
{
address
=
formInstance
.
getFieldValue
();
address
=
formInstance
.
getFieldValue
();
if
(
address
.
contains
(
"@"
)){
if
(
address
.
contains
(
"@"
))
{
String
[]
split
=
address
.
split
(
"@"
);
String
[]
split
=
address
.
split
(
"@"
);
address
=
split
[
0
];
address
=
split
[
0
];
}
}
}
}
if
(
formInstance
.
getFieldName
().
equals
(
"latitude"
)){
if
(
formInstance
.
getFieldName
().
equals
(
"latitude"
))
{
latitude
=
formInstance
.
getFieldValue
();
latitude
=
formInstance
.
getFieldValue
();
}
}
if
(
formInstance
.
getFieldName
().
equals
(
"longitude"
)){
if
(
formInstance
.
getFieldName
().
equals
(
"longitude"
))
{
longitude
=
formInstance
.
getFieldValue
();
longitude
=
formInstance
.
getFieldValue
();
}
}
}
}
}
}
if
(!
ValidationUtil
.
isEmpty
(
equipmentSpecific
.
getAgencyId
())){
if
(!
ValidationUtil
.
isEmpty
(
equipmentSpecific
.
getAgencyId
()))
{
// 机场单位
// 机场单位
JSONObject
unitMap
=
jcsFeign
.
getUnitById
(
appKey
,
product
,
token
,
equipmentSpecific
.
getAgencyId
()).
getResult
();
JSONObject
unitMap
=
jcsFeign
.
getUnitById
(
appKey
,
product
,
token
,
equipmentSpecific
.
getAgencyId
()).
getResult
();
JSONObject
jsonObject
=
unitMap
.
getJSONObject
(
"map"
);
JSONObject
jsonObject
=
unitMap
.
getJSONObject
(
"map"
);
confirmAlamVo
.
setUnitInvolvedId
(
equipmentSpecific
.
getAgencyId
());
confirmAlamVo
.
setUnitInvolvedId
(
equipmentSpecific
.
getAgencyId
());
confirmAlamVo
.
setUnitInvolvedName
(
unitMap
.
getString
(
"bizOrgName"
));
confirmAlamVo
.
setUnitInvolvedName
(
unitMap
.
getString
(
"bizOrgName"
));
confirmAlamVo
.
setAddress
(
address
==
null
?
jsonObject
.
getString
(
"companyLocation"
)
:
address
);
confirmAlamVo
.
setAddress
(
address
==
null
?
jsonObject
.
getString
(
"companyLocation"
)
:
address
);
confirmAlamVo
.
setLongitude
(
longitude
==
null
?
jsonObject
.
getDouble
(
"longitude"
)
:
Double
.
valueOf
(
longitude
));
confirmAlamVo
.
setLongitude
(
longitude
==
null
?
jsonObject
.
getDouble
(
"longitude"
)
:
Double
.
valueOf
(
longitude
));
confirmAlamVo
.
setLatitude
(
latitude
==
null
?
jsonObject
.
getDouble
(
"latitude"
):
Double
.
valueOf
(
latitude
));
confirmAlamVo
.
setLatitude
(
latitude
==
null
?
jsonObject
.
getDouble
(
"latitude"
)
:
Double
.
valueOf
(
latitude
));
}
}
try
{
try
{
// 机场人员
// 机场人员
...
@@ -580,10 +635,10 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
...
@@ -580,10 +635,10 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
Map
<
String
,
Double
>
equipLocationInfo
=
equipmentSpecificSerivce
.
getEquipLocationInfo
(
ent
.
getEquipmentSpecificId
());
Map
<
String
,
Double
>
equipLocationInfo
=
equipmentSpecificSerivce
.
getEquipLocationInfo
(
ent
.
getEquipmentSpecificId
());
if
(!
ObjectUtils
.
isEmpty
(
equipLocationInfo
))
{
if
(!
ObjectUtils
.
isEmpty
(
equipLocationInfo
))
{
if
(
equipLocationInfo
.
containsKey
(
"longitude"
)){
if
(
equipLocationInfo
.
containsKey
(
"longitude"
))
{
confirmAlamVo
.
setFloorLongitude
(
equipLocationInfo
.
get
(
"longitude"
));
confirmAlamVo
.
setFloorLongitude
(
equipLocationInfo
.
get
(
"longitude"
));
}
}
if
(
equipLocationInfo
.
containsKey
(
"latitude"
)){
if
(
equipLocationInfo
.
containsKey
(
"latitude"
))
{
confirmAlamVo
.
setFloorLatitude
(
equipLocationInfo
.
get
(
"latitude"
));
confirmAlamVo
.
setFloorLatitude
(
equipLocationInfo
.
get
(
"latitude"
));
}
}
}
}
...
@@ -594,7 +649,7 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
...
@@ -594,7 +649,7 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
}
}
}
}
private
Double
getVal
(
String
value
){
private
Double
getVal
(
String
value
)
{
return
ValidationUtil
.
isEmpty
(
value
)
?
null
:
Double
.
parseDouble
(
value
);
return
ValidationUtil
.
isEmpty
(
value
)
?
null
:
Double
.
parseDouble
(
value
);
}
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/MqttReceiveServiceImpl.java
View file @
7982ff55
...
@@ -201,7 +201,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
...
@@ -201,7 +201,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
public
static
List
<
EquipmentSpecificAlarmLog
>
upAlarmLogStatus
(
String
iotCode
,
String
equipmentSpecificIndexKey
,
public
static
List
<
EquipmentSpecificAlarmLog
>
upAlarmLogStatus
(
String
iotCode
,
String
equipmentSpecificIndexKey
,
String
traceId
,
IEquipmentSpecificAlarmLogService
equipmentSpecificAlarmLogService
,
String
traceId
,
IEquipmentSpecificAlarmLogService
equipmentSpecificAlarmLogService
,
boolean
flag
,
String
batchConfirm
)
{
boolean
flag
,
boolean
batchConfirm
,
String
confirmType
)
{
// LambdaQueryWrapper<EquipmentSpecificAlarmLog> queryWrapper = new LambdaQueryWrapper<>();
// LambdaQueryWrapper<EquipmentSpecificAlarmLog> queryWrapper = new LambdaQueryWrapper<>();
// if (batchConfirm.equalsIgnoreCase(HandleBatchConfirmEnum.SINGLE.getCode())) {
// if (batchConfirm.equalsIgnoreCase(HandleBatchConfirmEnum.SINGLE.getCode())) {
...
@@ -594,7 +594,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
...
@@ -594,7 +594,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
bool
=
Boolean
.
FALSE
;
bool
=
Boolean
.
FALSE
;
}
else
{
}
else
{
alarmLogs
.
addAll
(
upAlarmLogStatus
(
action
.
getIotCode
(),
action
.
getEquipmentSpecificIndexKey
(),
action
.
getTraceId
(),
alarmLogs
.
addAll
(
upAlarmLogStatus
(
action
.
getIotCode
(),
action
.
getEquipmentSpecificIndexKey
(),
action
.
getTraceId
(),
equipmentSpecificAlarmLogService
,
false
,
""
));
equipmentSpecificAlarmLogService
,
false
,
false
,
""
));
mqttSendGateway
.
sendToMqtt
(
TopicEnum
.
EQYQR
.
getTopic
(),
JSONArray
.
toJSON
(
action
).
toString
());
mqttSendGateway
.
sendToMqtt
(
TopicEnum
.
EQYQR
.
getTopic
(),
JSONArray
.
toJSON
(
action
).
toString
());
bool
=
Boolean
.
TRUE
;
bool
=
Boolean
.
TRUE
;
}
}
...
@@ -858,7 +858,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
...
@@ -858,7 +858,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
bool
=
Boolean
.
FALSE
;
bool
=
Boolean
.
FALSE
;
}
else
{
}
else
{
alarmLogs
.
addAll
(
upAlarmLogStatus
(
action
.
getIotCode
(),
action
.
getEquipmentSpecificIndexKey
(),
action
.
getTraceId
(),
alarmLogs
.
addAll
(
upAlarmLogStatus
(
action
.
getIotCode
(),
action
.
getEquipmentSpecificIndexKey
(),
action
.
getTraceId
(),
equipmentSpecificAlarmLogService
,
false
,
""
));
equipmentSpecificAlarmLogService
,
false
,
false
,
""
));
mqttSendGateway
.
sendToMqtt
(
TopicEnum
.
EQYQR
.
getTopic
(),
JSONArray
.
toJSON
(
action
).
toString
());
mqttSendGateway
.
sendToMqtt
(
TopicEnum
.
EQYQR
.
getTopic
(),
JSONArray
.
toJSON
(
action
).
toString
());
bool
=
Boolean
.
TRUE
;
bool
=
Boolean
.
TRUE
;
}
}
...
@@ -1151,7 +1151,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
...
@@ -1151,7 +1151,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
bool
=
Boolean
.
FALSE
;
bool
=
Boolean
.
FALSE
;
}
else
{
}
else
{
alarmLogs
.
addAll
(
upAlarmLogStatus
(
action
.
getIotCode
(),
action
.
getEquipmentSpecificIndexKey
(),
action
.
getTraceId
(),
alarmLogs
.
addAll
(
upAlarmLogStatus
(
action
.
getIotCode
(),
action
.
getEquipmentSpecificIndexKey
(),
action
.
getTraceId
(),
equipmentSpecificAlarmLogService
,
false
,
""
));
equipmentSpecificAlarmLogService
,
false
,
false
,
""
));
mqttSendGateway
.
sendToMqtt
(
TopicEnum
.
EQYQR
.
getTopic
(),
JSONArray
.
toJSON
(
action
).
toString
());
mqttSendGateway
.
sendToMqtt
(
TopicEnum
.
EQYQR
.
getTopic
(),
JSONArray
.
toJSON
(
action
).
toString
());
bool
=
Boolean
.
TRUE
;
bool
=
Boolean
.
TRUE
;
}
}
...
...
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