Commit 5ac8c33f authored by zhangch's avatar zhangch
parents 69b4f9c5 8384a4f5
......@@ -3,8 +3,9 @@ package com.hungraim.ltc.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hungraim.ism.pojo.vo.disable.DisableEvaluateInfoVO;
import com.hungraim.ism.pojo.vo.disable.DisableEvaluateVO;
import com.hungraim.ltc.pojo.entity.disable.ChDisableEvaluate;
import com.hungraim.ltc.service.DisableEvaluateService;
import com.hungraim.ltc.pojo.entity.eval.ChAprTask;
import com.hungraim.ltc.pojo.vo.assessment.TaskDistributionVO;
import com.hungraim.ltc.service.TaskService;
import com.hungraim.ltc.util.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -19,27 +20,40 @@ import java.util.List;
* @author czz
*/
@RestController
@RequestMapping("/api.apply/disableEvaluate")
@RequestMapping("/api.apply/task")
@Slf4j
public class DisableEvaluateController {
public class TaskController {
@Autowired
private DisableEvaluateService disableEvaluateService;
private TaskService taskService;
/**
* 失能评定列表
* 评定任务分配列表
*
* @param organId 适用机构代码
* @param srvOrganId 护理机构
* @param realName 失能人员姓名
* @param certiCode 失能人员身份证号码
* @param pageNum 当前页
* @param pageSize 每页几条数据
* @return 失能评定列表
* @param organId 适用机构代码
* @param isIncludeSubsidiaries 是否包含子机构 0包含,1不包含
* @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 每页几条数据
*/
@RequestMapping("/disableEvaluateList")
public Result<List<DisableEvaluateVO>> disableEvaluateList(String organId, String srvOrganId, String realName, String certiCode, int pageNum, int pageSize) {
IPage<DisableEvaluateVO> iPage = disableEvaluateService.disableEvaluateList(organId, realName, certiCode, srvOrganId, pageNum, pageSize);
@RequestMapping("/taskDistributionList")
public Result<List<TaskDistributionVO>> taskDistributionList(String organId, String isIncludeSubsidiaries, String provincial, String city,
String street, String realName, String certiCode, String taskName, String taskTel,
String daysRemaining, String status, String isReturn, String area,
int pageNum, int pageSize) {
IPage<TaskDistributionVO> iPage = taskService.taskDistributionList(organId, isIncludeSubsidiaries, provincial, city,
street, realName, certiCode, taskName, taskTel, daysRemaining, status, isReturn, area,
pageNum, pageSize);
return Result.success(iPage.getRecords());
}
......@@ -51,7 +65,7 @@ public class DisableEvaluateController {
*/
@RequestMapping("/disableEvaluateInfo")
public Result<DisableEvaluateInfoVO> disableEvaluateInfo(String evaluateId) {
DisableEvaluateInfoVO disableEvaluateInfoVO = disableEvaluateService.disableEvaluateInfo(evaluateId);
DisableEvaluateInfoVO disableEvaluateInfoVO = taskService.disableEvaluateInfo(evaluateId);
return Result.success(disableEvaluateInfoVO);
}
......@@ -66,15 +80,14 @@ public class DisableEvaluateController {
*/
@RequestMapping("/disableEvaluate")
public Result disableEvaluate(String applyId, String checkName, Short applyStatus, String checkRemark) {
//disableEvaluateService.disableExamine(applyId, checkName, applyStatus, checkRemark);
return Result.success();
}
/**
* 新增失能申请
* 新增失能评定
*/
@RequestMapping("/addDisableEvaluate")
public Result addEvaluate(ChDisableEvaluate chDisableEvaluate) {
@RequestMapping("/addAprTask")
public Result addAprTask(ChAprTask chAprTask) {
return Result.success();
}
......
......@@ -5,28 +5,40 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ism.pojo.vo.disable.DisableEvaluateInfoVO;
import com.hungraim.ism.pojo.vo.disable.DisableEvaluateVO;
import com.hungraim.ism.pojo.vo.disable.DisableVO;
import com.hungraim.ltc.pojo.entity.disable.ChDisableEvaluate;
import com.hungraim.ltc.pojo.entity.eval.ChAprTask;
import com.hungraim.ltc.pojo.vo.assessment.TaskDistributionVO;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
/**
* 失能人员申请历史Mapper
* 失能评定Mapper
*
* @author czz
*/
@Mapper
@Repository
public interface DisableEvaluateMapper extends BaseMapper<ChDisableEvaluate> {
public interface TaskMapper extends BaseMapper<ChAprTask> {
/**
* 查询失能评定列表
* 评定任务分配列表
*
* @param organId 适用机构代码
* @param srvOrganId 护理机构
* @param realName 失能人员姓名
* @param certiCode 失能人员身份证号码
* @param organId 适用机构代码
* @param isIncludeSubsidiaries 是否包含子机构 0包含,1不包含
* @param provincial 所在省
* @param city 所在市
* @param area 所在区域
* @param street 所在街道
* @param realName 失能人员姓名
* @param certiCode 失能人员身份证号码
* @param taskName 评定人员姓名
* @param taskTel 评定人员手机号码
* @param daysRemaining 评定剩余天数
* @param status 任务状态
* @param isReturn 是否退回
*/
Page<DisableEvaluateVO> disableEvaluateList(Page<DisableVO> page, String organId, String srvOrganId, String realName, String certiCode);
Page<TaskDistributionVO> taskDistributionList(Page<TaskDistributionVO> page, String organId, String isIncludeSubsidiaries, String provincial, String city,
String street, String realName, String certiCode, String taskName, String taskTel,
String daysRemaining, String status, String isReturn, String area);
DisableEvaluateInfoVO selectDisableEvaluateInfoByEvaluateId(String evaluateId);
......
......@@ -3,29 +3,41 @@ package com.hungraim.ltc.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hungraim.ism.pojo.vo.disable.DisableEvaluateInfoVO;
import com.hungraim.ism.pojo.vo.disable.DisableEvaluateVO;
import com.hungraim.ltc.pojo.entity.disable.ChDisableEvaluate;
import com.hungraim.ltc.pojo.entity.eval.ChAprTask;
import com.hungraim.ltc.pojo.vo.assessment.TaskDistributionVO;
import org.springframework.stereotype.Service;
/**
* 失能申请Service
* 失能评定Service
*
* @author czz
*/
@Service
public interface DisableEvaluateService {
public interface TaskService {
/**
* 失能评定列表
* 评定任务分配列表
*
* @param organId 适用机构代码
* @param srvOrganId 护理机构
* @param realName 失能人员姓名
* @param certiCode 失能人员身份证号码
* @param pageNum 当前页
* @param pageSize 每页几条数据
* @return
* @param organId 适用机构代码
* @param isIncludeSubsidiaries 是否包含子机构 0包含,1不包含
* @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<DisableEvaluateVO> disableEvaluateList(String organId, String srvOrganId, String realName, String certiCode, int pageNum, int pageSize);
IPage<TaskDistributionVO> taskDistributionList(String organId, String isIncludeSubsidiaries, String provincial, String city,
String street, String realName, String certiCode, String taskName, String taskTel,
String daysRemaining, String status, String isReturn, String area,
int pageNum, int pageSize);
/**
* 失能评定详情
......@@ -35,7 +47,7 @@ public interface DisableEvaluateService {
*/
DisableEvaluateInfoVO disableEvaluateInfo(String evaluateId);
void addEvaluate(ChDisableEvaluate disableEvaluate);
void addEvaluate(ChAprTask disableEvaluate);
void disableEvaluate(String applyId, String checkName, Short applyStatus, String checkRemark);
}
......@@ -3,32 +3,36 @@ package com.hungraim.ltc.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ism.pojo.vo.disable.DisableEvaluateInfoVO;
import com.hungraim.ism.pojo.vo.disable.DisableEvaluateVO;
import com.hungraim.ltc.dao.DisableEvaluateMapper;
import com.hungraim.ltc.pojo.entity.disable.ChDisableEvaluate;
import com.hungraim.ltc.service.DisableEvaluateService;
import com.hungraim.ltc.dao.TaskMapper;
import com.hungraim.ltc.pojo.entity.eval.ChAprTask;
import com.hungraim.ltc.pojo.vo.assessment.TaskDistributionVO;
import com.hungraim.ltc.service.TaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class DisableEvaluateServiceImpl implements DisableEvaluateService {
public class TaskServiceImpl implements TaskService {
@Autowired
private DisableEvaluateMapper disableEvaluateList;
private TaskMapper taskMapper;
@Override
public IPage<DisableEvaluateVO> disableEvaluateList(String organId, String srvOrganId, String realName, String certiCode, int pageNum, int pageSize) {
return disableEvaluateList.disableEvaluateList(new Page(pageNum, pageSize), organId, realName, certiCode, srvOrganId);
public IPage<TaskDistributionVO> taskDistributionList(String organId, String isIncludeSubsidiaries, String provincial, String city,
String street, String realName, String certiCode, String taskName, String taskTel,
String daysRemaining, String status, String isReturn, String area,
int pageNum, int pageSize) {
return taskMapper.taskDistributionList(new Page<>(pageNum, pageSize), organId, isIncludeSubsidiaries, provincial, city,
street, realName, certiCode, taskName, taskTel, daysRemaining, status, isReturn, area);
}
@Override
public DisableEvaluateInfoVO disableEvaluateInfo(String evaluateId) {
return disableEvaluateList.selectDisableEvaluateInfoByEvaluateId(evaluateId);
return taskMapper.selectDisableEvaluateInfoByEvaluateId(evaluateId);
}
@Override
public void addEvaluate(ChDisableEvaluate disableEvaluate) {
disableEvaluateList.insert(disableEvaluate);
public void addEvaluate(ChAprTask disableEvaluate) {
taskMapper.insert(disableEvaluate);
}
@Override
......
......@@ -2,34 +2,80 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hungraim.ism.dao.DisableApplyMapper">
<select id="disableEvaluateList" resultType="com.hungraim.ism.pojo.vo.disable.DisableEvaluateVO">
select e.evaluate_id evaluateId,
o.ORGAN_NAME organName,
e.organ_id organId,
e.PROVINCE_CODE provincial,
e.CITY_CODE city,
e.AREA_CODE area,
e.REAL_NAME realName,
e.CERTI_CODE certiCode,
e.DISEASE_DESC diseaseDesc,
e.TEL tel,
e.SRV_ORGEN_ID srvOrgenId,
e.MODE_ID modeId,
e.EVALUATE_TIME evaluateTime
from CH_DISABLE_EVALUATE e,CH_FND_ORGAN o
where e.organ_id = o.ORGAN_ID
<if test="organId != null">
and e.organ_Id = #{organId}
</if>
<if test="srvOrganId != null">
and e.srv_Organ_Id = #{srvOrganId}
</if>
<if test="realName != null">
and e.real_Name like '%'#{realName}'%'
</if>
<if test="certiCode != null">
and e.certi_Code = #{certiCode}
</if>
<select id="taskDistributionList" resultType="com.hungraim.ltc.pojo.vo.assessment.TaskDistributionVO">
select
task.task_id taskId,
task.apply_id applyId,
organ.organ_name organName,
task.apr_organ_id aprOrganId,
task.district_provincial districtProvincial,
task.district_city districPity,
task.district_area districtArea,
disable.real_name realName,
task.fcd fcd,
disable.certi_code certiCode,
(select DISE_TYPE_CODE from CH_FND_DISEASE_TYPE where disable.DISE_TYPE_F = DISE_TYPE_ID) diseTypeF,
(select DISE_TYPE_CODE from CH_FND_DISEASE_TYPE where disable.DISE_TYPE_S = DISE_TYPE_ID) diseTypeS,
disable.tel tel,
disable.ACPT_PROVINCIAL acptProvincial,
disable.ACPT_CITY acptCity,
disable.ACPT_AREA acptArea,
disable.ACPT_STREET acptStreet,
disable.end_time endTime,
emp.real_name empRealName,
emp.tel emoTel,
task.assign_time assignTime,
task.accept_time acceptTime,
task.finish_time finishTime,
task.task_status taskStatus,
push.refuse_reason refuseReason,
push.refuse_remark refuseRemark
from CH_APR_TASK task
left join ch_apr_organ organ on task.apr_organ_id = organ.apr_organ_id
left join ch_disable_info disable on task.disable_info_id = disable.disab_info_id
left join ch_apr_emp emp on task.apr_emp_id = emp.emp_id
left join ch_apr_task_push push on task.task_id = push.task_id
<where>
<if test="organIds != null">
and task.apr_organ_id in
<foreach collection="organIds" item="organId" open="(" close=")" separator=",">
#{organId}
</foreach>
</if>
<if test="provincial != null and provincial != ''">
and disable.ACPT_PROVINCIAL = #{provincial}
</if>
<if test="city != null and city != ''">
and disable.ACPT_CITY = #{city}
</if>
<if test="area != null and area != ''">
and disable.ACPT_AREA = #{area}
</if>
<if test="street != null and street != ''">
and disable.ACPT_STREET = #{street}
</if>
<if test="realName != null and realName != ''">
and disable.real_name like CONCAT(CONCAT('%',#{realName}) ,'%')
</if>
<if test="certiCode != null and certiCode != ''">
and disable.certi_code = #{certiCode}
</if>
<if test="taskName != null and taskName != ''">
and emp.real_name = #{taskName}
</if>
<if test="taskTel != null and taskTel != ''">
and emp.tel = #{taskTel}
</if>
<if test="daysRemaining != null and daysRemaining != ''">
#and s.SRV_ORGAN_NAME = #{taskName}
</if>
<if test="status != null and status != ''">
and task.TASK_STATUS = #{status}
</if>
<if test="isReturn != null and isReturn != ''">
#and s.SRV_ORGAN_NAME = #{taskName}
</if>
</where>
</select>
<select id="selectDisableEvaluateInfoByEvaluateId" resultType="com.hungraim.ism.pojo.vo.disable.DisableEvaluateInfoVO">
......@@ -55,15 +101,15 @@
a.ACPT_SRV_CITY acptSrvCity,
a.ACPT_SRV_AREA acptSrvArea,
a.ACPT_SRV_STREET acptSrvStreet,
a.ACPT_SRV_ROAD_DETAIL acptSrvRoadDetail,
a.ADRESS_DISTRICT_PROVINCIAL adressDistrictProvincial,
a.ADRESS_DISTRICT_CITY adressDistrictCity,
a.ADRESS_DISTRICT_CODE adressDistrictCode,
a.ADDRESS_ROAD_DETAIL addressRoadDetail,
a.ADDRESS_NUMBER_DETAIL addressNumberDetail,
a.ACPT_SRV_ROAD_DETAIL acptSrvRoadDetail,
a.ADRESS_DISTRICT_PROVINCIAL adressDistrictProvincial,
a.ADRESS_DISTRICT_CITY adressDistrictCity,
a.ADRESS_DISTRICT_CODE adressDistrictCode,
a.ADDRESS_ROAD_DETAIL addressRoadDetail,
a.ADDRESS_NUMBER_DETAIL addressNumberDetail,
a.DISEASE disease,
a.APPLY_METHOD applyMethod,
a.DISEASE disease,
a.APPLY_METHOD applyMethod,
a.DISEASE_DESC diseaseDesc,
a.MEDICAL_CARD medicalCard,
a.MEDICAL_TYPE medicalType,
......
package com.hungraim.ltc.pojo.entity.eval;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@Data
@TableName("CH_APR_TASK")
public class ChAprTask {
private Integer taskId;
private java.util.Date assignTime;
private Integer taskStatus;
private Integer assignEmp;
private String districtProvincial;
private Integer reAprStatus;
private java.util.Date endTime;
private java.util.Date finishTime;
private String districtArea;
private Integer applyId;
private Integer aprType;
private java.util.Date taskAppointmentDate;
private Integer defineEmp;
private Integer finishEmp;
private java.util.Date fCD;
private Integer acceptEmp;
private java.util.Date acceptTime;
private java.util.Date lcd;
private Integer aprEmpId;
private String organId;
private String districtCity;
private java.util.Date reAprTime;
private Integer endEmp;
private Integer disableInfoId;
private Integer fcu;
private java.util.Date effTime;
private Integer aprOrganId;
private Integer lcu;
private java.util.Date lastAprDate;
private String appointmentRemark;
}
package com.hungraim.ltc.pojo.vo.assessment;
import lombok.Data;
import java.util.Date;
@Data
public class TaskDistributionVO {
//鉴定任务id ch_apr_task
private Integer taskId;
//任务明细id
private Integer applyId;
//适用机构 ch_apr_organ apr_organ_id
private String organName;
//机构代码
private String aprOrganId;
//所在省市区
private String districtProvincial;
private String districPity;
private String districtArea;
//失能人员姓名 ch_disable_info
private String realName;
//申请日期
private Date fcd;
//失能人员身份证号码
private String certiCode;
//年龄
//诊断疾病 CH_FND_DISEASE_TYPE
private String diseTypeF;//大类
private String diseTypeS;//小类
//失能人员联系电话
private String tel;
//接受评定地址
private String acptProvincial;
private String acptCity;
private String acptArea;
//街道
private String acptStreet;
//评定截止日期
private Date endTime;
//评定人员 ch_apr_emp emp_id
private String empRealName;
//评定人员手机号码
private String empTel;
//任务分配时间
private Date assignTime;
//任务接受时间
private Date acceptTime;
//任务完成时间
private Date finishTime;
//任务状态
private Integer taskStatus;
//拒绝原因
private String refuseReason;
//备注
private String refuseRemark;
}
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