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
77c23ac1
authored
Oct 30, 2023
by
huangjy
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix:修复bug
parent
a1c5585b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
9 deletions
server-service/src/main/java/com/makeit/service/platform/device/impl/PlatDeviceServiceImpl.java
server-service/src/main/java/com/makeit/service/platform/elder/impl/PlatElderServiceImpl.java
server-service/src/main/java/com/makeit/service/platform/device/impl/PlatDeviceServiceImpl.java
View file @
77c23ac1
...
...
@@ -157,7 +157,12 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
spaceName
=
spaceNameJoin
+
"-"
+
record
.
getSpaceName
()
+
"-"
+
record
.
getRoomName
();
}
else
{
spaceName
=
record
.
getSpaceName
()
+
"-"
+
record
.
getRoomName
();
if
(
StringUtils
.
isNotEmpty
(
record
.
getSpaceName
()))
{
spaceName
=
record
.
getSpaceName
();
}
if
(
StringUtils
.
isNotEmpty
(
record
.
getRoomName
()))
{
spaceName
+=
"-"
+
record
.
getRoomName
();
}
}
if
(
StringUtils
.
isNotBlank
(
record
.
getBedName
()))
{
spaceName
=
spaceName
+
"-"
+
record
.
getBedName
();
...
...
@@ -398,7 +403,7 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
@Override
public
void
editDeviceProperties
(
PlatDeviceAttrWechatDTO
dto
)
{
log
.
info
(
"写入设备属性请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
devicePropertiesOperateService
.
deviceWrite
(
dto
.
getDeviceId
(),
dto
.
getRadarMount
(),
dto
.
getRadarMode
(),
dto
.
getRadarHight
());
devicePropertiesOperateService
.
deviceWrite
(
dto
.
getDeviceId
(),
dto
.
getRadarMount
(),
dto
.
getRadarMode
(),
dto
.
getRadarHight
()
,
dto
.
getUsrServerInfo
()
);
//更新区域设置设备安装方式
platRegionSettingService
.
update
(
new
UpdateWrapper
<
PlatRegionSetting
>().
lambda
()
...
...
server-service/src/main/java/com/makeit/service/platform/elder/impl/PlatElderServiceImpl.java
View file @
77c23ac1
...
...
@@ -287,15 +287,43 @@ public class PlatElderServiceImpl extends ServiceImpl<PlatElderMapper, PlatElder
Optional
<
SysConfigVO
>
configVO6
=
sysConfigVOS6
.
stream
().
filter
(
sysConfigVO
->
sysConfigVO
.
getValue
().
equals
(
vo
.
getElderType
())).
findFirst
();
vo
.
setElderType
(
configVO6
.
isPresent
()
?
configVO6
.
get
().
getName
()
:
""
);
Optional
<
SysConfigVO
>
configVO7
=
sysConfigVOS7
.
stream
().
filter
(
sysConfigVO
->
sysConfigVO
.
getValue
().
equals
(
vo
.
getIllness
())).
findFirst
();
vo
.
setIllness
(
configVO7
.
isPresent
()
?
configVO7
.
get
().
getName
()
:
""
);
if
(
StringUtils
.
isNotEmpty
(
vo
.
getIllness
()))
{
StringBuilder
illness
=
new
StringBuilder
();
ArrayList
<
String
>
illnessList
=
Lists
.
newArrayList
(
vo
.
getIllness
().
split
(
","
));
for
(
String
s
:
illnessList
)
{
Optional
<
SysConfigVO
>
configVO7
=
sysConfigVOS7
.
stream
().
filter
(
sysConfigVO
->
sysConfigVO
.
getValue
().
equals
(
s
)).
findFirst
();
configVO7
.
ifPresent
(
sysConfigVO
->
illness
.
append
(
sysConfigVO
.
getName
()).
append
(
" "
));
}
vo
.
setIllness
(
illness
.
toString
());
}
else
{
vo
.
setIllness
(
""
);
}
Optional
<
SysConfigVO
>
configVO8
=
sysConfigVOS8
.
stream
().
filter
(
sysConfigVO
->
sysConfigVO
.
getValue
().
equals
(
vo
.
getHobbies
())).
findFirst
();
vo
.
setHobbies
(
configVO8
.
isPresent
()
?
configVO8
.
get
().
getName
()
:
""
);
if
(
StringUtils
.
isNotEmpty
(
vo
.
getHobbies
()))
{
StringBuilder
hobbies
=
new
StringBuilder
();
ArrayList
<
String
>
getHobbiesList
=
Lists
.
newArrayList
(
vo
.
getHobbies
().
split
(
","
));
for
(
String
s
:
getHobbiesList
)
{
Optional
<
SysConfigVO
>
configVO7
=
sysConfigVOS8
.
stream
().
filter
(
sysConfigVO
->
sysConfigVO
.
getValue
().
equals
(
s
)).
findFirst
();
configVO7
.
ifPresent
(
sysConfigVO
->
hobbies
.
append
(
sysConfigVO
.
getName
()).
append
(
" "
));
}
vo
.
setHobbies
(
hobbies
.
toString
());
}
else
{
vo
.
setHobbies
(
""
);
}
if
(
StringUtils
.
isNotEmpty
(
vo
.
getFoodProhibition
()))
{
StringBuilder
foodProhibition
=
new
StringBuilder
();
ArrayList
<
String
>
foodProhibitionList
=
Lists
.
newArrayList
(
vo
.
getFoodProhibition
().
split
(
","
));
for
(
String
s
:
foodProhibitionList
)
{
Optional
<
SysConfigVO
>
configVO7
=
sysConfigVOS9
.
stream
().
filter
(
sysConfigVO
->
sysConfigVO
.
getValue
().
equals
(
s
)).
findFirst
();
configVO7
.
ifPresent
(
sysConfigVO
->
foodProhibition
.
append
(
sysConfigVO
.
getName
()).
append
(
" "
));
}
vo
.
setFoodProhibition
(
foodProhibition
.
toString
());
}
else
{
vo
.
setFoodProhibition
(
""
);
}
Optional
<
SysConfigVO
>
configVO9
=
sysConfigVOS9
.
stream
().
filter
(
sysConfigVO
->
sysConfigVO
.
getValue
().
equals
(
vo
.
getFoodProhibition
())).
findFirst
();
vo
.
setFoodProhibition
(
configVO9
.
isPresent
()
?
configVO9
.
get
().
getName
()
:
""
);
vo
.
setId
(
e
.
getId
());
vo
.
setRemark
(
e
.
getRemark
());
...
...
@@ -618,7 +646,7 @@ public class PlatElderServiceImpl extends ServiceImpl<PlatElderMapper, PlatElder
PlatElder
old
=
getOne
(
new
QueryWrapper
<
PlatElder
>().
lambda
()
.
eq
(
PlatElder:
:
getCertificateType
,
dto
.
getCertificateType
())
.
eq
(
PlatElder:
:
getCertificateNumber
,
dto
.
getCertificateNumber
())
.
eq
(
StringUtils
.
isNotEmpty
(
dto
.
getId
()),
BaseEntity:
:
getId
,
dto
.
getId
())
.
ne
(
StringUtils
.
isNotEmpty
(
dto
.
getId
()),
BaseEntity:
:
getId
,
dto
.
getId
())
);
if
(
old
!=
null
&&
!
old
.
getId
().
equals
(
dto
.
getId
()))
{
...
...
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