Commit b77d1343 authored by zhangch's avatar zhangch

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

parent 2dddb458
......@@ -168,9 +168,11 @@ public class DisableServiceImpl implements DisableService {
}
BeanUtil.copyProperties(chDisableApply, chAprTask);
chAprTask.setDisableInfoId(chDisableInfo.getDisabInfoId());//失能人员id
chAprTask.setReAprStatus(0);
chAprTask.setEffTime(new Date());
chAprTask.setFcd(null);
chAprTask.setAprType(0);//申请:0;复评:1
chAprTask.setTaskStatus(0); // 任务状态 0 未分配
aprTaskMapper.insert(chAprTask);
}
}
......
......@@ -41,19 +41,10 @@ public class OrganServiceImpl implements OrganService {
@Override
public List<Long> getOrganIds(Long organId, Boolean isInvolveChild) {
List<Long> organIds = new ArrayList<>();
if (isInvolveChild) {
if (organId != null) {
organIds.add(organId);
if (organId != null) {
organIds.add(organId);
if (isInvolveChild) {
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;
......
......@@ -26,27 +26,24 @@ public class ReTaskController {
private ReTaskService reTaskService;
/**
* 复评申请列表
* 可以进行复评申请的列表
*
* @param organId 适用机构id
* @param isIncluded 是否包含下级机构,值为true,则包含organId的下层机构
* @param acptProvincial 所在省
* @param acptCity 所在市
* @param acptCrea 所在区域
* @param isChildGroup 是否包含下级机构,值为true,则包含organId的下层机构
* @param districtProvincial 所在省
* @param districtCity 所在市
* @param districtArea 所在区域
* @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) {
Long organId, Boolean isChildGroup, String districtProvincial, String districtCity, String districtArea,
String realName, String certiCode) {
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);
}
/**
......
......@@ -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.vo.assessment.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
......@@ -55,5 +56,5 @@ public interface TaskMapper extends BaseMapper<ChAprTask> {
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;
*/
@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);
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;
import cn.hutool.core.bean.BeanUtil;
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.ChDisableApplyMapper;
import com.hungraim.ltc.dao.TaskMapper;
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.disable.ChDisableApplyVo;
import com.hungraim.ltc.service.ReTaskService;
......@@ -31,7 +29,7 @@ public class ReTaskServiceImpl extends ServiceImpl<TaskMapper, ChAprTask> implem
private final ChDisableApplyMapper chDisableApplyMapper;
@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;
List<Long> organIds = null;
if (organId != null) {
......@@ -41,7 +39,7 @@ public class ReTaskServiceImpl extends ServiceImpl<TaskMapper, ChAprTask> implem
organChild = organFeignService.getOrganChild(organId, isIncluded);
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
......
......@@ -341,65 +341,41 @@
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
apply.DISTRICT_PROVINCIAL districtProvincial,
apply.DISTRICT_CITY districtCity,
apply.DISTRICT_AREA districtArea,
apply.real_name realName,
apply.gender gender,
apply.BIRTHDAY birthday,
apply.certi_code certiCode,
apply.tel tel
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
and task.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 test="districtProvincial != null and districtProvincial != ''">
and apply.DISTRICT_PROVINCIAL = #{districtProvincial}
</if>
<if test="acptCity != null and acptCity != ''">
and disable.ACPT_CITY = #{acptCity}
<if test="districtCity != null and districtCity != ''">
and apply.DISTRICT_CITY = #{districtCity}
</if>
<if test="acptCrea != null and acptCrea != ''">
and disable.ACPT_AREA = #{acptCrea}
<if test="districtArea != null and districtArea != ''">
and apply.DISTRICT_AREA = #{districtArea}
</if>
<if test="realName != null and realName != ''">
and disable.real_name like CONCAT(CONCAT('%',#{realName}) ,'%')
and apply.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}
and apply.certi_code = #{certiCode}
</if>
</where>
</select>
......
......@@ -16,9 +16,9 @@ public class ReTaskDistributionVO {
//机构代码
private String organId;
//机构所在省市区
private String acptProvincial;
private String acptCity;
private String acptCrea;
private String districtProvincial;
private String districtCity;
private String districtArea;
//失能人员姓名
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