Commit 21c15203 authored by 蔡镇泽's avatar 蔡镇泽

复评申请列表接口及失能评定接口调整

parent fa469c05
......@@ -170,6 +170,7 @@ public class DisableServiceImpl implements DisableService {
chAprTask.setDisableInfoId(chDisableInfo.getDisabInfoId());//失能人员id
chAprTask.setEffTime(new Date());
chAprTask.setFcd(null);
chAprTask.setAprType(0);//申请:0;复评:1
aprTaskMapper.insert(chAprTask);
}
}
......
......@@ -77,6 +77,13 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!--apply-api-->
<dependency>
<groupId>com.hungraim.ltc</groupId>
<artifactId>apply-api</artifactId>
<version>0.0.1</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
......
package com.hungraim.ltc.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.pojo.vo.assessment.ReTaskDistributionVO;
import com.hungraim.ltc.service.ReTaskService;
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.RequestParam;
import org.springframework.web.bind.annotation.RestController;
/**
* 复评Controller
*
* @author czz
*/
@RestController
@RequestMapping("/api.assessment/reTask")
@Slf4j
public class ReTaskController {
@Autowired
private ReTaskService reTaskService;
/**
* 复评申请列表
*
* @param organId 适用机构id
* @param isIncluded 是否包含下级机构,值为true,则包含organId的下层机构
* @param acptProvincial 所在省
* @param acptCity 所在市
* @param acptCrea 所在区域
* @param realName 失能人员姓名
* @param certiCode 失能人员身份证号码
* @param dataFrom 申请来源
* @param srvOrganId 护理机构
* @param applyMethod 申请类别
* @param pageNum 当前页
* @param pageSize 每页几条数据
*/
@RequestMapping("/reTaskDistributionList")
public Result<Page<ReTaskDistributionVO>> reTaskDistributionList(@RequestParam(defaultValue = "1") Integer pageNum, @RequestParam(defaultValue = "10") Integer pageSize,
Long organId, Boolean isIncluded, String acptProvincial, String acptCity, String acptCrea,
String realName, String certiCode, String dataFrom, String srvOrganId, String applyMethod) {
Page<ReTaskDistributionVO> page = new Page<>(pageNum, pageSize);
page = reTaskService.reTaskDistributionList(page, organId, isIncluded, acptProvincial, acptCity, acptCrea, realName, certiCode, dataFrom, srvOrganId, applyMethod);
return Result.success(page);
}
}
......@@ -54,4 +54,6 @@ public interface TaskMapper extends BaseMapper<ChAprTask> {
TaskGroupInfoListInfoVO taskGroupInfoListInfo(String pushId);
List<AllotTaskHisVO> allotTaskHisList();
Page<ReTaskDistributionVO> reTaskDistributionList(Page<ReTaskDistributionVO> page, List<Long> organIds, String acptProvincial, String acptCity, String acptCrea, String realName, String certiCode, String dataFrom, String srvOrganId, String applyMethod);
}
package com.hungraim.ltc.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hungraim.ltc.pojo.entity.assessment.ChAprTask;
import com.hungraim.ltc.pojo.vo.assessment.ReTaskDistributionVO;
import org.springframework.stereotype.Service;
/**
* 复评Service
*
* @author czz
*/
@Service
public interface ReTaskService extends IService<ChAprTask> {
Page<ReTaskDistributionVO> reTaskDistributionList(Page<ReTaskDistributionVO> page, Long organId, Boolean isIncluded, String acptProvincial, String acptCity, String acptCrea, String realName, String certiCode, String dataFrom, String srvOrganId, String applyMethod);
}
package com.hungraim.ltc.service.impl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hungraim.ltc.api.OrganFeignService;
import com.hungraim.ltc.dao.TaskMapper;
import com.hungraim.ltc.pojo.entity.assessment.ChAprTask;
import com.hungraim.ltc.pojo.vo.assessment.ReTaskDistributionVO;
import com.hungraim.ltc.service.ReTaskService;
import com.hungraim.ltc.util.Result;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @author czz
*/
@Service
@Slf4j
@AllArgsConstructor
public class ReTaskServiceImpl extends ServiceImpl<TaskMapper, ChAprTask> implements ReTaskService {
private final TaskMapper taskMapper;
private final OrganFeignService organFeignService;
@Override
public Page<ReTaskDistributionVO> reTaskDistributionList(Page<ReTaskDistributionVO> page, Long organId, Boolean isIncluded, String acptProvincial, String acptCity, String acptCrea, String realName, String certiCode, String dataFrom, String srvOrganId, String applyMethod) {
Result<List<Long>> organChild = null;
List<Long> organIds = null;
if (organId != null) {
if (isIncluded == null) {
isIncluded = false;
}
organChild = organFeignService.getOrganChild(organId, isIncluded);
organIds = organChild.getData();
}
return taskMapper.reTaskDistributionList(page, organIds, acptProvincial, acptCity, acptCrea, realName, certiCode, dataFrom, srvOrganId, applyMethod);
}
}
\ No newline at end of file
......@@ -6,8 +6,8 @@
select
task.task_id taskId,
task.apply_id applyId,
organ.SRV_ORGAN_NAME organName,
organ.SRV_ORGAN_CODE aprOrganId,
fndOrgan.ORGAN_NAME organName,
task.ORGAN_ID aprOrganId,
(select DISTRICT_NAME from CH_FND_DISTRICT dis where task.DISTRICT_PROVINCIAL = dis.DISTRICT_CODE) districtProvincial,
(select DISTRICT_NAME from CH_FND_DISTRICT dis where task.DISTRICT_CITY = dis.DISTRICT_CODE) districPity,
(select DISTRICT_NAME from CH_FND_DISTRICT dis where task.DISTRICT_AREA = dis.DISTRICT_CODE) districtArea,
......@@ -56,7 +56,9 @@
left join ch_apr_task_emp cate on task.task_id = cate.task_id
left join ch_apr_report report on report.TASK_ID = task.TASK_ID
left join ch_refuse_reason reason on push.refuse_reason = reason.refuse_reason_id
left join CH_FND_ORGAN fndOrgan on task.ORGAN_ID = fndOrgan.ORGAN_ID
<where>
and task.APR_TYPE = 0
<if test="organIds != null">
and task.apr_organ_id in
<foreach collection="organIds" item="organId" open="(" close=")" separator=",">
......@@ -105,8 +107,8 @@
<select id="taskReportList" resultType="com.hungraim.ltc.pojo.vo.assessment.TaskReportVO">
SELECT report.REPORT_ID reportId,
report.evaluate_time evaluateTime,
task.APR_ORGAN_ID organId,
organ.SRV_ORGAN_NAME organName,
task.ORGAN_ID organId,
fndOrgan.ORGAN_NAME organName,
(SELECT dis.DISTRICT_NAME FROM CH_FND_DISTRICT dis WHERE task.DISTRICT_PROVINCIAL = dis.DISTRICT_CODE) districtProvincial,
(SELECT dis.DISTRICT_NAME FROM CH_FND_DISTRICT dis WHERE task.DISTRICT_CITY = dis.DISTRICT_CODE) districPity,
(SELECT dis.DISTRICT_NAME FROM CH_FND_DISTRICT dis WHERE task.DISTRICT_AREA = dis.DISTRICT_CODE) districtArea,
......@@ -141,6 +143,7 @@
left join ch_apr_organ aprOrgan on task.apr_organ_id = aprOrgan.apr_organ_id
left join ch_srv_organ organ on aprOrgan.organ_id = organ.organ_id
LEFT JOIN CH_DISABLE_RISK_LEVEL lev ON report.DISABLE_LEVEL_ID = lev.DISA_RISK_LEVEL_ID
left join CH_FND_ORGAN fndOrgan on task.ORGAN_ID = fndOrgan.ORGAN_ID
<where>
<if test="name != null and name != ''">
and info.REAL_NAME like CONCAT(CONCAT('%',#{name}) ,'%')
......@@ -332,4 +335,73 @@
LEFT JOIN ch_apr_emp emp on push.emp_id = emp.emp_id
</select>
<select id="reTaskDistributionList" resultType="com.hungraim.ltc.pojo.vo.assessment.ReTaskDistributionVO">
select
task.task_id taskId,
task.apply_id applyId,
fndOrgan.ORGAN_NAME organName,
fndOrgan.ORGAN_ID organId,
(select DISTRICT_NAME from CH_FND_DISTRICT dis where task.DISTRICT_PROVINCIAL = dis.DISTRICT_CODE) acptProvincial,
(select DISTRICT_NAME from CH_FND_DISTRICT dis where task.DISTRICT_CITY = dis.DISTRICT_CODE) acptCity,
(select DISTRICT_NAME from CH_FND_DISTRICT dis where task.DISTRICT_AREA = dis.DISTRICT_CODE) acptCrea,
disable.real_name realName,
disable.gender gender,
disable.BIRTHDAY birthday,
disable.certi_code certiCode,
disable.tel tel,
pool.srv_mode_id srvModeId,
srvMode.SRV_MODE_NAME srvModeName,
(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,
apply.DATA_FROM dataFrom,
apply.APPLY_METHOD applyMethod,
task.fcd fcd
from CH_APR_TASK task
--适用机构
left join CH_FND_ORGAN fndOrgan on task.ORGAN_ID = fndOrgan.ORGAN_ID
--失能申请表
left join CH_DISABLE_APPLY apply on task.APPLY_ID = apply.APPLY_ID
--失能人员信息表
left join ch_disable_info disable on task.disable_info_id = disable.disab_info_id
--服务分配表
left join ch_srv_send send on disable.DISAB_INFO_ID = send.DISAB_INFO_ID
--护理机构表
left join ch_srv_organ srvOrgan on send.SRV_ORGAN_ID = srvOrgan.SRV_ORGAN_ID
left join ch_apr_task_pool pool on task.TASK_ID = pool.TASK_ID
left join ch_fnd_srv_mode srvMode on pool.srv_mode_id = srvMode.srv_mode_id
<where>
and task.task_status = 3
<if test="organIds != null">
and task.apr_organ_id in
<foreach collection="organIds" item="organId" open="(" close=")" separator=",">
#{organId}
</foreach>
</if>
<if test="acptProvincial != null and acptProvincial != ''">
and disable.ACPT_PROVINCIAL = #{acptProvincial}
</if>
<if test="acptCity != null and acptCity != ''">
and disable.ACPT_CITY = #{acptCity}
</if>
<if test="acptCrea != null and acptCrea != ''">
and disable.ACPT_AREA = #{acptCrea}
</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="dataFrom != null and dataFrom != ''">
and apply.DATA_FROM = #{dataFrom}
</if>
<if test="srvOrganId != null and srvOrganId != ''">
and srvOrgan.SRV_ORGAN_ID = #{srvOrganId}
</if>
<if test="applyMethod != null and applyMethod != ''">
and apply.APPLY_METHOD = #{applyMethod}
</if>
</where>
</select>
</mapper>
\ No newline at end of file
package com.hungraim.ltc.pojo.vo.assessment;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
@Data
public class ReTaskDistributionVO {
//鉴定任务id
private Integer taskId;
//任务明细id
private Integer applyId;
//适用机构
private String organName;
//机构代码
private String organId;
//机构所在省市区
private String acptProvincial;
private String acptCity;
private String acptCrea;
//失能人员姓名
private String realName;
//失能人员性别
private String gender;
//年龄
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date birthday;//出生年月
//失能人员身份证号码
private String certiCode;
//失能人员联系电话
private String tel;
//申请服务方式
private String srvModeId;
private String srvModeName;
//诊断疾病
private String diseTypeF;//大类
private String diseTypeS;//小类
//申请来源
private String dataFrom;//网厅:0,核心:1
//申请类别
private String applyMethod;//1首次申请、2复评申请,3动态评估
//申请时间
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date fcd;
}
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