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
c4a5f851
Commit
c4a5f851
authored
Jul 12, 2022
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加前端页面
parent
538f3d36
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
13 deletions
+10
-13
device-manager-ui/admin/src/views/device/drawerview.vue
device-manager-ui/admin/src/views/device/drawerview.vue
+6
-9
device-manager/src/main/java/com/mortals/xhx/busiz/web/DeviceApiController.java
...n/java/com/mortals/xhx/busiz/web/DeviceApiController.java
+4
-3
device-manager/src/main/java/com/mortals/xhx/module/device/service/impl/DeviceServiceImpl.java
...als/xhx/module/device/service/impl/DeviceServiceImpl.java
+0
-1
No files found.
device-manager-ui/admin/src/views/device/drawerview.vue
View file @
c4a5f851
...
...
@@ -92,10 +92,6 @@ export default {
this
.
reset
();
this
.
urls
.
currUrl
=
this
.
pageInfo
.
addUrl
;
this
.
pageInfo
.
type
=
"
add
"
;
this
.
form
.
siteId
=
row
.
siteId
;
this
.
form
.
siteName
=
row
.
siteName
;
this
.
form
.
siteCode
=
row
.
siteCode
;
this
.
getData
();
this
.
title
=
"
新增设备
"
;
},
...
...
@@ -138,11 +134,12 @@ export default {
console
.
log
(
"
form:
"
,
this
.
form
);
Object
.
assign
(
this
.
viewInfo
,
this
.
form
);
console
.
log
(
"
viewInfo
"
,
this
.
viewInfo
);
// if(this.pageInfo.type=='add'){
// this.form.siteId = this.siteId;
// this.form.siteName = this.siteName;
// this.form.siteCode = this.siteCode;
// }
if
(
this
.
pageInfo
.
type
==
'
add
'
){
this
.
form
.
siteId
=
this
.
siteId
;
this
.
form
.
siteName
=
this
.
siteName
;
this
.
form
.
siteCode
=
this
.
siteCode
;
}
console
.
log
(
"
form:
"
,
this
.
form
);
},
afterSubmit
(
data
)
{
...
...
device-manager/src/main/java/com/mortals/xhx/busiz/web/DeviceApiController.java
View file @
c4a5f851
...
...
@@ -160,6 +160,7 @@ public class DeviceApiController {
deviceEntity
.
setDeviceStatus
(
DeviceStatusEnum
.
在线
.
getValue
());
deviceService
.
update
(
deviceEntity
);
rsp
.
setData
(
deviceResp
);
deviceService
.
sendThirdParty
(
deviceEntity
,
productEntity
,
platformEntity
,
DeviceMethodEnum
.
ONLINE
);
}
catch
(
Exception
e
)
{
log
.
error
(
"接收数据失败"
,
e
);
rsp
.
setCode
(
ApiRespCodeEnum
.
FAILED
.
getValue
());
...
...
@@ -305,12 +306,11 @@ public class DeviceApiController {
deviceEntity
=
new
DeviceEntity
();
deviceEntity
.
initAttrValue
();
saveOrUpdate
(
req
,
platformEntity
,
productEntity
,
deviceEntity
);
deviceEntity
.
setCreateTime
(
new
Date
());
deviceEntity
.
setCreateUserId
(
1L
);
deviceService
.
save
(
deviceEntity
,
null
);
}
else
{
//更新
saveOrUpdate
(
req
,
platformEntity
,
productEntity
,
deviceEntity
);
...
...
@@ -319,6 +319,8 @@ public class DeviceApiController {
deviceService
.
update
(
deviceEntity
,
null
);
}
deviceService
.
sendThirdParty
(
deviceEntity
,
productEntity
,
platformEntity
,
DeviceMethodEnum
.
ACTIVE
);
deviceService
.
sendThirdParty
(
deviceEntity
,
productEntity
,
platformEntity
,
DeviceMethodEnum
.
ONLINE
);
DeviceQueueAuthInfo
authInfo
=
new
DeviceQueueAuthInfo
();
authInfo
.
setHost
(
host
);
authInfo
.
setPort
(
port
);
...
...
@@ -347,7 +349,6 @@ public class DeviceApiController {
deviceInfo
.
setProductName
(
productEntity
.
getProductName
());
registerResp
.
setDeviceInfo
(
deviceInfo
);
String
content
=
EncryptUtil
.
myEnscrt
(
JSON
.
toJSONString
(
registerResp
),
9
,
DES_STR
,
ENCRYPT_STR
);
log
.
info
(
"deEncrypt:{}"
,
EncryptUtil
.
myReEnscrt
(
content
,
9
,
DES_STR
,
ENCRYPT_STR
));
...
...
device-manager/src/main/java/com/mortals/xhx/module/device/service/impl/DeviceServiceImpl.java
View file @
c4a5f851
...
...
@@ -291,7 +291,6 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D
@Override
protected
void
saveBefore
(
DeviceEntity
entity
,
Context
context
)
throws
AppException
{
if
(
ObjectUtils
.
isEmpty
(
entity
.
getDeviceCode
()))
{
throw
new
AppException
(
"设备编码不能为空!"
);
}
...
...
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