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
9d81430d
Commit
9d81430d
authored
Apr 15, 2024
by
KeYong
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_dl_3.7.1.1' into develop_dl_3.7.1.1
parents
6f2bd136
3dd7e63a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
79 deletions
+5
-79
ConfirmAlarmServiceImpl.java
...oin/equipmanage/service/impl/ConfirmAlarmServiceImpl.java
+5
-79
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 @
9d81430d
...
@@ -197,7 +197,6 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
...
@@ -197,7 +197,6 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
EquipmentSpecificAlarmLog
alarmLog
=
equipmentSpecificAlarmLogService
.
getById
(
ent
.
getId
());
EquipmentSpecificAlarmLog
alarmLog
=
equipmentSpecificAlarmLogService
.
getById
(
ent
.
getId
());
List
<
EquipmentSpecificAlarmLog
>
list
=
null
;
List
<
EquipmentSpecificAlarmLog
>
list
=
null
;
String
handleConfirm
=
ent
.
getHandleConfirm
();
String
handleConfirm
=
ent
.
getHandleConfirm
();
int
isBatch
=
0
;
if
(!
ObjectUtils
.
isEmpty
(
alarmLog
))
{
if
(!
ObjectUtils
.
isEmpty
(
alarmLog
))
{
Long
equipmentSpecificAlarmId
=
alarmLog
.
getEquipmentSpecificAlarmId
();
Long
equipmentSpecificAlarmId
=
alarmLog
.
getEquipmentSpecificAlarmId
();
...
@@ -205,37 +204,7 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
...
@@ -205,37 +204,7 @@ 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());
// if (!StringUtil.isNotEmpty(equipment.getCleanType())) {
// 若此装备未定义消除策略,默认设置为复位信号自动消除
// equipment.setCleanType(AlarmCleanTypeEnum.ZDXC.getCode());
// equipmentMapper.updateById(equipment);
// }
// if (StringUtil.isNotEmpty(equipment.getCleanType()) && AlarmCleanTypeEnum.QRXC.getCode().equals(equipment.getCleanType())) {
// EquipmentSpecificAlarm alarm = equipmentSpecificAlarmMapper.selectById(alarmLog.getEquipmentSpecificAlarmId());
// alarm.setStatus(AlarmStatusEnum.HF.getCode());
// equipmentSpecificAlarmMapper.updateById(alarm);
// // 警情处理确认后消除更新value 为false,否则灯还在闪
// LambdaUpdateWrapper<EquipmentSpecificIndex> updateWrapper = new LambdaUpdateWrapper<EquipmentSpecificIndex>().
// set(EquipmentSpecificIndex::getValue, "false").
// set(EquipmentSpecificIndex::getUpdateDate, new Date()).
// eq(EquipmentSpecificIndex::getEquipmentSpecificId, alarm.getEquipmentSpecificId()).
// eq(EquipmentSpecificIndex::getEquipmentIndexKey, alarm.getEquipmentSpecificIndexKey());
// iEquipmentSpecificIndexSerivce.update(updateWrapper);
// //指标图标显示根据 EquipmentSpecific 表中的 RealtimeIotIndexValue 判断 同步修改
// LambdaUpdateWrapper<EquipmentSpecific> wrapper = new LambdaUpdateWrapper<EquipmentSpecific>().
// set(EquipmentSpecific::getRealtimeIotIndexValue, "false").
// set(EquipmentSpecific::getRealtimeIotIndexUpdateDate, new Date()).
// eq(EquipmentSpecific::getId, alarm.getEquipmentSpecificId());
// equipmentSpecificSerivce.update(wrapper);
// MqttReceiveServiceImpl.upAlarmLogStatus(alarmLog.getIotCode(), alarmLog.getEquipmentSpecificIndexKey(), null, equipmentSpecificAlarmLogService, true, "");
// }
// 如果是批量确警,先查询,再确警,用于批量消息推送
// isBatch = ent.getIsBatch();
// if (isBatch == 1) {
// 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
()));
...
@@ -254,46 +223,8 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
...
@@ -254,46 +223,8 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
}
else
{
}
else
{
ent
.
setResolveResult
(
dateString
+
" "
+
userModel
.
getRealName
()
+
" 进行警情确认处理。"
);
ent
.
setResolveResult
(
dateString
+
" "
+
userModel
.
getRealName
()
+
" 进行警情确认处理。"
);
}
}
// if (ent.getIsBatch() == 0){
// if (StringUtils.isNotEmpty(handleConfirm) && HandleBatchConfirmEnum.SINGLE.getCode().equalsIgnoreCase(handleConfirm)) {
if
(
StringUtils
.
isEmpty
(
handleConfirm
)
||
StringUtils
.
isNotEmpty
(
handleConfirm
)
&&
HandleBatchConfirmEnum
.
SINGLE
.
getCode
().
equalsIgnoreCase
(
handleConfirm
))
{
// QueryWrapper<EquipmentSpecificAlarmLog> wrapper = new QueryWrapper<>();
// wrapper.eq("equipment_specific_id", ent.getEquipmentSpecificId()).isNull("confirm_date");
// List<EquipmentSpecificAlarmLog> logs = equipmentSpecificAlarmLogMapper.selectList(wrapper);
// if (0 < logs.size()) {
// for (EquipmentSpecificAlarmLog x : logs) {
// 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());
// }
// equipmentSpecificAlarmLogService.updateBatchById(logs);
// }
// } else if (StringUtils.isNotEmpty(handleConfirm) && HandleBatchConfirmEnum.ALL.getCode().equalsIgnoreCase(handleConfirm)) {
// QueryWrapper<EquipmentSpecificAlarmLog> logQueryWrapper = new QueryWrapper<>();
// logQueryWrapper.isNull("confirm_date");
// List<EquipmentSpecificAlarmLog> logList = equipmentSpecificAlarmLogMapper.selectList(logQueryWrapper);
// if (0 < logList.size()) {
// for (EquipmentSpecificAlarmLog x : logList) {
// 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());
// }
// equipmentSpecificAlarmLogService.updateBatchById(logList);
// }
// } else {
// i = equipmentSpecificAlarmLogMapper.updateById(ent);
// }
// } else {
if
(
StringUtils
.
isNotEmpty
(
handleConfirm
)
&&
HandleBatchConfirmEnum
.
SINGLE
.
getCode
().
equalsIgnoreCase
(
handleConfirm
))
{
QueryWrapper
<
EquipmentSpecificAlarm
>
alarmWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
EquipmentSpecificAlarm
>
alarmWrapper
=
new
QueryWrapper
<>();
alarmWrapper
.
eq
(
"equipment_specific_id"
,
ent
.
getEquipmentSpecificId
()).
eq
(
"status"
,
1
);
alarmWrapper
.
eq
(
"equipment_specific_id"
,
ent
.
getEquipmentSpecificId
()).
eq
(
"status"
,
1
);
List
<
EquipmentSpecificAlarm
>
alarms
=
equipmentSpecificAlarmMapper
.
selectList
(
alarmWrapper
);
List
<
EquipmentSpecificAlarm
>
alarms
=
equipmentSpecificAlarmMapper
.
selectList
(
alarmWrapper
);
...
@@ -327,6 +258,7 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
...
@@ -327,6 +258,7 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
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
.
setDefectBatchId
(
ent
.
getDefectBatchId
());
x
.
setAlarmReason
(
ent
.
getAlarmReason
());
x
.
setAlarmReason
(
ent
.
getAlarmReason
());
x
.
setCleanTime
(
date
);
x
.
setCleanTime
(
date
);
}
}
...
@@ -364,6 +296,7 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
...
@@ -364,6 +296,7 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
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
.
setDefectBatchId
(
ent
.
getDefectBatchId
());
x
.
setType
(
ent
.
getType
());
x
.
setType
(
ent
.
getType
());
x
.
setResolveResult
(
ent
.
getResolveResult
());
x
.
setResolveResult
(
ent
.
getResolveResult
());
x
.
setAlarmReason
(
ent
.
getAlarmReason
());
x
.
setAlarmReason
(
ent
.
getAlarmReason
());
...
@@ -372,14 +305,7 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
...
@@ -372,14 +305,7 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
equipmentSpecificAlarmLogService
.
updateBatchById
(
list
);
equipmentSpecificAlarmLogService
.
updateBatchById
(
list
);
}
}
}
}
// 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);
...
...
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