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
0e89059f
Commit
0e89059f
authored
Sep 21, 2023
by
KeYong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新确警
parent
3cf40340
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
14 deletions
+22
-14
OrgPersonController.java
...oot/module/common/biz/controller/OrgPersonController.java
+0
-5
ConfirmAlarmServiceImpl.java
...oin/equipmanage/service/impl/ConfirmAlarmServiceImpl.java
+4
-5
MqttReceiveServiceImpl.java
...join/equipmanage/service/impl/MqttReceiveServiceImpl.java
+18
-4
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/OrgPersonController.java
View file @
0e89059f
...
@@ -8,9 +8,6 @@ import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
...
@@ -8,9 +8,6 @@ import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import
com.yeejoin.amos.boot.biz.common.constants.CommonConstant
;
import
com.yeejoin.amos.boot.biz.common.constants.CommonConstant
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.biz.common.interceptors.PermissionInterceptorContext
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.common.api.core.framework.PersonIdentify
;
import
com.yeejoin.amos.boot.module.common.api.core.framework.PersonIdentify
;
import
com.yeejoin.amos.boot.module.common.api.dto.*
;
import
com.yeejoin.amos.boot.module.common.api.dto.*
;
...
@@ -26,7 +23,6 @@ import io.swagger.annotations.Api;
...
@@ -26,7 +23,6 @@ import io.swagger.annotations.Api;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
...
@@ -43,7 +39,6 @@ import java.util.Collection;
...
@@ -43,7 +39,6 @@ import java.util.Collection;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
/**
* @author fengwang
* @author fengwang
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/ConfirmAlarmServiceImpl.java
View file @
0e89059f
...
@@ -25,7 +25,6 @@ import com.yeejoin.equipmanage.service.*;
...
@@ -25,7 +25,6 @@ import com.yeejoin.equipmanage.service.*;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.context.annotation.Lazy
;
...
@@ -39,7 +38,6 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
...
@@ -39,7 +38,6 @@ 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
{
...
@@ -200,6 +198,7 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
...
@@ -200,6 +198,7 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
ent
.
setEquipmentSpecificAlarmId
(
equipmentSpecificAlarmId
);
ent
.
setEquipmentSpecificAlarmId
(
equipmentSpecificAlarmId
);
ent
.
setEquipmentSpecificId
(
alarmLog
.
getEquipmentSpecificId
());
ent
.
setEquipmentSpecificId
(
alarmLog
.
getEquipmentSpecificId
());
ent
.
setEquipmentSpecificIndexKey
(
alarmLog
.
getEquipmentSpecificIndexKey
());
ent
.
setEquipmentSpecificIndexKey
(
alarmLog
.
getEquipmentSpecificIndexKey
());
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
()))
{
// 若此装备未定义消除策略,默认设置为复位信号自动消除
// 若此装备未定义消除策略,默认设置为复位信号自动消除
...
@@ -218,13 +217,13 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
...
@@ -218,13 +217,13 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
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
();
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/MqttReceiveServiceImpl.java
View file @
0e89059f
...
@@ -185,7 +185,21 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
...
@@ -185,7 +185,21 @@ 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
)
{
boolean
flag
,
String
batchConfirm
)
{
// LambdaQueryWrapper<EquipmentSpecificAlarmLog> queryWrapper = new LambdaQueryWrapper<>();
// if (batchConfirm.equalsIgnoreCase(HandleBatchConfirmEnum.SINGLE.getCode())) {
// queryWrapper.eq(EquipmentSpecificAlarmLog::getIotCode, iotCode);
// queryWrapper.ne(EquipmentSpecificAlarmLog::getStatus, AlarmStatusEnum.HF.getCode());
// } else if (batchConfirm.equalsIgnoreCase(HandleBatchConfirmEnum.ALL.getCode())) {
// // 此处做了全库的设备告警消除原因有二:第一点 目前在警情确认的时候会把设备定义类型是确认消除的设备的同一类型告警全部消除,所以此处逻辑合理;
// // 第二点:现在做了一键做全库设备的确认操作,但是没有全库设备的消除操作功能,所以此处做如下逻辑符合功能操作的惯性。 ----2023年9月20日 柯勇
// queryWrapper.ne(EquipmentSpecificAlarmLog::getStatus, AlarmStatusEnum.HF.getCode());
// } else {
// queryWrapper.eq(EquipmentSpecificAlarmLog::getIotCode, iotCode);
// queryWrapper.eq(EquipmentSpecificAlarmLog::getEquipmentSpecificIndexKey, equipmentSpecificIndexKey);
// queryWrapper.ne(EquipmentSpecificAlarmLog::getStatus, AlarmStatusEnum.HF.getCode());
// }
LambdaQueryWrapper
<
EquipmentSpecificAlarmLog
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
EquipmentSpecificAlarmLog
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
EquipmentSpecificAlarmLog:
:
getIotCode
,
iotCode
);
queryWrapper
.
eq
(
EquipmentSpecificAlarmLog:
:
getIotCode
,
iotCode
);
queryWrapper
.
eq
(
EquipmentSpecificAlarmLog:
:
getEquipmentSpecificIndexKey
,
equipmentSpecificIndexKey
);
queryWrapper
.
eq
(
EquipmentSpecificAlarmLog:
:
getEquipmentSpecificIndexKey
,
equipmentSpecificIndexKey
);
...
@@ -563,7 +577,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
...
@@ -563,7 +577,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
mqttSendGateway
.
sendToMqtt
(
TopicEnum
.
EQDQR
.
getTopic
(),
JSONArray
.
toJSON
(
action
).
toString
());
mqttSendGateway
.
sendToMqtt
(
TopicEnum
.
EQDQR
.
getTopic
(),
JSONArray
.
toJSON
(
action
).
toString
());
}
else
{
}
else
{
alarmLogs
.
addAll
(
upAlarmLogStatus
(
action
.
getIotCode
(),
action
.
getEquipmentSpecificIndexKey
(),
action
.
getTraceId
(),
alarmLogs
.
addAll
(
upAlarmLogStatus
(
action
.
getIotCode
(),
action
.
getEquipmentSpecificIndexKey
(),
action
.
getTraceId
(),
equipmentSpecificAlarmLogService
,
false
));
equipmentSpecificAlarmLogService
,
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
;
}
}
...
@@ -813,7 +827,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
...
@@ -813,7 +827,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
mqttSendGateway
.
sendToMqtt
(
TopicEnum
.
EQDQR
.
getTopic
(),
JSONArray
.
toJSON
(
action
).
toString
());
mqttSendGateway
.
sendToMqtt
(
TopicEnum
.
EQDQR
.
getTopic
(),
JSONArray
.
toJSON
(
action
).
toString
());
}
else
{
}
else
{
alarmLogs
.
addAll
(
upAlarmLogStatus
(
action
.
getIotCode
(),
action
.
getEquipmentSpecificIndexKey
(),
action
.
getTraceId
(),
alarmLogs
.
addAll
(
upAlarmLogStatus
(
action
.
getIotCode
(),
action
.
getEquipmentSpecificIndexKey
(),
action
.
getTraceId
(),
equipmentSpecificAlarmLogService
,
false
));
equipmentSpecificAlarmLogService
,
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
;
}
}
...
@@ -1074,7 +1088,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
...
@@ -1074,7 +1088,7 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
mqttSendGateway
.
sendToMqtt
(
TopicEnum
.
EQDQR
.
getTopic
(),
JSONArray
.
toJSON
(
action
).
toString
());
mqttSendGateway
.
sendToMqtt
(
TopicEnum
.
EQDQR
.
getTopic
(),
JSONArray
.
toJSON
(
action
).
toString
());
}
else
{
}
else
{
alarmLogs
.
addAll
(
upAlarmLogStatus
(
action
.
getIotCode
(),
action
.
getEquipmentSpecificIndexKey
(),
action
.
getTraceId
(),
alarmLogs
.
addAll
(
upAlarmLogStatus
(
action
.
getIotCode
(),
action
.
getEquipmentSpecificIndexKey
(),
action
.
getTraceId
(),
equipmentSpecificAlarmLogService
,
false
));
equipmentSpecificAlarmLogService
,
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