Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YeeAmosFireAutoSysRoot
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
station
YeeAmosFireAutoSysRoot
Commits
e255d280
Commit
e255d280
authored
Jan 19, 2021
by
田涛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
数字预案绑定资源删除信息同步
parent
640a10a8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
10 deletions
+12
-10
ContingencyPlanServiceImpl.java
...fas/business/service/impl/ContingencyPlanServiceImpl.java
+4
-5
EquipmentServiceImpl.java
.../amos/fas/business/service/impl/EquipmentServiceImpl.java
+8
-5
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/ContingencyPlanServiceImpl.java
View file @
e255d280
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.component.rule.config.ClazzUtils
;
import
com.yeejoin.amos.fas.business.dao.mapper.*
;
...
...
@@ -19,9 +18,7 @@ import com.yeejoin.amos.fas.exception.YeeException;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.eclipse.paho.client.mqttv3.IMqttMessageListener
;
import
org.eclipse.paho.client.mqttv3.MqttException
;
import
org.eclipse.paho.client.mqttv3.MqttMessage
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Qualifier
;
...
...
@@ -403,7 +400,7 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
}
catch
(
MqttException
e
)
{
logger
.
fatal
(
"订阅规则删除同步消息失败,资源删除或取消无法同步"
,
e
);
}
try
{
/*
try {
emqKeeper.getMqttClient().subscribe(DELETE_SYNC_PLAN_EQUIP, (s, mqttMessage) -> {
System.out.println(s);
byte[] payload = mqttMessage.getPayload();
...
...
@@ -418,6 +415,7 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
});
} catch (MqttException e) {
logger.fatal("订阅保护对象删除同步消息失败,资源删除或取消无法同步", e);
}
}
*/
}
}
\ No newline at end of file
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/EquipmentServiceImpl.java
View file @
e255d280
...
...
@@ -2,10 +2,7 @@ package com.yeejoin.amos.fas.business.service.impl;
import
com.yeejoin.amos.fas.business.constants.FasConstant
;
import
com.yeejoin.amos.fas.business.dao.mapper.EquipmentSpecificMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.FireEquipMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.ImpAndFireEquipMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.ImpEquipMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.*
;
import
com.yeejoin.amos.fas.business.dao.repository.IEquipmentDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IEquipmentFireEquipmentDao
;
import
com.yeejoin.amos.fas.business.dao.repository.IPreplanPictureDao
;
...
...
@@ -72,6 +69,9 @@ public class EquipmentServiceImpl implements IEquipmentService {
@Autowired
private
RedisTemplate
redisTemplate
;
@Autowired
private
PlanEquipmentMapper
planEquipmentMapper
;
// @Autowired
// private IFmeaEquipmentPointDao iFmeaEquipmentPointDao;
...
...
@@ -109,6 +109,7 @@ public class EquipmentServiceImpl implements IEquipmentService {
@Override
@Transactional
public
String
[]
delete
(
String
[]
idArray
)
throws
Exception
{
List
<
Long
>
idList
=
new
ArrayList
<>();
for
(
String
id
:
idArray
)
{
Optional
<
Equipment
>
equipment1
=
iEquipmentDao
.
findById
(
Long
.
parseLong
(
id
));
Equipment
equipment
=
null
;
...
...
@@ -125,10 +126,12 @@ public class EquipmentServiceImpl implements IEquipmentService {
}
else
{
throw
new
Exception
(
"找不到指定的对象:"
+
id
);
}
idList
.
add
(
Long
.
valueOf
(
id
));
//删除重点设备关联关系
equipmentFireEquipmentDao
.
deleteByEquipmentId
(
Long
.
valueOf
(
id
));
}
// 同步至数字预案
planEquipmentMapper
.
logicDeleteByEquipIdList
(
idList
);
return
idArray
;
}
...
...
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