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
2ac43742
authored
Oct 08, 2023
by
lzy
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
长者添加
parent
ada2efbe
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
10 deletions
server-common/src/main/java/com/makeit/enums/CodeMessageEnum.java
server-common/src/main/resources/locale/business_messages.properties
server-service/src/main/java/com/makeit/service/platform/elder/impl/PlatElderServiceImpl.java
server-common/src/main/java/com/makeit/enums/CodeMessageEnum.java
View file @
2ac43742
...
...
@@ -107,13 +107,14 @@ public enum CodeMessageEnum {
PLATFORM_ERROR_SPACE_NOT_DEL
(
500
,
"PLATFORM.ERROR.SPACE.NOT.DEL"
),
PLATFORM_ERROR_SPACE_NOT_AUTH_PARENT
(
500
,
"PLATFORM.ERROR.SPACE.NOT.AUTH.PARENT"
),
PLATFORM_ERROR_SPACE_USER_NOT_ADD
(
500
,
"PLATFORM.ERROR.SPACE.USER.NOT.ADD"
),
PLATFORM_ERROR_ROOM_EXIT_BAD
(
500
,
"PLATFORM.ERROR.ROOM.EXIT.B
A
D"
),
PLATFORM_ERROR_ROOM_BAD_NUMBER_NOT_AUTH
(
500
,
"PLATFORM.ERROR.ROOM.B
A
D.NUMBER.NOT.AUTH"
),
PLATFORM_ERROR_ROOM_EXIT_BAD
(
500
,
"PLATFORM.ERROR.ROOM.EXIT.B
E
D"
),
PLATFORM_ERROR_ROOM_BAD_NUMBER_NOT_AUTH
(
500
,
"PLATFORM.ERROR.ROOM.B
E
D.NUMBER.NOT.AUTH"
),
PLATFORM_ERROR_ROOM_NAME_EXIT
(
500
,
"PLATFORM.ERROR.ROOM.NAME.EXIT"
),
PLATFORM_ERROR_BAD_NAME_EXIT
(
500
,
"PLATFORM.ERROR.BAD.NAME.EXIT"
),
PLATFORM_ERROR_BAD_NOT_DEL
(
500
,
"PLATFORM.ERROR.BAD.NOT.DEL"
),
PLATFORM_ERROR_BAD_NAME_EXIT
(
500
,
"PLATFORM.ERROR.BED.NAME.EXIT"
),
PLATFORM_ERROR_BAD_NOT_DEL
(
500
,
"PLATFORM.ERROR.BED.NOT.DEL"
),
PLATFORM_ERROR_BED_NOT_BIND_ELDER
(
500
,
"PLATFORM.ERROR.BED.NOT.BIND.ELDER"
),
PLATFORM_ERROR_ROOM_OTHER_USED_NOT_DEL
(
500
,
"PLATFORM.ERROR.ROOM.OTHER.USED.NOT.DEL"
),
PLATFORM_ERROR_BED_BIND_DEVICE_NOT_AUTH
(
500
,
"PLATFORM.ERROR.BED.BIND
_DEVICE_NOT_
AUTH"
),
PLATFORM_ERROR_BED_BIND_DEVICE_NOT_AUTH
(
500
,
"PLATFORM.ERROR.BED.BIND
.DEVICE.NOT.
AUTH"
),
PLATFORM_ERROR_ELDER_BED_CANT_DEL
(
500
,
"PLATFORM.ERROR.ELDER.BED.CANT.DEL"
),
...
...
server-common/src/main/resources/locale/business_messages.properties
View file @
2ac43742
...
...
@@ -100,14 +100,15 @@ PLATFORM.ERROR.SPACE.NAME.DUPLICATE=同一层级,空间名称不能重复
PLATFORM.ERROR.SPACE.NOT.DEL
=
该空间下存在下级或者房间,不可删除
PLATFORM.ERROR.SPACE.NOT.AUTH.PARENT
=
上级空间不能是自己的下级空间
PLATFORM.ERROR.SPACE.USER.NOT.ADD
=
当前用户没有所属组织,请先分配组织
PLATFORM.ERROR.ROOM.EXIT.B
A
D
=
房间中存在已入住的床位,不可删除
PLATFORM.ERROR.ROOM.EXIT.B
E
D
=
房间中存在已入住的床位,不可删除
PLATFORM.ERROR.ROOM.NAME.EXIT
=
该房间名称已存在
PLATFORM.ERROR.ROOM.BAD.NUMBER.NOT.AUTH
=
床位数量不能改小
PLATFORM.ERROR.BAD.NAME.EXIT
=
床位名称已存在
PLATFORM.ERROR.BAD.NOT.DEL
=
床位已绑定长者或设备,不可删除
PLATFORM.ERROR.ROOM.BED.NUMBER.NOT.AUTH
=
床位数量不能改小
PLATFORM.ERROR.BED.NAME.EXIT
=
床位名称已存在
PLATFORM.ERROR.BED.NOT.DEL
=
床位已绑定长者或设备,不可删除
PLATFORM.ERROR.BED.NOT.BIND.ELDER
=
床位已入住长者,不可再次入住
PLATFORM.ERROR.ROOM.OTHER.USED.NOT.DEL
=
该房间下有床位有其他长者入住
PLATFORM.ERROR.BED.BIND
_DEVICE_NOT_
AUTH
=
该床位已绑定设备,请重新选择床位
PLATFORM.ERROR.BED.BIND
.DEVICE.NOT.
AUTH
=
该床位已绑定设备,请重新选择床位
PLATFORM.ERROR.ELDER.BED.CANT.DEL
=
含入住床位的老人,不可删除
...
...
server-service/src/main/java/com/makeit/service/platform/elder/impl/PlatElderServiceImpl.java
View file @
2ac43742
...
...
@@ -520,6 +520,16 @@ public class PlatElderServiceImpl extends ServiceImpl<PlatElderMapper, PlatElder
}
private
void
checkBed
(
PlatElderAddDTO
dto
)
{
PlatBed
platBed
=
platBedService
.
getById
(
dto
.
getBedId
());
if
(
CommonEnum
.
NO
.
getValue
().
equals
(
platBed
.
getStatus
()))
{
throw
new
BusinessException
(
CodeMessageEnum
.
PLATFORM_ERROR_BED_BIND_DEVICE_NOT_AUTH
);
}
}
private
void
fillSpace
(
PlatElder
platElder
)
{
if
(
StringUtils
.
isBlank
(
platElder
.
getBedId
()))
{
...
...
@@ -544,6 +554,7 @@ public class PlatElderServiceImpl extends ServiceImpl<PlatElderMapper, PlatElder
public
void
add
(
PlatElderAddDTO
dto
)
{
check
(
dto
);
checkBed
(
dto
);
PlatElder
platElder
=
BeanDtoVoUtils
.
convert
(
dto
,
PlatElder
.
class
);
...
...
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