Merge branch 'master' of codeup.aliyun.com:61c0318acd8b75daa5a125f7/medical/openhis
This commit is contained in:
@@ -0,0 +1,117 @@
|
|||||||
|
/*
|
||||||
|
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||||
|
*/
|
||||||
|
package com.openhis.web.basedatamanage.controller;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.core.common.core.domain.R;
|
||||||
|
import com.core.common.enums.AssignSeqEnum;
|
||||||
|
import com.core.common.utils.AssignSeqUtil;
|
||||||
|
import com.core.common.utils.MessageUtils;
|
||||||
|
import com.openhis.administration.domain.Organization;
|
||||||
|
import com.openhis.administration.service.IOrganizationService;
|
||||||
|
import com.openhis.common.constant.PromptMsgConstant;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 机构管理(科室)controller
|
||||||
|
*
|
||||||
|
* @author
|
||||||
|
* @date 2025-02-21
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/basedatamanage/organization")
|
||||||
|
@Slf4j
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class OrganizationController {
|
||||||
|
|
||||||
|
private final IOrganizationService organizationService;
|
||||||
|
|
||||||
|
@Autowired(required = false)
|
||||||
|
private AssignSeqUtil assignSeqUtil;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加科室信息
|
||||||
|
*
|
||||||
|
* @param organization 科室信息
|
||||||
|
*/
|
||||||
|
@PostMapping("/organization")
|
||||||
|
public R<?> addOrganization(@Validated @RequestBody Organization organization) {
|
||||||
|
|
||||||
|
// 新增organization信息
|
||||||
|
// Organization organization = new Organization();
|
||||||
|
// BeanUtils.copyProperties(organizationdto, organization);
|
||||||
|
|
||||||
|
// 基础采番
|
||||||
|
String code = assignSeqUtil.getSeq(AssignSeqEnum.TEST.getPrefix());
|
||||||
|
organization.setBus_no(code);
|
||||||
|
|
||||||
|
boolean saveOrganizationSuccess = organizationService.save(organization);
|
||||||
|
|
||||||
|
return saveOrganizationSuccess
|
||||||
|
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00001, new Object[] {"科室信息"}))
|
||||||
|
: R.fail(PromptMsgConstant.Common.M00007, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑科室信息
|
||||||
|
*
|
||||||
|
* @param organization 科室信息
|
||||||
|
*/
|
||||||
|
@PutMapping("/organization")
|
||||||
|
public R<?> editOrganization(@Validated @RequestBody Organization organization) {
|
||||||
|
// 更新organization信息
|
||||||
|
// Organization organization = new Organization();
|
||||||
|
// BeanUtils.copyProperties(organizationdto, organization);
|
||||||
|
|
||||||
|
boolean updateSuccess = organizationService.updateById(organization);
|
||||||
|
return updateSuccess
|
||||||
|
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"科室信息"}))
|
||||||
|
: R.fail(PromptMsgConstant.Common.M00007, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除科室信息
|
||||||
|
*
|
||||||
|
* @param orgId 主表id
|
||||||
|
*/
|
||||||
|
@DeleteMapping("/organization")
|
||||||
|
public R<?> deleteSupplyRequest(@RequestParam Long orgId) {
|
||||||
|
|
||||||
|
boolean deleteSuccess = organizationService.removeById(orgId);
|
||||||
|
|
||||||
|
return deleteSuccess
|
||||||
|
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00005, new Object[] {"科室信息"}))
|
||||||
|
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00006, new Object[] {"科室信息删除失败"}));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 科室分页列表
|
||||||
|
*
|
||||||
|
* @param classEnum 机构分类枚举
|
||||||
|
* @param activeFlag 活动标识
|
||||||
|
* @param pageNo 当前页码
|
||||||
|
* @param pageSize 查询条数
|
||||||
|
* @param request 请求数据
|
||||||
|
* @return 科室分页列表
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/organization")
|
||||||
|
public R<?> getOrganizationPage(Integer classEnum, Integer activeFlag,
|
||||||
|
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
|
||||||
|
|
||||||
|
// 查询【科室】分页列表
|
||||||
|
Page<Organization> organizationPage =
|
||||||
|
organizationService.getOrganizationPage(classEnum, activeFlag, pageNo, pageSize);
|
||||||
|
return R.ok(organizationPage);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,17 +1,19 @@
|
|||||||
package com.openhis.web.datadictionary.controller;
|
package com.openhis.web.datadictionary.controller;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
import com.core.common.utils.MessageUtils;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.core.common.core.domain.R;
|
import com.core.common.core.domain.R;
|
||||||
|
import com.core.common.utils.MessageUtils;
|
||||||
import com.openhis.clinical.domain.ConditionDefinition;
|
import com.openhis.clinical.domain.ConditionDefinition;
|
||||||
import com.openhis.clinical.service.IConditionDefinitionService;
|
import com.openhis.clinical.service.IConditionDefinitionService;
|
||||||
import com.openhis.common.constant.PromptMsgConstant;
|
import com.openhis.common.constant.PromptMsgConstant;
|
||||||
|
import com.openhis.common.enums.ConditionDefinitionSource;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -36,7 +38,9 @@ public class DiseaseManageController {
|
|||||||
*/
|
*/
|
||||||
@GetMapping("/information-category")
|
@GetMapping("/information-category")
|
||||||
public R<?> getDiseaseCategory() {
|
public R<?> getDiseaseCategory() {
|
||||||
return null;
|
// 获取疾病目录种类
|
||||||
|
List<ConditionDefinitionSource> statusList = Arrays.asList(ConditionDefinitionSource.values());
|
||||||
|
return R.ok(statusList);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -44,6 +48,7 @@ public class DiseaseManageController {
|
|||||||
*
|
*
|
||||||
* @param searchKey 查询条件
|
* @param searchKey 查询条件
|
||||||
* @param status 查询条件-状态
|
* @param status 查询条件-状态
|
||||||
|
* @param status 查询条件-疾病种类
|
||||||
* @param pageNo 当前页码
|
* @param pageNo 当前页码
|
||||||
* @param pageSize 查询条数
|
* @param pageSize 查询条数
|
||||||
* @return
|
* @return
|
||||||
@@ -52,18 +57,36 @@ public class DiseaseManageController {
|
|||||||
public R<?> getDiseaseList(@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
|
public R<?> getDiseaseList(@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
|
||||||
@RequestParam(value = "status", defaultValue = "-1") Integer status,
|
@RequestParam(value = "status", defaultValue = "-1") Integer status,
|
||||||
@RequestParam(value = "sourceEnum", defaultValue = "-1") Integer sourceEnum,
|
@RequestParam(value = "sourceEnum", defaultValue = "-1") Integer sourceEnum,
|
||||||
@RequestParam(value = "id", defaultValue = "-1") Long id,
|
|
||||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
|
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
|
||||||
|
|
||||||
// 查询【病种目录】分页列表
|
// 查询【病种目录】分页列表
|
||||||
Page<ConditionDefinition> diseasePage =
|
Page<ConditionDefinition> diseasePage =
|
||||||
iConditionDefinitionService.getPage(searchKey, status, sourceEnum, id,pageNo, pageSize);
|
iConditionDefinitionService.getPage(searchKey, status, sourceEnum, pageNo, pageSize);
|
||||||
// 返回【病种目录列表DTO】分页
|
// 返回【病种目录列表DTO】分页
|
||||||
return R.ok(diseasePage);
|
return R.ok(diseasePage);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 病种目录编辑
|
/**
|
||||||
|
* 根据id查询疾病详情
|
||||||
|
*
|
||||||
|
* @param id 疾病ID
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/information-one")
|
||||||
|
public R<?> getDiseaseOne(@RequestParam(value = "id", required = false, defaultValue = "0") Long id) {
|
||||||
|
|
||||||
|
// 根据ID查询【病种目录】
|
||||||
|
ConditionDefinition byId = iConditionDefinitionService.getById(id);
|
||||||
|
return R.ok(byId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 病种目录编辑
|
||||||
|
*
|
||||||
|
* @param conditionDefinitionList 病种目录实体列表
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
@PutMapping("/information")
|
@PutMapping("/information")
|
||||||
public R<?> editDisease(@RequestBody List<ConditionDefinition> conditionDefinitionList) {
|
public R<?> editDisease(@RequestBody List<ConditionDefinition> conditionDefinitionList) {
|
||||||
// 更新病种信息
|
// 更新病种信息
|
||||||
@@ -72,17 +95,27 @@ public class DiseaseManageController {
|
|||||||
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null));
|
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null));
|
||||||
}
|
}
|
||||||
|
|
||||||
// 新增外来病种目录
|
/**
|
||||||
|
* 新增外来病种目录
|
||||||
|
*
|
||||||
|
* @param conditionDefinition 病种目录实体
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
@PostMapping("/information")
|
@PostMapping("/information")
|
||||||
public R<?> addDisease(@RequestBody ConditionDefinition conditionDefinition) {
|
public R<?> addDisease(@RequestBody ConditionDefinition conditionDefinition) {
|
||||||
// 新增外来病种目录
|
// 新增外来病种目录
|
||||||
return iConditionDefinitionService.addDisease(conditionDefinition)
|
return iConditionDefinitionService.addDisease(conditionDefinition)
|
||||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"病种目录"}))
|
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"疾病目录"}))
|
||||||
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00008, null));
|
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00008, null));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 新增医保病种目录
|
/**
|
||||||
|
* 新增医保病种目录
|
||||||
|
*
|
||||||
|
* @param conditionDefinition 病种目录实体
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
@PostMapping("/information-yb")
|
@PostMapping("/information-yb")
|
||||||
void AddYbDisease(@RequestBody ConditionDefinition conditionDefinition) {}
|
void AddYbDisease(@RequestBody ConditionDefinition conditionDefinition) {}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
package com.openhis.administration.service;
|
package com.openhis.administration.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.openhis.administration.domain.Organization;
|
import com.openhis.administration.domain.Organization;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 机构管理Service接口
|
* 机构管理(科室)Service接口
|
||||||
*
|
*
|
||||||
* @author system
|
* @author system
|
||||||
* @date 2025-02-20
|
* @date 2025-02-21
|
||||||
*/
|
*/
|
||||||
public interface IOrganizationService extends IService<Organization> {
|
public interface IOrganizationService extends IService<Organization> {
|
||||||
|
Page<Organization> getOrganizationPage(Integer classEnum,Integer activeFlag, Integer pageNo, Integer pageSize);
|
||||||
}
|
}
|
||||||
@@ -1,19 +1,53 @@
|
|||||||
package com.openhis.administration.service.impl;
|
package com.openhis.administration.service.impl;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
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.openhis.administration.domain.Organization;
|
import com.openhis.administration.domain.Organization;
|
||||||
import com.openhis.administration.mapper.OrganizationMapper;
|
import com.openhis.administration.mapper.OrganizationMapper;
|
||||||
import com.openhis.administration.service.IOrganizationService;
|
import com.openhis.administration.service.IOrganizationService;
|
||||||
|
import com.openhis.common.enums.DelFlag;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 机构管理Service业务层处理
|
* 机构管理(科室)Service业务层处理
|
||||||
*
|
*
|
||||||
* @author system
|
* @author system
|
||||||
* @date 2025-02-20
|
* @date 2025-02-21
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class OrganizationServiceImpl extends ServiceImpl<OrganizationMapper, Organization> implements IOrganizationService {
|
public class OrganizationServiceImpl extends ServiceImpl<OrganizationMapper, Organization>
|
||||||
|
implements IOrganizationService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private OrganizationMapper organizationMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询科室列表
|
||||||
|
*
|
||||||
|
* @param classEnum 机构分类枚举
|
||||||
|
* @param activeFlag 活动标识
|
||||||
|
* @return 科室列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Page<Organization> getOrganizationPage(Integer classEnum,Integer activeFlag, Integer pageNo, Integer pageSize) {
|
||||||
|
|
||||||
|
LambdaQueryWrapper<Organization> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
|
||||||
|
if (classEnum != null) {
|
||||||
|
queryWrapper.eq(Organization::getTypeEnum, classEnum);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (activeFlag != null) {
|
||||||
|
queryWrapper.eq(Organization::getTypeEnum, activeFlag);
|
||||||
|
}
|
||||||
|
|
||||||
|
Page<Organization> organizationPage = organizationMapper.selectPage(new Page<>(pageNo, pageSize), queryWrapper);
|
||||||
|
|
||||||
|
// 返回科室信息列表
|
||||||
|
return organizationPage;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,15 +1,12 @@
|
|||||||
package com.openhis.clinical.domain;
|
package com.openhis.clinical.domain;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
|
||||||
import com.core.common.core.domain.HisBaseEntity;
|
import com.core.common.core.domain.HisBaseEntity;
|
||||||
import com.openhis.common.enums.ConditionDefinitionSource;
|
import com.openhis.common.enums.ConditionDefinitionSource;
|
||||||
import com.openhis.common.enums.PublicationStatus;
|
import com.openhis.common.enums.PublicationStatus;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
@@ -34,7 +31,7 @@ public class ConditionDefinition extends HisBaseEntity {
|
|||||||
private ConditionDefinitionSource sourceEnum;
|
private ConditionDefinitionSource sourceEnum;
|
||||||
|
|
||||||
/** 编码 */
|
/** 编码 */
|
||||||
private String condition_code;
|
private String conditionCode;
|
||||||
|
|
||||||
/** 诊断名称 */
|
/** 诊断名称 */
|
||||||
private String name;
|
private String name;
|
||||||
@@ -63,5 +60,4 @@ public class ConditionDefinition extends HisBaseEntity {
|
|||||||
/** 状态 */
|
/** 状态 */
|
||||||
private PublicationStatus statusEnum;
|
private PublicationStatus statusEnum;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
package com.openhis.clinical.service;
|
package com.openhis.clinical.service;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.openhis.clinical.domain.ConditionDefinition;
|
import com.openhis.clinical.domain.ConditionDefinition;
|
||||||
@@ -13,28 +11,33 @@ import com.openhis.clinical.domain.ConditionDefinition;
|
|||||||
* @date 2025-02-20
|
* @date 2025-02-20
|
||||||
*/
|
*/
|
||||||
public interface IConditionDefinitionService extends IService<ConditionDefinition> {
|
public interface IConditionDefinitionService extends IService<ConditionDefinition> {
|
||||||
/**
|
|
||||||
* 病种分类查询
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
List<ConditionDefinition> getMedicationCategory();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询病种目录分页列表
|
* 查询病种目录分页列表
|
||||||
*
|
*
|
||||||
* @param searchKey 查询条件
|
* @param searchKey 查询条件
|
||||||
* @param status 查询条件-状态
|
* @param status 查询条件-状态
|
||||||
|
* @param sourceEnum 查询条件-疾病种类
|
||||||
* @param pageNo 当前页码
|
* @param pageNo 当前页码
|
||||||
* @param pageSize 查询条数
|
* @param pageSize 查询条数
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Page<ConditionDefinition> getPage(String searchKey, Integer status, Integer source_enum, Long id, Integer pageNo,
|
Page<ConditionDefinition> getPage(String searchKey, Integer status, Integer sourceEnum, Integer pageNo,
|
||||||
Integer pageSize);
|
Integer pageSize);
|
||||||
|
|
||||||
// 新增病种目录
|
/**
|
||||||
|
* 新增病种
|
||||||
|
*
|
||||||
|
* @param conditionDefinition 病种目录实体
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
boolean addDisease(ConditionDefinition conditionDefinition);
|
boolean addDisease(ConditionDefinition conditionDefinition);
|
||||||
|
|
||||||
// 新增医保病种目录
|
/**
|
||||||
|
* 新增医保病种
|
||||||
|
*
|
||||||
|
* @param conditionDefinition 病种目录实体
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
boolean addYbDisease(ConditionDefinition conditionDefinition);
|
boolean addYbDisease(ConditionDefinition conditionDefinition);
|
||||||
}
|
}
|
||||||
@@ -12,7 +12,6 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|||||||
import com.openhis.clinical.domain.ConditionDefinition;
|
import com.openhis.clinical.domain.ConditionDefinition;
|
||||||
import com.openhis.clinical.mapper.ConditionDefinitionMapper;
|
import com.openhis.clinical.mapper.ConditionDefinitionMapper;
|
||||||
import com.openhis.clinical.service.IConditionDefinitionService;
|
import com.openhis.clinical.service.IConditionDefinitionService;
|
||||||
import com.openhis.common.enums.DelFlag;
|
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -31,22 +30,18 @@ public class ConditionDefinitionServiceImpl extends ServiceImpl<ConditionDefinit
|
|||||||
|
|
||||||
private final ConditionDefinitionMapper conditionDefinitionMapper;
|
private final ConditionDefinitionMapper conditionDefinitionMapper;
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<ConditionDefinition> getMedicationCategory() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询病种目录分页列表
|
* 查询病种目录分页列表
|
||||||
*
|
*
|
||||||
* @param searchKey 查询条件
|
* @param searchKey 查询条件
|
||||||
* @param status 查询条件-状态
|
* @param status 查询条件-状态
|
||||||
|
* @param sourceEnum 查询条件-疾病种类
|
||||||
* @param pageNo 当前页码
|
* @param pageNo 当前页码
|
||||||
* @param pageSize 查询条数
|
* @param pageSize 查询条数
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Page<ConditionDefinition> getPage(String searchKey, Integer status, Integer sourceEnum, Long id, Integer pageNo,
|
public Page<ConditionDefinition> getPage(String searchKey, Integer status, Integer sourceEnum, Integer pageNo,
|
||||||
Integer pageSize) {
|
Integer pageSize) {
|
||||||
Page<ConditionDefinition> conditionList;
|
Page<ConditionDefinition> conditionList;
|
||||||
// 生成查询条件
|
// 生成查询条件
|
||||||
@@ -54,7 +49,7 @@ public class ConditionDefinitionServiceImpl extends ServiceImpl<ConditionDefinit
|
|||||||
// 模糊查询项目
|
// 模糊查询项目
|
||||||
if (StringUtils.isNotEmpty(searchKey)) {
|
if (StringUtils.isNotEmpty(searchKey)) {
|
||||||
// 模糊查询项目为【疾病编码】,【疾病名称】,【拼音】,【五笔】
|
// 模糊查询项目为【疾病编码】,【疾病名称】,【拼音】,【五笔】
|
||||||
queryWrapper.and(q -> q.like(ConditionDefinition::getCondition_code, searchKey).or()
|
queryWrapper.and(q -> q.like(ConditionDefinition::getConditionCode, searchKey).or()
|
||||||
.like(ConditionDefinition::getName, searchKey).or().like(ConditionDefinition::getPyStr, searchKey).or()
|
.like(ConditionDefinition::getName, searchKey).or().like(ConditionDefinition::getPyStr, searchKey).or()
|
||||||
.like(ConditionDefinition::getWbStr, searchKey));
|
.like(ConditionDefinition::getWbStr, searchKey));
|
||||||
}
|
}
|
||||||
@@ -66,25 +61,25 @@ public class ConditionDefinitionServiceImpl extends ServiceImpl<ConditionDefinit
|
|||||||
if (sourceEnum != -1) {
|
if (sourceEnum != -1) {
|
||||||
queryWrapper.eq(ConditionDefinition::getSourceEnum, sourceEnum);
|
queryWrapper.eq(ConditionDefinition::getSourceEnum, sourceEnum);
|
||||||
}
|
}
|
||||||
// Id查询
|
|
||||||
if (id != -1) {
|
|
||||||
queryWrapper.eq(ConditionDefinition::getId, id);
|
|
||||||
}
|
|
||||||
// 查询删除状态
|
|
||||||
queryWrapper.eq(ConditionDefinition::getDeleteFlag, DelFlag.NO.getCode());
|
|
||||||
// 查询病种目录列表
|
// 查询病种目录列表
|
||||||
conditionList = conditionDefinitionMapper.selectPage(new Page<>(pageNo, pageSize), queryWrapper);
|
conditionList = conditionDefinitionMapper.selectPage(new Page<>(pageNo, pageSize), queryWrapper);
|
||||||
// 返回病种目录列表
|
// 返回病种目录列表
|
||||||
return conditionList;
|
return conditionList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增病种
|
||||||
|
*
|
||||||
|
* @param conditionDefinition 病种目录实体
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public boolean addDisease(ConditionDefinition conditionDefinition) {
|
public boolean addDisease(ConditionDefinition conditionDefinition) {
|
||||||
// 根据病种编码判断病种是否存在
|
// 根据病种编码判断病种是否存在
|
||||||
List<ConditionDefinition> conditionDefinitions =
|
List<ConditionDefinition> conditionDefinitions =
|
||||||
conditionDefinitionMapper.selectList(new LambdaQueryWrapper<ConditionDefinition>()
|
conditionDefinitionMapper.selectList(new LambdaQueryWrapper<ConditionDefinition>()
|
||||||
.eq(ConditionDefinition::getCondition_code, conditionDefinition.getCondition_code()));
|
.eq(ConditionDefinition::getConditionCode, conditionDefinition.getConditionCode()));
|
||||||
if (conditionDefinitions.size() > 0) {
|
if (conditionDefinitions.size() > 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -96,6 +91,12 @@ public class ConditionDefinitionServiceImpl extends ServiceImpl<ConditionDefinit
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增医保病种
|
||||||
|
*
|
||||||
|
* @param conditionDefinition 病种目录实体
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean addYbDisease(ConditionDefinition conditionDefinition) {
|
public boolean addYbDisease(ConditionDefinition conditionDefinition) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user