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
47d7a3a4
Commit
47d7a3a4
authored
Mar 27, 2023
by
zengxiaoli@yeah.net
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
建床管理
1.查询-失能人员多条数据整合成一条 2.打卡详情-打卡记录按照每月每天执行的项目打勾 3.打卡详情-记录中展示对应的护理机构名称和机构类型 4.查询服务开始和结束时间,换成服务方案里的时间。
parent
9bad7448
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
78 deletions
+31
-78
BuildBedController.java
...ungraim/ltc/governance/controller/BuildBedController.java
+4
-4
BuildBedMapper.java
.../java/com/hungraim/ltc/governance/dao/BuildBedMapper.java
+1
-1
IBuildBedService.java
...com/hungraim/ltc/governance/service/IBuildBedService.java
+1
-1
BuildBedServiceImpl.java
...raim/ltc/governance/service/impl/BuildBedServiceImpl.java
+2
-2
BuildBedMapper.xml
...ces/com/hungraim/ltc/governance/mapper/BuildBedMapper.xml
+23
-70
No files found.
governance/src/main/java/com/hungraim/ltc/governance/controller/BuildBedController.java
View file @
47d7a3a4
...
@@ -336,8 +336,8 @@ public class BuildBedController {
...
@@ -336,8 +336,8 @@ public class BuildBedController {
* @return
* @return
*/
*/
@GetMapping
(
"/chPunchDetailsQuery"
)
@GetMapping
(
"/chPunchDetailsQuery"
)
public
Result
chPunchDetailsQuery
(
Long
taskDetailId
,
String
sevStarTime
,
String
sevEndTime
){
public
Result
chPunchDetailsQuery
(
Long
taskDetailId
,
String
certiCode
,
String
sevStarTime
,
String
sevEndTime
){
ChPunchDetailsVO
chPunchDetailsVO
=
buildBedService
.
chPunchDetailsQuery
(
taskDetailId
,
sevStarTime
,
sevEndTime
);
ChPunchDetailsVO
chPunchDetailsVO
=
buildBedService
.
chPunchDetailsQuery
(
taskDetailId
,
certiCode
,
sevStarTime
,
sevEndTime
);
return
Result
.
success
(
chPunchDetailsVO
);
return
Result
.
success
(
chPunchDetailsVO
);
}
}
...
@@ -378,5 +378,4 @@ public class BuildBedController {
...
@@ -378,5 +378,4 @@ public class BuildBedController {
}
}
}
}
\ No newline at end of file
governance/src/main/java/com/hungraim/ltc/governance/dao/BuildBedMapper.java
View file @
47d7a3a4
...
@@ -42,7 +42,7 @@ public interface BuildBedMapper extends BaseMapper<ChSrvBuildBed> {
...
@@ -42,7 +42,7 @@ public interface BuildBedMapper extends BaseMapper<ChSrvBuildBed> {
ChPunchDetailsVO
getsrvOrgan
(
Long
taskDetailId
);
ChPunchDetailsVO
getsrvOrgan
(
Long
taskDetailId
);
List
<
ChServiceTypeDetailedVO
>
getServiceTypeDetailed
(
@Param
(
"taskDetailId"
)
Long
taskDetailId
,
@Param
(
"sevStarTime"
)
String
sevStarTime
,
@Param
(
"sevEndTime"
)
String
sevEndTime
);
List
<
ChServiceTypeDetailedVO
>
getServiceTypeDetailed
(
@Param
(
"taskDetailId"
)
Long
taskDetailId
,
@Param
(
"
certiCode"
)
String
certiCode
,
@Param
(
"
sevStarTime"
)
String
sevStarTime
,
@Param
(
"sevEndTime"
)
String
sevEndTime
);
List
<
ChServiceTypeVO
>
selectServiceTypeDetailed
();
List
<
ChServiceTypeVO
>
selectServiceTypeDetailed
();
}
}
governance/src/main/java/com/hungraim/ltc/governance/service/IBuildBedService.java
View file @
47d7a3a4
...
@@ -56,5 +56,5 @@ public interface IBuildBedService extends IService<ChSrvBuildBed> {
...
@@ -56,5 +56,5 @@ public interface IBuildBedService extends IService<ChSrvBuildBed> {
* 打卡详情
* 打卡详情
* @param taskDetailId
* @param taskDetailId
*/
*/
ChPunchDetailsVO
chPunchDetailsQuery
(
Long
taskDetailId
,
String
sevStarTime
,
String
sevEndTime
);
ChPunchDetailsVO
chPunchDetailsQuery
(
Long
taskDetailId
,
String
certiCode
,
String
sevStarTime
,
String
sevEndTime
);
}
}
governance/src/main/java/com/hungraim/ltc/governance/service/impl/BuildBedServiceImpl.java
View file @
47d7a3a4
...
@@ -132,7 +132,7 @@ public class BuildBedServiceImpl extends ServiceImpl<BuildBedMapper, ChSrvBuildB
...
@@ -132,7 +132,7 @@ public class BuildBedServiceImpl extends ServiceImpl<BuildBedMapper, ChSrvBuildB
* @param taskDetailId
* @param taskDetailId
*/
*/
@Override
@Override
public
ChPunchDetailsVO
chPunchDetailsQuery
(
Long
taskDetailId
,
String
sevStarTime
,
String
sevEndTime
)
{
public
ChPunchDetailsVO
chPunchDetailsQuery
(
Long
taskDetailId
,
String
certiCode
,
String
sevStarTime
,
String
sevEndTime
)
{
List
<
ChPunchDetailVO
>
chPunchDetailVOS
=
new
ArrayList
<>();
List
<
ChPunchDetailVO
>
chPunchDetailVOS
=
new
ArrayList
<>();
//获取项目信息
//获取项目信息
List
<
ChServiceTypeVO
>
chServiceTypeDetaileds
=
buildBedMapper
.
selectServiceTypeDetailed
();
List
<
ChServiceTypeVO
>
chServiceTypeDetaileds
=
buildBedMapper
.
selectServiceTypeDetailed
();
...
@@ -154,7 +154,7 @@ public class BuildBedServiceImpl extends ServiceImpl<BuildBedMapper, ChSrvBuildB
...
@@ -154,7 +154,7 @@ public class BuildBedServiceImpl extends ServiceImpl<BuildBedMapper, ChSrvBuildB
}
}
log
.
info
(
"chPunchDetailsQuery获取服务机构和服务类型:"
+
chPunchDetailsVO
);
log
.
info
(
"chPunchDetailsQuery获取服务机构和服务类型:"
+
chPunchDetailsVO
);
//打卡详情
//打卡详情
List
<
ChServiceTypeDetailedVO
>
serviceTypeDetailed1s
=
buildBedMapper
.
getServiceTypeDetailed
(
taskDetailId
,
sevStarTime
,
sevEndTime
);
List
<
ChServiceTypeDetailedVO
>
serviceTypeDetailed1s
=
buildBedMapper
.
getServiceTypeDetailed
(
taskDetailId
,
certiCode
,
sevStarTime
,
sevEndTime
);
log
.
info
(
"chPunchDetailsQuery打卡详情:"
+
serviceTypeDetailed1s
);
log
.
info
(
"chPunchDetailsQuery打卡详情:"
+
serviceTypeDetailed1s
);
chPunchDetailsVO
.
setRecordData
(
chPunchDetailVOS
);
chPunchDetailsVO
.
setRecordData
(
chPunchDetailVOS
);
chPunchDetailsVO
.
setChPunchDetailVOS
(
serviceTypeDetailed1s
);
chPunchDetailsVO
.
setChPunchDetailVOS
(
serviceTypeDetailed1s
);
...
...
governance/src/main/resources/com/hungraim/ltc/governance/mapper/BuildBedMapper.xml
View file @
47d7a3a4
...
@@ -27,22 +27,19 @@
...
@@ -27,22 +27,19 @@
<select
id=
"chSrvTaskDetailQuery"
parameterType=
"com.hungraim.ltc.pojo.vo.disable.ChSrvTaskDetailVo"
<select
id=
"chSrvTaskDetailQuery"
parameterType=
"com.hungraim.ltc.pojo.vo.disable.ChSrvTaskDetailVo"
resultType=
"com.hungraim.ltc.pojo.vo.disable.ChSrvTaskDetailVo"
>
resultType=
"com.hungraim.ltc.pojo.vo.disable.ChSrvTaskDetailVo"
>
SELECT
select
t.TASK_DETAIL
_ID taskDetailId,
program.PROGRAM
_ID taskDetailId,
mode1.MODE_NAME modeName,
----服务方式
mode1.MODE_NAME modeName,
organ.SRV_ORGAN_NAME srvOrganName,--护理机构名称
organ.SRV_ORGAN_NAME srvOrganName,--护理机构名称
info.REAL_NAME realName,--失能人员名字
info.REAL_NAME realName,--失能人员名字
info.CERTI_CODE certiCode,--失能人员身份证件号码
info.CERTI_CODE certiCode,--失能人员身份证件号码
t.SRV_START_TIME sevStarTime,--服务开始时间
program.PROGRAM_DATE sevStarTime,--服务开始时间
t.SRV_END_TIME sevEndTime,--服务结束时间
program.PROGRAM_EDN_DATE sevEndTime--服务结束时间
TO_DATE( '', 'yyyy-MM-dd' ) declarationTime
from ch_srv_program program
FROM
CH_SRV_TASK_DETAIL t --服务明细表
LEFT JOIN ch_srv_task task ON task.srv_task_id = t.srv_task_id --服务计划详情
LEFT JOIN CH_DISABLE_INFO info ON task.DISAB_INFO_ID = info.DISAB_INFO_ID --失能人员信息表
LEFT JOIN ch_srv_program program ON task.program_id = program.program_id --服务方案
LEFT JOIN ch_srv_organ organ ON program.srv_organ_id = organ.srv_organ_id --服务机构
LEFT JOIN ch_cfg_srv_mode mode1 ON program.srv_mode_id = mode1.mode_id --服务方式
LEFT JOIN ch_cfg_srv_mode mode1 ON program.srv_mode_id = mode1.mode_id --服务方式
LEFT JOIN ch_srv_organ organ ON program.srv_organ_id = organ.srv_organ_id --服务机构
LEFT JOIN ch_srv_task task ON task.PROGRAM_ID = program.PROGRAM_ID --服务计划详情
LEFT JOIN CH_DISABLE_INFO info ON task.DISAB_INFO_ID = info.DISAB_INFO_ID --失能人员信息表
where 1=1
where 1=1
<if
test=
"vo.srvOrganName != null and vo.srvOrganName != ''"
>
<if
test=
"vo.srvOrganName != null and vo.srvOrganName != ''"
>
AND organ.SRV_ORGAN_NAME LIKE '%' || #{vo.srvOrganName} || '%'
AND organ.SRV_ORGAN_NAME LIKE '%' || #{vo.srvOrganName} || '%'
...
@@ -57,43 +54,10 @@
...
@@ -57,43 +54,10 @@
AND info.CERTI_CODE =#{vo.certiCode}
AND info.CERTI_CODE =#{vo.certiCode}
</if>
</if>
<if
test=
"vo.sevStarTime != null and vo.sevStarTime != ''"
>
<if
test=
"vo.sevStarTime != null and vo.sevStarTime != ''"
>
AND
t.SRV_START_TIM
E
>
= TO_DATE (#{vo.sevStarTime}, 'yyyy-mm-dd')
AND
program.PROGRAM_DAT
E
>
= TO_DATE (#{vo.sevStarTime}, 'yyyy-mm-dd')
</if>
</if>
<if
test=
"vo.sevEndTime != null and vo.sevEndTime != ''"
>
<if
test=
"vo.sevEndTime != null and vo.sevEndTime != ''"
>
AND t.SRV_END_TIME
<
= TO_DATE (#{vo.sevEndTime}, 'yyyy-mm-dd')
AND program.PROGRAM_EDN_DATE
<
= TO_DATE (#{vo.sevEndTime}, 'yyyy-mm-dd')
</if>
UNION
SELECT
d.TASK_DETAIL_ID taskDetailId,
d.MODE_NAME modeName,----服务方式
o.SRV_ORGAN_NAME srvOrganName,--护理机构名称
info.REAL_NAME realName,--失能人员名字
info.CERTI_CODE certiCode,--失能人员身份证件号码
TO_DATE( '', 'yyyy-MM-dd' ) sevStarTime,--服务开始时间
TO_DATE( '', 'yyyy-MM-dd' ) sevEndTime,--服务结束时间
d.DECLARATION_TIME declarationTime--申报日期
FROM
CH_DISAB_ACCOUNTS_DETAIL d --账户信息表
LEFT JOIN CH_DISABLE_INFO info ON d.DISAB_INFO_ID = info.DISAB_INFO_ID --失能人员信息表
LEFT JOIN CH_SRV_ORGAN o ON d.SRV_ORGAN_ID = o.SRV_ORGAN_ID --护理机构表
where 1=1
<if
test=
"vo.srvOrganName != null and vo.srvOrganName != ''"
>
AND o.SRV_ORGAN_NAME LIKE '%' || #{vo.srvOrganName} || '%'
</if>
<if
test=
"vo.modeName != null and vo.modeName != ''"
>
AND d.MODE_NAME = #{vo.modeName}
</if>
<if
test=
"vo.realName != null and vo.realName != ''"
>
AND info.REAL_NAME LIKE '%' || #{vo.realName} || '%'
</if>
<if
test=
"vo.certiCode != null and vo.certiCode != ''"
>
AND info.CERTI_CODE =#{vo.certiCode}
</if>
<if
test=
"vo.sevStarTime != null and vo.sevStarTime != ''"
>
AND d.DECLARATION_TIME
>
= TO_DATE (#{vo.sevStarTime}, 'yyyy-mm-dd')
</if>
<if
test=
"vo.sevEndTime != null and vo.sevEndTime != ''"
>
AND d.DECLARATION_TIME
<
= TO_DATE (#{vo.sevEndTime}, 'yyyy-mm-dd')
</if>
</if>
</select>
</select>
<select
id=
"getsrvOrgan"
resultType=
"com.hungraim.ltc.pojo.entity.account.ChPunchDetailsVO"
>
<select
id=
"getsrvOrgan"
resultType=
"com.hungraim.ltc.pojo.entity.account.ChPunchDetailsVO"
>
...
@@ -103,43 +67,32 @@
...
@@ -103,43 +67,32 @@
FROM
FROM
CH_SRV_ORGAN n
CH_SRV_ORGAN n
LEFT JOIN CH_CFG_SRV_ORGAN_TYPE e ON n.ORGAN_ID = e.ORGAN_TYPE_ID
LEFT JOIN CH_CFG_SRV_ORGAN_TYPE e ON n.ORGAN_ID = e.ORGAN_TYPE_ID
LEFT JOIN CH_DISAB_ACCOUNTS_DETAIL detail ON n.SRV_ORGAN_ID = detail.SRV_ORGAN_ID
LEFT JOIN ch_srv_program program ON n.SRV_ORGAN_ID = program.SRV_ORGAN_ID
WHERE detail.TASK_DETAIL_ID = #{taskDetailId}
WHERE program.PROGRAM_ID = #{taskDetailId}
</select>
</select>
<select
id=
"getServiceTypeDetailed"
parameterType=
"Long"
resultType=
"com.hungraim.ltc.pojo.entity.account.ChServiceTypeDetailedVO"
>
<select
id=
"getServiceTypeDetailed"
parameterType=
"Long"
resultType=
"com.hungraim.ltc.pojo.entity.account.ChServiceTypeDetailedVO"
>
SELECT
SELECT
to_char( detail.DECLARATION_TIME, 'dd' ) executionTime,
detail.TASK_DETAIL_ID,
service.SERVICE_TYPE_DETAILED_NAME itemName,
detail.SRV_START_TIME ,
service.SERVICE_TYPE_DETAILED_ID serviceTypeDetailedId
detail.SRV_END_TIME,
FROM
CH_DISAB_ACCOUNTS_DETAIL detail
LEFT JOIN CH_SRV_TASK_FINISH_ITEM item ON detail.TASK_DETAIL_ID = item.TASK_DETAIL_ID
LEFT JOIN CH_SRV_ORGAN_PROJECT CSOP ON CSOP.PROJECT_ID = item.ITEM_ID
left join CH_SERVICE_TYPE_DETAILED service on service.SERVICE_TYPE_DETAILED_ID = CSOP.ITEM_NAME
WHERE 1=1
<if
test=
"taskDetailId != null and taskDetailId != ''"
>
and detail.TASK_DETAIL_ID = #{taskDetailId}
</if>
<if
test=
"sevStarTime != null and sevStarTime != ''"
>
AND detail.DECLARATION_TIME
>
= TO_DATE (substr(#{sevStarTime} ,1,10), 'yyyy-mm-dd')
</if>
<if
test=
"sevEndTime != null and sevEndTime != ''"
>
AND detail.DECLARATION_TIME
<
= TO_DATE (substr(#{sevEndTime},1,10), 'yyyy-mm-dd')
</if>
UNION
SELECT
to_char( detail.SRV_START_TIME, 'dd' ) executionTime,
to_char( detail.SRV_START_TIME, 'dd' ) executionTime,
service.SERVICE_TYPE_DETAILED_NAME itemName,
service.SERVICE_TYPE_DETAILED_NAME itemName,
service.SERVICE_TYPE_DETAILED_ID serviceTypeDetailedId
service.SERVICE_TYPE_DETAILED_ID serviceTypeDetailedId
FROM
FROM
CH_SRV_TASK_DETAIL detail
CH_SRV_TASK_DETAIL detail
LEFT JOIN ch_srv_task task ON task.srv_task_id = detail.srv_task_id --服务计划详情
LEFT JOIN CH_SRV_TASK_FINISH_ITEM item ON detail.TASK_DETAIL_ID = item.TASK_DETAIL_ID
LEFT JOIN CH_SRV_TASK_FINISH_ITEM item ON detail.TASK_DETAIL_ID = item.TASK_DETAIL_ID
LEFT JOIN CH_SRV_ORGAN_PROJECT CSOP ON CSOP.PROJECT_ID = item.ITEM_ID
LEFT JOIN CH_SRV_ORGAN_PROJECT CSOP ON CSOP.PROJECT_ID = item.ITEM_ID
left join CH_SERVICE_TYPE_DETAILED service on service.SERVICE_TYPE_DETAILED_ID = CSOP.ITEM_NAME
left join CH_SERVICE_TYPE_DETAILED service on service.SERVICE_TYPE_DETAILED_ID = CSOP.ITEM_NAME
WHERE 1=1
WHERE 1=1
<if
test=
"taskDetailId != null and taskDetailId != ''"
>
<if
test=
"taskDetailId != null and taskDetailId != ''"
>
and detail.TASK_DETAIL_ID = #{taskDetailId}
and task.PROGRAM_ID = #{taskDetailId}
</if>
<if
test=
"certiCode != null and certiCode != ''"
>
and task.DISAB_INFO_ID = (select DISAB_INFO_ID from CH_DISABLE_INFO where CERTI_CODE =#{certiCode})
</if>
</if>
<if
test=
"sevStarTime != null and sevStarTime != ''"
>
<if
test=
"sevStarTime != null and sevStarTime != ''"
>
AND detail.SRV_START_TIME
>
= TO_DATE (substr(#{sevStarTime},1,10), 'yyyy-mm-dd')
AND detail.SRV_START_TIME
>
= TO_DATE (substr(#{sevStarTime},1,10), 'yyyy-mm-dd')
...
...
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