Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
device-new-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
device-new-platform
Commits
c19bd4df
Commit
c19bd4df
authored
Jul 15, 2022
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设备添加站点编码
parent
a52305ad
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
device-manager/src/main/java/com/mortals/xhx/module/device/service/impl/DeviceServiceImpl.java
...als/xhx/module/device/service/impl/DeviceServiceImpl.java
+8
-6
No files found.
device-manager/src/main/java/com/mortals/xhx/module/device/service/impl/DeviceServiceImpl.java
View file @
c19bd4df
...
@@ -215,7 +215,7 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D
...
@@ -215,7 +215,7 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D
//注册rabbmit相关队列与绑定
//注册rabbmit相关队列与绑定
registerRabbitQueue
(
entity
,
platformEntity
,
productEntity
);
registerRabbitQueue
(
entity
,
platformEntity
,
productEntity
);
//新增设备通知第三方平台
//新增设备通知第三方平台
// sendThirdParty(entity, productEntity, platformEntity, DeviceMethodEnum.ADD);
// sendThirdParty(entity, productEntity, platformEntity, DeviceMethodEnum.ADD);
}
else
{
}
else
{
throw
new
AppException
(
"产品或平台不存在!"
);
throw
new
AppException
(
"产品或平台不存在!"
);
}
}
...
@@ -257,7 +257,7 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D
...
@@ -257,7 +257,7 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D
//注册rabbmit相关队列与绑定
//注册rabbmit相关队列与绑定
registerRabbitQueue
(
entity
,
platformEntity
,
productEntity
);
registerRabbitQueue
(
entity
,
platformEntity
,
productEntity
);
//新增设备通知第三方平台 激活后的设备才通知
//新增设备通知第三方平台 激活后的设备才通知
if
(
entity
.
getDeviceStatus
()>
0
)
{
if
(
entity
.
getDeviceStatus
()
>
0
)
{
sendThirdParty
(
entity
,
productEntity
,
platformEntity
,
DeviceMethodEnum
.
UPDATE
);
sendThirdParty
(
entity
,
productEntity
,
platformEntity
,
DeviceMethodEnum
.
UPDATE
);
}
}
}
}
...
@@ -398,16 +398,18 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D
...
@@ -398,16 +398,18 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D
entity
.
setPlatformName
(
platformEntity
.
getPlatformName
());
entity
.
setPlatformName
(
platformEntity
.
getPlatformName
());
}
}
}
}
//如果负责人与电话为空,查询站点关联
//如果负责人与电话为空,查询站点关联
if
(
ObjectUtils
.
isEmpty
(
entity
.
getLeadingOfficial
()))
{
if
(
ObjectUtils
.
isEmpty
(
entity
.
getLeadingOfficial
())
||
ObjectUtils
.
isEmpty
(
entity
.
getSiteCode
()))
{
Rest
<
SitePdu
>
info
=
siteFeign
.
info
(
entity
.
getSiteId
());
Rest
<
SitePdu
>
info
=
siteFeign
.
info
(
entity
.
getSiteId
());
if
(
info
.
getCode
()==
YesNoEnum
.
YES
.
getValue
())
{
if
(
info
.
getCode
()
==
YesNoEnum
.
YES
.
getValue
())
{
entity
.
setLeadingOfficial
(
info
.
getData
().
getLeadingOfficial
());
entity
.
setLeadingOfficial
(
info
.
getData
().
getLeadingOfficial
());
entity
.
setLeadingOfficialTelephone
(
info
.
getData
().
getLeadingOfficialTelephone
());
entity
.
setLeadingOfficialTelephone
(
info
.
getData
().
getLeadingOfficialTelephone
());
entity
.
setSiteCode
(
info
.
getData
().
getSiteCode
());
entity
.
setSiteName
(
info
.
getData
().
getSiteName
());
}
}
}
}
super
.
saveBefore
(
entity
,
context
);
super
.
saveBefore
(
entity
,
context
);
}
}
...
...
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