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
8a726e82
Commit
8a726e82
authored
Sep 26, 2023
by
zhangwanglin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
出院情况查询条件
parent
79815f56
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
20 deletions
+13
-20
BuildBedMapper.java
.../java/com/hungraim/ltc/governance/dao/BuildBedMapper.java
+1
-1
BuildBedServiceImpl.java
...raim/ltc/governance/service/impl/BuildBedServiceImpl.java
+1
-9
BuildBedMapper.xml
...ces/com/hungraim/ltc/governance/mapper/BuildBedMapper.xml
+11
-10
No files found.
governance/src/main/java/com/hungraim/ltc/governance/dao/BuildBedMapper.java
View file @
8a726e82
...
...
@@ -48,5 +48,5 @@ public interface BuildBedMapper extends BaseMapper<ChSrvBuildBed> {
int
getRoleByUserId
(
@Param
(
"userId"
)
Integer
userId
,
@Param
(
"roleIds"
)
List
<
String
>
roleIds
);
int
selectSrvSend
(
String
disabInfoId
);
}
governance/src/main/java/com/hungraim/ltc/governance/service/impl/BuildBedServiceImpl.java
View file @
8a726e82
...
...
@@ -99,17 +99,9 @@ public class BuildBedServiceImpl extends ServiceImpl<BuildBedMapper, ChSrvBuildB
*/
@Override
public
Page
<
ChSrvTaskDetailVo
>
chSrvTaskDetailQuery
(
Page
<
ChSrvTaskDetailVo
>
page
,
ChSrvTaskDetailVo
vo
){
Page
<
ChSrvTaskDetailVo
>
chSrvTaskDetailVoPage
=
buildBedMapper
.
chSrvTaskDetailQuery
(
page
,
vo
);
chSrvTaskDetailVoPage
.
getRecords
().
stream
().
filter
(
chSrvTaskDetail
->
{
String
disabInfoId
=
chSrvTaskDetail
.
getDisabInfoId
();
String
hospitalFlag
=
chSrvTaskDetail
.
getHospitalFlag
();
if
(
"1"
.
equals
(
hospitalFlag
)){
int
count
=
buildBedMapper
.
selectSrvSend
(
disabInfoId
);
if
(
count
>
0
)
{
chSrvTaskDetail
.
setHospitalFlag
(
"0"
);
}
}
if
(
null
!=
chSrvTaskDetail
.
getSevStarTime
()){
chSrvTaskDetail
.
setSevStarTime
(
chSrvTaskDetail
.
getSevStarTime
().
substring
(
0
,
19
));
}
...
...
governance/src/main/resources/com/hungraim/ltc/governance/mapper/BuildBedMapper.xml
View file @
8a726e82
...
...
@@ -28,8 +28,9 @@
<select
id=
"chSrvTaskDetailQuery"
parameterType=
"com.hungraim.ltc.pojo.vo.disable.ChSrvTaskDetailVo"
resultType=
"com.hungraim.ltc.pojo.vo.disable.ChSrvTaskDetailVo"
>
select A.* from (
select row_number()over(partition by info.CERTI_CODE order by program.PROGRAM_ID) rn,
select A.*,(case when A.exitReasonId = 4 and A.hospitalFlag1 = 0 then 0
when A.exitReasonId = 4 and A.hospitalFlag1 > 0 then 1 else 2 end) hospitalFlag
from ( select row_number()over(partition by info.CERTI_CODE order by program.PROGRAM_ID) rn,
program.PROGRAM_ID taskDetailId,
mode1.MODE_NAME modeName,
organ.SRV_ORGAN_NAME srvOrganName,--护理机构名称
...
...
@@ -37,7 +38,9 @@
info.CERTI_CODE certiCode,--失能人员身份证件号码
program.PROGRAM_DATE sevStarTime,--服务开始时间
program.PROGRAM_EDN_DATE sevEndTime,--服务结束时间
(case when info.exit_time is null then 0 else 1 end) hospitalFlag,
(select count(*) from CH_SRV_SEND t where t.DISAB_INFO_ID = info.DISAB_INFO_ID and
t.STATUS = 1) hospitalFlag1,
info.exit_reason_id exitReasonId,
info.DISAB_INFO_ID disabInfoId
from ch_srv_program program
LEFT JOIN ch_cfg_srv_mode mode1 ON program.srv_mode_id = mode1.mode_id --服务方式
...
...
@@ -61,9 +64,7 @@
<if
test=
"vo.certiCode != null and vo.certiCode != ''"
>
AND info.CERTI_CODE =#{vo.certiCode}
</if>
<if
test=
"vo.hospitalFlag != null and vo.hospitalFlag != ''"
>
AND (case when info.exit_time is null then 0 else 1 end) =#{vo.hospitalFlag}
</if>
<if
test=
"vo.sevStarTime != null and vo.sevStarTime != ''"
>
AND program.PROGRAM_DATE
>
= TO_DATE (#{vo.sevStarTime}, 'yyyy-mm-dd')
</if>
...
...
@@ -72,12 +73,12 @@
</if>
)A
where A.rn =1
<if
test=
"vo.hospitalFlag != null and vo.hospitalFlag != ''"
>
AND (case when A.exitReasonId = 4 and A.hospitalFlag1 = 0 then 0
when A.exitReasonId = 4 and A.hospitalFlag1 > 0 then 1 else 2 end) = #{vo.hospitalFlag}
</if>
</select>
<select
id=
"selectSrvSend"
resultType=
"java.lang.Integer"
>
select count(*) from CH_SRV_SEND t where t.DISAB_INFO_ID = #{disabInfoId} and
t.STATUS = 1
</select>
<select
id=
"getsrvOrgan"
resultType=
"com.hungraim.ltc.pojo.entity.account.ChPunchDetailsVO"
>
SELECT
...
...
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