Commit cea1fd63 authored by zhangch's avatar zhangch

对接服务计划查询列表接口修改

parent 625d9418
...@@ -11,6 +11,10 @@ import java.util.Date; ...@@ -11,6 +11,10 @@ import java.util.Date;
@Data @Data
public class SrvTaskDetailVO { public class SrvTaskDetailVO {
/** /**
* 服务计划详情id
*/
private String taskDetailId;
/**
* 服务计划id * 服务计划id
*/ */
private String srvTaskId; private String srvTaskId;
...@@ -48,7 +52,7 @@ public class SrvTaskDetailVO { ...@@ -48,7 +52,7 @@ public class SrvTaskDetailVO {
/** /**
* 诊断疾病 * 诊断疾病
*/ */
private String disease; private String diseTypeS;
/** /**
* 接受服务地址 * 接受服务地址
*/ */
...@@ -56,6 +60,7 @@ public class SrvTaskDetailVO { ...@@ -56,6 +60,7 @@ public class SrvTaskDetailVO {
private String acptSrvCity; private String acptSrvCity;
private String acptSrvArea; private String acptSrvArea;
private String acptSrvStreet; private String acptSrvStreet;
private String acptSrvAddress;
/** /**
* 评定等级 * 评定等级
*/ */
...@@ -64,7 +69,7 @@ public class SrvTaskDetailVO { ...@@ -64,7 +69,7 @@ public class SrvTaskDetailVO {
* 评定完成日期 * 评定完成日期
*/ */
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date evaluateRafinishTimetingType; private Date finishTime;
/** /**
* 服务方式 * 服务方式
*/ */
......
...@@ -60,11 +60,11 @@ public class SvrSendListVo { ...@@ -60,11 +60,11 @@ public class SvrSendListVo {
/** /**
* 接收服务省市区 * 接收服务省市区
*/ */
private String acptProvincial; private String acptSrvProvincial;
private String acptCity; private String acptSrvCity;
private String acptArea; private String acptSrvArea;
private String acptStreet; private String acptSrvStreet;
private String acptAddress; private String acptSrvAddress;
/** /**
* 服务方案数量 * 服务方案数量
......
...@@ -8,6 +8,7 @@ import com.hungraim.ltc.util.Result; ...@@ -8,6 +8,7 @@ import com.hungraim.ltc.util.Result;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
...@@ -32,12 +33,12 @@ public class SrvTaskController { ...@@ -32,12 +33,12 @@ public class SrvTaskController {
/** /**
* 查询护理机构人员列表 * 查询护理机构人员列表
* *
* @param pageNum 页码 * @param pageNum 页码
* @param pageSize 每页大小 * @param pageSize 每页大小
* @param srvOrganId 护理服务机构id * @param srvOrganId 护理服务机构id
* @param name 护理人员姓名 * @param name 护理人员姓名
* @param certiType 护理人员证件类型 * @param certiType 护理人员证件类型
* @param certifNum 护理人员证件号码 * @param certifNum 护理人员证件号码
*/ */
@RequestMapping("/getSrvOrganEmpList") @RequestMapping("/getSrvOrganEmpList")
public Result<Page<OrganEmpVO>> getSrvOrganEmpList(@RequestParam(defaultValue = "1") Integer pageNum, @RequestParam(defaultValue = "10") Integer pageSize, public Result<Page<OrganEmpVO>> getSrvOrganEmpList(@RequestParam(defaultValue = "1") Integer pageNum, @RequestParam(defaultValue = "10") Integer pageSize,
...@@ -69,7 +70,7 @@ public class SrvTaskController { ...@@ -69,7 +70,7 @@ public class SrvTaskController {
/** /**
* 服务计划查询列表 * 服务计划查询列表
* *
* @param organId 护理机构id * @param srvOrganId 护理机构id
* @param disableName 失能人员姓名 * @param disableName 失能人员姓名
* @param disableTel 失能人员手机号码 * @param disableTel 失能人员手机号码
* @param empName 护理人员姓名 * @param empName 护理人员姓名
...@@ -81,11 +82,11 @@ public class SrvTaskController { ...@@ -81,11 +82,11 @@ public class SrvTaskController {
*/ */
@RequestMapping("/getSrvTaskDetailList") @RequestMapping("/getSrvTaskDetailList")
public Result<Page<SrvTaskDetailVO>> getSrvTaskDetailList(@RequestParam(defaultValue = "1") Integer pageNum, @RequestParam(defaultValue = "10") Integer pageSize, public Result<Page<SrvTaskDetailVO>> getSrvTaskDetailList(@RequestParam(defaultValue = "1") Integer pageNum, @RequestParam(defaultValue = "10") Integer pageSize,
Integer organId, String disableName, String disableTel, Integer srvOrganId, String disableName, String disableTel,
String empName, String certifNum, String startTime, String endTime, String empName, String certifNum, @DateTimeFormat(pattern = "yyyy-MM-dd") Date startTime,@DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime,
String status, String modeId) { String status, String modeId) {
Page<SrvTaskDetailVO> page = new Page<>(pageNum, pageSize); Page<SrvTaskDetailVO> page = new Page<>(pageNum, pageSize);
page = srvTaskService.getSrvTaskDetailList(page, organId, disableName, disableTel, empName, certifNum, startTime, endTime, status, modeId); page = srvTaskService.getSrvTaskDetailList(page, srvOrganId, disableName, disableTel, empName, certifNum, startTime, endTime, status, modeId);
return Result.success(page); return Result.success(page);
} }
......
...@@ -11,6 +11,7 @@ import org.apache.ibatis.annotations.Mapper; ...@@ -11,6 +11,7 @@ import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import java.util.Date;
import java.util.List; import java.util.List;
@Mapper @Mapper
...@@ -19,7 +20,7 @@ public interface SrvTaskMapper extends BaseMapper<ChSrvTask> { ...@@ -19,7 +20,7 @@ public interface SrvTaskMapper extends BaseMapper<ChSrvTask> {
Page<SrvTaskVO> getSrvTaskList(Page<SrvTaskVO> page, @Param("srvOrganId") Long srvOrganId,@Param("disableName") String disableName,@Param("disableTel") String disableTel,@Param("taskStatus") String taskStatus); Page<SrvTaskVO> getSrvTaskList(Page<SrvTaskVO> page, @Param("srvOrganId") Long srvOrganId,@Param("disableName") String disableName,@Param("disableTel") String disableTel,@Param("taskStatus") String taskStatus);
Page<SrvTaskDetailVO> getSrvTaskDetailList(Page<SrvTaskDetailVO> page, Integer organId, String disableName, String disableTel, String empName, String certifNum, String startTime, String endTime, String status, String modeId); Page<SrvTaskDetailVO> getSrvTaskDetailList(Page<SrvTaskDetailVO> page, Integer organId, String disableName, String disableTel, String empName, String certifNum, Date startTime, Date endTime, String status, String modeId);
List<SrvTaskInfoVO> getSrvTaskInfoList(String programId); List<SrvTaskInfoVO> getSrvTaskInfoList(String programId);
......
...@@ -27,6 +27,6 @@ public interface SrvTaskService { ...@@ -27,6 +27,6 @@ public interface SrvTaskService {
Page<OrganEmpVO> getSrvOrganEmpList(Page<OrganEmpVO> page, String organId, String name, String certiType, String certifNum); Page<OrganEmpVO> getSrvOrganEmpList(Page<OrganEmpVO> page, String organId, String name, String certiType, String certifNum);
Page<SrvTaskDetailVO> getSrvTaskDetailList(Page<SrvTaskDetailVO> page, Integer organId, String disableName, String disableTel, String empName, String certifNum, String startTime, String endTime, String status, String modeId); Page<SrvTaskDetailVO> getSrvTaskDetailList(Page<SrvTaskDetailVO> page, Integer organId, String disableName, String disableTel, String empName, String certifNum, Date startTime, Date endTime, String status, String modeId);
} }
...@@ -45,8 +45,7 @@ public class SrvTaskServiceImpl implements SrvTaskService { ...@@ -45,8 +45,7 @@ public class SrvTaskServiceImpl implements SrvTaskService {
/** /**
* 服务计划查询列表 * 服务计划查询列表
* * @param organId 护理机构id
* @param organId 护理机构id
* @param disableName 失能人员姓名 * @param disableName 失能人员姓名
* @param disableTel 失能人员手机号码 * @param disableTel 失能人员手机号码
* @param empName 护理人员姓名 * @param empName 护理人员姓名
...@@ -57,7 +56,7 @@ public class SrvTaskServiceImpl implements SrvTaskService { ...@@ -57,7 +56,7 @@ public class SrvTaskServiceImpl implements SrvTaskService {
* @param modeId 服务方式 * @param modeId 服务方式
*/ */
@Override @Override
public Page<SrvTaskDetailVO> getSrvTaskDetailList(Page<SrvTaskDetailVO> page, Integer organId, String disableName, String disableTel, String empName, String certifNum, String startTime, String endTime, String status, String modeId) { public Page<SrvTaskDetailVO> getSrvTaskDetailList(Page<SrvTaskDetailVO> page, Integer organId, String disableName, String disableTel, String empName, String certifNum, Date startTime, Date endTime, String status, String modeId) {
return srvTaskMapper.getSrvTaskDetailList(page, organId, disableName, disableTel, empName, certifNum, startTime, endTime, status, modeId); return srvTaskMapper.getSrvTaskDetailList(page, organId, disableName, disableTel, empName, certifNum, startTime, endTime, status, modeId);
} }
......
...@@ -41,11 +41,11 @@ ...@@ -41,11 +41,11 @@
T3.TEL realTel, T3.TEL realTel,
T3.BIRTHDAY birthday, T3.BIRTHDAY birthday,
T3.GENDER gender, T3.GENDER gender,
T3.ACPT_PROVINCIAL acptProvincial, T3.ACPT_SRV_PROVINCIAL acptSrvProvincial,
T3.ACPT_CITY acptCity, T3.ACPT_SRV_CITY acptSrvCity,
T3.ACPT_AREA acptArea, T3.ACPT_SRV_AREA acptSrvArea,
T3.ACPT_STREET acptStreet, T3.ACPT_SRV_STREET acptSrvStreet,
T3.ACPT_ADDRESS acptAddress, T3.ACPT_SRV_ADDRESS acptSrvAddress,
T1.STATUS sendStatus, T1.STATUS sendStatus,
T1.EFF_TIME effTime, T1.EFF_TIME effTime,
(SELECT COUNT(0) FROM CH_SRV_PROGRAM T4 WHERE T1.SRV_ORGAN_ID = T4.SRV_ORGAN_ID AND T1.DISAB_INFO_ID = T4.DISAB_INFO_ID) programNum (SELECT COUNT(0) FROM CH_SRV_PROGRAM T4 WHERE T1.SRV_ORGAN_ID = T4.SRV_ORGAN_ID AND T1.DISAB_INFO_ID = T4.DISAB_INFO_ID) programNum
......
...@@ -51,10 +51,10 @@ ...@@ -51,10 +51,10 @@
<if test="disableTel != null and disableTel != ''"> <if test="disableTel != null and disableTel != ''">
and disable.tel = #{disableTel} and disable.tel = #{disableTel}
</if> </if>
<if test="taskStatus != null and taskStatus == '1'"> <if test='taskStatus != null and taskStatus == "1"'>
and ( SELECT count( 0 ) FROM ch_srv_task WHERE program_id = program.PROGRAM_ID ) = 0 and ( SELECT count( 0 ) FROM ch_srv_task WHERE program_id = program.PROGRAM_ID ) = 0
</if> </if>
<if test="taskStatus != null and taskStatus == '2'"> <if test='taskStatus != null and taskStatus == "2"'>
and ( SELECT count( 0 ) FROM ch_srv_task WHERE program_id = program.PROGRAM_ID ) > 0 and ( SELECT count( 0 ) FROM ch_srv_task WHERE program_id = program.PROGRAM_ID ) > 0
</if> </if>
</where> </where>
...@@ -63,6 +63,7 @@ ...@@ -63,6 +63,7 @@
<!--服务计划查询列表--> <!--服务计划查询列表-->
<select id="getSrvTaskDetailList" resultType="com.hungraim.ltc.pojo.vo.governance.SrvTaskDetailVO"> <select id="getSrvTaskDetailList" resultType="com.hungraim.ltc.pojo.vo.governance.SrvTaskDetailVO">
select select
detail.TASK_DETAIL_ID taskDetailId,
--服务计划id --服务计划id
task.srv_task_id srvTaskId, task.srv_task_id srvTaskId,
--服务方案id --服务方案id
...@@ -70,9 +71,9 @@ ...@@ -70,9 +71,9 @@
--失能人员id --失能人员id
disable.disab_info_id disabInfoId, disable.disab_info_id disabInfoId,
--所在省市 --所在省市
(select DISTRICT_NAME from CH_FND_DISTRICT dis where disable.district_provincial = dis.DISTRICT_CODE) districtProvincial, disable.district_provincial districtProvincial,
(select DISTRICT_NAME from CH_FND_DISTRICT dis where disable.district_city = dis.DISTRICT_CODE) districtCity, disable.district_city districtCity,
(select DISTRICT_NAME from CH_FND_DISTRICT dis where disable.DISTRICT_AREA = dis.DISTRICT_CODE) districtArea, disable.DISTRICT_AREA districtArea,
--失能人员姓名 --失能人员姓名
disable.real_name realName, disable.real_name realName,
--手机号码 --手机号码
...@@ -82,12 +83,13 @@ ...@@ -82,12 +83,13 @@
--性别 --性别
disable.gender gender, disable.gender gender,
--诊断疾病 --诊断疾病
disable.disease disease, disable.DISE_TYPE_S diseTypeS,
--接受服务地址 --接受服务地址
(select DISTRICT_NAME from CH_FND_DISTRICT dis where disable.acpt_srv_provincial = dis.DISTRICT_CODE) acptSrvProvincial, disable.acpt_srv_provincial acptSrvProvincial,
(select DISTRICT_NAME from CH_FND_DISTRICT dis where disable.acpt_srv_city = dis.DISTRICT_CODE) acptSrvCity, disable.acpt_srv_city acptSrvCity,
(select DISTRICT_NAME from CH_FND_DISTRICT dis where disable.acpt_srv_area = dis.DISTRICT_CODE) acptSrvArea, disable.acpt_srv_area acptSrvArea,
(select STREET_NAME from CH_FND_STREET street where disable.acpt_srv_street = street.STREET_CODE) acptSrvStreet, disable.acpt_srv_street acptSrvStreet,
disable.ACPT_SRV_ADDRESS acptSrvAddress,
--评定等级 --评定等级
report.evaluate_rating_type evaluateRatingType, report.evaluate_rating_type evaluateRatingType,
--评定完成日期 --评定完成日期
...@@ -102,8 +104,8 @@ ...@@ -102,8 +104,8 @@
detail.SRV_DATE srvDate, detail.SRV_DATE srvDate,
--任务状态 --任务状态
detail.status status detail.status status
from ch_srv_task task--服务计划 from ch_srv_task_detail detail--服务计划
left join ch_srv_task_detail detail on task.srv_task_id = detail.srv_task_id--服务计划详情 left join ch_srv_task task on task.srv_task_id = detail.srv_task_id--服务计划详情
left join ch_disable_info disable on task.disab_info_id = disable.disab_info_id--失能人员 left join ch_disable_info disable on task.disab_info_id = disable.disab_info_id--失能人员
left join ch_apr_task aprtask on disable.last_task_id = aprtask.task_id--评定任务 left join ch_apr_task aprtask on disable.last_task_id = aprtask.task_id--评定任务
left join ch_apr_report report on aprtask.task_id = report.task_id--评定报告 left join ch_apr_report report on aprtask.task_id = report.task_id--评定报告
...@@ -129,11 +131,11 @@ ...@@ -129,11 +131,11 @@
<if test="certifNum != null and certifNum != ''"> <if test="certifNum != null and certifNum != ''">
and emp.certif_num = #{certifNum} and emp.certif_num = #{certifNum}
</if> </if>
<if test="startTime != null and startTime != ''"> <if test="startTime != null">
and detail.SRV_DATE &gt;= #{startTime} and detail.SRV_DATE &gt;= #{startTime}
</if> </if>
<if test="endTime != null and endTime != ''"> <if test="endTime != null">
and detail.SRV_DATE &lt;;= #{endTime} and detail.SRV_DATE &lt;= #{endTime}
</if> </if>
<if test="status != null and status != ''"> <if test="status != null and status != ''">
and task.status = #{status} and task.status = #{status}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment