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
e7b92ac0
Commit
e7b92ac0
authored
Jun 01, 2022
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加设备导入导出功能
parent
595f6442
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
1 deletion
+21
-1
device-manager/src/main/java/com/mortals/xhx/module/device/service/impl/DeviceServiceImpl.java
...als/xhx/module/device/service/impl/DeviceServiceImpl.java
+13
-1
device-manager/src/main/java/com/mortals/xhx/module/device/web/DeviceController.java
...a/com/mortals/xhx/module/device/web/DeviceController.java
+8
-0
No files found.
device-manager/src/main/java/com/mortals/xhx/module/device/service/impl/DeviceServiceImpl.java
View file @
e7b92ac0
...
@@ -184,7 +184,7 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D
...
@@ -184,7 +184,7 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D
deviceReq
.
setPlatformCode
(
platformEntity
.
getPlatformSn
());
deviceReq
.
setPlatformCode
(
platformEntity
.
getPlatformSn
());
if
(!
ObjectUtils
.
isEmpty
(
platformEntity
.
getSendUrl
())
if
(!
ObjectUtils
.
isEmpty
(
platformEntity
.
getSendUrl
())
&&
platformEntity
.
getSendSwitch
()
==
SendSwitchEnum
.
启用
.
getValue
()
&&
platformEntity
.
getSendSwitch
()
==
SendSwitchEnum
.
启用
.
getValue
()
&&
entity
.
getSwitchSend
())
{
&&
entity
.
getSwitchSend
())
{
if
(
PatternPool
.
URL_HTTP
.
matcher
(
platformEntity
.
getSendUrl
()).
find
())
{
if
(
PatternPool
.
URL_HTTP
.
matcher
(
platformEntity
.
getSendUrl
()).
find
())
{
ApiResp
<
String
>
resp
=
messageService
.
sendThirdParty
(
platformEntity
.
getSendUrl
(),
deviceReq
);
ApiResp
<
String
>
resp
=
messageService
.
sendThirdParty
(
platformEntity
.
getSendUrl
(),
deviceReq
);
}
else
{
}
else
{
...
@@ -223,4 +223,16 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D
...
@@ -223,4 +223,16 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D
super
.
removeBefore
(
ids
,
context
);
super
.
removeBefore
(
ids
,
context
);
}
}
@Override
protected
void
exportAfter
(
DeviceEntity
params
,
Context
context
,
List
<
DeviceEntity
>
list
)
throws
AppException
{
list
.
stream
().
forEach
(
deviceEntity
->
{
PlatformEntity
platformEntity
=
platformService
.
get
(
deviceEntity
.
getPlatformId
());
ProductEntity
productEntity
=
productService
.
get
(
deviceEntity
.
getProductId
());
if
(!
ObjectUtils
.
isEmpty
(
platformEntity
)
&&
!
ObjectUtils
.
isEmpty
(
productEntity
))
{
deviceEntity
.
setProductCode
(
productEntity
.
getProductCode
());
deviceEntity
.
setPlatformCode
(
platformEntity
.
getPlatformSn
());
}
});
super
.
exportAfter
(
params
,
context
,
list
);
}
}
}
\ No newline at end of file
device-manager/src/main/java/com/mortals/xhx/module/device/web/DeviceController.java
View file @
e7b92ac0
...
@@ -214,4 +214,12 @@ public class DeviceController extends BaseCRUDJsonMappingController<DeviceServic
...
@@ -214,4 +214,12 @@ public class DeviceController extends BaseCRUDJsonMappingController<DeviceServic
return
jsonObject
.
toJSONString
();
return
jsonObject
.
toJSONString
();
}
}
@Override
public
void
doExportAfter
(
Context
context
,
List
<
DeviceEntity
>
list
)
throws
AppException
{
list
.
stream
().
forEach
(
item
->{
});
super
.
doExportAfter
(
context
,
list
);
}
}
}
\ No newline at end of file
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