Commit 5f6aa6cc authored by 蔡镇泽's avatar 蔡镇泽

查询疾病类型

parent 6907b6ca
...@@ -69,6 +69,17 @@ public class DisableController { ...@@ -69,6 +69,17 @@ public class DisableController {
} }
/** /**
* 查询疾病类型
*
* @param parDiseTypeId 父疾病类型id 不传值默认查询所有一级疾病类型
*/
@RequestMapping("/fndDiseaseList")
public Result<List<ChFndDiseaseType>> fndDiseaseList(String parDiseTypeId) {
List<ChFndDiseaseType> chFndDiseaseTypes = disableService.fndDiseaseList(parDiseTypeId);
return Result.success(chFndDiseaseTypes);
}
/**
* 失能人员信息列表 * 失能人员信息列表
* *
* @param organId 适用机构代码 * @param organId 适用机构代码
......
package com.hungraim.ism.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hungraim.ltc.pojo.entity.disable.ChFndDiseaseType;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
/**
* 疾病类型Mapper
*
* @author czz
*/
@Mapper
@Repository
public interface FndDiseaseTypeMapper extends BaseMapper<ChFndDiseaseType> {
}
...@@ -69,4 +69,11 @@ public interface DisableService { ...@@ -69,4 +69,11 @@ public interface DisableService {
* @param organId 机构id * @param organId 机构id
*/ */
List<ChSrvOrgan> srvOrganList(String organId); List<ChSrvOrgan> srvOrganList(String organId);
/**
* 查询疾病类型
*
* @param parDiseTypeId 父疾病类型id
*/
List<ChFndDiseaseType> fndDiseaseList(String parDiseTypeId);
} }
...@@ -9,6 +9,7 @@ import com.hungraim.ism.pojo.vo.disable.DisableVO; ...@@ -9,6 +9,7 @@ import com.hungraim.ism.pojo.vo.disable.DisableVO;
import com.hungraim.ism.pojo.vo.disable.ExamineRecord; import com.hungraim.ism.pojo.vo.disable.ExamineRecord;
import com.hungraim.ism.service.DisableService; import com.hungraim.ism.service.DisableService;
import com.hungraim.ltc.pojo.entity.disable.*; import com.hungraim.ltc.pojo.entity.disable.*;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -30,6 +31,8 @@ public class DisableServiceImpl implements DisableService { ...@@ -30,6 +31,8 @@ public class DisableServiceImpl implements DisableService {
private FndSrvModeMapper fndSrvModeMapper; private FndSrvModeMapper fndSrvModeMapper;
@Autowired @Autowired
private SrvOrganMapper srvOrganMapper; private SrvOrganMapper srvOrganMapper;
@Autowired
private FndDiseaseTypeMapper fndDiseaseTypeMapper;
/** /**
* 获取机构ids * 获取机构ids
...@@ -144,4 +147,16 @@ public class DisableServiceImpl implements DisableService { ...@@ -144,4 +147,16 @@ public class DisableServiceImpl implements DisableService {
return srvOrganMapper.selectList(new QueryWrapper<ChSrvOrgan>().eq("organ_id", organId)); return srvOrganMapper.selectList(new QueryWrapper<ChSrvOrgan>().eq("organ_id", organId));
} }
@Override
public List<ChFndDiseaseType> fndDiseaseList(String parDiseTypeId) {
QueryWrapper<ChFndDiseaseType> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("IS_VALID", "0");
if (StringUtils.isNotBlank(parDiseTypeId)) {
queryWrapper.eq("PAR_DISE_TYPE_ID", parDiseTypeId);
} else {
queryWrapper.and(wrapper -> wrapper.isNull("PAR_DISE_TYPE_ID").or().eq("PAR_DISE_TYPE_ID", ""));
}
return fndDiseaseTypeMapper.selectList(queryWrapper);
}
} }
\ No newline at end of file
package com.hungraim.ltc.pojo.entity.disable;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
/**
* 疾病类型表
*/
@Data
@TableName("CH_FND_DISEASE_TYPE")
public class ChFndDiseaseType {
private Integer diseTypeId;
private String diseTypeCode;
private Integer parDiseTypeId;
private Integer isValid;
}
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