Commit b77d1343 authored by zhangch's avatar zhangch

调试 可以进行复评申请的列表 接口

parent 2dddb458
...@@ -168,9 +168,11 @@ public class DisableServiceImpl implements DisableService { ...@@ -168,9 +168,11 @@ public class DisableServiceImpl implements DisableService {
} }
BeanUtil.copyProperties(chDisableApply, chAprTask); BeanUtil.copyProperties(chDisableApply, chAprTask);
chAprTask.setDisableInfoId(chDisableInfo.getDisabInfoId());//失能人员id chAprTask.setDisableInfoId(chDisableInfo.getDisabInfoId());//失能人员id
chAprTask.setReAprStatus(0);
chAprTask.setEffTime(new Date()); chAprTask.setEffTime(new Date());
chAprTask.setFcd(null); chAprTask.setFcd(null);
chAprTask.setAprType(0);//申请:0;复评:1 chAprTask.setAprType(0);//申请:0;复评:1
chAprTask.setTaskStatus(0); // 任务状态 0 未分配
aprTaskMapper.insert(chAprTask); aprTaskMapper.insert(chAprTask);
} }
} }
......
...@@ -41,19 +41,10 @@ public class OrganServiceImpl implements OrganService { ...@@ -41,19 +41,10 @@ public class OrganServiceImpl implements OrganService {
@Override @Override
public List<Long> getOrganIds(Long organId, Boolean isInvolveChild) { public List<Long> getOrganIds(Long organId, Boolean isInvolveChild) {
List<Long> organIds = new ArrayList<>(); List<Long> organIds = new ArrayList<>();
if (isInvolveChild) {
if (organId != null) { if (organId != null) {
organIds.add(organId); organIds.add(organId);
if (isInvolveChild) {
getOrganList(organId, organIds); getOrganList(organId, organIds);
// QueryWrapper<ChFndOrgan> queryWrapper = new QueryWrapper<>();
// queryWrapper.eq("PARENT_ID", organId);
// queryWrapper.eq("STATUS", "1");
// List<ChFndOrgan> chFndOrgans = fndOrganMapper.selectList(queryWrapper);
// if (chFndOrgans != null) {
// for (ChFndOrgan chFndOrgan : chFndOrgans) {
// organIds.add(Long.valueOf(chFndOrgan.getOrganId()));
// }
// }
} }
} }
return organIds; return organIds;
......
...@@ -26,27 +26,24 @@ public class ReTaskController { ...@@ -26,27 +26,24 @@ public class ReTaskController {
private ReTaskService reTaskService; private ReTaskService reTaskService;
/** /**
* 复评申请列表 * 可以进行复评申请的列表
* *
* @param organId 适用机构id * @param organId 适用机构id
* @param isIncluded 是否包含下级机构,值为true,则包含organId的下层机构 * @param isChildGroup 是否包含下级机构,值为true,则包含organId的下层机构
* @param acptProvincial 所在省 * @param districtProvincial 所在省
* @param acptCity 所在市 * @param districtCity 所在市
* @param acptCrea 所在区域 * @param districtArea 所在区域
* @param realName 失能人员姓名 * @param realName 失能人员姓名
* @param certiCode 失能人员身份证号码 * @param certiCode 失能人员身份证号码
* @param dataFrom 申请来源
* @param srvOrganId 护理机构
* @param applyMethod 申请类别
* @param pageNum 当前页 * @param pageNum 当前页
* @param pageSize 每页几条数据 * @param pageSize 每页几条数据
*/ */
@RequestMapping("/reTaskDistributionList") @RequestMapping("/reTaskDistributionList")
public Result<Page<ReTaskDistributionVO>> reTaskDistributionList(@RequestParam(defaultValue = "1") Integer pageNum, @RequestParam(defaultValue = "10") Integer pageSize, 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, Long organId, Boolean isChildGroup, String districtProvincial, String districtCity, String districtArea,
String realName, String certiCode, String dataFrom, String srvOrganId, String applyMethod) { String realName, String certiCode) {
Page<ReTaskDistributionVO> page = new Page<>(pageNum, pageSize); Page<ReTaskDistributionVO> page = new Page<>(pageNum, pageSize);
page = reTaskService.reTaskDistributionList(page, organId, isIncluded, acptProvincial, acptCity, acptCrea, realName, certiCode, dataFrom, srvOrganId, applyMethod); page = reTaskService.reTaskDistributionList(page, organId, isChildGroup, districtProvincial, districtCity, districtArea, realName, certiCode);
return Result.success(page); return Result.success(page);
} }
/** /**
......
...@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.pojo.entity.assessment.ChAprTask; import com.hungraim.ltc.pojo.entity.assessment.ChAprTask;
import com.hungraim.ltc.pojo.vo.assessment.*; import com.hungraim.ltc.pojo.vo.assessment.*;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import java.util.List; import java.util.List;
...@@ -55,5 +56,5 @@ public interface TaskMapper extends BaseMapper<ChAprTask> { ...@@ -55,5 +56,5 @@ public interface TaskMapper extends BaseMapper<ChAprTask> {
List<AllotTaskHisVO> allotTaskHisList(); 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); Page<ReTaskDistributionVO> reTaskDistributionList(Page<ReTaskDistributionVO> page, @Param("organIds") List<Long> organIds, String districtProvincial, String districtCity, String districtArea, String realName, String certiCode);
} }
...@@ -14,7 +14,7 @@ import org.springframework.stereotype.Service; ...@@ -14,7 +14,7 @@ import org.springframework.stereotype.Service;
*/ */
@Service @Service
public interface ReTaskService extends IService<ChAprTask> { 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); Page<ReTaskDistributionVO> reTaskDistributionList(Page<ReTaskDistributionVO> page, Long organId, Boolean isIncluded, String acptProvincial, String acptCity, String acptCrea, String realName, String certiCode);
/** /**
* 复评申请详情 * 复评申请详情
*/ */
......
package com.hungraim.ltc.service.impl; package com.hungraim.ltc.service.impl;
import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hungraim.ltc.api.OrganFeignService; import com.hungraim.ltc.api.OrganFeignService;
import com.hungraim.ltc.dao.ChDisableApplyMapper; import com.hungraim.ltc.dao.ChDisableApplyMapper;
import com.hungraim.ltc.dao.TaskMapper; import com.hungraim.ltc.dao.TaskMapper;
import com.hungraim.ltc.pojo.entity.assessment.ChAprTask; import com.hungraim.ltc.pojo.entity.assessment.ChAprTask;
import com.hungraim.ltc.pojo.entity.disable.ChDisableApply;
import com.hungraim.ltc.pojo.vo.assessment.ReTaskDistributionVO; import com.hungraim.ltc.pojo.vo.assessment.ReTaskDistributionVO;
import com.hungraim.ltc.pojo.vo.disable.ChDisableApplyVo; import com.hungraim.ltc.pojo.vo.disable.ChDisableApplyVo;
import com.hungraim.ltc.service.ReTaskService; import com.hungraim.ltc.service.ReTaskService;
...@@ -31,7 +29,7 @@ public class ReTaskServiceImpl extends ServiceImpl<TaskMapper, ChAprTask> implem ...@@ -31,7 +29,7 @@ public class ReTaskServiceImpl extends ServiceImpl<TaskMapper, ChAprTask> implem
private final ChDisableApplyMapper chDisableApplyMapper; private final ChDisableApplyMapper chDisableApplyMapper;
@Override @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) { public Page<ReTaskDistributionVO> reTaskDistributionList(Page<ReTaskDistributionVO> page, Long organId, Boolean isIncluded, String acptProvincial, String acptCity, String acptCrea, String realName, String certiCode) {
Result<List<Long>> organChild = null; Result<List<Long>> organChild = null;
List<Long> organIds = null; List<Long> organIds = null;
if (organId != null) { if (organId != null) {
...@@ -41,7 +39,7 @@ public class ReTaskServiceImpl extends ServiceImpl<TaskMapper, ChAprTask> implem ...@@ -41,7 +39,7 @@ public class ReTaskServiceImpl extends ServiceImpl<TaskMapper, ChAprTask> implem
organChild = organFeignService.getOrganChild(organId, isIncluded); organChild = organFeignService.getOrganChild(organId, isIncluded);
organIds = organChild.getData(); organIds = organChild.getData();
} }
return taskMapper.reTaskDistributionList(page, organIds, acptProvincial, acptCity, acptCrea, realName, certiCode, dataFrom, srvOrganId, applyMethod); return taskMapper.reTaskDistributionList(page, organIds, acptProvincial, acptCity, acptCrea, realName, certiCode);
} }
@Override @Override
......
...@@ -341,65 +341,41 @@ ...@@ -341,65 +341,41 @@
task.apply_id applyId, task.apply_id applyId,
fndOrgan.ORGAN_NAME organName, fndOrgan.ORGAN_NAME organName,
fndOrgan.ORGAN_ID organId, fndOrgan.ORGAN_ID organId,
(select DISTRICT_NAME from CH_FND_DISTRICT dis where task.DISTRICT_PROVINCIAL = dis.DISTRICT_CODE) acptProvincial, apply.DISTRICT_PROVINCIAL districtProvincial,
(select DISTRICT_NAME from CH_FND_DISTRICT dis where task.DISTRICT_CITY = dis.DISTRICT_CODE) acptCity, apply.DISTRICT_CITY districtCity,
(select DISTRICT_NAME from CH_FND_DISTRICT dis where task.DISTRICT_AREA = dis.DISTRICT_CODE) acptCrea, apply.DISTRICT_AREA districtArea,
disable.real_name realName, apply.real_name realName,
disable.gender gender, apply.gender gender,
disable.BIRTHDAY birthday, apply.BIRTHDAY birthday,
disable.certi_code certiCode, apply.certi_code certiCode,
disable.tel tel, apply.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 from CH_APR_TASK task
--适用机构 --适用机构
left join CH_FND_ORGAN fndOrgan on task.ORGAN_ID = fndOrgan.ORGAN_ID 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_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> <where>
and task.task_status = 3 and task.task_status = 3
<if test="organIds != null"> <if test="organIds != null">
and task.apr_organ_id in and task.organ_id in
<foreach collection="organIds" item="organId" open="(" close=")" separator=","> <foreach collection="organIds" item="organId" open="(" close=")" separator=",">
#{organId} #{organId}
</foreach> </foreach>
</if> </if>
<if test="acptProvincial != null and acptProvincial != ''"> <if test="districtProvincial != null and districtProvincial != ''">
and disable.ACPT_PROVINCIAL = #{acptProvincial} and apply.DISTRICT_PROVINCIAL = #{districtProvincial}
</if> </if>
<if test="acptCity != null and acptCity != ''"> <if test="districtCity != null and districtCity != ''">
and disable.ACPT_CITY = #{acptCity} and apply.DISTRICT_CITY = #{districtCity}
</if> </if>
<if test="acptCrea != null and acptCrea != ''"> <if test="districtArea != null and districtArea != ''">
and disable.ACPT_AREA = #{acptCrea} and apply.DISTRICT_AREA = #{districtArea}
</if> </if>
<if test="realName != null and realName != ''"> <if test="realName != null and realName != ''">
and disable.real_name like CONCAT(CONCAT('%',#{realName}) ,'%') and apply.real_name like CONCAT(CONCAT('%',#{realName}) ,'%')
</if> </if>
<if test="certiCode != null and certiCode != ''"> <if test="certiCode != null and certiCode != ''">
and disable.certi_code = #{certiCode} and apply.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> </if>
</where> </where>
</select> </select>
......
...@@ -16,9 +16,9 @@ public class ReTaskDistributionVO { ...@@ -16,9 +16,9 @@ public class ReTaskDistributionVO {
//机构代码 //机构代码
private String organId; private String organId;
//机构所在省市区 //机构所在省市区
private String acptProvincial; private String districtProvincial;
private String acptCity; private String districtCity;
private String acptCrea; private String districtArea;
//失能人员姓名 //失能人员姓名
private String realName; private String realName;
//失能人员性别 //失能人员性别
......
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