Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
黄嘉阳
/
iot-platform-server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
d33f3d04
authored
Nov 14, 2023
by
huangjy
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix:设备修改信息
parent
5bed686e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
17 deletions
server-service/src/main/java/com/makeit/service/platform/device/impl/PlatDeviceServiceImpl.java
server-service/src/main/java/com/makeit/service/platform/device/impl/PlatDeviceServiceImpl.java
View file @
d33f3d04
...
@@ -466,12 +466,11 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
...
@@ -466,12 +466,11 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
if
(
StringUtils
.
isNotEmpty
(
result
))
{
if
(
StringUtils
.
isNotEmpty
(
result
))
{
throw
new
RuntimeException
(
"设备写入失败:"
+
result
);
throw
new
RuntimeException
(
"设备写入失败:"
+
result
);
}
}
PlatDeviceOther
other
=
platDeviceOtherService
.
getOne
(
new
QueryWrapper
<
PlatDeviceOther
>().
lambda
()
List
<
PlatDeviceOther
>
platDeviceOtherList
=
platDeviceOtherService
.
list
(
new
QueryWrapper
<
PlatDeviceOther
>().
lambda
()
.
eq
(
PlatDeviceOther:
:
getOriDeviceId
,
deviceId
)
.
eq
(
PlatDeviceOther:
:
getOriDeviceId
,
deviceId
));
.
last
(
"limit 1"
));
for
(
PlatDeviceOther
platDeviceOther
:
platDeviceOtherList
)
{
if
(
other
!=
null
)
{
platDeviceOther
.
setAttribute
(
JSON
.
toJSONString
(
map
));
other
.
setAttribute
(
JSON
.
toJSONString
(
map
));
platDeviceOtherService
.
updateById
(
platDeviceOther
);
platDeviceOtherService
.
updateById
(
other
);
}
}
if
(
dto
.
getRadarMount
()
!=
null
)
{
if
(
dto
.
getRadarMount
()
!=
null
)
{
List
<
PlatDevice
>
platDeviceList
=
list
(
new
QueryWrapper
<
PlatDevice
>().
lambda
().
eq
(
PlatDevice:
:
getOriDeviceId
,
deviceId
));
List
<
PlatDevice
>
platDeviceList
=
list
(
new
QueryWrapper
<
PlatDevice
>().
lambda
().
eq
(
PlatDevice:
:
getOriDeviceId
,
deviceId
));
...
@@ -493,17 +492,16 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
...
@@ -493,17 +492,16 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
if
(
StringUtils
.
isNotEmpty
(
result
))
{
if
(
StringUtils
.
isNotEmpty
(
result
))
{
throw
new
RuntimeException
(
"设备写入失败:"
+
result
);
throw
new
RuntimeException
(
"设备写入失败:"
+
result
);
}
}
PlatDeviceOther
other
=
platDeviceOtherService
.
getOne
(
new
QueryWrapper
<
PlatDeviceOther
>().
lambda
()
List
<
PlatDeviceOther
>
platDeviceOtherList
=
platDeviceOtherService
.
list
(
new
QueryWrapper
<
PlatDeviceOther
>().
lambda
()
.
eq
(
PlatDeviceOther:
:
getOriDeviceId
,
deviceId
)
.
eq
(
PlatDeviceOther:
:
getOriDeviceId
,
deviceId
));
.
last
(
"limit 1"
));
for
(
PlatDeviceOther
platDeviceOther
:
platDeviceOtherList
)
{
if
(
other
!=
null
)
{
platDeviceOther
.
setProtocolAccount
(
usrServerInfo
.
getUsername
());
other
.
setProtocolAccount
(
usrServerInfo
.
getUsername
());
platDeviceOther
.
setProtocolPassword
(
usrServerInfo
.
getPassword
());
other
.
setProtocolPassword
(
usrServerInfo
.
getPassword
());
platDeviceOther
.
setProtocolAddress
(
usrServerInfo
.
getAddr
());
other
.
setProtocolAddress
(
usrServerInfo
.
getAddr
());
platDeviceOther
.
setProtocolPort
(
usrServerInfo
.
getPort
()
==
null
?
""
:
usrServerInfo
.
getPort
().
toString
());
other
.
setProtocolPort
(
usrServerInfo
.
getPort
()
==
null
?
""
:
usrServerInfo
.
getPort
().
toString
());
platDeviceOther
.
setSecureId
(
usrServerInfo
.
getSecureId
());
other
.
setSecureId
(
usrServerInfo
.
getSecureId
());
platDeviceOther
.
setSecureKey
(
usrServerInfo
.
getSecureKey
());
other
.
setSecureKey
(
usrServerInfo
.
getSecureKey
());
platDeviceOtherService
.
updateById
(
platDeviceOther
);
platDeviceOtherService
.
updateById
(
other
);
}
}
}
}
...
...
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