Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
info-publish-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
赵啸非
info-publish-platform
Commits
b8603d2f
Commit
b8603d2f
authored
Dec 06, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改同步逻辑
parent
77d1ff5f
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
25 deletions
+25
-25
info-publish-manager-ui/admin/src/components/FileUpload.vue
info-publish-manager-ui/admin/src/components/FileUpload.vue
+2
-0
info-publish-manager-ui/admin/src/views/device/drawershow.vue
...-publish-manager-ui/admin/src/views/device/drawershow.vue
+11
-3
info-publish-manager/src/main/java/com/mortals/xhx/module/device/service/impl/DeviceServiceImpl.java
...als/xhx/module/device/service/impl/DeviceServiceImpl.java
+8
-16
info-publish-manager/src/test/java/com/mortals/httpclient/device/DeviceController.http
.../java/com/mortals/httpclient/device/DeviceController.http
+3
-5
info-publish-manager/src/test/java/com/mortals/httpclient/http-client.env.json
...src/test/java/com/mortals/httpclient/http-client.env.json
+1
-1
No files found.
info-publish-manager-ui/admin/src/components/FileUpload.vue
View file @
b8603d2f
...
@@ -131,6 +131,8 @@ export default {
...
@@ -131,6 +131,8 @@ export default {
methods
:
{
methods
:
{
showFileList
(){
showFileList
(){
console
.
log
(
"
value
"
,
this
.
value
)
let
temp
=
1
;
let
temp
=
1
;
// 首先将值转为数组
// 首先将值转为数组
const
filePathlist
=
this
.
value
.
split
(
'
,
'
);
const
filePathlist
=
this
.
value
.
split
(
'
,
'
);
...
...
info-publish-manager-ui/admin/src/views/device/drawershow.vue
View file @
b8603d2f
...
@@ -72,6 +72,9 @@
...
@@ -72,6 +72,9 @@
"
deviceStatus
"
,
"
deviceStatus
"
,
"
enabled
"
,
"
enabled
"
,
],
],
toArrays
:[
"
workmanId
"
],
toDate
:[],
toDate
:[],
// 表单校验
// 表单校验
rules
:
{
rules
:
{
...
@@ -127,11 +130,16 @@
...
@@ -127,11 +130,16 @@
this
.
fileNames
=
""
this
.
fileNames
=
""
this
.
filePaths
=
""
this
.
filePaths
=
""
if
(
data
.
entity
.
deviceFileEntityList
&&
data
.
entity
.
deviceFileEntityList
.
length
>
0
)
{
if
(
data
.
entity
.
deviceFileEntityList
&&
data
.
entity
.
deviceFileEntityList
.
length
>
0
)
{
this
.
fileNames
=
data
.
entity
.
deviceFileEntityList
.
map
(
i
=>
i
.
fileName
+
"
,
"
)
this
.
fileNames
=
data
.
entity
.
deviceFileEntityList
.
map
(
i
=>
i
.
fileName
+
"
"
).
join
(
"
,
"
)
this
.
filePaths
=
data
.
entity
.
deviceFileEntityList
.
map
(
i
=>
i
.
filePath
s
+
"
,
"
)
this
.
filePaths
=
data
.
entity
.
deviceFileEntityList
.
map
(
i
=>
i
.
filePath
+
""
).
join
(
"
,
"
)
}
}
console
.
log
(
"
filePaths:
"
+
this
.
filePaths
)
//处理选择的人员
if
(
data
.
entity
.
deviceWorkmanEntityList
&&
data
.
entity
.
deviceWorkmanEntityList
.
length
>
0
)
{
data
.
entity
.
workmanId
=
data
.
entity
.
deviceWorkmanEntityList
.
map
(
i
=>
i
.
workmanId
+
""
).
join
(
"
,
"
)
console
.
log
(
"
fileNames:
"
+
this
.
fileNames
)
}
console
.
log
(
"
afterdata
"
,
data
)
return
data
;
return
data
;
},
},
...
...
info-publish-manager/src/main/java/com/mortals/xhx/module/device/service/impl/DeviceServiceImpl.java
View file @
b8603d2f
...
@@ -148,26 +148,18 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D
...
@@ -148,26 +148,18 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D
protected
void
updateAfter
(
DeviceEntity
entity
,
Context
context
)
throws
AppException
{
protected
void
updateAfter
(
DeviceEntity
entity
,
Context
context
)
throws
AppException
{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getDeviceWorkmanEntityList
()))
{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getDeviceWorkmanEntityList
()))
{
//先删除 再添加
//先删除 再添加
List
<
Long
>
deviceIdList
=
entity
.
getDeviceWorkmanEntityList
().
stream
().
map
(
i
->
i
.
getDeviceId
()).
collect
(
Collectors
.
toList
());
if
(!
ObjectUtils
.
isEmpty
(
deviceIdList
))
{
DeviceWorkmanQuery
deviceWorkmanQuery
=
new
DeviceWorkmanQuery
();
DeviceWorkmanQuery
deviceWorkmanQuery
=
new
DeviceWorkmanQuery
();
deviceWorkmanQuery
.
setDeviceIdList
(
deviceIdList
);
deviceWorkmanQuery
.
setDeviceId
(
entity
.
getId
()
);
Long
[]
deviceIds
=
deviceWorkmanService
.
find
(
deviceWorkmanQuery
).
stream
().
map
(
DeviceWorkmanEntity:
:
getId
).
toArray
(
Long
[]::
new
);
Long
[]
deviceIds
=
deviceWorkmanService
.
find
(
deviceWorkmanQuery
).
stream
().
map
(
DeviceWorkmanEntity:
:
getId
).
toArray
(
Long
[]::
new
);
deviceWorkmanService
.
remove
(
deviceIds
,
context
);
deviceWorkmanService
.
remove
(
deviceIds
,
context
);
}
saveDeviceWorkman
(
entity
,
context
);
saveDeviceWorkman
(
entity
,
context
);
}
}
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getDeviceFileEntityList
()))
{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getDeviceFileEntityList
()))
{
List
<
Long
>
deviceIdList
=
entity
.
getDeviceFileEntityList
().
stream
().
map
(
i
->
i
.
getDeviceId
()).
collect
(
Collectors
.
toList
());
if
(!
ObjectUtils
.
isEmpty
(
deviceIdList
))
{
DeviceFileQuery
deviceFileQuery
=
new
DeviceFileQuery
();
DeviceFileQuery
deviceFileQuery
=
new
DeviceFileQuery
();
deviceFileQuery
.
setDeviceIdList
(
deviceIdList
);
deviceFileQuery
.
setDeviceId
(
entity
.
getId
()
);
Long
[]
deviceIds
=
deviceFileService
.
find
(
deviceFileQuery
).
stream
().
map
(
DeviceFileEntity:
:
getId
).
toArray
(
Long
[]::
new
);
Long
[]
deviceIds
=
deviceFileService
.
find
(
deviceFileQuery
).
stream
().
map
(
DeviceFileEntity:
:
getId
).
toArray
(
Long
[]::
new
);
deviceFileService
.
remove
(
deviceIds
,
context
);
deviceFileService
.
remove
(
deviceIds
,
context
);
}
saveDeviceFile
(
entity
,
context
);
saveDeviceFile
(
entity
,
context
);
}
}
}
}
...
...
info-publish-manager/src/test/java/com/mortals/httpclient/device/DeviceController.http
View file @
b8603d2f
...
@@ -14,14 +14,12 @@ client.global.set("authToken", JSON.parse(response.body).data.token);
...
@@ -14,14 +14,12 @@ client.global.set("authToken", JSON.parse(response.body).data.token);
%}
%}
###设备管理列表
###设备管理列表
POST {{baseUrl}}/device/
list
POST {{baseUrl}}/device/
infoByCode
Content-Type: application/json
Content-Type: application/json
{
{
"deviceName":"sjfrrr",
"deviceCode":"d6u6i3",
"deviceCode":"18-93-7F-C0-AD-B5"
"page":1,
"size":10
}
}
...
...
info-publish-manager/src/test/java/com/mortals/httpclient/http-client.env.json
View file @
b8603d2f
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
"baseLogin"
:
"http://127.0.0.1:18222/m"
"baseLogin"
:
"http://127.0.0.1:18222/m"
},
},
"dev"
:
{
"dev"
:
{
"baseUrl"
:
"http://192.168.0.2
17:18222
/m"
,
"baseUrl"
:
"http://192.168.0.2
52:
/m"
,
"baseLogin"
:
"http://192.168.0.98:11078/base"
"baseLogin"
:
"http://192.168.0.98:11078/base"
},
},
"test"
:
{
"test"
:
{
...
...
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