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
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
17 deletions
+54
-17
BuildBedController.java
...ungraim/ltc/governance/controller/BuildBedController.java
+42
-9
RemoveBedController.java
...ngraim/ltc/governance/controller/RemoveBedController.java
+12
-5
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 {
...
@@ -44,13 +44,48 @@ public class BuildBedController {
@Autowired
@Autowired
private
DisableInfoServie
disableInfoServie
;
private
DisableInfoServie
disableInfoServie
;
/**
* 建床管理列表
*/
@PostMapping
(
"/searchOrgBed"
)
@PostMapping
(
"/searchOrgBed"
)
public
Result
searchOrgBed
(
@RequestBody
BuildBedSearchReq
req
)
{
public
Result
searchOrgBed
(
@RequestBody
BuildBedSearchReq
req
)
{
return
buildBedService
.
searchOrgBed
(
req
);
return
buildBedService
.
searchOrgBed
(
req
);
}
}
/**
* 建床管理新增
*/
@PostMapping
(
"/addBuild"
)
@PostMapping
(
"/addBuild"
)
public
Result
<
Boolean
>
buildBed
(
ChSrvBuildBed
buildBed
)
{
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
);
boolean
b
=
buildBedService
.
save
(
buildBed
);
return
Result
.
success
(
b
);
return
Result
.
success
(
b
);
}
}
...
@@ -111,14 +146,14 @@ public class BuildBedController {
...
@@ -111,14 +146,14 @@ public class BuildBedController {
}
}
/**
/**
*已分配护理机构信息查询
*
已分配护理机构信息查询
*/
*/
@PostMapping
(
"/querySrvYet"
)
@PostMapping
(
"/querySrvYet"
)
public
Result
querySrvYet
(
DisableInfoVo
disableInfoVo
){
public
Result
querySrvYet
(
DisableInfoVo
disableInfoVo
)
{
if
(
StrUtil
.
isBlankIfStr
(
disableInfoVo
.
getDisableInfoId
())){
if
(
StrUtil
.
isBlankIfStr
(
disableInfoVo
.
getDisableInfoId
()))
{
return
Result
.
failed
(
"失能人员id不能为空"
);
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
();
long
total
=
disableInfoVos
.
getTotal
();
List
<
DisableInfoVo
>
records
=
disableInfoVos
.
getRecords
();
List
<
DisableInfoVo
>
records
=
disableInfoVos
.
getRecords
();
Map
map
=
new
HashMap
<>();
Map
map
=
new
HashMap
<>();
...
@@ -138,14 +173,14 @@ public class BuildBedController {
...
@@ -138,14 +173,14 @@ public class BuildBedController {
for
(
ChSrvSend
chSrvSend
:
chSrvSends
)
{
for
(
ChSrvSend
chSrvSend
:
chSrvSends
)
{
disabInfoId
=
chSrvSend
.
getDisabInfoId
();
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
(
"参数不全!"
);
return
Result
.
failed
(
"参数不全!"
);
}
}
chSrvSend
.
setAllotTime
(
new
Date
());
chSrvSend
.
setAllotTime
(
new
Date
());
chSrvSend
.
setStatus
(
Short
.
valueOf
(
"1"
));
chSrvSend
.
setStatus
(
Short
.
valueOf
(
"1"
));
if
(
chrSrvVo
.
getSrvSendId
()
==
null
)
{
if
(
chrSrvVo
.
getSrvSendId
()
==
null
)
{
Long
id
=
sendService
.
selectMaxId
();
Long
id
=
sendService
.
selectMaxId
();
if
(
id
==
null
)
{
if
(
id
==
null
)
{
id
=
0L
;
id
=
0L
;
}
}
chSrvSend
.
setSrvSendId
(++
id
);
chSrvSend
.
setSrvSendId
(++
id
);
...
@@ -158,7 +193,5 @@ public class BuildBedController {
...
@@ -158,7 +193,5 @@ public class BuildBedController {
return
Result
.
success
();
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;
...
@@ -14,6 +14,8 @@ import org.springframework.web.bind.annotation.RestController;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
/**
/**
* 撤床
*
* @author jiaguokai
* @author jiaguokai
*/
*/
@RestController
@RestController
...
@@ -25,13 +27,18 @@ public class RemoveBedController {
...
@@ -25,13 +27,18 @@ public class RemoveBedController {
@Resource
@Resource
private
IBuildBedService
buildBedService
;
private
IBuildBedService
buildBedService
;
@PostMapping
(
"/"
)
/**
* 撤床
*/
@PostMapping
(
"/revokeBuild"
)
public
Result
removeOne
(
ChSrvRemoveBed
removeBed
)
{
public
Result
removeOne
(
ChSrvRemoveBed
removeBed
)
{
Boolean
result
=
removeBedService
.
save
(
removeBed
);
if
(
result
)
{
Integer
buildBedId
=
removeBed
.
getBuildBedId
();
Integer
buildBedId
=
removeBed
.
getBuildBedId
();
buildBedService
.
update
(
new
LambdaUpdateWrapper
<
ChSrvBuildBed
>().
eq
(
ChSrvBuildBed:
:
getBuildBedId
,
buildBedId
).
set
(
ChSrvBuildBed:
:
getStatus
,
1
));
boolean
update
=
buildBedService
.
update
(
new
LambdaUpdateWrapper
<
ChSrvBuildBed
>().
eq
(
ChSrvBuildBed:
:
getBuildBedId
,
buildBedId
).
set
(
ChSrvBuildBed:
:
getStatus
,
1
));
result
=
update
;
return
Result
.
success
(
removeBedService
.
removeOne
(
removeBed
));
}
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;
...
@@ -6,7 +6,6 @@ import com.hungraim.ltc.governance.dao.RemoveBedMapper;
import
com.hungraim.ltc.governance.service.IRemoveBedService
;
import
com.hungraim.ltc.governance.service.IRemoveBedService
;
import
com.hungraim.ltc.pojo.entity.governance.ChSrvRemoveBed
;
import
com.hungraim.ltc.pojo.entity.governance.ChSrvRemoveBed
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
...
@@ -26,8 +25,6 @@ public class RemoveBedServiceImpl extends ServiceImpl<RemoveBedMapper, ChSrvRemo
...
@@ -26,8 +25,6 @@ public class RemoveBedServiceImpl extends ServiceImpl<RemoveBedMapper, ChSrvRemo
@Override
@Override
public
Integer
removeOne
(
ChSrvRemoveBed
removeBed
)
{
public
Integer
removeOne
(
ChSrvRemoveBed
removeBed
)
{
return
null
;
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