Commit bccf6d7d authored by zhangch's avatar zhangch
parents f0be3a24 7d9148bf
...@@ -2,11 +2,12 @@ package com.hungraim.ltc.controller; ...@@ -2,11 +2,12 @@ package com.hungraim.ltc.controller;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.metadata.IPage; 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.DisableExamineInfoVO;
import com.hungraim.ltc.pojo.vo.disable.DisableInfoVO;
import com.hungraim.ltc.pojo.vo.disable.DisableVO; import com.hungraim.ltc.pojo.vo.disable.DisableVO;
import com.hungraim.ltc.pojo.vo.disable.DistrictTreeVo; import com.hungraim.ltc.pojo.vo.disable.DistrictTreeVo;
import com.hungraim.ltc.service.DisableService; import com.hungraim.ltc.service.DisableService;
import com.hungraim.ltc.pojo.entity.disable.*;
import com.hungraim.ltc.util.Result; 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;
...@@ -246,5 +247,18 @@ public class DisableController { ...@@ -246,5 +247,18 @@ public class DisableController {
return Result.success(); 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);
}
} }
package com.hungraim.ltc.dao; package com.hungraim.ltc.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hungraim.ltc.pojo.entity.assessment.ChAprTaskPush; import com.hungraim.ltc.pojo.entity.serviceManage.ChCfgPara;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
@Repository /**
* 基础参数配置Mapper
*
* @author czz
*/
@Mapper @Mapper
public interface ChAprTaskPushMapper extends BaseMapper<ChAprTaskPush> { @Repository
} public interface CfgParaMapper extends BaseMapper<ChCfgPara> {
\ No newline at end of file
}
...@@ -2,10 +2,11 @@ package com.hungraim.ltc.dao; ...@@ -2,10 +2,11 @@ package com.hungraim.ltc.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 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.DisableExamineInfoVO;
import com.hungraim.ltc.pojo.vo.disable.DisableInfoVO;
import com.hungraim.ltc.pojo.vo.disable.DisableVO; import com.hungraim.ltc.pojo.vo.disable.DisableVO;
import com.hungraim.ltc.pojo.vo.disable.ExamineRecord; import com.hungraim.ltc.pojo.vo.disable.ExamineRecord;
import com.hungraim.ltc.pojo.entity.disable.ChDisableApply;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
...@@ -39,4 +40,6 @@ public interface DisableApplyMapper extends BaseMapper<ChDisableApply> { ...@@ -39,4 +40,6 @@ public interface DisableApplyMapper extends BaseMapper<ChDisableApply> {
DisableExamineInfoVO selectDisableExamineInfoByApplyId(String applyId); DisableExamineInfoVO selectDisableExamineInfoByApplyId(String applyId);
List<ExamineRecord> listExamineRecordByApplyId(String applyId); List<ExamineRecord> listExamineRecordByApplyId(String applyId);
DisableInfoVO getDisableInfo(String disableInfoId);
} }
package com.hungraim.ltc.service; package com.hungraim.ltc.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 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.DisableExamineInfoVO;
import com.hungraim.ltc.pojo.vo.disable.DisableInfoVO;
import com.hungraim.ltc.pojo.vo.disable.DisableVO; import com.hungraim.ltc.pojo.vo.disable.DisableVO;
import com.hungraim.ltc.pojo.entity.disable.*;
import com.hungraim.ltc.pojo.vo.disable.DistrictTreeVo; import com.hungraim.ltc.pojo.vo.disable.DistrictTreeVo;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -17,24 +18,10 @@ import java.util.List; ...@@ -17,24 +18,10 @@ import java.util.List;
@Service @Service
public interface DisableService { 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, Page<DisableVO> disableList(String organId, String districtProvincial, String districtCity,
String districtArea, String realName, String certiCode, String dataFrom, 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 { ...@@ -105,4 +92,6 @@ public interface DisableService {
* 查询所有疾病数据 * 查询所有疾病数据
*/ */
List<ChFndDiseaseType> fndAllDisease(); List<ChFndDiseaseType> fndAllDisease();
DisableInfoVO getDisableInfo(String disableInfoId);
} }
...@@ -7,20 +7,15 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -7,20 +7,15 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.dao.*; import com.hungraim.ltc.dao.*;
import com.hungraim.ltc.pojo.entity.assessment.ChAprTask; import com.hungraim.ltc.pojo.entity.assessment.ChAprTask;
import com.hungraim.ltc.pojo.entity.disable.*; import com.hungraim.ltc.pojo.entity.disable.*;
import com.hungraim.ltc.pojo.vo.disable.DisableExamineInfoVO; import com.hungraim.ltc.pojo.entity.serviceManage.ChCfgPara;
import com.hungraim.ltc.pojo.vo.disable.DisableVO; import com.hungraim.ltc.pojo.vo.disable.*;
import com.hungraim.ltc.pojo.vo.disable.DistrictTreeVo;
import com.hungraim.ltc.pojo.vo.disable.ExamineRecord;
import com.hungraim.ltc.service.DisableService; import com.hungraim.ltc.service.DisableService;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.ArrayList; import java.util.*;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
@Service @Service
public class DisableServiceImpl implements DisableService { public class DisableServiceImpl implements DisableService {
...@@ -45,6 +40,8 @@ public class DisableServiceImpl implements DisableService { ...@@ -45,6 +40,8 @@ public class DisableServiceImpl implements DisableService {
private DisableInfoMapper disableInfoMapper; private DisableInfoMapper disableInfoMapper;
@Autowired @Autowired
private AprTaskMapper aprTaskMapper; private AprTaskMapper aprTaskMapper;
@Autowired
private CfgParaMapper cfgParaMapper;
/** /**
* 获取机构ids * 获取机构ids
...@@ -68,17 +65,31 @@ public class DisableServiceImpl implements DisableService { ...@@ -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 @Override
public Page<DisableVO> disableList(String organId, String districtProvincial, String districtCity, public Page<DisableVO> disableList(String organId, String districtProvincial, String districtCity,
String districtArea, String realName, String certiCode, String dataFrom, String districtArea, String realName, String certiCode, String dataFrom,
String srvOrganName, int page, int pageSize) { String srvOrganName, int pageNum, int pageSize) {
// 没有organId参数的时候,这个集合就为null // 没有organId参数的时候,这个集合就为null
List<String> organIds = null; List<String> organIds = null;
if (StrUtil.isNotBlank(organId)) { if (StrUtil.isNotBlank(organId)) {
organIds = Arrays.asList(organId.split(",")); 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); districtCity, districtArea, realName, certiCode, dataFrom, srvOrganName);
} }
...@@ -98,34 +109,36 @@ public class DisableServiceImpl implements DisableService { ...@@ -98,34 +109,36 @@ public class DisableServiceImpl implements DisableService {
@Override @Override
public void disableExamine(String applyId, String checkName, Short applyStatus, String checkRemark) { public void disableExamine(String applyId, String checkName, Short applyStatus, String checkRemark) {
ChDisableApply chDisableApply = disableApplyMapper.selectById(applyId);
Date date = new Date(); Date date = new Date();
//更新审核状态
ChDisableApply chDisableApply = disableApplyMapper.selectById(applyId);
chDisableApply.setCheckName(checkName);//审核人
chDisableApply.setApplyStatus(applyStatus);//申请状态
chDisableApply.setCheckRemark(checkRemark);//审核备注
chDisableApply.setCheckTime(date);//审核时间
disableApplyMapper.updateById(chDisableApply);
//添加失能审核历史
ChDisableApplyHis chDisableApplyHis = new ChDisableApplyHis(); ChDisableApplyHis chDisableApplyHis = new ChDisableApplyHis();
BeanUtils.copyProperties(chDisableApply, chDisableApplyHis); BeanUtils.copyProperties(chDisableApply, chDisableApplyHis);
chDisableApplyHis.setCheckName(checkName); disableApplyHisMapper.insert(chDisableApplyHis);
chDisableApplyHis.setApplyStatus(applyStatus); //审核通过
chDisableApplyHis.setCheckRemark(checkRemark);
chDisableApplyHis.setCheckTime(date);
if (applyStatus.equals(Short.valueOf("2"))) { if (applyStatus.equals(Short.valueOf("2"))) {
// 审核通过
chDisableApply.setCheckName(checkName);
chDisableApply.setApplyStatus(applyStatus);
chDisableApply.setCheckRemark(checkRemark);
chDisableApply.setCheckTime(date);
disableApplyMapper.updateById(chDisableApply);
//添加失能人员信息 //添加失能人员信息
ChDisableInfo chDisableInfo = new ChDisableInfo(); ChDisableInfo chDisableInfo = new ChDisableInfo();
BeanUtil.copyProperties(chDisableApply, chDisableInfo); BeanUtil.copyProperties(chDisableApply, chDisableInfo);
disableInfoMapper.insert(chDisableInfo); disableInfoMapper.insert(chDisableInfo);
//添加失能评定信息 //添加失能评定信息
ChAprTask chAprTask = new ChAprTask(); ChAprTask chAprTask = new ChAprTask();
ChCfgPara chCfgPara = cfgParaMapper.selectOne(new QueryWrapper<ChCfgPara>().eq("ORGAN_ID", chAprTask.getOrganId()));
if (chCfgPara != null && chCfgPara.getCfgArgTime() != null) {
Calendar cd = Calendar.getInstance();
cd.setTime(date);
cd.add(Calendar.DATE, chCfgPara.getCfgArgTime().intValue());
chAprTask.setLastAprDate(cd.getTime());//鉴定截至日期
}
BeanUtil.copyProperties(chDisableApply, chAprTask); BeanUtil.copyProperties(chDisableApply, chAprTask);
aprTaskMapper.insert(chAprTask); aprTaskMapper.insert(chAprTask);
} }
disableApplyHisMapper.insert(chDisableApplyHis);
} }
@Override @Override
...@@ -225,4 +238,9 @@ public class DisableServiceImpl implements DisableService { ...@@ -225,4 +238,9 @@ public class DisableServiceImpl implements DisableService {
queryWrapper.eq("IS_VALID", "0"); queryWrapper.eq("IS_VALID", "0");
return fndDiseaseTypeMapper.selectList(queryWrapper); return fndDiseaseTypeMapper.selectList(queryWrapper);
} }
@Override
public DisableInfoVO getDisableInfo(String disableInfoId) {
return disableApplyMapper.getDisableInfo(disableInfoId);
}
} }
\ No newline at end of file
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
and a.DISTRICT_CITY = #{city} and a.DISTRICT_CITY = #{city}
</if> </if>
<if test="area != null and area != ''"> <if test="area != null and area != ''">
and a.DISTRICT_AREA = #{area} and a.DISTRICT_AREA = #{area}
</if> </if>
<if test="name != null and name != ''"> <if test="name != null and name != ''">
and a.REAL_NAME like CONCAT(CONCAT('%',#{name}) ,'%') and a.REAL_NAME like CONCAT(CONCAT('%',#{name}) ,'%')
...@@ -59,60 +59,60 @@ ...@@ -59,60 +59,60 @@
</select> </select>
<select id="selectDisableExamineInfoByApplyId" resultType="com.hungraim.ltc.pojo.vo.disable.DisableExamineInfoVO"> <select id="selectDisableExamineInfoByApplyId" resultType="com.hungraim.ltc.pojo.vo.disable.DisableExamineInfoVO">
select a.APPLY_ID applyId, select a.APPLY_ID applyId,
a.organ_id organId, a.organ_id organId,
a.DISTRICT_PROVINCIAL districtProvincial, a.DISTRICT_PROVINCIAL districtProvincial,
a.DISTRICT_CITY districtCity, a.DISTRICT_CITY districtCity,
a.DISTRICT_AREA districtArea, a.DISTRICT_AREA districtArea,
a.REAL_NAME realName, a.REAL_NAME realName,
a.CERTI_CODE certiCode, a.CERTI_CODE certiCode,
a.BIRTHDAY birthday, a.BIRTHDAY birthday,
a.GENDER gender, a.GENDER gender,
a.TEL tel, a.TEL tel,
a.REGIST regist, a.REGIST regist,
a.FIXED_TEL fixedTel, a.FIXED_TEL fixedTel,
a.TREATMENT_TYPE treatmentType, a.TREATMENT_TYPE treatmentType,
a.ACPT_PROVINCIAL acptProvincial, a.ACPT_PROVINCIAL acptProvincial,
a.ACPT_CITY acptCity, a.ACPT_CITY acptCity,
a.ACPT_AREA acptArea, a.ACPT_AREA acptArea,
a.ACPT_STREET acptStreet, a.ACPT_STREET acptStreet,
a.ACPT_ADDRESS acptAddress, a.ACPT_ADDRESS acptAddress,
a.ACPT_SRV_PROVINCIAL acptSrvProvincial, a.ACPT_SRV_PROVINCIAL acptSrvProvincial,
a.ACPT_SRV_CITY acptSrvCity, a.ACPT_SRV_CITY acptSrvCity,
a.ACPT_SRV_AREA acptSrvArea, a.ACPT_SRV_AREA acptSrvArea,
a.ACPT_SRV_STREET acptSrvStreet, a.ACPT_SRV_STREET acptSrvStreet,
a.ACPT_SRV_ADDRESS acptSrvAddress, a.ACPT_SRV_ADDRESS acptSrvAddress,
a.ACPT_SRV_TYPE acptSrvType, a.ACPT_SRV_TYPE acptSrvType,
a.ADRESS_DISTRICT_PROVINCIAL adressDistrictProvincial, a.ADRESS_DISTRICT_PROVINCIAL adressDistrictProvincial,
a.ADRESS_DISTRICT_CITY adressDistrictCity, a.ADRESS_DISTRICT_CITY adressDistrictCity,
a.ADRESS_DISTRICT_CODE adressDistrictCode, a.ADRESS_DISTRICT_CODE adressDistrictCode,
a.STREET street, a.STREET street,
a.ADRESS_DETAIL adressDetail, a.ADRESS_DETAIL adressDetail,
a.ADDRESS_TYPE addressType, a.ADDRESS_TYPE addressType,
a.DISE_TYPE_F diseTypeF, a.DISE_TYPE_F diseTypeF,
a.DISE_TYPE_S diseTypeS, a.DISE_TYPE_S diseTypeS,
a.SRV_MODE_ID srvModeId, a.SRV_MODE_ID srvModeId,
a.DISEASE_DESC diseaseDesc, a.DISEASE_DESC diseaseDesc,
a.MEDICAL_CARD medicalCard, a.MEDICAL_CARD medicalCard,
a.MEDICAL_TYPE medicalType, a.MEDICAL_TYPE medicalType,
a.SRV_ORGAN_ID srvOrganId, a.SRV_ORGAN_ID srvOrganId,
o.PERMIT_ID permitId, o.PERMIT_ID permitId,
a.OPER_NAME operName, a.OPER_NAME operName,
a.OPER_CERTI_CODE operCertiCode, a.OPER_CERTI_CODE operCertiCode,
a.OPER_TEL operTel, a.OPER_TEL operTel,
a.OPER_RELATION operRelation, a.OPER_RELATION operRelation,
a.OPER_FIXED_TEL operFixedTel, a.OPER_FIXED_TEL operFixedTel,
a.OPER_DISTRICT_PROVINCE operDistrictProvince, a.OPER_DISTRICT_PROVINCE operDistrictProvince,
a.OPER_DISTRICT_CITY operDistrictCity, a.OPER_DISTRICT_CITY operDistrictCity,
a.OPER_DISTRICT_CODE operDistrictCode, a.OPER_DISTRICT_CODE operDistrictCode,
a.OPER_STREET operStreet, a.OPER_STREET operStreet,
a.OPER_ADDRESS operAddress, a.OPER_ADDRESS operAddress,
a.CHECK_NAME checkName, a.CHECK_NAME checkName,
a.APPLY_STATUS applyStatus, a.APPLY_STATUS applyStatus,
a.CHECK_REMARK checkRemark a.CHECK_REMARK checkRemark
from CH_DISABLE_APPLY a from CH_DISABLE_APPLY a
LEFT JOIN CH_SRV_ORGAN o ON a.SRV_ORGAN_ID = o.SRV_ORGAN_ID LEFT JOIN CH_SRV_ORGAN o ON a.SRV_ORGAN_ID = o.SRV_ORGAN_ID
where a.APPLY_ID = #{applyId} where a.APPLY_ID = #{applyId}
...@@ -129,4 +129,42 @@ ...@@ -129,4 +129,42 @@
where APPLY_ID = #{applyId} where APPLY_ID = #{applyId}
</select> </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> </mapper>
\ No newline at end of file
...@@ -266,13 +266,18 @@ public class TaskController { ...@@ -266,13 +266,18 @@ public class TaskController {
* @param refuseRemark 拒绝备注 * @param refuseRemark 拒绝备注
*/ */
@RequestMapping("/taskGroupByGroup") @RequestMapping("/taskGroupByGroup")
public Result taskGroupByGroup(String groupNumber, Integer status, Integer refuseReason, String refuseRemark) { public Result taskGroupByGroup(String groupNumber, Integer status, Short refuseReason, String refuseRemark) {
if (StringUtils.isBlank(groupNumber)) { if (StringUtils.isBlank(groupNumber)) {
return Result.failed("组号不能为空!"); return Result.failed("组号不能为空!");
} }
if (status == null || status < 0 || status > 5) { if (status == null || status < 0 || status > 5) {
return Result.failed("状态异常!"); return Result.failed("状态异常!");
} }
if (status == 4 || status == 5) {
if (refuseReason == null) {
return Result.failed("拒绝原因不能为空!");
}
}
Result<Object> objectResult = taskService.taskGroupByGroup(groupNumber, status, refuseReason, refuseRemark); Result<Object> objectResult = taskService.taskGroupByGroup(groupNumber, status, refuseReason, refuseRemark);
if (!ResultCode.SUCCESS.getCode().equals(objectResult.getCode())) { if (!ResultCode.SUCCESS.getCode().equals(objectResult.getCode())) {
//失败 //失败
...@@ -290,13 +295,18 @@ public class TaskController { ...@@ -290,13 +295,18 @@ public class TaskController {
* @param refuseRemark 拒绝备注 * @param refuseRemark 拒绝备注
*/ */
@RequestMapping("/taskGroup") @RequestMapping("/taskGroup")
public Result taskGroup(Integer pushId, Integer status, Integer refuseReason, String refuseRemark) { public Result taskGroup(Integer pushId, Integer status, Short refuseReason, String refuseRemark) {
if (status == null || status < 0 || status > 5) { if (status == null || status < 0 || status > 5) {
return Result.failed("状态异常!"); return Result.failed("状态异常!");
} }
if (pushId == null) { if (pushId == null) {
return Result.failed("任务组id不能为空!"); return Result.failed("任务组id不能为空!");
} }
if (status == 4 || status == 5) {
if (refuseReason == null) {
return Result.failed("拒绝原因不能为空!");
}
}
Result<Object> objectResult = taskService.taskGroup(pushId, status, refuseReason, refuseRemark); Result<Object> objectResult = taskService.taskGroup(pushId, status, refuseReason, refuseRemark);
if (!ResultCode.SUCCESS.getCode().equals(objectResult.getCode())) { if (!ResultCode.SUCCESS.getCode().equals(objectResult.getCode())) {
//失败 //失败
......
...@@ -18,36 +18,11 @@ import java.util.List; ...@@ -18,36 +18,11 @@ import java.util.List;
@Service @Service
public interface TaskService { public interface TaskService {
/**
* 评定任务分配列表
*
* @param organId 适用机构代码
* @param provincial 所在省
* @param city 所在市
* @param area 所在区域
* @param street 所在街道
* @param realName 失能人员姓名
* @param certiCode 失能人员身份证号码
* @param taskName 评定人员姓名
* @param taskTel 评定人员手机号码
* @param daysRemaining 评定剩余天数
* @param status 任务状态
* @param isReturn 是否退回
* @param pageNum 当前页
* @param pageSize 每页几条数据
*/
IPage<TaskDistributionVO> taskDistributionList(String organId, String provincial, String city, IPage<TaskDistributionVO> taskDistributionList(String organId, String provincial, String city,
String street, String realName, String certiCode, String taskName, String taskTel, String street, String realName, String certiCode, String taskName, String taskTel,
String daysRemaining, String status, String isReturn, String area, String daysRemaining, String status, String isReturn, String area,
int pageNum, int pageSize); int pageNum, int pageSize);
/**
* 评定报告录入列表
*
* @param name 失能人员姓名
* @param certiCode 失能人员身份证号码
* @param tel 失能人员手机号码
*/
List<TaskReportVO> taskReportList(String name, String certiCode, String tel); List<TaskReportVO> taskReportList(String name, String certiCode, String tel);
List<AprEmpVO> aprEmpList(String organName, String name, String tel, String groupLeader); List<AprEmpVO> aprEmpList(String organName, String name, String tel, String groupLeader);
...@@ -60,7 +35,7 @@ public interface TaskService { ...@@ -60,7 +35,7 @@ public interface TaskService {
List<TaskGroupVO> taskGroupList(String name, String certiCode, String tel); List<TaskGroupVO> taskGroupList(String name, String certiCode, String tel);
Result<Object> taskGroup(Integer pushId, Integer status, Integer refuseReason, String refuseRemark); Result<Object> taskGroup(Integer pushId, Integer status, Short refuseReason, String refuseRemark);
List<ChCfgSrvDisableLevel> cfgSrvDisableLevelList(); List<ChCfgSrvDisableLevel> cfgSrvDisableLevelList();
...@@ -68,7 +43,7 @@ public interface TaskService { ...@@ -68,7 +43,7 @@ public interface TaskService {
List<TaskGroupInfoVO> taskGroupInfoList(String groupNumber); List<TaskGroupInfoVO> taskGroupInfoList(String groupNumber);
Result<Object> taskGroupByGroup(String groupNumber, Integer status, Integer refuseReason, String refuseRemark); Result<Object> taskGroupByGroup(String groupNumber, Integer status, Short refuseReason, String refuseRemark);
TaskGroupInfoListInfoVO taskGroupInfoListInfo(String pushId); TaskGroupInfoListInfoVO taskGroupInfoListInfo(String pushId);
......
...@@ -33,8 +33,6 @@ public class TaskServiceImpl implements TaskService { ...@@ -33,8 +33,6 @@ public class TaskServiceImpl implements TaskService {
@Autowired @Autowired
private AprReportMapper aprReportMapper; private AprReportMapper aprReportMapper;
@Autowired @Autowired
private TaskEmpMapper taskEmpMapper;
@Autowired
private AprPersonInfoMapper personInfoMapper; private AprPersonInfoMapper personInfoMapper;
@Autowired @Autowired
private TaskPushMapper taskPushMapper; private TaskPushMapper taskPushMapper;
...@@ -47,6 +45,24 @@ public class TaskServiceImpl implements TaskService { ...@@ -47,6 +45,24 @@ public class TaskServiceImpl implements TaskService {
@Autowired @Autowired
private RefuseReasonMapper refuseReasonMapper; private RefuseReasonMapper refuseReasonMapper;
/**
* 评定任务分配列表
*
* @param organId 适用机构代码
* @param provincial 所在省
* @param city 所在市
* @param area 所在区域
* @param street 所在街道
* @param realName 失能人员姓名
* @param certiCode 失能人员身份证号码
* @param taskName 评定人员姓名
* @param taskTel 评定人员手机号码
* @param daysRemaining 评定剩余天数
* @param status 任务状态
* @param isReturn 是否退回
* @param pageNum 当前页
* @param pageSize 每页几条数据
*/
@Override @Override
public IPage<TaskDistributionVO> taskDistributionList(String organId, String provincial, String city, public IPage<TaskDistributionVO> taskDistributionList(String organId, String provincial, String city,
String street, String realName, String certiCode, String taskName, String taskTel, String street, String realName, String certiCode, String taskName, String taskTel,
...@@ -60,22 +76,50 @@ public class TaskServiceImpl implements TaskService { ...@@ -60,22 +76,50 @@ public class TaskServiceImpl implements TaskService {
street, realName, certiCode, taskName, taskTel, daysRemaining, status, isReturn, area); street, realName, certiCode, taskName, taskTel, daysRemaining, status, isReturn, area);
} }
/**
* 评定报告录入列表
*
* @param name 失能人员姓名
* @param certiCode 失能人员身份证号码
* @param tel 失能人员手机号码
*/
@Override @Override
public List<TaskReportVO> taskReportList(String name, String certiCode, String tel) { public List<TaskReportVO> taskReportList(String name, String certiCode, String tel) {
return taskMapper.taskReportList(name, certiCode, tel); return taskMapper.taskReportList(name, certiCode, tel);
} }
/**
* 查询评定人员列表
*
* @param organName 评定机构名称
* @param name 评定人员姓名
* @param tel 评定人员手机号码
* @param groupLeader 是否组长0组长,1非组长
*/
@Override @Override
public List<AprEmpVO> aprEmpList(String organName, String name, String tel, String groupLeader) { public List<AprEmpVO> aprEmpList(String organName, String name, String tel, String groupLeader) {
return taskMapper.aprEmpList(organName, name, tel, groupLeader); return taskMapper.aprEmpList(organName, name, tel, groupLeader);
} }
/**
* 评定报告新增
*
* @param taskId 评定任务id
* @param person1 鉴定人员1id
* @param person2 鉴定人员2id
* @param person3 鉴定人员3id
* @param evaluateTime 评估时间 格式:2020-11-12
* @param disableLevelId 失能等级id
* @param polNo 保单号
* @param remark 备注
*/
@Override @Override
public Result<Object> addReport(Integer taskId, Integer person1, Integer person2, Integer person3, Date evaluateTime, Integer disableLevelId, String polNo, String remark) { public Result<Object> addReport(Integer taskId, Integer person1, Integer person2, Integer person3, Date evaluateTime, Integer disableLevelId, String polNo, String remark) {
ChAprTask task = taskMapper.selectById(taskId); ChAprTask task = taskMapper.selectById(taskId);
if (task != null) { if (task != null) {
return Result.failed("已存在的评定任务报告!"); return Result.failed("已存在的评定任务报告!");
} }
//插入评定任务
ChAprReport report = new ChAprReport(); ChAprReport report = new ChAprReport();
report.setTaskId(taskId); report.setTaskId(taskId);
report.setEffTime(new Date()); report.setEffTime(new Date());
...@@ -85,6 +129,7 @@ public class TaskServiceImpl implements TaskService { ...@@ -85,6 +129,7 @@ public class TaskServiceImpl implements TaskService {
report.setStatus(0); report.setStatus(0);
report.setEvaluateTime(evaluateTime); report.setEvaluateTime(evaluateTime);
aprReportMapper.insert(report); aprReportMapper.insert(report);
//插入评定任务关联人员1.2.3(至少一位,最多三位)
//person1 //person1
ChAprPersonInfo person1Info = new ChAprPersonInfo(); ChAprPersonInfo person1Info = new ChAprPersonInfo();
person1Info.setReportId(report.getReportId()); person1Info.setReportId(report.getReportId());
...@@ -108,6 +153,18 @@ public class TaskServiceImpl implements TaskService { ...@@ -108,6 +153,18 @@ public class TaskServiceImpl implements TaskService {
return Result.success(); return Result.success();
} }
/**
* 评定报告修改
*
* @param reportId 评定报告id
* @param person1 鉴定人员1id
* @param person2 鉴定人员2id
* @param person3 鉴定人员3id
* @param evaluateDate 评估时间
* @param disableLevelId 失能等级id
* @param polNo 保单号
* @param remark 备注
*/
@Override @Override
public void updateReport(Integer reportId, Integer person1, Integer person2, Integer person3, Date evaluateDate, Integer disableLevelId, String polNo, String remark) { public void updateReport(Integer reportId, Integer person1, Integer person2, Integer person3, Date evaluateDate, Integer disableLevelId, String polNo, String remark) {
//update鉴定报告 //update鉴定报告
...@@ -160,6 +217,12 @@ public class TaskServiceImpl implements TaskService { ...@@ -160,6 +217,12 @@ public class TaskServiceImpl implements TaskService {
} }
} }
/**
* 评定任务分配
*
* @param taskId 评定任务id
* @param empId 评定人员id
*/
@Override @Override
public Result<Object> allotTask(String taskId, String empId) { public Result<Object> allotTask(String taskId, String empId) {
ChAprEmp chAprEmp = aprEmpMapper.selectById(empId); ChAprEmp chAprEmp = aprEmpMapper.selectById(empId);
...@@ -201,43 +264,74 @@ public class TaskServiceImpl implements TaskService { ...@@ -201,43 +264,74 @@ public class TaskServiceImpl implements TaskService {
return Result.success(); return Result.success();
} }
/**
* 评定任务分组管理列表
*
* @param name 评定人员姓名
* @param certiCode 评定人员身份证号码
* @param tel 评定人员手机号码
*/
@Override @Override
public List<TaskGroupVO> taskGroupList(String name, String certiCode, String tel) { public List<TaskGroupVO> taskGroupList(String name, String certiCode, String tel) {
return taskMapper.taskGroupList(name, certiCode, tel); return taskMapper.taskGroupList(name, certiCode, tel);
} }
@Override /**
public Result<Object> taskGroup(Integer pushId, Integer status, Integer refuseReason, String refuseRemark) { * 查询失能等级列表
ChAprTaskPush chAprTaskPush = taskPushMapper.selectById(pushId); */
if (chAprTaskPush == null) {
return Result.failed("不存在的组!");
}
chAprTaskPush.setStatus(status.shortValue());
if (status == 4 || status == 5 || status == 0) {
chAprTaskPush.setRefuseReason(refuseReason.shortValue());
chAprTaskPush.setRefuseRemark(refuseRemark);
}
taskPushMapper.updateById(chAprTaskPush);
return Result.success();
}
@Override @Override
public List<ChCfgSrvDisableLevel> cfgSrvDisableLevelList() { public List<ChCfgSrvDisableLevel> cfgSrvDisableLevelList() {
return cfgSrvDisableLevelMapper.selectList(new QueryWrapper<>()); return cfgSrvDisableLevelMapper.selectList(new QueryWrapper<>());
} }
/**
* 通过报告id查询评定报告人员信息
*
* @param reportId 评定报告id
*/
@Override @Override
public List<PersonInfoVO> personInfoList(String reportId) { public List<PersonInfoVO> personInfoList(String reportId) {
return taskMapper.personInfoList(reportId); return taskMapper.personInfoList(reportId);
} }
/**
* 评定任务分组管理列表详情
*
* @param groupNumber 组号
*/
@Override @Override
public List<TaskGroupInfoVO> taskGroupInfoList(String groupNumber) { public List<TaskGroupInfoVO> taskGroupInfoList(String groupNumber) {
return taskMapper.taskGroupInfoList(groupNumber); return taskMapper.taskGroupInfoList(groupNumber);
} }
@Override @Override
public Result<Object> taskGroupByGroup(String groupNumber, Integer status, Integer refuseReason, String refuseRemark) { public Result<Object> taskGroup(Integer pushId, Integer status, Short refuseReason, String refuseRemark) {
ChAprTaskPush chAprTaskPush = taskPushMapper.selectById(pushId);
if (chAprTaskPush == null) {
return Result.failed("不存在的组!");
}
//更新任务组状态
chAprTaskPush.setStatus(status.shortValue());
chAprTaskPush.setRefuseReason(refuseReason);
chAprTaskPush.setRefuseRemark(refuseRemark);
taskPushMapper.updateById(chAprTaskPush);
//更新评定任务状态
ChAprTask chAprTask = taskMapper.selectById(chAprTaskPush.getTaskId());
chAprTask.setTaskStatus(status);
taskMapper.updateById(chAprTask);
return Result.success();
}
/**
* 评定任务分组管理(整组操作)
*
* @param groupNumber 组号
* @param status 分组状态 未分配(拒绝(重新分配)):0;已分配:1;已接受:2;已完成:3;拒绝(中止):4,拒绝(终止):5
* @param refuseReason 拒绝原因id
* @param refuseRemark 拒绝备注
*/
@Override
public Result<Object> taskGroupByGroup(String groupNumber, Integer status, Short refuseReason, String refuseRemark) {
List<ChAprTaskPush> pushList = taskPushMapper.selectList(new QueryWrapper<ChAprTaskPush>().eq("group_number", groupNumber)); List<ChAprTaskPush> pushList = taskPushMapper.selectList(new QueryWrapper<ChAprTaskPush>().eq("group_number", groupNumber));
if (pushList == null || pushList.size() <= 0) { if (pushList == null || pushList.size() <= 0) {
return Result.failed("不存在的组!"); return Result.failed("不存在的组!");
...@@ -251,28 +345,42 @@ public class TaskServiceImpl implements TaskService { ...@@ -251,28 +345,42 @@ public class TaskServiceImpl implements TaskService {
for (ChAprTaskPush push : pushList) { for (ChAprTaskPush push : pushList) {
//更新任务组状态 //更新任务组状态
push.setStatus(status.shortValue()); push.setStatus(status.shortValue());
if (status == 4 || status == 5 || status == 0) { push.setRefuseReason(refuseReason);
push.setRefuseReason(refuseReason.shortValue()); push.setRefuseRemark(refuseRemark);
push.setRefuseRemark(refuseRemark);
}
taskPushMapper.updateById(push); taskPushMapper.updateById(push);
//更新评定任务状态 //更新评定任务状态
ChAprTask chAprTask = taskMapper.selectById(push.getTaskId()); ChAprTask chAprTask = taskMapper.selectById(push.getTaskId());
chAprTask.setTaskStatus(status); chAprTask.setTaskStatus(status);
taskMapper.updateById(chAprTask);
} }
return Result.success(); return Result.success();
} }
/**
* 评定任务分组管理列表详情详情
*
* @param pushId 任务组id
*/
@Override @Override
public TaskGroupInfoListInfoVO taskGroupInfoListInfo(String pushId) { public TaskGroupInfoListInfoVO taskGroupInfoListInfo(String pushId) {
return taskMapper.taskGroupInfoListInfo(pushId); return taskMapper.taskGroupInfoListInfo(pushId);
} }
/**
* 分配历史信息列表
*/
@Override @Override
public List<AllotTaskHisVO> allotTaskHisList() { public List<AllotTaskHisVO> allotTaskHisList() {
return taskMapper.allotTaskHisList(); return taskMapper.allotTaskHisList();
} }
/**
* 设置预约日期和备注
*
* @param pushId 分组id
* @param timeDate 预约日期
* @param remark 备注
*/
@Override @Override
public Result<Object> updatePushTimeAndRemark(String pushId, Date timeDate, String remark) { public Result<Object> updatePushTimeAndRemark(String pushId, Date timeDate, String remark) {
ChAprTaskPush chAprTaskPush = taskPushMapper.selectById(pushId); ChAprTaskPush chAprTaskPush = taskPushMapper.selectById(pushId);
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hungraim.ltc.dao.ChAprTaskPushMapper">
<resultMap id="BaseResultMap" type="com.hungraim.ltc.pojo.entity.assessment.ChAprTaskPush">
<id column="TASK_PUSH_ID" jdbcType="DECIMAL" property="taskPushId"/>
<result column="TASK_POOL_ID" jdbcType="VARCHAR" property="taskPoolId"/>
<result column="TIME" jdbcType="TIMESTAMP" property="time"/>
<result column="EVALUATE_ADDRESS_ID" jdbcType="DECIMAL" property="evaluateAddressId"/>
<result column="GROUP_NUMBER" jdbcType="VARCHAR" property="groupNumber"/>
<result column="ORDER_NUMBER" jdbcType="DECIMAL" property="orderNumber"/>
<result column="TASK_ID" jdbcType="DECIMAL" property="taskId"/>
<result column="PLANNED_ARRIVAL_TIME" jdbcType="TIMESTAMP" property="plannedArrivalTime"/>
<result column="PLANNED_DEPARTURE_TIME" jdbcType="TIMESTAMP" property="plannedDepartureTime"/>
<result column="DISTANCE_STATION_KILOMETERS" jdbcType="DECIMAL" property="distanceStationKilometers"/>
<result column="DISTANCE_STATION_TRAVEL_TIME" jdbcType="DECIMAL" property="distanceStationTravelTime" />
<result column="TOTAL_DISTANCE" jdbcType="DECIMAL" property="totalDistance" />
<result column="LENGTH_OF_TIME" jdbcType="DECIMAL" property="lengthOfTime" />
<result column="SEND_ID" jdbcType="DECIMAL" property="sendId" />
<result column="EMP_ID" jdbcType="DECIMAL" property="empId" />
<result column="STATUS" jdbcType="DECIMAL" property="status" />
<result column="FCD" jdbcType="TIMESTAMP" property="fcd" />
<result column="FCU" jdbcType="DECIMAL" property="fcu" />
<result column="LCD" jdbcType="TIMESTAMP" property="lcd" />
<result column="LCU" jdbcType="DECIMAL" property="lcu" />
<result column="SETOUT_DATE" jdbcType="TIMESTAMP" property="setoutDate" />
<result column="TASK_GROUP_NO" jdbcType="VARCHAR" property="taskGroupNo" />
<result column="ROUTE_START_LOCATION" jdbcType="VARCHAR" property="routeStartLocation" />
<result column="ROUTE_END_LOCATION" jdbcType="VARCHAR" property="routeEndLocation" />
<result column="ROUTE_START_TIME" jdbcType="TIMESTAMP" property="routeStartTime" />
<result column="ROUTE_END_TIME" jdbcType="TIMESTAMP" property="routeEndTime" />
<result column="STOP_LOCATION" jdbcType="VARCHAR" property="stopLocation" />
<result column="DATA_FROM" jdbcType="DECIMAL" property="dataFrom" />
<result column="ACCEPT_TIME" jdbcType="TIMESTAMP" property="acceptTime" />
<result column="ACCEPT_EMP" jdbcType="DECIMAL" property="acceptEmp" />
<result column="ACCEPT_ORGAN_NAME" jdbcType="DECIMAL" property="acceptOrganName" />
<result column="REFUSE_REASON" jdbcType="DECIMAL" property="refuseReason" />
<result column="REFUSE_REMARK" jdbcType="VARCHAR" property="refuseRemark" />
<result column="REFUSE_TIME" jdbcType="TIMESTAMP" property="refuseTime" />
<result column="REFUSE_EMP" jdbcType="DECIMAL" property="refuseEmp" />
<result column="REFUSE_ORGAN_NAME" jdbcType="DECIMAL" property="refuseOrganName" />
<result column="ASSIGN_TIME" jdbcType="TIMESTAMP" property="assignTime" />
<result column="ASSIGN_EMP" jdbcType="DECIMAL" property="assignEmp" />
<result column="ASSIGN_ORGAN_NAME" jdbcType="DECIMAL" property="assignOrganName" />
<result column="IS_MANUAL" jdbcType="DECIMAL" property="isManual" />
<result column="FINISH_TIME" jdbcType="TIMESTAMP" property="finishTime" />
<result column="FINISH_EMP" jdbcType="DECIMAL" property="finishEmp" />
<result column="FINISH_ORGAN_NAME" jdbcType="DECIMAL" property="finishOrganName" />
<result column="TASK_APPOINTMENT_DATE" jdbcType="TIMESTAMP" property="taskAppointmentDate" />
<result column="APPOINTMENT_REMARK" jdbcType="VARCHAR" property="appointmentRemark" />
</resultMap>
</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; package com.hungraim.ltc.pojo.vo.disable;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data; import lombok.Data;
...@@ -11,7 +10,6 @@ import java.util.Date; ...@@ -11,7 +10,6 @@ import java.util.Date;
* 失能人员信息列表VO * 失能人员信息列表VO
*/ */
@Data @Data
@TableName("")
public class DisableVO implements Serializable { public class DisableVO implements Serializable {
//id //id
private String applyId; private String applyId;
......
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
*/
@Data
public class SrvTaskVO extends PageInfo implements Serializable {
/**
* 服务计划id
*/
private Integer srvTaskId;
/**
* 失能人员id
*/
private Integer disabInfoId;
/**
* 所在省市
*/
private String districtProvincial;
private String districtCity;
private String districtArea;
/**
* 失能人员姓名
*/
private String realName;
/**
* 手机号码
*/
private String tel;
/**
* 年龄
*/
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date birthday;
/**
* 性别
*/
private String gender;
/**
* 诊断疾病
*/
private String disease;
/**
* 失能等级
*/
private String disableLevelName;
/**
* 接受服务地址
*/
private String acptSrvProvincial;
private String acptSrvCity;
private String acptSrvArea;
private String acptSrvStreet;
/**
* 评定等级
*/
private String evaluateRatingType;
/**
* 评定完成日期
*/
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date evaluateRafinishTimetingType;
/**
* 服务方式
*/
private String srvModeName;
/**
* 护理机构名称
*/
private String srvOrganName;
/**
* 护理服务人员
*/
private String empName;
/**
* 任务时间
*/
@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;
}
package com.hungraim.ltc.governance.controller;
import com.hungraim.ltc.governance.service.SrvTaskService;
import com.hungraim.ltc.pojo.vo.governance.SrvTaskVO;
import com.hungraim.ltc.util.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* 服务计划Controller
*
* @author czz
*/
@RestController
@RequestMapping("/api.governance/srvTask")
@Slf4j
public class SrvTaskController {
@Autowired
private SrvTaskService srvTaskService;
/**
* 服务计划、服务计划配置列表
*
* @param organId 护理机构id
* @param disableName 失能人员姓名
* @param disableTel 失能人员手机号码
* @param empName 护理人员姓名
* @param certifNum 护理人员证件号码
* @param startTime 服务计划开始时间
* @param endTime 服务计划结束时间
* @param status 任务状态(服务计划状态)
* @param modeId 服务方式
*/
@RequestMapping("/getSrvTaskList")
public Result<List<SrvTaskVO>> getSrvTaskList(Integer organId, String disableName, String disableTel,
String empName, String certifNum, String startTime, String endTime,
String status, String modeId) {
List<SrvTaskVO> tasks = srvTaskService.getSrvTaskList(organId, disableName, disableTel, empName, certifNum, startTime, endTime, status, modeId);
return Result.success(tasks);
}
}
package com.hungraim.ltc.governance.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTask;
import com.hungraim.ltc.pojo.vo.governance.SrvTaskVO;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
import java.util.List;
@Mapper
@Repository
public interface SrvTaskMapper extends BaseMapper<ChSrvTask> {
List<SrvTaskVO> getSrvTaskList(Integer organId, String disableName, String disableTel,
String empName, String certifNum, String startTime, String endTime,
String status, String modeId);
}
package com.hungraim.ltc.governance.service;
import com.hungraim.ltc.pojo.vo.governance.SrvTaskVO;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 服务计划Service
*
* @author czz
*/
@Service
public interface SrvTaskService {
List<SrvTaskVO> getSrvTaskList(Integer organId, String disableName, String disableTel,
String empName, String certifNum, String startTime, String endTime,
String status, String modeId);
}
package com.hungraim.ltc.governance.service.impl;
import com.hungraim.ltc.governance.dao.SrvTaskMapper;
import com.hungraim.ltc.governance.service.SrvTaskService;
import com.hungraim.ltc.pojo.vo.governance.SrvTaskVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 服务计划ServiceImpl
*/
@Service
public class SrvTaskServiceImpl implements SrvTaskService {
@Autowired
private SrvTaskMapper srvTaskMapper;
/**
* 服务计划列表
*
* @param organId 护理机构id
* @param disableName 失能人员姓名
* @param disableTel 失能人员手机号码
* @param empName 护理人员姓名
* @param certifNum 护理人员证件号码
* @param startTime 服务计划开始时间
* @param endTime 服务计划结束时间
* @param status 任务状态
* @param modeId 服务方式
*/
@Override
public List<SrvTaskVO> getSrvTaskList(Integer organId, String disableName, String disableTel,
String empName, String certifNum, String startTime, String endTime,
String status, String modeId) {
return srvTaskMapper.getSrvTaskList(organId, disableName, disableTel, empName, certifNum, startTime, endTime, status, modeId);
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hungraim.ltc.governance.dao.SrvTaskMapper">
<!--查询服务分配信息列表-->
<select id="getSrvTaskList" resultType="com.hungraim.ltc.pojo.vo.governance.SrvTaskVO">
select
task.srv_task_id srvTaskId,
disable.disab_info_id disabInfoId,
--所在省市
(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,
--手机号码
disable.tel tel,
--年龄
disable.birthday birthday,
--性别
disable.gender gender,
--诊断疾病
disable.disease disease,
--失能等级
level1.disable_level_name disableLevelName,
--接受服务地址
(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,
--评定完成日期
aprtask.finish_time finishTime,
--服务方式
mode1.srv_mode_name srvModeName,
--护理机构名称
organ.srv_organ_name srvOrganName,
--护理服务人员
emp.emp_name empName,
--任务时间
task.eff_time effTime,
--任务状态(服务计划状态)
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--评定任务
left join ch_apr_report report on aprtask.task_id = report.task_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_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}
</if>
<if test="disableName != null and disableName != ''">
and disable.real_name = #{disableName}
</if>
<if test="disableTel != null and disableTel != ''">
and disable.tel = #{disableTel}
</if>
<if test="empName != null and empName != ''">
and emp.emp_name = #{empName}
</if>
<if test="certifNum != null and certifNum != ''">
and emp.certif_num = #{certifNum}
</if>
<if test="startTime != null and startTime != ''">
and task.eff_time &gt;= #{startTime}
</if>
<if test="endTime != null and endTime != ''">
and task.eff_time &lt;= #{endTime}
</if>
<if test="status != null and status != ''">
and task.status = #{status}
</if>
<if test="modeId != null and modeId != ''">
and mode1.srv_mode_name = #{modeId}
</if>
</where>
</select>
</mapper>
\ No newline at end of file
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