Commit 7d9148bf authored by 蔡镇泽's avatar 蔡镇泽

查询失能人员信息

parent 55aecbe2
......@@ -2,11 +2,12 @@ package com.hungraim.ltc.controller;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hungraim.ltc.pojo.entity.disable.*;
import com.hungraim.ltc.pojo.vo.disable.DisableExamineInfoVO;
import com.hungraim.ltc.pojo.vo.disable.DisableInfoVO;
import com.hungraim.ltc.pojo.vo.disable.DisableVO;
import com.hungraim.ltc.pojo.vo.disable.DistrictTreeVo;
import com.hungraim.ltc.service.DisableService;
import com.hungraim.ltc.pojo.entity.disable.*;
import com.hungraim.ltc.util.Result;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
......@@ -246,5 +247,18 @@ public class DisableController {
return Result.success();
}
/**
* 查询失能人员信息
*
* @param disableInfoId 失能人员id
*/
@RequestMapping("/getDisableInfo")
public Result getDisableInfo(String disableInfoId) {
if (StringUtils.isBlank(disableInfoId)) {
return Result.failed("请求参数错误");
}
DisableInfoVO disableInfoVO = disableService.getDisableInfo(disableInfoId);
return Result.success(disableInfoVO);
}
}
......@@ -2,10 +2,11 @@ package com.hungraim.ltc.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.pojo.entity.disable.ChDisableApply;
import com.hungraim.ltc.pojo.vo.disable.DisableExamineInfoVO;
import com.hungraim.ltc.pojo.vo.disable.DisableInfoVO;
import com.hungraim.ltc.pojo.vo.disable.DisableVO;
import com.hungraim.ltc.pojo.vo.disable.ExamineRecord;
import com.hungraim.ltc.pojo.entity.disable.ChDisableApply;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
......@@ -39,4 +40,6 @@ public interface DisableApplyMapper extends BaseMapper<ChDisableApply> {
DisableExamineInfoVO selectDisableExamineInfoByApplyId(String applyId);
List<ExamineRecord> listExamineRecordByApplyId(String applyId);
DisableInfoVO getDisableInfo(String disableInfoId);
}
package com.hungraim.ltc.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.pojo.entity.disable.*;
import com.hungraim.ltc.pojo.vo.disable.DisableExamineInfoVO;
import com.hungraim.ltc.pojo.vo.disable.DisableInfoVO;
import com.hungraim.ltc.pojo.vo.disable.DisableVO;
import com.hungraim.ltc.pojo.entity.disable.*;
import com.hungraim.ltc.pojo.vo.disable.DistrictTreeVo;
import org.springframework.stereotype.Service;
......@@ -17,24 +18,10 @@ import java.util.List;
@Service
public interface DisableService {
/**
* 查询所有资源对应的角色
*
* @param organId 适用机构代码
* @param districtProvincial 所在省
* @param districtCity 所在市
* @param districtArea 所在区域
* @param realName 失能人员姓名
* @param certiCode 失能人员身份证号码
* @param dataFrom 申请来源
* @param srvOrganId 护理机构
* @param pageNum 当前页
* @param pageSize 每页几条数据
* @return list
*/
Page<DisableVO> disableList(String organId, String districtProvincial, String districtCity,
String districtArea, String realName, String certiCode, String dataFrom,
String srvOrganId, int pageNum, int pageSize);
String srvOrganName, int pageNum, int pageSize);
/**
* 失能审核信息详情
......@@ -105,4 +92,6 @@ public interface DisableService {
* 查询所有疾病数据
*/
List<ChFndDiseaseType> fndAllDisease();
DisableInfoVO getDisableInfo(String disableInfoId);
}
......@@ -8,10 +8,7 @@ import com.hungraim.ltc.dao.*;
import com.hungraim.ltc.pojo.entity.assessment.ChAprTask;
import com.hungraim.ltc.pojo.entity.disable.*;
import com.hungraim.ltc.pojo.entity.serviceManage.ChCfgPara;
import com.hungraim.ltc.pojo.vo.disable.DisableExamineInfoVO;
import com.hungraim.ltc.pojo.vo.disable.DisableVO;
import com.hungraim.ltc.pojo.vo.disable.DistrictTreeVo;
import com.hungraim.ltc.pojo.vo.disable.ExamineRecord;
import com.hungraim.ltc.pojo.vo.disable.*;
import com.hungraim.ltc.service.DisableService;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.BeanUtils;
......@@ -68,17 +65,31 @@ public class DisableServiceImpl implements DisableService {
}
}
/**
* 查询所有资源对应的角色
*
* @param organId 适用机构代码
* @param districtProvincial 所在省
* @param districtCity 所在市
* @param districtArea 所在区域
* @param realName 失能人员姓名
* @param certiCode 失能人员身份证号码
* @param dataFrom 申请来源
* @param srvOrganName 护理机构名称
* @param pageNum 当前页
* @param pageSize 每页几条数据
* @return list
*/
@Override
public Page<DisableVO> disableList(String organId, String districtProvincial, String districtCity,
String districtArea, String realName, String certiCode, String dataFrom,
String srvOrganName, int page, int pageSize) {
String srvOrganName, int pageNum, int pageSize) {
// 没有organId参数的时候,这个集合就为null
List<String> organIds = null;
if (StrUtil.isNotBlank(organId)) {
organIds = Arrays.asList(organId.split(","));
}
return disableApplyMapper.disableList(new Page<>(page, pageSize), organIds, districtProvincial,
return disableApplyMapper.disableList(new Page<>(pageNum, pageSize), organIds, districtProvincial,
districtCity, districtArea, realName, certiCode, dataFrom, srvOrganName);
}
......@@ -227,4 +238,9 @@ public class DisableServiceImpl implements DisableService {
queryWrapper.eq("IS_VALID", "0");
return fndDiseaseTypeMapper.selectList(queryWrapper);
}
@Override
public DisableInfoVO getDisableInfo(String disableInfoId) {
return disableApplyMapper.getDisableInfo(disableInfoId);
}
}
\ No newline at end of file
......@@ -129,4 +129,42 @@
where APPLY_ID = #{applyId}
</select>
<select id="getDisableInfo" resultType="com.hungraim.ltc.pojo.vo.disable.DisableInfoVO">
select
--失能人员id
disable.disab_info_id disabInfoId,
--姓名
disable.real_name realName,
--所在省市区
(select district_name from ch_fnd_district dis where disable.district_provincial = dis.district_code) districtProvincial,
(select district_name from ch_fnd_district dis where disable.district_city = dis.district_code) districtCity,
(select district_name from ch_fnd_district dis where disable.district_area = dis.district_code) districtArea,
--手机号码
disable.tel tel,
--性别
disable.gender gender,
--诊断疾病
disable.disease disease,
--家庭住址
(select dis.district_name from ch_fnd_district dis where disable.adress_district_provincial = dis.district_code) adressDistrictProvincial,
(select dis.district_name from ch_fnd_district dis where disable.adress_district_city = dis.district_code) adressDistrictCity,
(select dis.district_name from ch_fnd_district dis where disable.adress_district_code = dis.district_code) adressDistrictCode,
--评定等级
report.evaluate_rating evaluateRating,
--评定完成时间
task.finish_time finishTime,
--申请服务方式
mode1.srv_mode_name srvModeName,
--接受服务地址
(SELECT dis.DISTRICT_NAME FROM CH_FND_DISTRICT dis WHERE disable.acpt_srv_provincial = dis.DISTRICT_CODE) acptSrvProvincial,
(SELECT dis.DISTRICT_NAME FROM CH_FND_DISTRICT dis WHERE disable.acpt_srv_city = dis.DISTRICT_CODE) acptSrvCity,
(SELECT dis.DISTRICT_NAME FROM CH_FND_DISTRICT dis WHERE disable.acpt_srv_area = dis.DISTRICT_CODE) acptSrvArea
from ch_disable_info disable
left join ch_apr_report report on disable.last_task_id = report.task_id
left join ch_apr_task task on disable.last_task_id = task.task_id
left join ch_disable_apply apply on disable.apply_id = apply.apply_id
left join ch_fnd_srv_mode mode1 on apply.srv_mode_id = mode1.srv_mode_id
where disable.disab_info_id = #{disableInfoId}
</select>
</mapper>
\ No newline at end of file
package com.hungraim.ltc.pojo.vo.disable;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 失能人员信息列表VO
*/
@Data
public class DisableInfoVO implements Serializable {
/**
* 失能人员id
*/
private String disabInfoId;
/**
* 姓名
*/
private String realName;
/**
* 所在省市区
*/
private String districtProvincial;
private String districtCity;
private String districtArea;
/**
* 手机号码
*/
private String tel;
/**
* 性别
*/
private String gender;
/**
* 诊断疾病
*/
private String disease;
/**
* 家庭住址
*/
private String adressDistrictProvincial;
private String adressDistrictCity;
private String adressDistrictCode;
/**
* 评定等级
*/
private String evaluateRating;
/**
* 评定完成时间
*/
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date finishTime;
/**
* 申请服务方式
*/
private String srvModeName;
/**
* 接受服务地址
*/
private String acptSrvProvincial;
private String acptSrvCity;
private String acptSrvArea;
}
package com.hungraim.ltc.pojo.vo.disable;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
......@@ -11,7 +10,6 @@ import java.util.Date;
* 失能人员信息列表VO
*/
@Data
@TableName("")
public class DisableVO implements Serializable {
//id
private String applyId;
......
......@@ -13,6 +13,14 @@ import java.util.Date;
@Data
public class SrvTaskVO extends PageInfo implements Serializable {
/**
* 服务计划id
*/
private Integer srvTaskId;
/**
* 失能人员id
*/
private Integer disabInfoId;
/**
* 所在省市
*/
private String districtProvincial;
......@@ -40,12 +48,16 @@ public class SrvTaskVO extends PageInfo implements Serializable {
*/
private String disease;
/**
* 失能等级
*/
private String disableLevelName;
/**
* 接受服务地址
*/
private String acptSrvProvincial;
private String acptSrvCity;
private String acptSrvArea;
private String acptSrvRoadType;
private String acptSrvStreet;
/**
* 评定等级
*/
......@@ -73,7 +85,21 @@ public class SrvTaskVO extends PageInfo implements Serializable {
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date effTime;
/**
* 任务状态
* 任务状态(服务计划状态)
*/
private String status;
/**
* 服务方案状态
*/
private String progStatus;
/**
* 服务方案起始日
*/
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date programEffTime;
/**
* 服务方案终止日
*/
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date programEndTime;
}
......@@ -12,6 +12,8 @@ import java.util.List;
/**
* 服务计划Controller
*
* @author czz
*/
@RestController
@RequestMapping("/api.governance/srvTask")
......@@ -22,7 +24,7 @@ public class SrvTaskController {
private SrvTaskService srvTaskService;
/**
* 服务计划列表
* 服务计划、服务计划配置列表
*
* @param organId 护理机构id
* @param disableName 失能人员姓名
......@@ -31,8 +33,7 @@ public class SrvTaskController {
* @param certifNum 护理人员证件号码
* @param startTime 服务计划开始时间
* @param endTime 服务计划结束时间
* @param endTime 服务计划结束时间
* @param status 任务状态
* @param status 任务状态(服务计划状态)
* @param modeId 服务方式
*/
@RequestMapping("/getSrvTaskList")
......
......@@ -26,7 +26,6 @@ public class SrvTaskServiceImpl implements SrvTaskService {
* @param certifNum 护理人员证件号码
* @param startTime 服务计划开始时间
* @param endTime 服务计划结束时间
* @param endTime 服务计划结束时间
* @param status 任务状态
* @param modeId 服务方式
*/
......
......@@ -5,10 +5,12 @@
<!--查询服务分配信息列表-->
<select id="getSrvTaskList" resultType="com.hungraim.ltc.pojo.vo.governance.SrvTaskVO">
select
task.srv_task_id srvTaskId,
disable.disab_info_id disabInfoId,
--所在省市
disable.district_provincial districtProvincial,
disable.district_city districtCity,
disable.district_area districtArea,
(select DISTRICT_NAME from CH_FND_DISTRICT dis where disable.district_provincial = dis.DISTRICT_CODE) districtProvincial,
(select DISTRICT_NAME from CH_FND_DISTRICT dis where disable.district_city = dis.DISTRICT_CODE) districtCity,
(select DISTRICT_NAME from CH_FND_DISTRICT dis where disable.DISTRICT_AREA = dis.DISTRICT_CODE) districtArea,
--失能人员姓名
disable.real_name realName,
--手机号码
......@@ -19,11 +21,13 @@
disable.gender gender,
--诊断疾病
disable.disease disease,
--失能等级
level1.disable_level_name disableLevelName,
--接受服务地址
disable.acpt_srv_provincial acptSrvProvincial,
disable.acpt_srv_city acptSrvCity,
disable.acpt_srv_area acptSrvArea,
disable.acpt_srv_road_type acptSrvRoadType,
(select DISTRICT_NAME from CH_FND_DISTRICT dis where disable.acpt_srv_provincial = dis.DISTRICT_CODE) districtProvincial,
(select DISTRICT_NAME from CH_FND_DISTRICT dis where disable.acpt_srv_city = dis.DISTRICT_CODE) districtCity,
(select DISTRICT_NAME from CH_FND_DISTRICT dis where disable.acpt_srv_area = dis.DISTRICT_CODE) districtArea,
(select STREET_NAME from CH_FND_STREET street where disable.acpt_srv_street = street.STREET_CODE) acptStreet,
--评定等级
report.evaluate_rating_type evaluateRatingType,
--评定完成日期
......@@ -36,8 +40,14 @@
emp.emp_name empName,
--任务时间
task.eff_time effTime,
--任务状态
task.status status
--任务状态(服务计划状态)
task.status status,
--服务方案状态
program.prog_status progStatus,
--服务方案起始日
program.EFF_TIME programEffTime,
--服务方案终止日
program.END_TIME programEndTime
from ch_srv_task task--服务计划
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--评定任务
......@@ -46,6 +56,7 @@
left join ch_srv_organ organ on program.srv_organ_id = organ.srv_organ_id--服务机构
left join ch_fnd_srv_mode mode1 on program.srv_mode_id = mode1.srv_mode_id--服务方式
left join ch_srv_organ_emp emp on task.srv_emp_id = emp.emp_id--护理人员
left join ch_cfg_srv_disable_level level1 on report.disable_level_id = level1.disable_level_id--失能等级
<where>
<if test="organId != null">
and organ.SRV_ORGAN_ID = #{organId}
......
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