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
70eba14e
authored
Oct 28, 2023
by
huangjy
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix:修复bug
parent
cf5e9f67
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
4 deletions
server-service/src/main/java/com/makeit/dto/wechat/device/PlatDeviceAttrWechatDTO.java
server-service/src/main/java/com/makeit/service/platform/elder/impl/PlatElderServiceImpl.java
server-service/src/main/java/com/makeit/service/platform/space/impl/PlatSpaceServiceImpl.java
server-service/src/main/java/com/makeit/dto/wechat/device/PlatDeviceAttrWechatDTO.java
View file @
70eba14e
...
...
@@ -32,7 +32,14 @@ public class PlatDeviceAttrWechatDTO {
@ApiModelProperty
(
value
=
"读取硬件的系统参数,主要读取服务信息和雷达信息,多个逗号隔开"
)
private
String
readProperties
;
@ApiModelProperty
(
value
=
"服务信息"
)
@ApiModelProperty
(
value
=
"服务信息 {\n"
+
" \"password\": \"\",\n"
+
" \"port\": 0,\n"
+
" \"secure_key\": \"\",\n"
+
" \"secure_id\": \"\",\n"
+
" \"addr\": \"\",\n"
+
" \"username\": \"\"\n"
+
" }"
)
private
String
usrServerInfo
;
}
server-service/src/main/java/com/makeit/service/platform/elder/impl/PlatElderServiceImpl.java
View file @
70eba14e
...
...
@@ -27,9 +27,12 @@ import com.makeit.entity.platform.space.PlatSpace;
import
com.makeit.enums.CodeMessageEnum
;
import
com.makeit.enums.CommonEnum
;
import
com.makeit.enums.FileSuffixEnum
;
import
com.makeit.enums.biz.sys.SysConfigCategoryConst
;
import
com.makeit.enums.id.TreeConst
;
import
com.makeit.exception.BusinessException
;
import
com.makeit.mapper.platform.elder.PlatElderMapper
;
import
com.makeit.module.system.service.SysConfigService
;
import
com.makeit.module.system.vo.SysConfigVO
;
import
com.makeit.service.platform.auth.PlatOrgService
;
import
com.makeit.service.platform.elder.*
;
import
com.makeit.service.platform.space.PlatBedService
;
...
...
@@ -106,6 +109,8 @@ public class PlatElderServiceImpl extends ServiceImpl<PlatElderMapper, PlatElder
@Autowired
private
PersonalConfigCacheUtil
personalConfigCacheUtil
;
@Autowired
private
SysConfigService
sysConfigService
;
private
LambdaQueryWrapper
<
PlatElder
>
lambdaQueryWrapper
(
PlatElderQueryDTO
dto
)
{
List
<
String
>
typeOrgIdList
=
Lists
.
newArrayList
();
...
...
@@ -227,14 +232,13 @@ public class PlatElderServiceImpl extends ServiceImpl<PlatElderMapper, PlatElder
List
<
PlatElder
>
dbList
=
list
(
lambdaQueryWrapper
(
dto
));
dbList
.
forEach
(
e
->{
if
(
StringUtils
.
isNotBlank
(
e
.
getHomeAddress
Detail
()))
{
if
(
StringUtils
.
isNotBlank
(
e
.
getHomeAddress
()))
{
e
.
setHomeAddressDetail
(
e
.
getHomeAddress
());
}
if
(
StringUtils
.
isNotBlank
(
e
.
getRegisterAddress
Detail
()))
{
if
(
StringUtils
.
isNotBlank
(
e
.
getRegisterAddress
()))
{
e
.
setRegisterAddressDetail
(
e
.
getRegisterAddress
());
}
});
List
<
PlatElderHealthInfo
>
healthInfoList
=
platElderHealthInfoService
.
list
(
new
QueryWrapper
<
PlatElderHealthInfo
>().
lambda
()
.
in
(
PlatElderHealthInfo:
:
getElderId
,
StreamUtil
.
mapId
(
dbList
,
PlatElder:
:
getId
)));
Map
<
String
,
PlatElderHealthInfo
>
healthInfoMap
=
StreamUtil
.
toMap
(
healthInfoList
,
PlatElderHealthInfo:
:
getElderId
);
...
...
@@ -243,6 +247,16 @@ public class PlatElderServiceImpl extends ServiceImpl<PlatElderMapper, PlatElder
.
in
(
PlatElderOtherInfo:
:
getElderId
,
StreamUtil
.
mapId
(
dbList
,
PlatElder:
:
getId
)));
Map
<
String
,
PlatElderOtherInfo
>
otherInfoMap
=
StreamUtil
.
toMap
(
otherInfoList
,
PlatElderOtherInfo:
:
getElderId
);
List
<
SysConfigVO
>
sysConfigVOS1
=
sysConfigService
.
viewListByCategoryCode
(
SysConfigCategoryConst
.
ELDER_CERTIFICATE_TYPE
);
List
<
SysConfigVO
>
sysConfigVOS2
=
sysConfigService
.
viewListByCategoryCode
(
SysConfigCategoryConst
.
ELDER_BLOOD
);
List
<
SysConfigVO
>
sysConfigVOS3
=
sysConfigService
.
viewListByCategoryCode
(
SysConfigCategoryConst
.
ELDER_INCOME
);
List
<
SysConfigVO
>
sysConfigVOS4
=
sysConfigService
.
viewListByCategoryCode
(
SysConfigCategoryConst
.
ELDER_EDUCATION
);
List
<
SysConfigVO
>
sysConfigVOS5
=
sysConfigService
.
viewListByCategoryCode
(
SysConfigCategoryConst
.
ELDER_BELIEF
);
List
<
SysConfigVO
>
sysConfigVOS6
=
sysConfigService
.
viewListByCategoryCode
(
SysConfigCategoryConst
.
ELDER_ELDER_TYPE
);
List
<
SysConfigVO
>
sysConfigVOS7
=
sysConfigService
.
viewListByCategoryCode
(
SysConfigCategoryConst
.
ELDER_ILLNESS
);
List
<
SysConfigVO
>
sysConfigVOS8
=
sysConfigService
.
viewListByCategoryCode
(
SysConfigCategoryConst
.
ELDER_HOBBIES
);
List
<
SysConfigVO
>
sysConfigVOS9
=
sysConfigService
.
viewListByCategoryCode
(
SysConfigCategoryConst
.
ELDER_Food_Prohibition
);
List
<
PlatElderExportVO
>
list
=
StreamUtil
.
map
(
dbList
,
e
->
{
PlatElderExportVO
vo
=
BeanDtoVoUtils
.
convert
(
e
,
PlatElderExportVO
.
class
);
...
...
@@ -255,7 +269,33 @@ public class PlatElderServiceImpl extends ServiceImpl<PlatElderMapper, PlatElder
if
(
otherInfo
!=
null
)
{
BeanUtils
.
copyProperties
(
otherInfo
,
vo
);
}
Optional
<
SysConfigVO
>
configVO
=
sysConfigVOS1
.
stream
().
filter
(
sysConfigVO
->
sysConfigVO
.
getValue
().
equals
(
vo
.
getCertificateType
())).
findFirst
();
vo
.
setCertificateType
(
configVO
.
isPresent
()
?
configVO
.
get
().
getName
()
:
""
);
Optional
<
SysConfigVO
>
configVO2
=
sysConfigVOS2
.
stream
().
filter
(
sysConfigVO
->
sysConfigVO
.
getValue
().
equals
(
vo
.
getBlood
())).
findFirst
();
vo
.
setBlood
(
configVO2
.
isPresent
()
?
configVO2
.
get
().
getName
()
:
""
);
Optional
<
SysConfigVO
>
configVO3
=
sysConfigVOS3
.
stream
().
filter
(
sysConfigVO
->
sysConfigVO
.
getValue
().
equals
(
vo
.
getIncome
())).
findFirst
();
vo
.
setIncome
(
configVO3
.
isPresent
()
?
configVO3
.
get
().
getName
()
:
""
);
Optional
<
SysConfigVO
>
configVO4
=
sysConfigVOS4
.
stream
().
filter
(
sysConfigVO
->
sysConfigVO
.
getValue
().
equals
(
vo
.
getEducation
())).
findFirst
();
vo
.
setEducation
(
configVO4
.
isPresent
()
?
configVO4
.
get
().
getName
()
:
""
);
Optional
<
SysConfigVO
>
configVO5
=
sysConfigVOS5
.
stream
().
filter
(
sysConfigVO
->
sysConfigVO
.
getValue
().
equals
(
vo
.
getBelief
())).
findFirst
();
vo
.
setBelief
(
configVO5
.
isPresent
()
?
configVO5
.
get
().
getName
()
:
""
);
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
()
:
""
);
Optional
<
SysConfigVO
>
configVO8
=
sysConfigVOS8
.
stream
().
filter
(
sysConfigVO
->
sysConfigVO
.
getValue
().
equals
(
vo
.
getHobbies
())).
findFirst
();
vo
.
setHobbies
(
configVO8
.
isPresent
()
?
configVO8
.
get
().
getName
()
:
""
);
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
());
...
...
server-service/src/main/java/com/makeit/service/platform/space/impl/PlatSpaceServiceImpl.java
View file @
70eba14e
...
...
@@ -498,6 +498,10 @@ public class PlatSpaceServiceImpl extends ServiceImpl<PlatSpaceMapper, PlatSpace
platSpace
.
setName
(
item
.
getCommunity
());
platSpace
.
setType
(
PlatSpaceEnum
.
TypeEnum
.
COMMUNITY
.
getValue
());
platSpace
.
setOrgId
(
orgId
);
PlatOrg
org
=
platOrgService
.
getById
(
orgId
);
if
(
org
!=
null
)
{
platSpace
.
setAttribute
(
org
.
getType
());
}
save
(
platSpace
);
firstSpaceNameMap
.
put
(
platSpace
.
getName
(),
platSpace
.
getId
());
firstId
=
platSpace
.
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