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
5c42fe63
Commit
5c42fe63
authored
May 07, 2021
by
蔡镇泽
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
查询服务计划制定详情列表
parent
7ad7c1bf
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
71 additions
and
47 deletions
+71
-47
SrvTaskInfoVO.java
...va/com/hungraim/ltc/pojo/vo/governance/SrvTaskInfoVO.java
+13
-12
SrvTaskController.java
...hungraim/ltc/governance/controller/SrvTaskController.java
+23
-11
SrvTaskMapper.java
...n/java/com/hungraim/ltc/governance/dao/SrvTaskMapper.java
+3
-2
SrvTaskService.java
...a/com/hungraim/ltc/governance/service/SrvTaskService.java
+3
-2
SrvTaskServiceImpl.java
...graim/ltc/governance/service/impl/SrvTaskServiceImpl.java
+19
-8
SrvTaskMapper.xml
...rces/com/hungraim/ltc/governance/mapper/SrvTaskMapper.xml
+10
-12
No files found.
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/governance/SrvTaskInfoVO.java
View file @
5c42fe63
package
com
.
hungraim
.
ltc
.
pojo
.
vo
.
governance
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.hungraim.ltc.pojo.entity.PageInfo
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 服务计划详情VO
*
* @author czz
*/
@Data
public
class
SrvTaskInfoVO
extends
PageInfo
implements
Serializable
{
public
class
SrvTaskInfoVO
implements
Serializable
{
/**
* 服务计划id
*/
private
String
srvTaskId
;
/**
* 服务
计划明细
id
* 服务
人员
id
*/
private
String
taskDetail
Id
;
private
String
srvEmp
Id
;
/**
* 服务人员姓名
*/
private
String
empName
;
/**
* 服务
方案起始日
* 服务
人员资质id
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
timezone
=
"GMT+8"
)
private
Date
srvStartTime
;
private
String
empTypeId
;
/**
* 服务
方案终止日
* 服务
人员资质名称
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
timezone
=
"GMT+8"
)
private
Date
srvEndTime
;
private
String
empTypeName
;
/**
* 具体护理日期 yyyy-MM-dd(逗号分隔)
*/
private
String
taskDetails
;
}
governance/src/main/java/com/hungraim/ltc/governance/controller/SrvTaskController.java
View file @
5c42fe63
package
com
.
hungraim
.
ltc
.
governance
.
controller
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.hungraim.ltc.governance.service.SrvTaskService
;
import
com.hungraim.ltc.pojo.vo.governance.OrganEmpVO
;
import
com.hungraim.ltc.pojo.vo.governance.SrvTaskInfoVO
;
...
...
@@ -10,6 +11,7 @@ import lombok.extern.slf4j.Slf4j;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
...
...
@@ -30,18 +32,28 @@ public class SrvTaskController {
/**
* 查询护理机构人员列表
*
* @param pageNum 页码
* @param pageSize 每页大小
* @param organId 护理服务机构id
* @param name 护理人员姓名
* @param certiType 护理人员证件类型
* @param certifNum 护理人员证件号码
*/
@RequestMapping
(
"/getSrvOrganEmpList"
)
public
Result
<
List
<
OrganEmpVO
>>
getSrvOrganEmpList
(
String
organId
,
String
name
,
String
certiType
,
String
certifNum
)
{
public
Result
<
Page
<
OrganEmpVO
>>
getSrvOrganEmpList
(
@RequestParam
(
defaultValue
=
"1"
)
Integer
pageNum
,
@RequestParam
(
defaultValue
=
"10"
)
Integer
pageSize
,
String
organId
,
String
name
,
String
certiType
,
String
certifNum
)
{
if
(
StringUtils
.
isBlank
(
organId
))
{
return
Result
.
failed
(
"
护理服务机构不能为空
!"
);
return
Result
.
failed
(
"
参数异常
!"
);
}
List
<
OrganEmpVO
>
organEmps
=
srvTaskService
.
getSrvOrganEmpList
(
organId
,
name
,
certiType
,
certifNum
);
return
Result
.
success
(
organEmps
);
if
(
pageNum
==
null
)
{
pageNum
=
1
;
}
if
(
pageSize
==
null
)
{
pageSize
=
10
;
}
Page
<
OrganEmpVO
>
page
=
new
Page
<>(
pageNum
,
pageSize
);
page
=
srvTaskService
.
getSrvOrganEmpList
(
page
,
organId
,
name
,
certiType
,
certifNum
);
return
Result
.
success
(
page
);
}
/**
...
...
@@ -66,17 +78,17 @@ public class SrvTaskController {
}
/**
* 查询服务计划制定详情
* 查询服务计划制定详情
列表
*
* @param
taskId 服务计划
id
* @param
programId 服务方案
id
*/
@RequestMapping
(
"/getSrvTaskInfo"
)
public
Result
<
SrvTaskInfoVO
>
getSrvTaskInfo
(
String
task
Id
)
{
if
(
StringUtils
.
isBlank
(
task
Id
))
{
return
Result
.
failed
(
"
taskId不能为空
!"
);
public
Result
<
List
<
SrvTaskInfoVO
>>
getSrvTaskInfoList
(
String
program
Id
)
{
if
(
StringUtils
.
isBlank
(
program
Id
))
{
return
Result
.
failed
(
"
参数异常
!"
);
}
SrvTaskInfoVO
taskInfo
=
srvTaskService
.
getSrvTaskInfo
(
task
Id
);
return
Result
.
success
(
taskInfo
);
List
<
SrvTaskInfoVO
>
taskInfos
=
srvTaskService
.
getSrvTaskInfoList
(
program
Id
);
return
Result
.
success
(
taskInfo
s
);
}
/**
...
...
governance/src/main/java/com/hungraim/ltc/governance/dao/SrvTaskMapper.java
View file @
5c42fe63
package
com
.
hungraim
.
ltc
.
governance
.
dao
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTask
;
import
com.hungraim.ltc.pojo.vo.governance.OrganEmpVO
;
import
com.hungraim.ltc.pojo.vo.governance.SrvTaskInfoVO
;
...
...
@@ -18,7 +19,7 @@ public interface SrvTaskMapper extends BaseMapper<ChSrvTask> {
String
empName
,
String
certifNum
,
String
startTime
,
String
endTime
,
String
status
,
String
modeId
);
SrvTaskInfoVO
getSrvTaskInfo
(
String
task
Id
);
List
<
SrvTaskInfoVO
>
getSrvTaskInfoList
(
String
program
Id
);
List
<
OrganEmpVO
>
getSrvOrganEmpList
(
String
organId
,
String
name
,
String
certiType
,
String
certifNum
);
Page
<
OrganEmpVO
>
getSrvOrganEmpList
(
Page
<
OrganEmpVO
>
page
,
String
organId
,
String
name
,
String
certiType
,
String
certifNum
);
}
governance/src/main/java/com/hungraim/ltc/governance/service/SrvTaskService.java
View file @
5c42fe63
package
com
.
hungraim
.
ltc
.
governance
.
service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.hungraim.ltc.pojo.vo.governance.OrganEmpVO
;
import
com.hungraim.ltc.pojo.vo.governance.SrvTaskInfoVO
;
import
com.hungraim.ltc.pojo.vo.governance.SrvTaskVO
;
...
...
@@ -19,12 +20,12 @@ public interface SrvTaskService {
String
empName
,
String
certifNum
,
String
startTime
,
String
endTime
,
String
status
,
String
modeId
);
SrvTaskInfoVO
getSrvTaskInfo
(
String
task
Id
);
List
<
SrvTaskInfoVO
>
getSrvTaskInfoList
(
String
program
Id
);
void
addSrvTask
(
Long
programId
,
Long
srvEmpId
,
Date
startTime
,
Date
endTime
);
void
updateSrvTask
(
String
taskId
,
Long
srvEmpId
,
Date
startTime
,
Date
endTime
);
List
<
OrganEmpVO
>
getSrvOrganEmpList
(
String
organId
,
String
name
,
String
certiType
,
String
certifNum
);
Page
<
OrganEmpVO
>
getSrvOrganEmpList
(
Page
<
OrganEmpVO
>
page
,
String
organId
,
String
name
,
String
certiType
,
String
certifNum
);
}
governance/src/main/java/com/hungraim/ltc/governance/service/impl/SrvTaskServiceImpl.java
View file @
5c42fe63
package
com
.
hungraim
.
ltc
.
governance
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.
hungraim.ltc.governance.dao.ChOrganEmpMapper
;
import
com.
baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.hungraim.ltc.governance.dao.ChSrvTaskDetailMapper
;
import
com.hungraim.ltc.governance.dao.SrvTaskMapper
;
import
com.hungraim.ltc.governance.service.SrvTaskService
;
...
...
@@ -10,6 +10,7 @@ import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTaskDetail;
import
com.hungraim.ltc.pojo.vo.governance.OrganEmpVO
;
import
com.hungraim.ltc.pojo.vo.governance.SrvTaskInfoVO
;
import
com.hungraim.ltc.pojo.vo.governance.SrvTaskVO
;
import
com.hungraim.ltc.util.DateUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -26,8 +27,6 @@ public class SrvTaskServiceImpl implements SrvTaskService {
private
SrvTaskMapper
srvTaskMapper
;
@Autowired
private
ChSrvTaskDetailMapper
chSrvTaskDetailMapper
;
@Autowired
private
ChOrganEmpMapper
chOrganEmpMapper
;
/**
* 服务计划列表
...
...
@@ -52,11 +51,23 @@ public class SrvTaskServiceImpl implements SrvTaskService {
/**
* 查询服务计划制定详情
*
* @param
taskId 服务计划
id
* @param
programId 服务方案
id
*/
@Override
public
SrvTaskInfoVO
getSrvTaskInfo
(
String
taskId
)
{
return
srvTaskMapper
.
getSrvTaskInfo
(
taskId
);
public
List
<
SrvTaskInfoVO
>
getSrvTaskInfoList
(
String
programId
)
{
List
<
SrvTaskInfoVO
>
srvTaskInfoList
=
srvTaskMapper
.
getSrvTaskInfoList
(
programId
);
//具体服务日期
for
(
SrvTaskInfoVO
vo
:
srvTaskInfoList
)
{
List
<
ChSrvTaskDetail
>
taskDetails
=
chSrvTaskDetailMapper
.
selectList
(
new
QueryWrapper
<
ChSrvTaskDetail
>().
eq
(
"srv_task_id"
,
vo
.
getSrvTaskId
()));
StringBuilder
sb
=
new
StringBuilder
();
for
(
ChSrvTaskDetail
detail
:
taskDetails
)
{
Date
srvDate
=
detail
.
getSrvDate
();
//服务日期
String
s
=
DateUtils
.
dateToStryyyyMMdd
(
srvDate
);
sb
.
append
(
s
).
append
(
","
);
}
vo
.
setTaskDetails
(
sb
.
toString
());
}
return
srvTaskInfoList
;
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
...
...
@@ -112,7 +123,7 @@ public class SrvTaskServiceImpl implements SrvTaskService {
}
@Override
public
List
<
OrganEmpVO
>
getSrvOrganEmpList
(
String
organId
,
String
name
,
String
certiType
,
String
certifNum
)
{
return
srvTaskMapper
.
getSrvOrganEmpList
(
organId
,
name
,
certiType
,
certifNum
);
public
Page
<
OrganEmpVO
>
getSrvOrganEmpList
(
Page
<
OrganEmpVO
>
page
,
String
organId
,
String
name
,
String
certiType
,
String
certifNum
)
{
return
srvTaskMapper
.
getSrvOrganEmpList
(
page
,
organId
,
name
,
certiType
,
certifNum
);
}
}
governance/src/main/resources/com/hungraim/ltc/governance/mapper/SrvTaskMapper.xml
View file @
5c42fe63
...
...
@@ -94,22 +94,20 @@
</select>
<!--查询服务计划信息-->
<select
id=
"getSrvTaskInfo"
resultType=
"com.hungraim.ltc.pojo.vo.governance.SrvTaskInfoVO"
>
<select
id=
"getSrvTaskInfo
List
"
resultType=
"com.hungraim.ltc.pojo.vo.governance.SrvTaskInfoVO"
>
select task.srv_task_id srvTaskId,
detail.task_detail_id taskDetailId,
--服务人员id
task.srv_emp_id srvEmpId,
--服务人员姓名
emp.EMP_NAME empName,
--服务人员资质
empType.emp_type_name empTypeName,
--服务方案起始日
detail.srv_start_time srvStartTime,
--服务方案终止日
detail.srv_end_time srvEndTime
emp.emp_name empName,
--服务人员资质id
emp.emp_type_id empTypeId,
--服务人员资质名称
empType.emp_type_name empTypeName
from ch_srv_task task--服务计划
left join ch_srv_organ_emp emp on task.srv_emp_id = emp.emp_id--护理人员
left join CH_EMP_TYPE empType on emp.EMP_TYPE_ID = empType.EMP_TYPE--护理人员资质
left join ch_srv_task_detail detail on task.srv_task_id = detail.task_detail_id--服务任务明细
where task.SRV_TASK_ID = #{taskId}
left join ch_emp_type empType on emp.emp_type_id = empType.emp_type--护理人员资质
where task.program_id = #{programId}
</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