Commit a8fb741e authored by “xuhd”'s avatar “xuhd”

问题96、疾病诊断新增维护

parent c5e36455
...@@ -4,6 +4,7 @@ import cn.hutool.core.util.StrUtil; ...@@ -4,6 +4,7 @@ import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.governance.service.NursingServiceItemsService; import com.hungraim.ltc.governance.service.NursingServiceItemsService;
import com.hungraim.ltc.pojo.entity.disable.ChCfgSrvDisableLevel; import com.hungraim.ltc.pojo.entity.disable.ChCfgSrvDisableLevel;
import com.hungraim.ltc.pojo.entity.disable.ChFndDiseaseType;
import com.hungraim.ltc.pojo.entity.disable.ChServiceType; import com.hungraim.ltc.pojo.entity.disable.ChServiceType;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvOrganProject; import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvOrganProject;
import com.hungraim.ltc.pojo.vo.disable.ChServiceTypeVo; import com.hungraim.ltc.pojo.vo.disable.ChServiceTypeVo;
...@@ -163,4 +164,42 @@ public class NursingServiceItemsController { ...@@ -163,4 +164,42 @@ public class NursingServiceItemsController {
return Result.success(list); return Result.success(list);
} }
/**
* 查询疾病类型
*
* @param parDiseTypeId 父疾病类型id 不传值默认查询所有一级疾病类型
*/
@RequestMapping("/fndDiseaseList")
public Result<List<ChFndDiseaseType>> fndDiseaseList(String parDiseTypeId) {
List<ChFndDiseaseType> chFndDiseaseTypes = nursingServiceItemsService.fndDiseaseList(parDiseTypeId);
return Result.success(chFndDiseaseTypes);
}
/**
* 查询所有疾病数据
*/
@RequestMapping("/fndAllDisease")
public Result<List<ChFndDiseaseType>> fndAllDisease() {
List<ChFndDiseaseType> chFndDiseaseTypes = nursingServiceItemsService.fndAllDisease();
return Result.success(chFndDiseaseTypes);
}
/**
* 修改疾病数据
*
* @param chFndDiseaseTypes 疾病修改的信息
* @return 返回执行结果
*/
@DeleteMapping("/saveDisease")
public Result saveDisease(List<ChFndDiseaseType> chFndDiseaseTypes) {
if (chFndDiseaseTypes == null || chFndDiseaseTypes.size() <= 0) {
return Result.failed(ResultCode.REQUEST_PARAM_ERROR);
}
nursingServiceItemsService.saveDisease(chFndDiseaseTypes);
return Result.success();
}
} }
package com.hungraim.ltc.governance.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> {
}
...@@ -2,6 +2,7 @@ package com.hungraim.ltc.governance.service; ...@@ -2,6 +2,7 @@ package com.hungraim.ltc.governance.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.pojo.entity.disable.ChCfgSrvDisableLevel; import com.hungraim.ltc.pojo.entity.disable.ChCfgSrvDisableLevel;
import com.hungraim.ltc.pojo.entity.disable.ChFndDiseaseType;
import com.hungraim.ltc.pojo.entity.disable.ChServiceType; import com.hungraim.ltc.pojo.entity.disable.ChServiceType;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvOrganProject; import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvOrganProject;
import com.hungraim.ltc.pojo.vo.disable.ChServiceTypeVo; import com.hungraim.ltc.pojo.vo.disable.ChServiceTypeVo;
...@@ -42,4 +43,24 @@ public interface NursingServiceItemsService { ...@@ -42,4 +43,24 @@ public interface NursingServiceItemsService {
void deleteSrvModel(Long modeId); void deleteSrvModel(Long modeId);
List<ChServiceTypeVo> queryServiceTypeList(); List<ChServiceTypeVo> queryServiceTypeList();
/**
* 查询疾病类型
*
* @param parDiseTypeId 父疾病类型id
*/
List<ChFndDiseaseType> fndDiseaseList(String parDiseTypeId);
/**
* 查询所有疾病数据
*/
List<ChFndDiseaseType> fndAllDisease();
/**
* 修改疾病数据
*
* @param chFndDiseaseTypes
* @return 返回执行结果
*/
void saveDisease(List<ChFndDiseaseType> chFndDiseaseTypes);
} }
...@@ -2,12 +2,14 @@ package com.hungraim.ltc.governance.service.impl; ...@@ -2,12 +2,14 @@ package com.hungraim.ltc.governance.service.impl;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.api.SrvModeFeignService; import com.hungraim.ltc.api.SrvModeFeignService;
import com.hungraim.ltc.governance.dao.*; import com.hungraim.ltc.governance.dao.*;
import com.hungraim.ltc.governance.service.NursingServiceItemsService; import com.hungraim.ltc.governance.service.NursingServiceItemsService;
import com.hungraim.ltc.pojo.entity.SysConfig.ChCfgSrvMode; import com.hungraim.ltc.pojo.entity.SysConfig.ChCfgSrvMode;
import com.hungraim.ltc.pojo.entity.disable.ChCfgSrvDisableLevel; import com.hungraim.ltc.pojo.entity.disable.ChCfgSrvDisableLevel;
import com.hungraim.ltc.pojo.entity.disable.ChFndDiseaseType;
import com.hungraim.ltc.pojo.entity.disable.ChServiceType; import com.hungraim.ltc.pojo.entity.disable.ChServiceType;
import com.hungraim.ltc.pojo.entity.disable.ChServiceTypeDetailed; import com.hungraim.ltc.pojo.entity.disable.ChServiceTypeDetailed;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvOrganProject; import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvOrganProject;
...@@ -18,6 +20,7 @@ import com.hungraim.ltc.util.Result; ...@@ -18,6 +20,7 @@ import com.hungraim.ltc.util.Result;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
...@@ -34,6 +37,7 @@ public class NursingServiceItemsServiceImpl implements NursingServiceItemsServic ...@@ -34,6 +37,7 @@ public class NursingServiceItemsServiceImpl implements NursingServiceItemsServic
private final SrvModeFeignService srvModeFeignService; private final SrvModeFeignService srvModeFeignService;
private final ServiceTypeMapper serviceTypeMapper; private final ServiceTypeMapper serviceTypeMapper;
private final ServiceTypeDetailedMapper serviceTypeDetailedMapper; private final ServiceTypeDetailedMapper serviceTypeDetailedMapper;
private final FndDiseaseTypeMapper fndDiseaseTypeMapper;
@Override @Override
public Page<OrganProjectVO> organProjectList(Page<OrganProjectVO> page, String organIds, String name, String status) { public Page<OrganProjectVO> organProjectList(Page<OrganProjectVO> page, String organIds, String name, String status) {
...@@ -130,4 +134,38 @@ public class NursingServiceItemsServiceImpl implements NursingServiceItemsServic ...@@ -130,4 +134,38 @@ public class NursingServiceItemsServiceImpl implements NursingServiceItemsServic
} }
return chServiceTypeVoList; return chServiceTypeVoList;
} }
@Override
public List<ChFndDiseaseType> fndAllDisease() {
QueryWrapper<ChFndDiseaseType> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("IS_VALID", "0");
return fndDiseaseTypeMapper.selectList(queryWrapper);
}
@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);
}
@Transactional(rollbackFor = Exception.class)
@Override
public void saveDisease(List<ChFndDiseaseType> chFndDiseaseTypes){
//遍历修改的列表
chFndDiseaseTypes.stream().forEach(e->{
if(e.getDiseTypeId() == null){
fndDiseaseTypeMapper.insert(e);
}else{
fndDiseaseTypeMapper.updateById(e);
}
});
}
} }
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