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
5c46e321
authored
Sep 20, 2023
by
杨伟程
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
老人增删改查
parent
bcdfae67
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
4 deletions
server-service/src/main/java/com/makeit/service/platform/elder/impl/PlatElderServiceImpl.java
server-service/src/main/java/com/makeit/service/platform/elder/impl/PlatElderServiceImpl.java
View file @
5c46e321
...
...
@@ -550,15 +550,41 @@ public class PlatElderServiceImpl extends ServiceImpl<PlatElderMapper, PlatElder
.
eq
(
PlatElderSocialRelation:
:
getElderId
,
dto
.
getId
()));
platElderSocialRelationService
.
saveBatch
(
relationList
);
PlatElderHealthInfo
healthInfo
=
BeanDtoVoUtils
.
convert
(
dto
.
getHealthInfo
(),
PlatElderHealthInfo
.
class
);
healthInfo
.
setElderId
(
dto
.
getId
());
// PlatElderHealthInfo healthInfo = BeanDtoVoUtils.convert(dto.getHealthInfo(), PlatElderHealthInfo.class);
// healthInfo.setElderId(dto.getId());
//
// platElderHealthInfoService.saveOrUpdate(healthInfo);
//
// PlatElderOtherInfo otherInfo = BeanDtoVoUtils.convert(dto.getOtherInfo(), PlatElderOtherInfo.class);
// otherInfo.setElderId(dto.getId());
//
// platElderOtherInfoService.saveOrUpdate(otherInfo);
PlatElderHealthInfo
healthInfo
=
platElderHealthInfoService
.
getOne
(
new
QueryWrapper
<
PlatElderHealthInfo
>().
lambda
()
.
eq
(
PlatElderHealthInfo:
:
getElderId
,
dto
.
getId
()));
if
(
healthInfo
==
null
)
{
healthInfo
=
new
PlatElderHealthInfo
();
}
String
healthInfoId
=
healthInfo
.
getId
();
BeanUtils
.
copyProperties
(
dto
.
getHealthInfo
(),
healthInfo
);
healthInfo
.
setId
(
healthInfoId
);
platElderHealthInfoService
.
saveOrUpdate
(
healthInfo
);
PlatElderOtherInfo
otherInfo
=
BeanDtoVoUtils
.
convert
(
dto
.
getOtherInfo
(),
PlatElderOtherInfo
.
class
);
otherInfo
.
setElderId
(
dto
.
getId
());
PlatElderOtherInfo
otherInfo
=
platElderOtherInfoService
.
getOne
(
new
QueryWrapper
<
PlatElderOtherInfo
>().
lambda
()
.
eq
(
PlatElderOtherInfo:
:
getElderId
,
dto
.
getId
()));
if
(
otherInfo
==
null
)
{
otherInfo
=
new
PlatElderOtherInfo
();
}
String
otherInfoId
=
otherInfo
.
getId
();
BeanUtils
.
copyProperties
(
dto
.
getOtherInfo
(),
otherInfo
);
otherInfo
.
setId
(
otherInfoId
);
platElderOtherInfoService
.
saveOrUpdate
(
otherInfo
);
}
@Override
...
...
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