Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
long-tern-care-service
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hubin
long-tern-care-service
Commits
fa469c05
Commit
fa469c05
authored
Jul 03, 2021
by
蔡镇泽
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
建床管理接口调整
parent
0d7dbd3f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
19 deletions
+56
-19
BuildBedController.java
...ungraim/ltc/governance/controller/BuildBedController.java
+43
-10
RemoveBedController.java
...ngraim/ltc/governance/controller/RemoveBedController.java
+13
-6
RemoveBedServiceImpl.java
...aim/ltc/governance/service/impl/RemoveBedServiceImpl.java
+0
-3
No files found.
governance/src/main/java/com/hungraim/ltc/governance/controller/BuildBedController.java
View file @
fa469c05
...
...
@@ -44,13 +44,48 @@ public class BuildBedController {
@Autowired
private
DisableInfoServie
disableInfoServie
;
/**
* 建床管理列表
*/
@PostMapping
(
"/searchOrgBed"
)
public
Result
searchOrgBed
(
@RequestBody
BuildBedSearchReq
req
)
{
return
buildBedService
.
searchOrgBed
(
req
);
}
/**
* 建床管理新增
*/
@PostMapping
(
"/addBuild"
)
public
Result
<
Boolean
>
buildBed
(
ChSrvBuildBed
buildBed
)
{
/*if (StringUtils.isBlank(buildBed.getRealName())) {
//姓名
return Result.failed(ResultCode.REQUEST_PARAM_ERROR);
}
if (StringUtils.isBlank(buildBed.getGender())) {
//性别
return Result.failed(ResultCode.REQUEST_PARAM_ERROR);
}
if (StringUtils.isBlank(buildBed.getCertiCode())) {
//身份证号
return Result.failed(ResultCode.REQUEST_PARAM_ERROR);
}
if (StringUtils.isBlank(buildBed.getAdressDetail())) {
//家庭住址
return Result.failed(ResultCode.REQUEST_PARAM_ERROR);
}
if (buildBed.getNursingDemandLevel() != null && buildBed.getNursingDemandLevel() >= 1 && buildBed.getNursingDemandLevel() <= 5) {
//护理需求等级
return Result.failed(ResultCode.REQUEST_PARAM_ERROR);
}
if (StringUtils.isBlank(buildBed.getChanghuNo())) {
//长护号
return Result.failed(ResultCode.REQUEST_PARAM_ERROR);
}
if (buildBed.getGuaranteeMode() != null && buildBed.getGuaranteeMode() >= 1 && buildBed.getGuaranteeMode() <= 3) {
//保障方式
return Result.failed(ResultCode.REQUEST_PARAM_ERROR);
}*/
buildBed
.
setRecordTime
(
new
Date
());
//建床时间
boolean
b
=
buildBedService
.
save
(
buildBed
);
return
Result
.
success
(
b
);
}
...
...
@@ -111,14 +146,14 @@ public class BuildBedController {
}
/**
*已分配护理机构信息查询
*
已分配护理机构信息查询
*/
@PostMapping
(
"/querySrvYet"
)
public
Result
querySrvYet
(
DisableInfoVo
disableInfoVo
){
if
(
StrUtil
.
isBlankIfStr
(
disableInfoVo
.
getDisableInfoId
())){
public
Result
querySrvYet
(
DisableInfoVo
disableInfoVo
)
{
if
(
StrUtil
.
isBlankIfStr
(
disableInfoVo
.
getDisableInfoId
()))
{
return
Result
.
failed
(
"失能人员id不能为空"
);
}
Page
<
DisableInfoVo
>
disableInfoVos
=
disableInfoServie
.
querySrvYet
(
disableInfoVo
.
getDisableInfoId
(),
disableInfoVo
.
getCurrent
(),
disableInfoVo
.
getLimit
());
Page
<
DisableInfoVo
>
disableInfoVos
=
disableInfoServie
.
querySrvYet
(
disableInfoVo
.
getDisableInfoId
(),
disableInfoVo
.
getCurrent
(),
disableInfoVo
.
getLimit
());
long
total
=
disableInfoVos
.
getTotal
();
List
<
DisableInfoVo
>
records
=
disableInfoVos
.
getRecords
();
Map
map
=
new
HashMap
<>();
...
...
@@ -131,21 +166,21 @@ public class BuildBedController {
* 提交分配机构
*/
@PostMapping
(
"/submit"
)
public
Result
submit
(
ChrSrvVo
chrSrvVo
)
{
public
Result
submit
(
ChrSrvVo
chrSrvVo
)
{
List
<
ChSrvSend
>
chSrvSends
=
chrSrvVo
.
getChSrvSends
();
if
(
chSrvSends
!=
null
&&
chSrvSends
.
size
()
>
0
)
{
Long
disabInfoId
=
null
;
for
(
ChSrvSend
chSrvSend
:
chSrvSends
)
{
disabInfoId
=
chSrvSend
.
getDisabInfoId
();
// 判斷參數是否存在
if
(
chSrvSend
.
getDisabInfoId
()
==
null
||
chSrvSend
.
getSrvOrganId
()==
null
||
chSrvSend
.
getSrvModeId
()==
null
)
{
if
(
chSrvSend
.
getDisabInfoId
()
==
null
||
chSrvSend
.
getSrvOrganId
()
==
null
||
chSrvSend
.
getSrvModeId
()
==
null
)
{
return
Result
.
failed
(
"参数不全!"
);
}
chSrvSend
.
setAllotTime
(
new
Date
());
chSrvSend
.
setStatus
(
Short
.
valueOf
(
"1"
));
if
(
chrSrvVo
.
getSrvSendId
()
==
null
)
{
if
(
chrSrvVo
.
getSrvSendId
()
==
null
)
{
Long
id
=
sendService
.
selectMaxId
();
if
(
id
==
null
)
{
if
(
id
==
null
)
{
id
=
0L
;
}
chSrvSend
.
setSrvSendId
(++
id
);
...
...
@@ -158,7 +193,5 @@ public class BuildBedController {
return
Result
.
success
();
}
}
governance/src/main/java/com/hungraim/ltc/governance/controller/RemoveBedController.java
View file @
fa469c05
...
...
@@ -14,6 +14,8 @@ import org.springframework.web.bind.annotation.RestController;
import
javax.annotation.Resource
;
/**
* 撤床
*
* @author jiaguokai
*/
@RestController
...
...
@@ -25,13 +27,18 @@ public class RemoveBedController {
@Resource
private
IBuildBedService
buildBedService
;
@PostMapping
(
"/"
)
/**
* 撤床
*/
@PostMapping
(
"/revokeBuild"
)
public
Result
removeOne
(
ChSrvRemoveBed
removeBed
)
{
Integer
buildBedId
=
removeBed
.
getBuildBedId
();
buildBedService
.
update
(
new
LambdaUpdateWrapper
<
ChSrvBuildBed
>().
eq
(
ChSrvBuildBed:
:
getBuildBedId
,
buildBedId
).
set
(
ChSrvBuildBed:
:
getStatus
,
1
));
return
Result
.
success
(
removeBedService
.
removeOne
(
removeBed
));
Boolean
result
=
removeBedService
.
save
(
removeBed
);
if
(
result
)
{
Integer
buildBedId
=
removeBed
.
getBuildBedId
();
boolean
update
=
buildBedService
.
update
(
new
LambdaUpdateWrapper
<
ChSrvBuildBed
>().
eq
(
ChSrvBuildBed:
:
getBuildBedId
,
buildBedId
).
set
(
ChSrvBuildBed:
:
getStatus
,
1
));
result
=
update
;
}
return
Result
.
success
(
result
);
}
}
governance/src/main/java/com/hungraim/ltc/governance/service/impl/RemoveBedServiceImpl.java
View file @
fa469c05
...
...
@@ -6,7 +6,6 @@ import com.hungraim.ltc.governance.dao.RemoveBedMapper;
import
com.hungraim.ltc.governance.service.IRemoveBedService
;
import
com.hungraim.ltc.pojo.entity.governance.ChSrvRemoveBed
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
...
...
@@ -26,8 +25,6 @@ public class RemoveBedServiceImpl extends ServiceImpl<RemoveBedMapper, ChSrvRemo
@Override
public
Integer
removeOne
(
ChSrvRemoveBed
removeBed
)
{
return
null
;
}
}
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