Merge branch 'master' of https://codeup.aliyun.com/61c0318acd8b75daa5a125f7/medical/openhis
This commit is contained in:
@@ -0,0 +1,144 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.basedatamanage.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
|
||||
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.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.core.common.utils.MessageUtils;
|
||||
import com.core.common.utils.bean.BeanUtils;
|
||||
import com.openhis.administration.domain.Location;
|
||||
import com.openhis.administration.mapper.LocationMapper;
|
||||
import com.openhis.administration.service.ILocationService;
|
||||
import com.openhis.common.constant.PromptMsgConstant;
|
||||
import com.openhis.common.enums.LocationForm;
|
||||
import com.openhis.common.utils.HisPageUtils;
|
||||
import com.openhis.common.utils.HisQueryUtils;
|
||||
import com.openhis.web.basedatamanage.dto.LocationQueryDto;
|
||||
import com.openhis.web.basedatamanage.dto.LocationQueryParam;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* 位置管理Controller业务层处理
|
||||
*
|
||||
* @author
|
||||
* @date 2025-02-21
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/basedatamanage/cabinet-location")
|
||||
@Slf4j
|
||||
@AllArgsConstructor
|
||||
public class CabinetLocationController {
|
||||
|
||||
private final ILocationService locationService;
|
||||
|
||||
@Autowired
|
||||
private LocationMapper locationMapper;
|
||||
|
||||
/**
|
||||
* 位置分页列表
|
||||
*
|
||||
* @param locationQueryParam 查询字段
|
||||
* @param searchKey 模糊查询关键字
|
||||
* @param pageNo 当前页码
|
||||
* @param pageSize 查询条数
|
||||
* @param request 请求数据
|
||||
* @return 位置分页列表
|
||||
*/
|
||||
@GetMapping(value = "/cabinet-location")
|
||||
public R<?> getLocationPage(LocationQueryParam locationQueryParam,
|
||||
@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
|
||||
|
||||
// 构建查询条件
|
||||
QueryWrapper<Location> queryWrapper = HisQueryUtils.buildQueryWrapper(locationQueryParam, searchKey,
|
||||
new HashSet<>(Arrays.asList("name", "py_str", "wb_str")), request);
|
||||
|
||||
// 设置排序
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
|
||||
// 执行分页查询并转换为 locationQueryDtoPage
|
||||
Page<LocationQueryDto> locationQueryDtoPage =
|
||||
HisPageUtils.selectPage(locationMapper, queryWrapper, pageNo, pageSize, LocationQueryDto.class);
|
||||
|
||||
return R.ok(locationQueryDtoPage,
|
||||
MessageUtils.createMessage(PromptMsgConstant.Common.M00009, new Object[] {"位置信息"}));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加库房位置信息
|
||||
*
|
||||
* @param locationQueryDto 库房位置信息
|
||||
*/
|
||||
@PostMapping("/cabinet-location")
|
||||
public R<?> addLocation(@Validated @RequestBody LocationQueryDto locationQueryDto) {
|
||||
|
||||
// 设置为库房
|
||||
// LocationQueryDto locationQuery = new LocationQueryDto(LocationForm.CABINET);
|
||||
Location location = new Location();
|
||||
locationQueryDto.setFormEnum(LocationForm.CABINET);
|
||||
BeanUtils.copyProperties(locationQueryDto, location);
|
||||
|
||||
boolean saveLocationSuccess = locationService.save(location);
|
||||
|
||||
return saveLocationSuccess
|
||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00001, new Object[] {"位置信息"}))
|
||||
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00003, new Object[] {"位置信息"}));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取库房位置需要编辑的信息
|
||||
*
|
||||
* @param locationId 库房位置信息Id
|
||||
*/
|
||||
@GetMapping("/cabinet-location-getById")
|
||||
public R<?> getLocationById(@Validated @RequestParam Long locationId) {
|
||||
|
||||
Location location = locationService.getById(locationId);
|
||||
return R.ok(location, MessageUtils.createMessage(PromptMsgConstant.Common.M00009, new Object[] {"位置信息"}));
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑库房位置信息
|
||||
*
|
||||
* @param location 库房位置信息
|
||||
*/
|
||||
@PutMapping("/cabinet-location")
|
||||
public R<?> editLocation(@Validated @RequestBody Location location) {
|
||||
|
||||
boolean updateLocationSuccess = locationService.updateById(location);
|
||||
|
||||
return updateLocationSuccess
|
||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"位置信息"}))
|
||||
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, new Object[] {"位置信息"}));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除库房位置信息
|
||||
*
|
||||
* @param locationId 库房位置信息Id
|
||||
*/
|
||||
@DeleteMapping("/cabinet-location")
|
||||
public R<?> deleteLocation(@RequestParam Long locationId) {
|
||||
|
||||
boolean deleteLocationSuccess = locationService.removeById(locationId);
|
||||
|
||||
return deleteLocationSuccess
|
||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00005, new Object[] {"位置信息"}))
|
||||
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00006, new Object[] {"位置信息"}));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3,10 +3,7 @@
|
||||
*/
|
||||
package com.openhis.web.basedatamanage.controller;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
@@ -16,7 +13,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.core.common.utils.AssignSeqUtil;
|
||||
@@ -26,8 +22,6 @@ import com.openhis.administration.mapper.OrganizationMapper;
|
||||
import com.openhis.administration.service.IOrganizationService;
|
||||
import com.openhis.common.constant.PromptMsgConstant;
|
||||
import com.openhis.common.enums.OrganizationType;
|
||||
import com.openhis.common.utils.HisPageUtils;
|
||||
import com.openhis.common.utils.HisQueryUtils;
|
||||
import com.openhis.web.basedatamanage.dto.OrgQueryParam;
|
||||
import com.openhis.web.basedatamanage.dto.OrganizationInitDto;
|
||||
import com.openhis.web.basedatamanage.dto.OrganizationQueryDto;
|
||||
@@ -77,20 +71,27 @@ public class OrganizationController {
|
||||
* @return 机构分页列表
|
||||
*/
|
||||
@GetMapping(value = "/organization")
|
||||
public R<?> getOrganizationPage(@RequestBody OrgQueryParam orgQueryParam,
|
||||
public R<?> getOrganizationPage(OrgQueryParam orgQueryParam,
|
||||
@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
|
||||
|
||||
// 构建查询条件
|
||||
QueryWrapper<Organization> queryWrapper = HisQueryUtils.buildQueryWrapper(orgQueryParam, searchKey,
|
||||
new HashSet<>(Arrays.asList("name", "py_str", "wb_str")), request);
|
||||
|
||||
// 设置排序
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
// 执行分页查询并转换为 orgQueryDtoPage
|
||||
Page<OrganizationQueryDto> orgQueryDtoPage =
|
||||
HisPageUtils.selectPage(organizationMapper, queryWrapper, pageNo, pageSize, OrganizationQueryDto.class);
|
||||
// // 构建查询条件
|
||||
// QueryWrapper<Organization> queryWrapper = HisQueryUtils.buildQueryWrapper(orgQueryParam, searchKey,
|
||||
// new HashSet<>(Arrays.asList("name", "py_str", "wb_str")), request);
|
||||
//
|
||||
// // 设置排序
|
||||
// queryWrapper.orderByDesc("create_time");
|
||||
// // 执行分页查询并转换为 orgQueryDtoPage
|
||||
// Page<OrganizationQueryDto> orgQueryDtoPage =
|
||||
// HisPageUtils.selectPage(organizationMapper, queryWrapper, pageNo, pageSize, OrganizationQueryDto.class);
|
||||
// 查询机构列表
|
||||
Page<Organization> page = organizationService.page(new Page<>(pageNo, pageSize));
|
||||
List<Organization> organizationList = page.getRecords();
|
||||
// 将机构列表转为树结构
|
||||
List<OrganizationQueryDto> orgTree = buildTree(organizationList);
|
||||
Page<OrganizationQueryDto> orgQueryDtoPage = new Page<>(pageNo, pageSize, page.getTotal());
|
||||
orgQueryDtoPage.setRecords(orgTree);
|
||||
|
||||
return R.ok(orgQueryDtoPage,
|
||||
MessageUtils.createMessage(PromptMsgConstant.Common.M00009, new Object[] {"机构信息"}));
|
||||
@@ -124,11 +125,11 @@ public class OrganizationController {
|
||||
*
|
||||
* @param orgId 机构信息
|
||||
*/
|
||||
@GetMapping("/organization-editById")
|
||||
@GetMapping("/organization-getById")
|
||||
public R<?> getOrganizationById(@Validated @RequestParam Long orgId) {
|
||||
|
||||
Organization organization = organizationService.getById(orgId);
|
||||
return R.ok(organization, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"机构信息"}));
|
||||
return R.ok(organization, MessageUtils.createMessage(PromptMsgConstant.Common.M00009, new Object[] {"机构信息"}));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -170,18 +171,74 @@ public class OrganizationController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 停用启用
|
||||
* 启用
|
||||
*
|
||||
* @param orgId 主表id
|
||||
* @param orgId 启用数据的Id
|
||||
*/
|
||||
@PutMapping("/organization-flag")
|
||||
public R<?> changeOrgFlag(@RequestParam Long orgId) {
|
||||
@PutMapping("/organization-active")
|
||||
public R<?> changeActive(@RequestParam Long orgId) {
|
||||
|
||||
boolean flagChangeSuccess = organizationService.changeOrgFlag(orgId);
|
||||
boolean activeSuccess = organizationService.activeChange(orgId);
|
||||
|
||||
return flagChangeSuccess
|
||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, new Object[] {"机构活动标识"}))
|
||||
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, new Object[] {"机构活动标识"}));
|
||||
return activeSuccess
|
||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, new Object[] {"启用"}))
|
||||
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, new Object[] {"启用"}));
|
||||
}
|
||||
|
||||
/**
|
||||
* 停用
|
||||
*
|
||||
* @param orgId 停用数据的Id
|
||||
*/
|
||||
@PutMapping("/organization-inactive")
|
||||
public R<?> changeInactive(@RequestParam Long orgId) {
|
||||
|
||||
boolean inActiveSuccess = organizationService.activeChange(orgId);
|
||||
|
||||
return inActiveSuccess
|
||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, new Object[] {"停用"}))
|
||||
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, new Object[] {"停用"}));
|
||||
}
|
||||
|
||||
/**
|
||||
* 将机构列表转换为树结构
|
||||
*
|
||||
* @param records 机构列表
|
||||
* @return tree
|
||||
*/
|
||||
private List<OrganizationQueryDto> buildTree(List<Organization> records) {
|
||||
// 按b_no的层级排序,确保父节点先处理
|
||||
List<Organization> sortedRecords = records.stream()
|
||||
.sorted(Comparator.comparingInt(r -> r.getBusNo().split("\\.").length)).collect(Collectors.toList());
|
||||
|
||||
Map<String, OrganizationQueryDto> nodeMap = new HashMap<>();
|
||||
List<OrganizationQueryDto> tree = new ArrayList<>();
|
||||
|
||||
for (Organization record : sortedRecords) {
|
||||
String bNo = record.getBusNo();
|
||||
String[] parts = bNo.split("\\.");
|
||||
OrganizationQueryDto node = new OrganizationQueryDto();
|
||||
BeanUtils.copyProperties(record, node);
|
||||
// 将当前节点加入映射
|
||||
nodeMap.put(bNo, node);
|
||||
|
||||
if (parts.length == 1) {
|
||||
// 根节点
|
||||
tree.add(node);
|
||||
} else {
|
||||
// 获取父节点的b_no(去掉最后一部分)
|
||||
String parentBNo = String.join(".", Arrays.copyOf(parts, parts.length - 1));
|
||||
OrganizationQueryDto parent = nodeMap.get(parentBNo);
|
||||
|
||||
if (parent != null) {
|
||||
parent.getChildren().add(node);
|
||||
} else {
|
||||
// 处理父节点不存在的情况(例如数据缺失)
|
||||
// 可根据需求调整为将节点加入根或抛出异常
|
||||
}
|
||||
}
|
||||
}
|
||||
return tree;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,172 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.basedatamanage.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.core.common.utils.MessageUtils;
|
||||
import com.openhis.administration.domain.Location;
|
||||
import com.openhis.administration.domain.OrganizationLocation;
|
||||
import com.openhis.administration.mapper.OrganizationLocationMapper;
|
||||
import com.openhis.administration.service.ILocationService;
|
||||
import com.openhis.administration.service.IOrganizationLocationService;
|
||||
import com.openhis.administration.service.IOrganizationService;
|
||||
import com.openhis.common.constant.PromptMsgConstant;
|
||||
import com.openhis.common.utils.HisPageUtils;
|
||||
import com.openhis.common.utils.HisQueryUtils;
|
||||
import com.openhis.web.basedatamanage.dto.OrgLocInitDto;
|
||||
import com.openhis.web.basedatamanage.dto.OrgLocQueryDto;
|
||||
import com.openhis.web.basedatamanage.dto.OrgLocQueryParam;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* 机构位置关系controller
|
||||
*
|
||||
* @author
|
||||
* @date 2025-02-25
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/basedatamanage/org-loc")
|
||||
@Slf4j
|
||||
@AllArgsConstructor
|
||||
public class OrganizationLocationController {
|
||||
|
||||
@Autowired
|
||||
private final IOrganizationLocationService organizationLocationService;
|
||||
|
||||
@Autowired
|
||||
private IOrganizationService organizationService;
|
||||
|
||||
@Autowired
|
||||
private ILocationService locationService;
|
||||
|
||||
@Autowired
|
||||
private OrganizationLocationMapper organizationLocationMapper;
|
||||
|
||||
/**
|
||||
* 机构位置关系初始化
|
||||
*
|
||||
*/
|
||||
@GetMapping(value = "/init")
|
||||
public R<?> init() {
|
||||
|
||||
OrgLocInitDto initDto = new OrgLocInitDto();
|
||||
// 设置科室列表
|
||||
initDto.setOrganization(organizationService.list())
|
||||
// 设置药库列表
|
||||
.setLocation(locationService.list(new LambdaQueryWrapper<Location>().in(Location::getFormEnum, 11)));
|
||||
return R.ok(initDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 机构位置关系分页列表
|
||||
*
|
||||
* @param orgLocQueryParam 查询字段
|
||||
* @param searchKey 模糊查询关键字
|
||||
* @param pageNo 当前页码
|
||||
* @param pageSize 查询条数
|
||||
* @param request 请求数据
|
||||
* @return 机构位置关系分页列表
|
||||
*/
|
||||
@GetMapping(value = "/org-loc")
|
||||
public R<?> getOrgLocPage(OrgLocQueryParam orgLocQueryParam,
|
||||
@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
|
||||
|
||||
// 构建查询条件
|
||||
QueryWrapper<OrganizationLocation> queryWrapper = HisQueryUtils.buildQueryWrapper(orgLocQueryParam, searchKey,
|
||||
new HashSet<>(Arrays.asList("name", "py_str", "wb_str")), request);
|
||||
|
||||
// 设置排序
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
|
||||
// 执行分页查询并转换为 orgLocQueryDtoPage
|
||||
Page<OrgLocQueryDto> orgLocQueryDtoPage =
|
||||
HisPageUtils.selectPage(organizationLocationMapper, queryWrapper, pageNo, pageSize, OrgLocQueryDto.class);
|
||||
|
||||
return R.ok(orgLocQueryDtoPage,
|
||||
MessageUtils.createMessage(PromptMsgConstant.Common.M00009, new Object[] {"机构信息"}));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加机构位置关系信息
|
||||
*
|
||||
* @param orgLocQueryDto 机构位置关系信息
|
||||
*/
|
||||
@PostMapping("/org-loc")
|
||||
public R<?> addOrgLoc(@Validated @RequestBody OrgLocQueryDto orgLocQueryDto) {
|
||||
|
||||
// 新增organizationLocation信息
|
||||
OrganizationLocation orgLoc = new OrganizationLocation();
|
||||
BeanUtils.copyProperties(orgLocQueryDto, orgLoc);
|
||||
|
||||
boolean saveOrgLocSuccess = organizationLocationService.save(orgLoc);
|
||||
|
||||
return saveOrgLocSuccess
|
||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00001, new Object[] {"机构位置关系信息"}))
|
||||
: R.fail(PromptMsgConstant.Common.M00007, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取机构位置关系需要编辑的信息
|
||||
*
|
||||
* @param orgLocId 机构位置关系信息
|
||||
*/
|
||||
@GetMapping("/org-loc-getById")
|
||||
public R<?> getOrgLocById(@Validated @RequestParam Long orgLocId) {
|
||||
|
||||
OrganizationLocation orgLoc = organizationLocationService.getById(orgLocId);
|
||||
return R.ok(orgLoc, MessageUtils.createMessage(PromptMsgConstant.Common.M00009, new Object[] {"机构位置关系信息"}));
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑机构位置关系信息
|
||||
*
|
||||
* @param orgLocQueryDto 机构位置关系信息
|
||||
*/
|
||||
@PutMapping("/org-loc")
|
||||
public R<?> editOrgLoc(@Validated @RequestBody OrgLocQueryDto orgLocQueryDto) {
|
||||
|
||||
// 编辑organizationLocation信息
|
||||
OrganizationLocation orgLoc = new OrganizationLocation();
|
||||
BeanUtils.copyProperties(orgLocQueryDto, orgLoc);
|
||||
|
||||
boolean editOrgLocSuccess = organizationLocationService.updateById(orgLoc);
|
||||
return editOrgLocSuccess
|
||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"机构位置关系信息"}))
|
||||
: R.fail(PromptMsgConstant.Common.M00007, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除机构位置关系信息
|
||||
*
|
||||
* @param orgLocId 主表id
|
||||
*/
|
||||
@DeleteMapping("/org-loc")
|
||||
public R<?> delOrgLoc(@RequestParam Long orgLocId) {
|
||||
|
||||
boolean delOrgLocSuccess = organizationLocationService.removeById(orgLocId);
|
||||
|
||||
return delOrgLocSuccess
|
||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00005, new Object[] {"机构位置关系信息"}))
|
||||
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00006, new Object[] {"机构位置关系信息"}));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,146 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.basedatamanage.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.openhis.administration.domain.Organization;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.core.common.utils.MessageUtils;
|
||||
import com.openhis.administration.domain.PractitionerRole;
|
||||
import com.openhis.administration.mapper.PractitionerRoleMapper;
|
||||
import com.openhis.administration.service.IPractitionerRoleService;
|
||||
import com.openhis.common.constant.PromptMsgConstant;
|
||||
import com.openhis.common.utils.HisPageUtils;
|
||||
import com.openhis.common.utils.HisQueryUtils;
|
||||
import com.openhis.web.basedatamanage.dto.PractRoleSearchParam;
|
||||
import com.openhis.web.basedatamanage.dto.PractitionerRoleDto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* 岗位管理Controller业务层处理
|
||||
*
|
||||
* @author
|
||||
* @date 2025-02-21
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/basedatamanage/practitioner-role")
|
||||
@Slf4j
|
||||
@AllArgsConstructor
|
||||
public class PractitionerRoleController {
|
||||
|
||||
private final IPractitionerRoleService practitionerRoleService;
|
||||
|
||||
@Autowired
|
||||
private PractitionerRoleMapper practitionerRoleMapper;
|
||||
|
||||
/**
|
||||
* 岗位分页列表
|
||||
*
|
||||
* @param practRoleSearchParam 查询条件
|
||||
* @param pageNo 当前页码
|
||||
* @param pageSize 查询条数
|
||||
* @param request 请求数据
|
||||
* @return 岗位分页列表
|
||||
*/
|
||||
@GetMapping(value = "/practitioner-role")
|
||||
public R<?> getPractitionerRolePage(PractRoleSearchParam practRoleSearchParam,
|
||||
@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
|
||||
|
||||
// 构建查询条件
|
||||
QueryWrapper<PractitionerRole> queryWrapper = HisQueryUtils.buildQueryWrapper(practRoleSearchParam, searchKey,
|
||||
new HashSet<>(Arrays.asList("name")), request);
|
||||
|
||||
// 设置排序
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
|
||||
// 执行分页查询并转换为 practitionerRoleDtoPage
|
||||
Page<PractitionerRoleDto> practitionerRoleDtoPage =
|
||||
HisPageUtils.selectPage(practitionerRoleMapper, queryWrapper, pageNo, pageSize, PractitionerRoleDto.class);
|
||||
|
||||
return R.ok(practitionerRoleDtoPage,
|
||||
MessageUtils.createMessage(PromptMsgConstant.Common.M00009, new Object[] {"机构信息"}));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加岗位信息
|
||||
*
|
||||
* @param practitionerRoleDto 岗位信息
|
||||
*/
|
||||
@PostMapping("/practitioner-role")
|
||||
public R<?> addPractitionerRole(@Validated @RequestBody PractitionerRoleDto practitionerRoleDto) {
|
||||
|
||||
// 新增practitionerRole信息
|
||||
PractitionerRole practitionerRole = new PractitionerRole();
|
||||
BeanUtils.copyProperties(practitionerRoleDto, practitionerRole);
|
||||
|
||||
boolean savePractitionerRoleSuccess = practitionerRoleService.save(practitionerRole);
|
||||
|
||||
return savePractitionerRoleSuccess
|
||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00001, new Object[] {"岗位信息"}))
|
||||
: R.fail(PromptMsgConstant.Common.M00007, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取岗位需要编辑的信息
|
||||
*
|
||||
* @param proleId 岗位信息
|
||||
*/
|
||||
@GetMapping("/practitioner-role-getById")
|
||||
public R<?> getPractitionerRoleById(@Validated @RequestParam Long proleId) {
|
||||
|
||||
PractitionerRole practitionerRole = practitionerRoleService.getById(proleId);
|
||||
return R.ok(practitionerRole, MessageUtils.createMessage(PromptMsgConstant.Common.M00009, new Object[] {"岗位信息"}));
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑岗位信息
|
||||
*
|
||||
* @param practitionerRoleDto 岗位信息
|
||||
*/
|
||||
@PutMapping("/practitioner-role")
|
||||
public R<?> editPractitionerRole(@Validated @RequestBody PractitionerRoleDto practitionerRoleDto) {
|
||||
|
||||
// 编辑practitionerRole信息
|
||||
PractitionerRole practitionerRole = new PractitionerRole();
|
||||
BeanUtils.copyProperties(practitionerRoleDto, practitionerRole);
|
||||
|
||||
boolean editPractitionerRoleSuccess = practitionerRoleService.updateById(practitionerRole);
|
||||
|
||||
return editPractitionerRoleSuccess
|
||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"岗位信息"}))
|
||||
: R.fail(PromptMsgConstant.Common.M00007, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除岗位信息
|
||||
*
|
||||
* @param prId 主表id
|
||||
*/
|
||||
@DeleteMapping("/practitioner-role")
|
||||
public R<?> deletePractitionerRole(@RequestParam Long prId) {
|
||||
|
||||
boolean deletePractitionerRoleSuccess = practitionerRoleService.removeById(prId);
|
||||
|
||||
return deletePractitionerRoleSuccess
|
||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00005, new Object[] {"岗位信息"}))
|
||||
: R.fail(PromptMsgConstant.Common.M00006, null);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.basedatamanage.dto;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.openhis.common.enums.LocationBedStatus;
|
||||
import com.openhis.common.enums.LocationForm;
|
||||
import com.openhis.common.enums.LocationMode;
|
||||
import com.openhis.common.enums.LocationStatus;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @author
|
||||
* @date 2025-02-21
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class LocationQueryDto {
|
||||
|
||||
/** ID */
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/** 编码 */
|
||||
private String busNo;
|
||||
|
||||
/** 名称 */
|
||||
private String name;
|
||||
|
||||
/** 状态编码 */
|
||||
private LocationStatus statusEnum;
|
||||
|
||||
/** 操作状态 */
|
||||
private LocationBedStatus operationalEnum;
|
||||
|
||||
/** 模式编码 */
|
||||
private LocationMode modeEnum;
|
||||
|
||||
/** 模式编码 */
|
||||
private String typeCode;
|
||||
|
||||
/** 功能编码 */
|
||||
private String typeJson;
|
||||
|
||||
/** 拼音码 */
|
||||
private String pyStr;
|
||||
|
||||
/** 五笔码 */
|
||||
private String wbStr;
|
||||
|
||||
/** 物理形式枚举 */
|
||||
private LocationForm formEnum;
|
||||
|
||||
/** 机构编码 */
|
||||
private Long organizationId;
|
||||
|
||||
/** 显示顺序 */
|
||||
private Integer displayOrder;
|
||||
|
||||
// public LocationQueryDto(LocationForm form, String busNo, LocationMode mode) {
|
||||
// public LocationQueryDto(LocationForm form) {
|
||||
// this.statusEnum = LocationStatus.ACTIVE;
|
||||
// this.formEnum = form;
|
||||
// this.modeEnum = mode;
|
||||
// }
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.basedatamanage.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.openhis.common.enums.LocationMode;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 科室分页查询条件
|
||||
*
|
||||
* @author
|
||||
* @date 2025-02-21
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class LocationQueryParam implements Serializable {
|
||||
/** 模式编码 */
|
||||
private LocationMode modeEnum;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.basedatamanage.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import com.openhis.administration.domain.Location;
|
||||
import com.openhis.administration.domain.Organization;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 科室位置关系初始化 dto
|
||||
*
|
||||
* @author
|
||||
* @date 2025-02-25
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class OrgLocInitDto implements Serializable {
|
||||
|
||||
/** 机构科室信息 */
|
||||
private List<Organization> organization;
|
||||
|
||||
/** 位置药房信息 */
|
||||
private List<Location> location;
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.basedatamanage.dto;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @author
|
||||
* @date 2025-02-21
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class OrgLocQueryDto {
|
||||
|
||||
/** ID */
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/** 机构编码 */
|
||||
private Long organizationId;
|
||||
|
||||
/** 位置编码 */
|
||||
private Long locationId;
|
||||
|
||||
/** 默认药房 */
|
||||
private Long defLocationId;
|
||||
|
||||
/** 药品类别 */
|
||||
private String medCategoryCode;
|
||||
|
||||
/** 开始时间 */
|
||||
private Date startTime;
|
||||
|
||||
/** 结束时间 */
|
||||
private Date endTime;
|
||||
|
||||
/** 显示顺序 */
|
||||
private Integer displayOrder;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.basedatamanage.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 科室分页查询条件
|
||||
*
|
||||
* @author
|
||||
* @date 2025-02-21
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class OrgLocQueryParam implements Serializable {
|
||||
|
||||
/** 活动标识 */
|
||||
private Integer activeFlag;
|
||||
|
||||
}
|
||||
@@ -3,7 +3,6 @@
|
||||
*/
|
||||
package com.openhis.web.basedatamanage.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
*/
|
||||
package com.openhis.web.basedatamanage.dto;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.openhis.common.enums.OrganizationClass;
|
||||
@@ -52,4 +55,7 @@ public class OrganizationQueryDto {
|
||||
|
||||
/** 显示顺序 */
|
||||
private Integer displayOrder;
|
||||
|
||||
/** 子集合 */
|
||||
private List<OrganizationQueryDto> children = new ArrayList<>();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.basedatamanage.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 岗位分页查询条件
|
||||
*
|
||||
* @author
|
||||
* @date 2025-02-21
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class PractRoleSearchParam implements Serializable {
|
||||
|
||||
/** 名称 */
|
||||
private String name;
|
||||
|
||||
/** 专业编码枚举 */
|
||||
private Integer specialtyEnum;
|
||||
|
||||
/** 机构 */
|
||||
private Long orgId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.basedatamanage.dto;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @author
|
||||
* @date 2025-02-21
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class PractitionerRoleDto {
|
||||
|
||||
/** ID */
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/** 名称 */
|
||||
private String name;
|
||||
|
||||
/** 角色编码 */
|
||||
private String role_code;
|
||||
|
||||
/** 活动标识 */
|
||||
private Integer activeFlag;
|
||||
|
||||
/** 参与者Id */
|
||||
private Long practitionerId;
|
||||
|
||||
/** 机构 */
|
||||
private Long orgId;
|
||||
|
||||
/** 位置ID */
|
||||
private Long locationId;
|
||||
|
||||
/** 服务id */
|
||||
private Long healthcareServiceId;
|
||||
|
||||
/** 专业编码枚举 */
|
||||
private Integer specialtyEnum;
|
||||
|
||||
/** 岗位类型 */
|
||||
private String typeCode;
|
||||
|
||||
/** 有效时间 */
|
||||
private String availabilityJson;
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.basicservice.controller;
|
||||
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.administration.domain.ChargeItemDefinition;
|
||||
import com.openhis.administration.domain.HealthcareService;
|
||||
import com.openhis.administration.mapper.LocationMapper;
|
||||
import com.openhis.administration.service.IChargeItemDefinitionService;
|
||||
import com.openhis.administration.service.IHealthcareServiceService;
|
||||
import com.openhis.common.enums.AccountStatus;
|
||||
import com.openhis.common.enums.WhetherContainUnknown;
|
||||
import com.openhis.web.basicservice.dto.HealthcareServiceAddOrUpdateParam;
|
||||
import com.openhis.web.basicservice.dto.HealthcareServiceInitDto;
|
||||
import com.openhis.web.basicservice.mapper.HealthcareServiceBizMapper;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
* 服务管理 controller
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/basic-service/healthcare")
|
||||
@Slf4j
|
||||
@AllArgsConstructor
|
||||
public class HealthcareServiceController {
|
||||
|
||||
private final IHealthcareServiceService iHealthcareServiceService;
|
||||
private final IChargeItemDefinitionService iChargeItemDefinitionService;
|
||||
|
||||
|
||||
private final HealthcareServiceBizMapper healthcareServiceBizMapper;
|
||||
private final LocationMapper locationMapper;
|
||||
|
||||
/**
|
||||
* 服务管理基础数据初始化
|
||||
*/
|
||||
@GetMapping(value = "/init")
|
||||
public R<?> init(@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
@RequestParam(value = "searchKey", defaultValue = "") String searchKey) {
|
||||
HealthcareServiceInitDto healthcareServiceInitDto = new HealthcareServiceInitDto();
|
||||
// 活动标记
|
||||
List<HealthcareServiceInitDto.activeFlagOption> activeFlagOptions = Stream.of(AccountStatus.values())
|
||||
.map(status -> new HealthcareServiceInitDto.activeFlagOption(status.getValue(), status.getInfo()))
|
||||
.collect(Collectors.toList());
|
||||
healthcareServiceInitDto.setActiveFlagOptions(activeFlagOptions);
|
||||
/* // 构建查询条件
|
||||
QueryWrapper<Location> queryWrapper = HisQueryUtils.buildQueryWrapper(null, searchKey,
|
||||
new HashSet<>(Arrays.asList("name")), null);
|
||||
Page<Location> LocationPage = HisPageUtils.selectPage(
|
||||
locationMapper, queryWrapper, pageNo, pageSize, Location.class);
|
||||
List<Location> LocationList = LocationPage.getRecords();
|
||||
// 位置信息
|
||||
List<HealthcareServiceInitDto.locationIdOption> locationIdOptions = LocationList.stream()
|
||||
.map(location -> new HealthcareServiceInitDto.locationIdOption(location.getId(), location.getName()))
|
||||
.collect(Collectors.toList());
|
||||
healthcareServiceInitDto.setLocationIdOptions(locationIdOptions);*/
|
||||
// 是否需要预约
|
||||
List<HealthcareServiceInitDto.appointmentRequiredFlagOption> appointmentRequiredFlagOptions = Stream.of(WhetherContainUnknown.values())
|
||||
.map(wh -> new HealthcareServiceInitDto.appointmentRequiredFlagOption(wh.getValue(), wh.getInfo()))
|
||||
.collect(Collectors.toList());
|
||||
healthcareServiceInitDto.setAppointmentRequiredFlagOptions(appointmentRequiredFlagOptions);
|
||||
return R.ok(healthcareServiceInitDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 服务管理 新增
|
||||
*/
|
||||
@PostMapping(value = "/healthcare-service")
|
||||
public R<?> add(@Validated @RequestBody HealthcareServiceAddOrUpdateParam healthcareServiceAddOrUpdateParam){
|
||||
// 服务管理-表单数据
|
||||
HealthcareService healthcareServiceFormData = healthcareServiceAddOrUpdateParam.getHealthcareServiceFormData();
|
||||
// 费用定价-表单数据
|
||||
ChargeItemDefinition chargeItemDefinitionFormData = healthcareServiceAddOrUpdateParam.getChargeItemDefinitionFormData();
|
||||
// 服务管理-新增
|
||||
HealthcareService healthcareService = iHealthcareServiceService.addHealthcareService(healthcareServiceFormData);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.openhis.web.basicservice.dto;
|
||||
|
||||
import com.openhis.administration.domain.ChargeItemDefinition;
|
||||
import com.openhis.administration.domain.HealthcareService;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 服务项目管理 新增修改参数类
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Data
|
||||
public class HealthcareServiceAddOrUpdateParam{
|
||||
/**
|
||||
* 服务管理
|
||||
*/
|
||||
private HealthcareService healthcareServiceFormData;
|
||||
|
||||
/**
|
||||
* 费用定价
|
||||
*/
|
||||
private ChargeItemDefinition chargeItemDefinitionFormData;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.openhis.web.basicservice.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 服务管理 基础数据
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class HealthcareServiceInitDto {
|
||||
|
||||
|
||||
private List<activeFlagOption> activeFlagOptions;
|
||||
//private List<locationIdOption> locationIdOptions;
|
||||
private List<appointmentRequiredFlagOption> appointmentRequiredFlagOptions;
|
||||
|
||||
|
||||
/**
|
||||
* 活动标记
|
||||
*/
|
||||
@Data
|
||||
public static class activeFlagOption {
|
||||
private Integer value;
|
||||
private String label;
|
||||
|
||||
public activeFlagOption(Integer value, String label) {
|
||||
this.value = value;
|
||||
this.label = label;
|
||||
}
|
||||
}
|
||||
|
||||
/* *//**
|
||||
* 位置信息
|
||||
*//*
|
||||
@Data
|
||||
public static class locationIdOption {
|
||||
private Long value;
|
||||
private String label;
|
||||
|
||||
public locationIdOption(Long value, String label) {
|
||||
this.value = value;
|
||||
this.label = label;
|
||||
}
|
||||
}*/
|
||||
|
||||
/**
|
||||
* 是否需要预约
|
||||
*/
|
||||
@Data
|
||||
public static class appointmentRequiredFlagOption {
|
||||
private Integer value;
|
||||
private String label;
|
||||
|
||||
public appointmentRequiredFlagOption(Integer value, String label) {
|
||||
this.value = value;
|
||||
this.label = label;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.openhis.web.basicservice.mapper;
|
||||
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* 服务管理 自定义Mapper
|
||||
*/
|
||||
@Repository
|
||||
public interface HealthcareServiceBizMapper {
|
||||
}
|
||||
@@ -0,0 +1,227 @@
|
||||
package com.openhis.web.datadictionary.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.core.common.utils.MessageUtils;
|
||||
import com.core.common.utils.bean.BeanUtils;
|
||||
import com.openhis.administration.domain.DeviceDefinition;
|
||||
import com.openhis.administration.domain.Organization;
|
||||
import com.openhis.administration.mapper.DeviceDefinitionMapper;
|
||||
import com.openhis.administration.service.IDeviceDefinitionService;
|
||||
import com.openhis.administration.service.IOrganizationService;
|
||||
import com.openhis.common.constant.PromptMsgConstant;
|
||||
import com.openhis.common.enums.DeviceCategory;
|
||||
import com.openhis.common.enums.OrganizationType;
|
||||
import com.openhis.common.enums.PublicationStatus;
|
||||
import com.openhis.common.utils.HisPageUtils;
|
||||
import com.openhis.common.utils.HisQueryUtils;
|
||||
import com.openhis.web.datadictionary.dto.DeviceManageDto;
|
||||
import com.openhis.web.datadictionary.dto.DeviceManageInitDto;
|
||||
import com.openhis.web.datadictionary.dto.DeviceManageSelParam;
|
||||
import com.openhis.web.datadictionary.dto.DeviceManageUpDto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* TODO:器材目录
|
||||
*
|
||||
* @author lpt
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/datadictionary/device")
|
||||
@Slf4j
|
||||
@AllArgsConstructor
|
||||
public class DeviceManageController {
|
||||
private final IDeviceDefinitionService iDeviceDefinitionService;
|
||||
private final DeviceDefinitionMapper DeviceDefinitionMapper;
|
||||
private final IOrganizationService iOrganizationService;
|
||||
|
||||
/**
|
||||
* TODO: 器材目录初期查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/init")
|
||||
public R<?> getDeviceManageInit() {
|
||||
DeviceManageInitDto deviceManageInitDto = new DeviceManageInitDto();
|
||||
// 获取状态
|
||||
List<DeviceManageInitDto.statusEnumOption> statusEnumOptions = Stream.of(PublicationStatus.values())
|
||||
.map(status -> new DeviceManageInitDto.statusEnumOption(status.getValue(), status.getInfo()))
|
||||
.collect(Collectors.toList());
|
||||
deviceManageInitDto.setStatusFlagOptions(statusEnumOptions);
|
||||
// 获取执行科室
|
||||
LambdaQueryWrapper<Organization> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(Organization::getTypeEnum, OrganizationType.HOSPITAL_DEPARTMENT);
|
||||
List<Organization> organizations = iOrganizationService.list(queryWrapper);
|
||||
List<DeviceManageInitDto.exeOrganization> exeOrganizations = organizations.stream()
|
||||
.map(exeOrg -> new DeviceManageInitDto.exeOrganization(exeOrg.getId(), exeOrg.getName()))
|
||||
.collect(Collectors.toList());
|
||||
deviceManageInitDto.setExeOrganizations(exeOrganizations);
|
||||
// 获取分类
|
||||
List<DeviceManageInitDto.deviceCategory> deviceCategories = Stream.of(DeviceCategory.values())
|
||||
.map(category -> new DeviceManageInitDto.deviceCategory(category.getValue(), category.getInfo()))
|
||||
.collect(Collectors.toList());
|
||||
deviceManageInitDto.setDeviceCategories(deviceCategories);
|
||||
return R.ok(deviceManageInitDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询器材目录分页列表
|
||||
*
|
||||
* @param DeviceManageSelParam 查询条件
|
||||
* @param searchKey 查询条件-模糊查询
|
||||
* @param pageNo 当前页码
|
||||
* @param pageSize 查询条数
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/information-page")
|
||||
public R<?> getDevicePage(DeviceManageSelParam DeviceManageSelParam,
|
||||
@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
|
||||
|
||||
// 构建查询条件
|
||||
QueryWrapper<DeviceDefinition> queryWrapper = HisQueryUtils.buildQueryWrapper(DeviceManageSelParam, searchKey,
|
||||
new HashSet<>(Arrays.asList("bus_no", "name", "py_str", "wb_str")), request);
|
||||
// 设置排序
|
||||
queryWrapper.orderByAsc("bus_no");
|
||||
// 分页查询
|
||||
Page<DeviceManageDto> deviceManagePage =
|
||||
HisPageUtils.selectPage(DeviceDefinitionMapper, queryWrapper, pageNo, pageSize, DeviceManageDto.class);
|
||||
// 返回【器材目录列表DTO】分页
|
||||
return R.ok(deviceManagePage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询器材详情
|
||||
*
|
||||
* @param id 器材ID
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/information-one/{id}")
|
||||
public R<?> getDeviceOne(@PathVariable("id") Long id) {
|
||||
|
||||
// 根据ID查询【器材目录】
|
||||
DeviceDefinition byId = iDeviceDefinitionService.getById(id);
|
||||
return R.ok(byId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 器材目录编辑
|
||||
*
|
||||
* @param DeviceManageDto 器材目录列表
|
||||
* @return
|
||||
*/
|
||||
@PutMapping("/information")
|
||||
public R<?> editDevice(@RequestBody DeviceManageUpDto DeviceManageDto) {
|
||||
|
||||
DeviceDefinition DeviceDefinition = new DeviceDefinition();
|
||||
BeanUtils.copyProperties(DeviceManageDto, DeviceDefinition);
|
||||
|
||||
// 更新器材信息
|
||||
return iDeviceDefinitionService.updateById(DeviceDefinition)
|
||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"器材目录"}))
|
||||
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null));
|
||||
}
|
||||
|
||||
/**
|
||||
* 器材目录停用
|
||||
*
|
||||
* @param ids 器材目录ID列表
|
||||
* @return
|
||||
*/
|
||||
@PutMapping("/information-stop")
|
||||
public R<?> editDeviceStop(@RequestBody List<Long> ids) {
|
||||
List<DeviceDefinition> DeviceDefinitionList = new CopyOnWriteArrayList<>();
|
||||
|
||||
// 取得更新值
|
||||
for (Long detail : ids) {
|
||||
DeviceDefinition DeviceDefinition = new DeviceDefinition();
|
||||
DeviceDefinition.setId(detail);
|
||||
DeviceDefinition.setStatusEnum(PublicationStatus.RETIRED);
|
||||
DeviceDefinitionList.add(DeviceDefinition);
|
||||
}
|
||||
// 更新器材信息
|
||||
return iDeviceDefinitionService.updateBatchById(DeviceDefinitionList)
|
||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"器材目录"}))
|
||||
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null));
|
||||
}
|
||||
|
||||
/**
|
||||
* 器材目录启用
|
||||
*
|
||||
* @param ids 器材目录ID列表
|
||||
* @return
|
||||
*/
|
||||
@PutMapping("/information-start")
|
||||
public R<?> editDeviceStart(@RequestBody List<Long> ids) {
|
||||
List<DeviceDefinition> DeviceDefinitionList = new CopyOnWriteArrayList<>();
|
||||
|
||||
// 取得更新值
|
||||
for (Long detail : ids) {
|
||||
DeviceDefinition DeviceDefinition = new DeviceDefinition();
|
||||
DeviceDefinition.setId(detail);
|
||||
DeviceDefinition.setStatusEnum(PublicationStatus.ACTIVE);
|
||||
DeviceDefinitionList.add(DeviceDefinition);
|
||||
}
|
||||
// 更新器材信息
|
||||
return iDeviceDefinitionService.updateBatchById(DeviceDefinitionList)
|
||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"器材目录"}))
|
||||
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增外来器材目录
|
||||
*
|
||||
* @param DeviceManageUpDto 器材目录
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/information")
|
||||
public R<?> addDevice(@Validated @RequestBody DeviceManageUpDto DeviceManageUpDto) {
|
||||
DeviceDefinition DeviceDefinition = new DeviceDefinition();
|
||||
BeanUtils.copyProperties(DeviceManageUpDto, DeviceDefinition);
|
||||
// 新增外来器材目录
|
||||
DeviceDefinition.setStatusEnum(PublicationStatus.DRAFT);
|
||||
return iDeviceDefinitionService.addDevice(DeviceDefinition)
|
||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"器材目录"}))
|
||||
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00008, null));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增医保器材目录
|
||||
*
|
||||
* @param DeviceManageUpDto 器材目录
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/information-yb")
|
||||
public R<?> addYbDevice(@RequestBody DeviceManageUpDto DeviceManageUpDto) {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 器材目录导出
|
||||
*
|
||||
* @param DeviceManageDto 器材目录
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/information-export")
|
||||
public R<?> exportDevice(@RequestBody DeviceManageDto DeviceManageDto) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,261 @@
|
||||
package com.openhis.web.datadictionary.controller;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.core.common.core.domain.entity.SysDictData;
|
||||
import com.core.common.utils.MessageUtils;
|
||||
import com.core.common.utils.bean.BeanUtils;
|
||||
import com.core.system.service.ISysDictTypeService;
|
||||
import com.openhis.administration.domain.Organization;
|
||||
import com.openhis.administration.service.IOrganizationService;
|
||||
import com.openhis.common.constant.PromptMsgConstant;
|
||||
import com.openhis.common.enums.ActivityDefCategory;
|
||||
import com.openhis.common.enums.OrganizationType;
|
||||
import com.openhis.common.enums.PublicationStatus;
|
||||
import com.openhis.common.utils.HisPageUtils;
|
||||
import com.openhis.common.utils.HisQueryUtils;
|
||||
import com.openhis.web.datadictionary.dto.DiagnosisTreatmentDto;
|
||||
import com.openhis.web.datadictionary.dto.DiagnosisTreatmentInitDto;
|
||||
import com.openhis.web.datadictionary.dto.DiagnosisTreatmentSelParam;
|
||||
import com.openhis.web.datadictionary.dto.DiagnosisTreatmentUpDto;
|
||||
import com.openhis.workflow.domain.ActivityDefinition;
|
||||
import com.openhis.workflow.mapper.ActivityDefinitionMapper;
|
||||
import com.openhis.workflow.service.IActivityDefinitionService;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* TODO:诊疗目录
|
||||
*
|
||||
* @author lpt
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/datadictionary/diagnosistreatment")
|
||||
@Slf4j
|
||||
@AllArgsConstructor
|
||||
public class DiagnosisTreatmentController {
|
||||
private final IActivityDefinitionService iActivityDefinitionService;
|
||||
private final ActivityDefinitionMapper activityDefinitionMapper;
|
||||
private final IOrganizationService iOrganizationService;
|
||||
private final ISysDictTypeService iSysDictTypeService;
|
||||
|
||||
/**
|
||||
* 诊疗目录初期查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/init")
|
||||
public R<?> getDiseaseTreatmentInit() {
|
||||
DiagnosisTreatmentInitDto diagnosisTreatmentInitDto = new DiagnosisTreatmentInitDto();
|
||||
// 获取状态
|
||||
List<DiagnosisTreatmentInitDto.statusEnumOption> statusEnumOptions = Stream.of(PublicationStatus.values())
|
||||
.map(status -> new DiagnosisTreatmentInitDto.statusEnumOption(status.getValue(), status.getInfo()))
|
||||
.collect(Collectors.toList());
|
||||
diagnosisTreatmentInitDto.setStatusFlagOptions(statusEnumOptions);
|
||||
// 获取执行科室
|
||||
LambdaQueryWrapper<Organization> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(Organization::getTypeEnum, OrganizationType.HOSPITAL_DEPARTMENT);
|
||||
List<Organization> organizations = iOrganizationService.list(queryWrapper);
|
||||
List<DiagnosisTreatmentInitDto.exeOrganization> exeOrganizations = organizations.stream()
|
||||
.map(exeOrg -> new DiagnosisTreatmentInitDto.exeOrganization(exeOrg.getId(), exeOrg.getName()))
|
||||
.collect(Collectors.toList());
|
||||
diagnosisTreatmentInitDto.setExeOrganizations(exeOrganizations);
|
||||
|
||||
// 获取诊疗分类
|
||||
// 查询医疗服务项类型
|
||||
List<SysDictData> medical_service_items =
|
||||
iSysDictTypeService.selectDictDataByType(ActivityDefCategory.MEDICAL_SERVICE_ITEM.getCode());
|
||||
// 获取医疗服务项List
|
||||
List<DiagnosisTreatmentInitDto.diseaseTreatmentType> diseaseTreatmentCategoryList = medical_service_items
|
||||
.stream().map(status -> new DiagnosisTreatmentInitDto.diseaseTreatmentType(status.getDictValue(),
|
||||
status.getDictLabel()))
|
||||
.collect(Collectors.toList());
|
||||
List<DiagnosisTreatmentInitDto.diseaseTreatmentCategory> diseaseTreatmentCategories = new ArrayList<>();
|
||||
|
||||
DiagnosisTreatmentInitDto.diseaseTreatmentCategory diseaseTreatmentCategory =
|
||||
new DiagnosisTreatmentInitDto.diseaseTreatmentCategory(ActivityDefCategory.MEDICAL_SERVICE_ITEM.getValue(),
|
||||
ActivityDefCategory.MEDICAL_SERVICE_ITEM.getInfo());
|
||||
diseaseTreatmentCategory.setChildren(diseaseTreatmentCategoryList);
|
||||
diseaseTreatmentCategories.add(diseaseTreatmentCategory);
|
||||
diagnosisTreatmentInitDto.setDiseaseTreatmentCategoryList(diseaseTreatmentCategories);
|
||||
|
||||
// 查询手术与治疗类型
|
||||
List<SysDictData> medical_service_items2 =
|
||||
iSysDictTypeService.selectDictDataByType(ActivityDefCategory.TREATMENT_SURGERY.getCode());
|
||||
// 获取手术与治疗List
|
||||
List<DiagnosisTreatmentInitDto.diseaseTreatmentType> diseaseTreatmentCategoryList2 = medical_service_items2
|
||||
.stream().map(status -> new DiagnosisTreatmentInitDto.diseaseTreatmentType(status.getDictValue(),
|
||||
status.getDictLabel()))
|
||||
.collect(Collectors.toList());
|
||||
DiagnosisTreatmentInitDto.diseaseTreatmentCategory diseaseTreatmentCategory2 =
|
||||
new DiagnosisTreatmentInitDto.diseaseTreatmentCategory(ActivityDefCategory.TREATMENT_SURGERY.getValue(),
|
||||
ActivityDefCategory.TREATMENT_SURGERY.getInfo());
|
||||
diseaseTreatmentCategory2.setChildren(diseaseTreatmentCategoryList2);
|
||||
diseaseTreatmentCategories.add(diseaseTreatmentCategory2);
|
||||
|
||||
diagnosisTreatmentInitDto.setDiseaseTreatmentCategoryList(diseaseTreatmentCategories);
|
||||
return R.ok(diagnosisTreatmentInitDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询诊疗目录分页列表
|
||||
*
|
||||
* @param DiagnosisTreatmentSelParam 查询条件
|
||||
* @param searchKey 查询条件-模糊查询
|
||||
* @param pageNo 当前页码
|
||||
* @param pageSize 查询条数
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/information-page")
|
||||
public R<?> getDiseaseTreatmentPage(DiagnosisTreatmentSelParam DiagnosisTreatmentSelParam,
|
||||
@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
|
||||
|
||||
// 构建查询条件
|
||||
QueryWrapper<ActivityDefinition> queryWrapper = HisQueryUtils.buildQueryWrapper(DiagnosisTreatmentSelParam,
|
||||
searchKey, new HashSet<>(Arrays.asList("bus_no", "name", "py_str", "wb_str")), request);
|
||||
// 设置排序
|
||||
queryWrapper.orderByAsc("bus_no");
|
||||
// 分页查询
|
||||
Page<DiagnosisTreatmentDto> diseaseTreatmentPage = HisPageUtils.selectPage(activityDefinitionMapper,
|
||||
queryWrapper, pageNo, pageSize, DiagnosisTreatmentDto.class);
|
||||
// 返回【诊疗目录列表DTO】分页
|
||||
return R.ok(diseaseTreatmentPage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询诊疗详情
|
||||
*
|
||||
* @param id 诊疗ID
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/information-one/{id}")
|
||||
public R<?> getDiseaseTreatmentOne(@PathVariable("id") Long id) {
|
||||
DiagnosisTreatmentDto diagnosisTreatmentDto = new DiagnosisTreatmentDto();
|
||||
// 根据ID查询【诊疗目录】
|
||||
ActivityDefinition activityDefinition = iActivityDefinitionService.getById(id);
|
||||
BeanUtils.copyProperties(activityDefinition, diagnosisTreatmentDto);
|
||||
return R.ok(diagnosisTreatmentDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 诊疗目录编辑
|
||||
*
|
||||
* @param diagnosisTreatmentUpDto 诊疗目录列表
|
||||
* @return
|
||||
*/
|
||||
@PutMapping("/information")
|
||||
public R<?> editDiseaseTreatment(@RequestBody DiagnosisTreatmentUpDto diagnosisTreatmentUpDto) {
|
||||
|
||||
ActivityDefinition ActivityDefinition = new ActivityDefinition();
|
||||
BeanUtils.copyProperties(diagnosisTreatmentUpDto, ActivityDefinition);
|
||||
|
||||
// 更新诊疗信息
|
||||
return iActivityDefinitionService.updateById(ActivityDefinition)
|
||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"诊疗目录"}))
|
||||
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null));
|
||||
}
|
||||
|
||||
/**
|
||||
* 诊疗目录停用
|
||||
*
|
||||
* @param ids 诊疗目录ID列表
|
||||
* @return
|
||||
*/
|
||||
@PutMapping("/information-stop")
|
||||
public R<?> editDiseaseTreatmentStop(@RequestBody List<Long> ids) {
|
||||
List<ActivityDefinition> ActivityDefinitionList = new CopyOnWriteArrayList<>();
|
||||
|
||||
// 取得更新值
|
||||
for (Long detail : ids) {
|
||||
ActivityDefinition ActivityDefinition = new ActivityDefinition();
|
||||
ActivityDefinition.setId(detail);
|
||||
ActivityDefinition.setStatusEnum(PublicationStatus.RETIRED);
|
||||
ActivityDefinitionList.add(ActivityDefinition);
|
||||
}
|
||||
// 更新诊疗信息
|
||||
return iActivityDefinitionService.updateBatchById(ActivityDefinitionList)
|
||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"诊疗目录"}))
|
||||
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null));
|
||||
}
|
||||
|
||||
/**
|
||||
* 诊疗目录启用
|
||||
*
|
||||
* @param ids 诊疗目录ID列表
|
||||
* @return
|
||||
*/
|
||||
@PutMapping("/information-start")
|
||||
public R<?> editDiseaseTreatmentStart(@RequestBody List<Long> ids) {
|
||||
List<ActivityDefinition> ActivityDefinitionList = new CopyOnWriteArrayList<>();
|
||||
|
||||
// 取得更新值
|
||||
for (Long detail : ids) {
|
||||
ActivityDefinition ActivityDefinition = new ActivityDefinition();
|
||||
ActivityDefinition.setId(detail);
|
||||
ActivityDefinition.setStatusEnum(PublicationStatus.ACTIVE);
|
||||
ActivityDefinitionList.add(ActivityDefinition);
|
||||
}
|
||||
// 更新诊疗信息
|
||||
return iActivityDefinitionService.updateBatchById(ActivityDefinitionList)
|
||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"诊疗目录"}))
|
||||
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, null));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增外来诊疗目录
|
||||
*
|
||||
* @param diagnosisTreatmentUpDto 诊疗目录
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/information")
|
||||
public R<?> addDiseaseTreatment(@Validated @RequestBody DiagnosisTreatmentUpDto diagnosisTreatmentUpDto) {
|
||||
ActivityDefinition ActivityDefinition = new ActivityDefinition();
|
||||
BeanUtils.copyProperties(diagnosisTreatmentUpDto, ActivityDefinition);
|
||||
// 新增外来诊疗目录
|
||||
ActivityDefinition.setStatusEnum(PublicationStatus.DRAFT);
|
||||
return iActivityDefinitionService.addDiagnosisTreatment(ActivityDefinition)
|
||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"诊疗目录"}))
|
||||
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00008, null));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增医保诊疗目录
|
||||
*
|
||||
* @param diagnosisTreatmentUpDto 诊疗目录
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/information-yb")
|
||||
public R<?> addYbDiseaseTreatment(@RequestBody DiagnosisTreatmentUpDto diagnosisTreatmentUpDto) {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 诊疗目录导出
|
||||
*
|
||||
* @param diagnosisTreatmentDto 诊疗目录
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/information-export")
|
||||
public R<?> exportDiseaseTreatment(@RequestBody DiagnosisTreatmentDto diagnosisTreatmentDto) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,11 @@
|
||||
package com.openhis.web.datadictionary.controller;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
@@ -25,9 +26,9 @@ import com.openhis.common.enums.PublicationStatus;
|
||||
import com.openhis.common.utils.HisPageUtils;
|
||||
import com.openhis.common.utils.HisQueryUtils;
|
||||
import com.openhis.web.datadictionary.dto.DiseaseManageDto;
|
||||
import com.openhis.web.datadictionary.dto.DiseaseManageInitDto;
|
||||
import com.openhis.web.datadictionary.dto.DiseaseManageSelParam;
|
||||
import com.openhis.web.datadictionary.dto.DiseaseManageUpDto;
|
||||
import com.openhis.web.datadictionary.dto.DiseaseSourceDto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -47,24 +48,24 @@ public class DiseaseManageController {
|
||||
private final ConditionDefinitionMapper conditionDefinitionMapper;
|
||||
|
||||
/**
|
||||
* 病种目录分类查询
|
||||
*
|
||||
* 病种目录初始化
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/information-category")
|
||||
public R<?> getDiseaseCategory() {
|
||||
@GetMapping("/information-init")
|
||||
public R<?> getDiseaseInit() {
|
||||
DiseaseManageInitDto diseaseManageInitDto = new DiseaseManageInitDto();
|
||||
// 获取疾病目录种类
|
||||
List<ConditionDefinitionSource> statusList = Arrays.asList(ConditionDefinitionSource.values());
|
||||
List<DiseaseSourceDto> diseaseSourceDtos = new ArrayList<>();
|
||||
// 取得更新值
|
||||
for (ConditionDefinitionSource detail : statusList) {
|
||||
DiseaseSourceDto diseaseSourceDto = new DiseaseSourceDto();
|
||||
diseaseSourceDto.setCode(detail.getCode());
|
||||
diseaseSourceDto.setValue(detail.getValue());
|
||||
diseaseSourceDto.setInfo(detail.getInfo());
|
||||
diseaseSourceDtos.add(diseaseSourceDto);
|
||||
}
|
||||
return R.ok(diseaseSourceDtos);
|
||||
List<DiseaseManageInitDto.diseaseCategory> diseaseCategoryList = Stream.of(ConditionDefinitionSource.values())
|
||||
.map(status -> new DiseaseManageInitDto.diseaseCategory(status.getValue(), status.getInfo()))
|
||||
.collect(Collectors.toList());
|
||||
diseaseManageInitDto.setDiseaseCategoryList(diseaseCategoryList);
|
||||
// 获取状态
|
||||
List<DiseaseManageInitDto.statusEnumOption> statusEnumOptions = Stream.of(PublicationStatus.values())
|
||||
.map(status -> new DiseaseManageInitDto.statusEnumOption(status.getValue(), status.getInfo()))
|
||||
.collect(Collectors.toList());
|
||||
diseaseManageInitDto.setStatusFlagOptions(statusEnumOptions);
|
||||
return R.ok(diseaseManageInitDto);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -102,10 +103,11 @@ public class DiseaseManageController {
|
||||
*/
|
||||
@GetMapping("/information-one/{id}")
|
||||
public R<?> getDiseaseOne(@PathVariable("id") Long id) {
|
||||
|
||||
DiseaseManageDto diseaseManageDto = new DiseaseManageDto();
|
||||
// 根据ID查询【病种目录】
|
||||
ConditionDefinition byId = iConditionDefinitionService.getById(id);
|
||||
return R.ok(byId);
|
||||
ConditionDefinition conditionDefinition = iConditionDefinitionService.getById(id);
|
||||
BeanUtils.copyProperties(conditionDefinition, diseaseManageDto);
|
||||
return R.ok(diseaseManageDto);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,10 +3,8 @@
|
||||
*/
|
||||
package com.openhis.web.datadictionary.controller;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
@@ -33,6 +31,7 @@ import com.openhis.administration.domain.ChargeItemDefinition;
|
||||
import com.openhis.administration.service.IChargeItemDefAppService;
|
||||
import com.openhis.administration.service.IChargeItemDefinitionService;
|
||||
import com.openhis.common.constant.PromptMsgConstant;
|
||||
import com.openhis.common.enums.PublicationStatus;
|
||||
import com.openhis.web.datadictionary.dto.ChargeItemDefPageDto;
|
||||
import com.openhis.web.datadictionary.dto.ChargeItemOptionDto;
|
||||
import com.openhis.web.datadictionary.dto.ItemDefSearchParam;
|
||||
@@ -48,7 +47,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
* @date 2025-02-21
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/dict-manager/definition")
|
||||
@RequestMapping("/dict-dictionary/definition")
|
||||
@Slf4j
|
||||
public class ItemDefinitionController {
|
||||
|
||||
@@ -69,59 +68,59 @@ public class ItemDefinitionController {
|
||||
*/
|
||||
@GetMapping(value = "/init")
|
||||
public R<?> getInitDefinitionOptions(ItemDefSearchParam itemDefSearchParam) {
|
||||
/// TODO: 2025/2/26 收费项目下拉框 暂未做成用枚举代替,后续替换
|
||||
List<ChargeItemOptionDto> chargeItemOptions = new ArrayList<>();
|
||||
if (DefinitionTypeEnum.MEDICATION.getCode().equals(itemDefSearchParam.getDefinitionType())) {
|
||||
// 西药
|
||||
chargeItemOptions.add(new ChargeItemOptionDto().setValue(ChargeItemEnum.WEST_MEDICINE.getCode())
|
||||
.setLabel(ChargeItemEnum.WEST_MEDICINE.getInfo()));
|
||||
chargeItemOptions.add(new ChargeItemOptionDto(ChargeItemEnum.WEST_MEDICINE.getCode(),
|
||||
ChargeItemEnum.WEST_MEDICINE.getInfo()));
|
||||
// 中药饮片
|
||||
chargeItemOptions
|
||||
.add(new ChargeItemOptionDto().setValue(ChargeItemEnum.CHINESE_MEDICINE_SLICES_FEE.getCode())
|
||||
.setLabel(ChargeItemEnum.CHINESE_MEDICINE_SLICES_FEE.getInfo()));
|
||||
chargeItemOptions.add(new ChargeItemOptionDto(ChargeItemEnum.CHINESE_MEDICINE_SLICES_FEE.getCode(),
|
||||
ChargeItemEnum.CHINESE_MEDICINE_SLICES_FEE.getInfo()));
|
||||
// 中成药
|
||||
chargeItemOptions.add(new ChargeItemOptionDto().setValue(ChargeItemEnum.CHINESE_MEDICINE_FEE.getCode())
|
||||
.setLabel(ChargeItemEnum.CHINESE_MEDICINE_FEE.getInfo()));
|
||||
chargeItemOptions.add(new ChargeItemOptionDto(ChargeItemEnum.CHINESE_MEDICINE_FEE.getCode(),
|
||||
ChargeItemEnum.CHINESE_MEDICINE_FEE.getInfo()));
|
||||
// 其他
|
||||
chargeItemOptions.add(new ChargeItemOptionDto().setValue(ChargeItemEnum.OTHER_FEE.getCode())
|
||||
.setLabel(ChargeItemEnum.OTHER_FEE.getInfo()));
|
||||
chargeItemOptions
|
||||
.add(new ChargeItemOptionDto(ChargeItemEnum.OTHER_FEE.getCode(), ChargeItemEnum.OTHER_FEE.getInfo()));
|
||||
} else if (DefinitionTypeEnum.DEVICE.getCode().equals(itemDefSearchParam.getDefinitionType())) {
|
||||
// 卫生材料
|
||||
chargeItemOptions.add(new ChargeItemOptionDto().setValue(ChargeItemEnum.SANITARY_MATERIALS_FEE.getCode())
|
||||
.setLabel(ChargeItemEnum.SANITARY_MATERIALS_FEE.getInfo()));
|
||||
chargeItemOptions.add(new ChargeItemOptionDto(ChargeItemEnum.SANITARY_MATERIALS_FEE.getCode(),
|
||||
ChargeItemEnum.SANITARY_MATERIALS_FEE.getInfo()));
|
||||
// 其他
|
||||
chargeItemOptions.add(new ChargeItemOptionDto().setValue(ChargeItemEnum.OTHER_FEE.getCode())
|
||||
.setLabel(ChargeItemEnum.OTHER_FEE.getInfo()));
|
||||
chargeItemOptions
|
||||
.add(new ChargeItemOptionDto(ChargeItemEnum.OTHER_FEE.getCode(), ChargeItemEnum.OTHER_FEE.getInfo()));
|
||||
} else if (DefinitionTypeEnum.ACTIVITY.getCode().equals(itemDefSearchParam.getDefinitionType())) {
|
||||
// 床位
|
||||
chargeItemOptions.add(new ChargeItemOptionDto().setValue(ChargeItemEnum.BED_FEE.getCode())
|
||||
.setLabel(ChargeItemEnum.BED_FEE.getInfo()));
|
||||
chargeItemOptions
|
||||
.add(new ChargeItemOptionDto(ChargeItemEnum.BED_FEE.getCode(), ChargeItemEnum.BED_FEE.getInfo()));
|
||||
// 诊察
|
||||
chargeItemOptions.add(new ChargeItemOptionDto().setValue(ChargeItemEnum.DIAGNOSTIC_FEE.getCode())
|
||||
.setLabel(ChargeItemEnum.DIAGNOSTIC_FEE.getInfo()));
|
||||
chargeItemOptions.add(new ChargeItemOptionDto(ChargeItemEnum.DIAGNOSTIC_FEE.getCode(),
|
||||
ChargeItemEnum.DIAGNOSTIC_FEE.getInfo()));
|
||||
// 检查
|
||||
chargeItemOptions.add(new ChargeItemOptionDto().setValue(ChargeItemEnum.CHECK_FEE.getCode())
|
||||
.setLabel(ChargeItemEnum.CHECK_FEE.getInfo()));
|
||||
chargeItemOptions
|
||||
.add(new ChargeItemOptionDto(ChargeItemEnum.CHECK_FEE.getCode(), ChargeItemEnum.CHECK_FEE.getInfo()));
|
||||
// 化验
|
||||
chargeItemOptions.add(new ChargeItemOptionDto().setValue(ChargeItemEnum.DIAGNOSTIC_TEST_FEE.getCode())
|
||||
.setLabel(ChargeItemEnum.DIAGNOSTIC_TEST_FEE.getInfo()));
|
||||
chargeItemOptions.add(new ChargeItemOptionDto(ChargeItemEnum.DIAGNOSTIC_TEST_FEE.getCode(),
|
||||
ChargeItemEnum.DIAGNOSTIC_TEST_FEE.getInfo()));
|
||||
// 治疗
|
||||
chargeItemOptions.add(new ChargeItemOptionDto().setValue(ChargeItemEnum.MEDICAL_EXPENSE_FEE.getCode())
|
||||
.setLabel(ChargeItemEnum.MEDICAL_EXPENSE_FEE.getInfo()));
|
||||
chargeItemOptions.add(new ChargeItemOptionDto(ChargeItemEnum.MEDICAL_EXPENSE_FEE.getCode(),
|
||||
ChargeItemEnum.MEDICAL_EXPENSE_FEE.getInfo()));
|
||||
// 手术
|
||||
chargeItemOptions.add(new ChargeItemOptionDto().setValue(ChargeItemEnum.OPERATION_FEE.getCode())
|
||||
.setLabel(ChargeItemEnum.OPERATION_FEE.getInfo()));
|
||||
chargeItemOptions.add(new ChargeItemOptionDto(ChargeItemEnum.OPERATION_FEE.getCode(),
|
||||
ChargeItemEnum.OPERATION_FEE.getInfo()));
|
||||
// 护理费
|
||||
chargeItemOptions.add(new ChargeItemOptionDto().setValue(ChargeItemEnum.NURSING_FEE.getCode())
|
||||
.setLabel(ChargeItemEnum.NURSING_FEE.getInfo()));
|
||||
chargeItemOptions.add(
|
||||
new ChargeItemOptionDto(ChargeItemEnum.NURSING_FEE.getCode(), ChargeItemEnum.NURSING_FEE.getInfo()));
|
||||
// 其他
|
||||
chargeItemOptions.add(new ChargeItemOptionDto().setValue(ChargeItemEnum.GENERAL_CONSULTATION_FEE.getCode())
|
||||
.setLabel(ChargeItemEnum.GENERAL_CONSULTATION_FEE.getInfo()));
|
||||
chargeItemOptions.add(new ChargeItemOptionDto(ChargeItemEnum.GENERAL_CONSULTATION_FEE.getCode(),
|
||||
ChargeItemEnum.GENERAL_CONSULTATION_FEE.getInfo()));
|
||||
// 挂号
|
||||
chargeItemOptions.add(new ChargeItemOptionDto().setValue(ChargeItemEnum.REGISTRATION_FEE.getCode())
|
||||
.setLabel(ChargeItemEnum.REGISTRATION_FEE.getInfo()));
|
||||
chargeItemOptions.add(new ChargeItemOptionDto(ChargeItemEnum.REGISTRATION_FEE.getCode(),
|
||||
ChargeItemEnum.REGISTRATION_FEE.getInfo()));
|
||||
// 其他
|
||||
chargeItemOptions.add(new ChargeItemOptionDto().setValue(ChargeItemEnum.OTHER_FEE.getCode())
|
||||
.setLabel(ChargeItemEnum.OTHER_FEE.getInfo()));
|
||||
chargeItemOptions
|
||||
.add(new ChargeItemOptionDto(ChargeItemEnum.OTHER_FEE.getCode(), ChargeItemEnum.OTHER_FEE.getInfo()));
|
||||
}
|
||||
return R.ok(chargeItemOptions);
|
||||
}
|
||||
@@ -157,16 +156,13 @@ public class ItemDefinitionController {
|
||||
// 通过 DefinitionType 区分药品定价/器具定价/活动定价
|
||||
if (DefinitionTypeEnum.MEDICATION.getCode().equals(chargeItemDefPageDto.getDefinitionType())) {
|
||||
queryWrapper.eq(ChargeItemDefPageDto::getInstanceTable, "med_medication_definition");
|
||||
chargeItemDefinitionPage =
|
||||
chargeItemDefSearchMapper.getMedList(new Page<>(pageNo, pageSize), queryWrapper);
|
||||
chargeItemDefinitionPage = chargeItemDefSearchMapper.getMedList(new Page<>(pageNo, pageSize), queryWrapper);
|
||||
} else if (DefinitionTypeEnum.DEVICE.getCode().equals(chargeItemDefPageDto.getDefinitionType())) {
|
||||
queryWrapper.eq(ChargeItemDefPageDto::getInstanceTable, "adm_device_definition");
|
||||
chargeItemDefinitionPage =
|
||||
chargeItemDefSearchMapper.getDevList(new Page<>(pageNo, pageSize), queryWrapper);
|
||||
chargeItemDefinitionPage = chargeItemDefSearchMapper.getDevList(new Page<>(pageNo, pageSize), queryWrapper);
|
||||
} else if (DefinitionTypeEnum.ACTIVITY.getCode().equals(chargeItemDefPageDto.getDefinitionType())) {
|
||||
queryWrapper.eq(ChargeItemDefPageDto::getInstanceTable, "wor_activity_definition");
|
||||
chargeItemDefinitionPage =
|
||||
chargeItemDefSearchMapper.getActList(new Page<>(pageNo, pageSize), queryWrapper);
|
||||
chargeItemDefinitionPage = chargeItemDefSearchMapper.getActList(new Page<>(pageNo, pageSize), queryWrapper);
|
||||
}
|
||||
return R.ok(chargeItemDefinitionPage, MessageUtils.createMessage(PromptMsgConstant.Common.M00009, null));
|
||||
}
|
||||
@@ -196,6 +192,17 @@ public class ItemDefinitionController {
|
||||
: R.fail(PromptMsgConstant.Common.M00007, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改项目定价
|
||||
*
|
||||
* @return 修改结果
|
||||
*/
|
||||
@GetMapping(value = "/status-enum-option")
|
||||
public R<?> getDropdownOption() {
|
||||
return R.ok(Arrays.stream(PublicationStatus.values())
|
||||
.map(status -> new ChargeItemOptionDto(status.getValue(), status.getInfo())).collect(Collectors.toList()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 采番测试(例子,非常规代码,请勿调用)
|
||||
*
|
||||
|
||||
@@ -2,9 +2,14 @@ package com.openhis.web.datadictionary.controller;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.core.common.utils.poi.ExcelUtil;
|
||||
import com.core.system.domain.SysOperLog;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -21,6 +26,7 @@ import com.openhis.medication.domain.MedicationDetail;
|
||||
import com.openhis.medication.service.IMedicationDefinitionService;
|
||||
import com.openhis.medication.service.IMedicationService;
|
||||
import com.openhis.web.datadictionary.dto.MedicationManageDto;
|
||||
import com.openhis.web.datadictionary.dto.MedicationManageInitDto;
|
||||
import com.openhis.web.datadictionary.dto.MedicationManageUpDto;
|
||||
import com.openhis.web.datadictionary.mapper.MedicationManageSearchMapper;
|
||||
|
||||
@@ -44,7 +50,23 @@ public class MedicationManageController {
|
||||
private final MedicationManageSearchMapper medicationManageSearchMapper;
|
||||
|
||||
/**
|
||||
* 查询病种目录分页列表
|
||||
* 药品目录初始化
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/information-init")
|
||||
public R<?> getMedicationInit() {
|
||||
MedicationManageInitDto medicationManageInitDto = new MedicationManageInitDto();
|
||||
// 获取状态
|
||||
List<MedicationManageInitDto.statusEnumOption> statusEnumOptions = Stream.of(PublicationStatus.values())
|
||||
.map(status -> new MedicationManageInitDto.statusEnumOption(status.getValue(), status.getInfo()))
|
||||
.collect(Collectors.toList());
|
||||
medicationManageInitDto.setStatusFlagOptions(statusEnumOptions);
|
||||
return R.ok(medicationManageInitDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询药品目录分页列表
|
||||
*
|
||||
* @param searchKey 查询条件
|
||||
* @param statusEnum 查询条件-状态
|
||||
@@ -189,14 +211,26 @@ public class MedicationManageController {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 药品目录导出
|
||||
*
|
||||
* @param medicationManageDto 药品目录
|
||||
* @param searchKey 查询条件
|
||||
* @param statusEnum 查询条件-状态
|
||||
* @param ybMatchFlag 查询条件-是否对码
|
||||
* @param categoryCode 查询条件-药品分类
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/information-export")
|
||||
public R<?> exportDisease(@RequestBody MedicationManageDto medicationManageDto) {
|
||||
public R<?> exportMedication(@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
|
||||
@RequestParam(value = "ybMatchFlag", defaultValue = "-1") Integer ybMatchFlag,
|
||||
@RequestParam(value = "statusEnum", defaultValue = "-1") Integer statusEnum,
|
||||
@RequestParam(value = "categoryCode", defaultValue = "") String categoryCode, HttpServletResponse response) {
|
||||
// 获取租户ID
|
||||
Integer tenantId = SecurityUtils.getLoginUser().getTenantId();
|
||||
List<MedicationManageDto> list = medicationManageSearchMapper.getList(searchKey,ybMatchFlag,statusEnum,categoryCode,tenantId);
|
||||
ExcelUtil<MedicationManageDto> util = new ExcelUtil<>(MedicationManageDto.class);
|
||||
util.exportExcel(response, list, "药品目录");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ package com.openhis.web.datadictionary.dto;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.openhis.common.enums.PublicationStatus;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@@ -35,7 +36,10 @@ public class ChargeItemDefPageDto {
|
||||
private String totalVolume;
|
||||
|
||||
/** 状态 */
|
||||
private Integer statusEnum;
|
||||
private PublicationStatus statusEnum;
|
||||
|
||||
/** 状态值 */
|
||||
private String statusEnumText;
|
||||
|
||||
/** 单位 */
|
||||
private String unitCode;
|
||||
|
||||
@@ -21,4 +21,9 @@ public class ChargeItemOptionDto {
|
||||
|
||||
/** 标签 */
|
||||
private String label;
|
||||
|
||||
public ChargeItemOptionDto(Integer value, String info) {
|
||||
this.value = value;
|
||||
this.label = info;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
package com.openhis.web.datadictionary.dto;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.openhis.common.enums.DeviceCategory;
|
||||
import com.openhis.common.enums.PublicationStatus;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 器材目录分页检索
|
||||
*
|
||||
* @author lpt
|
||||
* @date 2025-02-25
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class DeviceManageDto {
|
||||
/** ID */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
/** 编码 */
|
||||
private String busNo;
|
||||
|
||||
/** 器材名称 */
|
||||
private String name;
|
||||
|
||||
/** 器材名称拼音 */
|
||||
private String pyStr;
|
||||
|
||||
/** 器材五笔拼音 */
|
||||
private String wbStr;
|
||||
|
||||
/** 器材分类 */
|
||||
private DeviceCategory categoryEnum;
|
||||
|
||||
/** 器材种类 */
|
||||
private String typeCode;
|
||||
|
||||
/** 包装单位 */
|
||||
private String unitCode;
|
||||
|
||||
/** 包装规格 */
|
||||
private String size;
|
||||
|
||||
/** 拆零比 */
|
||||
private BigDecimal partPercent;
|
||||
|
||||
/** 最小使用单位 */
|
||||
private String minUnitCode;
|
||||
|
||||
/** 产品型号 */
|
||||
private String modelNumber;
|
||||
|
||||
/** 高值器材标志 */
|
||||
private Integer hvcmFlag;
|
||||
|
||||
/** 销售单位 */
|
||||
private String salesUnitCode;
|
||||
|
||||
/** 批准文号 */
|
||||
private String approvalNumber;
|
||||
|
||||
/** 医保标记 */
|
||||
private Integer ybFlag;
|
||||
|
||||
/** 医保编码 */
|
||||
private String ybNo;
|
||||
|
||||
/** 医保对码标记 */
|
||||
private Integer ybMatchFlag;
|
||||
|
||||
/** 状态 */
|
||||
private PublicationStatus statusEnum;
|
||||
|
||||
/** 生产厂家 */
|
||||
private Long manufacturerId;
|
||||
|
||||
/** 供应商 */
|
||||
private Long supplyId;
|
||||
|
||||
/** 说明 */
|
||||
private String description;
|
||||
|
||||
/** 适用范围 */
|
||||
private String jurisdiction;
|
||||
|
||||
/** 执行科室 */
|
||||
private Long ruleId;
|
||||
|
||||
/** 器材版本 */
|
||||
private String version;
|
||||
|
||||
/** 主要成分 */
|
||||
private String substanceText;
|
||||
|
||||
/** 过敏标记 */
|
||||
private Integer allergenFlag;
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.openhis.web.datadictionary.dto;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 器材目录初始dto
|
||||
*
|
||||
* @author lpt
|
||||
* @date 2025-02-25
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class DeviceManageInitDto {
|
||||
private List<statusEnumOption> statusFlagOptions;
|
||||
private List<deviceCategory> deviceCategories;
|
||||
private List<exeOrganization> exeOrganizations;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@Data
|
||||
public static class statusEnumOption {
|
||||
private Integer value;
|
||||
private String info;
|
||||
|
||||
public statusEnumOption(Integer value, String info) {
|
||||
this.value = value;
|
||||
this.info = info;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 器材分类
|
||||
*/
|
||||
@Data
|
||||
public static class deviceCategory {
|
||||
private Integer value;
|
||||
private String info;
|
||||
List<deviceCategory> children = new ArrayList<>();
|
||||
|
||||
public deviceCategory(Integer value, String info) {
|
||||
this.value = value;
|
||||
this.info = info;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行机构
|
||||
*/
|
||||
@Data
|
||||
public static class exeOrganization {
|
||||
private Long value;
|
||||
private String label;
|
||||
|
||||
public exeOrganization(Long value, String label) {
|
||||
this.value = value;
|
||||
this.label = label;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.openhis.web.datadictionary.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 器材目录分页检索条件
|
||||
*
|
||||
* @author lpt
|
||||
* @date 2025-02-25
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class DeviceManageSelParam {
|
||||
|
||||
/** 器材分类 */
|
||||
private Integer categoryEnum;
|
||||
|
||||
/** 医保对码标记 */
|
||||
private Integer ybMatchFlag;
|
||||
|
||||
/** 状态 */
|
||||
private Integer statusEnum;
|
||||
|
||||
/** 执行科室 */
|
||||
private Long ruleId;
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
package com.openhis.web.datadictionary.dto;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.openhis.common.enums.DeviceCategory;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 器材目录更新
|
||||
*
|
||||
* @author lpt
|
||||
* @date 2025-02-25
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class DeviceManageUpDto {
|
||||
/** ID */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
/** 编码 */
|
||||
@NotBlank(message = "器材编码不能为空")
|
||||
private String busNo;
|
||||
|
||||
/** 器材名称 */
|
||||
@NotBlank(message = "器材名称不能为空")
|
||||
private String name;
|
||||
|
||||
/** 器材名称拼音 */
|
||||
private String pyStr;
|
||||
|
||||
/** 器材五笔拼音 */
|
||||
private String wbStr;
|
||||
|
||||
/** 器材分类 */
|
||||
private DeviceCategory categoryEnum;
|
||||
|
||||
/** 器材种类 */
|
||||
private String typeCode;
|
||||
|
||||
/** 包装单位 */
|
||||
private String unitCode;
|
||||
|
||||
/** 包装规格 */
|
||||
private String size;
|
||||
|
||||
/** 拆零比 */
|
||||
private BigDecimal partPercent;
|
||||
|
||||
/** 最小使用单位 */
|
||||
private String minUnitCode;
|
||||
|
||||
/** 产品型号 */
|
||||
private String modelNumber;
|
||||
|
||||
/** 高值器材标志 */
|
||||
private Integer hvcmFlag;
|
||||
|
||||
/** 销售单位 */
|
||||
private String salesUnitCode;
|
||||
|
||||
/** 批准文号 */
|
||||
private String approvalNumber;
|
||||
|
||||
/** 医保标记 */
|
||||
private Integer ybFlag;
|
||||
|
||||
/** 医保编码 */
|
||||
private String ybNo;
|
||||
|
||||
/** 医保对码标记 */
|
||||
private Integer ybMatchFlag;
|
||||
|
||||
/** 生产厂家 */
|
||||
private Long manufacturerId;
|
||||
|
||||
/** 供应商 */
|
||||
private Long supplyId;
|
||||
|
||||
/** 说明 */
|
||||
private String description;
|
||||
|
||||
/** 适用范围 */
|
||||
private String jurisdiction;
|
||||
|
||||
/** 执行科室 */
|
||||
private Long ruleId;
|
||||
|
||||
/** 器材版本 */
|
||||
private String version;
|
||||
|
||||
/** 主要成分 */
|
||||
private String substanceText;
|
||||
|
||||
/** 过敏标记 */
|
||||
private Integer allergenFlag;
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package com.openhis.web.datadictionary.dto;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.openhis.common.enums.ActivityDefCategory;
|
||||
import com.openhis.common.enums.PublicationStatus;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 诊疗目录分页检索
|
||||
*
|
||||
* @author lpt
|
||||
* @date 2025-02-25
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class DiagnosisTreatmentDto {
|
||||
/** ID */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
/** 目录类别 */
|
||||
private ActivityDefCategory categoryEnum;
|
||||
|
||||
/** 编码 */
|
||||
private String busNo;
|
||||
|
||||
/** 项目名称 */
|
||||
private String name;
|
||||
|
||||
/** 项目名称拼音 */
|
||||
private String pyStr;
|
||||
|
||||
/** 五笔拼音 */
|
||||
private String wbStr;
|
||||
|
||||
/** 类型 */
|
||||
private String typeCode;
|
||||
|
||||
/** 使用单位 */
|
||||
private String permittedUnitCode;
|
||||
|
||||
/** 医保标记 */
|
||||
private Integer ybFlag;
|
||||
|
||||
/** 医保编码 */
|
||||
private String ybNo;
|
||||
|
||||
/** 医保对码标记 */
|
||||
private Integer ybMatchFlag;
|
||||
|
||||
/** 状态 */
|
||||
private PublicationStatus statusEnum;
|
||||
|
||||
/** 身体部位 */
|
||||
private String bodySiteCode;
|
||||
|
||||
/** 所需标本 */
|
||||
private String specimenCode;
|
||||
|
||||
/** 说明 */
|
||||
private String descriptionText;
|
||||
|
||||
/** 规则id */
|
||||
private Integer ruleId;
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
package com.openhis.web.datadictionary.dto;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 诊疗目录初期查询
|
||||
*
|
||||
* @author lpt
|
||||
* @date 2025-02-25
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class DiagnosisTreatmentInitDto {
|
||||
private List<statusEnumOption> statusFlagOptions;
|
||||
private List<diseaseTreatmentCategory> diseaseTreatmentCategoryList;
|
||||
private List<exeOrganization> exeOrganizations;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@Data
|
||||
public static class statusEnumOption {
|
||||
private Integer value;
|
||||
private String info;
|
||||
|
||||
public statusEnumOption(Integer value, String info) {
|
||||
this.value = value;
|
||||
this.info = info;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 诊疗分类
|
||||
*/
|
||||
@Data
|
||||
public static class diseaseTreatmentCategory {
|
||||
private Integer value;
|
||||
private String info;
|
||||
private List<diseaseTreatmentType> children = new ArrayList<>();
|
||||
|
||||
public diseaseTreatmentCategory(Integer value, String info) {
|
||||
this.value = value;
|
||||
this.info = info;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 诊疗类型
|
||||
*/
|
||||
@Data
|
||||
public static class diseaseTreatmentType {
|
||||
private String value;
|
||||
private String info;
|
||||
private List<diseaseTreatmentType> children = new ArrayList<>();
|
||||
|
||||
public diseaseTreatmentType(String value, String info) {
|
||||
this.value = value;
|
||||
this.info = info;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行机构
|
||||
*/
|
||||
@Data
|
||||
public static class exeOrganization {
|
||||
private Long value;
|
||||
private String label;
|
||||
|
||||
public exeOrganization(Long value, String label) {
|
||||
this.value = value;
|
||||
this.label = label;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.openhis.web.datadictionary.dto;
|
||||
|
||||
import com.openhis.common.enums.PublicationStatus;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 诊疗目录分页检索条件
|
||||
*
|
||||
* @author lpt
|
||||
* @date 2025-02-25
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class DiagnosisTreatmentSelParam {
|
||||
/** 目录类别 */
|
||||
private Integer categoryEnum;
|
||||
|
||||
/** 类型 */
|
||||
private String typeCode;
|
||||
|
||||
/** 医保对码标记 */
|
||||
private Integer ybMatchFlag;
|
||||
|
||||
/** 规则id */
|
||||
private Integer ruleId;
|
||||
|
||||
/** 状态 */
|
||||
private Integer statusEnum;
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package com.openhis.web.datadictionary.dto;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.openhis.common.enums.ActivityDefCategory;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 诊疗目录分页更新
|
||||
*
|
||||
* @author lpt
|
||||
* @date 2025-02-25
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class DiagnosisTreatmentUpDto {
|
||||
/** ID */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
/** 目录类别 */
|
||||
private ActivityDefCategory categoryEnum;
|
||||
|
||||
/** 编码 */
|
||||
@NotBlank(message = "项目编码不能为空")
|
||||
private String busNo;
|
||||
|
||||
/** 项目名称 */
|
||||
@NotBlank(message = "项目名称不能为空")
|
||||
private String name;
|
||||
|
||||
/** 项目名称拼音 */
|
||||
private String pyStr;
|
||||
|
||||
/** 五笔拼音 */
|
||||
private String wbStr;
|
||||
|
||||
/** 类型 */
|
||||
private String typeCode;
|
||||
|
||||
/** 使用单位 */
|
||||
private String permittedUnitCode;
|
||||
|
||||
/** 医保标记 */
|
||||
private Integer ybFlag;
|
||||
|
||||
/** 医保编码 */
|
||||
private String ybNo;
|
||||
|
||||
/** 医保对码标记 */
|
||||
private Integer ybMatchFlag;
|
||||
|
||||
/** 身体部位 */
|
||||
private String bodySiteCode;
|
||||
|
||||
/** 所需标本 */
|
||||
private String specimenCode;
|
||||
|
||||
/** 说明 */
|
||||
private String descriptionText;
|
||||
|
||||
/** 规则id */
|
||||
private Integer ruleId;
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.openhis.web.datadictionary.dto;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 疾病目录初始dto
|
||||
*
|
||||
* @author lpt
|
||||
* @date 2025-02-25
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class DiseaseManageInitDto {
|
||||
private List<statusEnumOption> statusFlagOptions;
|
||||
private List<diseaseCategory> diseaseCategoryList;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@Data
|
||||
public static class statusEnumOption {
|
||||
private Integer value;
|
||||
private String info;
|
||||
|
||||
public statusEnumOption(Integer value, String info) {
|
||||
this.value = value;
|
||||
this.info = info;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 疾病分类
|
||||
*/
|
||||
@Data
|
||||
public static class diseaseCategory {
|
||||
private Integer value;
|
||||
private String info;
|
||||
List<diseaseCategory> children = new ArrayList<>();
|
||||
|
||||
public diseaseCategory(Integer value, String info) {
|
||||
this.value = value;
|
||||
this.info = info;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,7 @@ import lombok.experimental.Accessors;
|
||||
@Accessors(chain = true)
|
||||
public class DiseaseManageSelParam {
|
||||
/** 所属分类 */
|
||||
private ConditionDefinitionSource sourceEnum;
|
||||
private Integer sourceEnum;
|
||||
/** 状态 */
|
||||
private PublicationStatus statusEnum;
|
||||
private Integer statusEnum;
|
||||
}
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
package com.openhis.web.datadictionary.dto;
|
||||
|
||||
import com.core.common.core.domain.entity.SysDept;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 疾病目录种别dto
|
||||
*
|
||||
* @author lpt
|
||||
* @date 2025-02-25
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class DiseaseSourceDto {
|
||||
private Integer value;
|
||||
private String code;
|
||||
private String info;
|
||||
List<DiseaseSourceDto> children = new ArrayList<>();
|
||||
}
|
||||
@@ -3,6 +3,7 @@
|
||||
*/
|
||||
package com.openhis.web.datadictionary.dto;
|
||||
|
||||
import com.openhis.common.enums.PublicationStatus;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@@ -32,7 +33,7 @@ public class ItemDefinitionDto {
|
||||
private String title;
|
||||
|
||||
/** 状态 */
|
||||
private Integer statusEnum;
|
||||
private PublicationStatus statusEnum;
|
||||
|
||||
/** 机构编码 */
|
||||
private String orgCode;
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.openhis.web.datadictionary.dto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 药品目录初始dto
|
||||
*
|
||||
* @author lpt
|
||||
* @date 2025-02-25
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class MedicationManageInitDto {
|
||||
private List<statusEnumOption> statusFlagOptions;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@Data
|
||||
public static class statusEnumOption {
|
||||
private Integer value;
|
||||
private String info;
|
||||
|
||||
public statusEnumOption(Integer value, String info) {
|
||||
this.value = value;
|
||||
this.info = info;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,5 @@
|
||||
package com.openhis.web.datadictionary.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@@ -12,7 +10,6 @@ import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.openhis.administration.domain.ChargeItemDefinition;
|
||||
import com.openhis.web.datadictionary.dto.ChargeItemDefPageDto;
|
||||
import com.openhis.web.datadictionary.dto.ItemDefSearchParam;
|
||||
|
||||
/**
|
||||
* 费用定价管理Mapper接口
|
||||
@@ -31,7 +28,7 @@ public interface ChargeItemDefSearchMapper extends BaseMapper<ChargeItemDefiniti
|
||||
* @return 分页查询
|
||||
*/
|
||||
IPage<ChargeItemDefPageDto> getMedList(@Param("page") Page<ChargeItemDefPageDto> page,
|
||||
@Param(Constants.WRAPPER) LambdaQueryWrapper<ChargeItemDefPageDto> queryWrapper);
|
||||
@Param(Constants.WRAPPER) LambdaQueryWrapper<ChargeItemDefPageDto> queryWrapper);
|
||||
|
||||
/**
|
||||
* 器具费用定价分页查询
|
||||
@@ -41,7 +38,7 @@ public interface ChargeItemDefSearchMapper extends BaseMapper<ChargeItemDefiniti
|
||||
* @return 分页查询
|
||||
*/
|
||||
IPage<ChargeItemDefPageDto> getDevList(@Param("page") Page<ChargeItemDefPageDto> page,
|
||||
@Param(Constants.WRAPPER) LambdaQueryWrapper<ChargeItemDefPageDto> queryWrapper);
|
||||
@Param(Constants.WRAPPER) LambdaQueryWrapper<ChargeItemDefPageDto> queryWrapper);
|
||||
|
||||
/**
|
||||
* 活动费用定价分页查询
|
||||
@@ -51,5 +48,5 @@ public interface ChargeItemDefSearchMapper extends BaseMapper<ChargeItemDefiniti
|
||||
* @return 分页查询
|
||||
*/
|
||||
IPage<ChargeItemDefPageDto> getActList(@Param("page") Page<ChargeItemDefPageDto> page,
|
||||
@Param(Constants.WRAPPER) LambdaQueryWrapper<ChargeItemDefPageDto> queryWrapper);
|
||||
@Param(Constants.WRAPPER) LambdaQueryWrapper<ChargeItemDefPageDto> queryWrapper);
|
||||
}
|
||||
@@ -55,4 +55,7 @@ public interface MedicationManageSearchMapper extends BaseMapper<ChargeItemDefin
|
||||
* @return
|
||||
*/
|
||||
MedicationManageDto getOne(@Param("id") Long id, @Param("tenantId") Integer tenantId);
|
||||
|
||||
List<MedicationManageDto> getList(@Param("searchKey") String searchKey, @Param("ybMatchFlag") Integer ybMatchFlag,
|
||||
@Param("statusEnum") Integer statusEnum, @Param("categoryCode") String categoryCode,@Param("tenantId") Integer tenantId);
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import com.core.common.utils.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -11,10 +12,6 @@ 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.ChineseConvertUtils;
|
||||
import com.core.common.utils.MessageUtils;
|
||||
import com.core.common.utils.StringUtils;
|
||||
import com.core.common.utils.bean.BeanUtils;
|
||||
import com.openhis.administration.domain.Patient;
|
||||
import com.openhis.administration.service.IPatientService;
|
||||
@@ -183,8 +180,8 @@ public class PatientInformationController {
|
||||
// 设置五笔首拼
|
||||
patient.setWbStr(ChineseConvertUtils.toWBFirstLetter(patient.getName()));
|
||||
// 设置地址
|
||||
String fullAddress = stringUtils.joinStrings(patient.getAddress(), patient.getAddressProvince(),
|
||||
patient.getAddressCity(), patient.getAddressDistrict(), patient.getAddressStreet());
|
||||
String fullAddress = stringUtils.joinStrings(patient.getAddressProvince(),
|
||||
patient.getAddressCity(), patient.getAddressDistrict(), patient.getAddressStreet(),patient.getAddress());
|
||||
patient.setAddress(fullAddress);
|
||||
|
||||
// 调用服务层保存病人信息
|
||||
@@ -215,8 +212,8 @@ public class PatientInformationController {
|
||||
// 设置五笔首拼
|
||||
patient.setWbStr(ChineseConvertUtils.toWBFirstLetter(patient.getName()));
|
||||
// 设置地址
|
||||
String fullAddress = stringUtils.joinStrings(patient.getAddress(), patient.getAddressProvince(),
|
||||
patient.getAddressCity(), patient.getAddressDistrict(), patient.getAddressStreet());
|
||||
String fullAddress = stringUtils.joinStrings(patient.getAddressProvince(),
|
||||
patient.getAddressCity(), patient.getAddressDistrict(), patient.getAddressStreet(),patient.getAddress());
|
||||
patient.setAddress(fullAddress);
|
||||
|
||||
// 调用服务层更新病人信息
|
||||
|
||||
@@ -35,19 +35,19 @@ public class PatientInformationDto {
|
||||
private String busNo;
|
||||
|
||||
/** 性别编码 */
|
||||
private AdministrativeGender genderEnum;
|
||||
private Integer genderEnum;
|
||||
|
||||
/** 生日 */
|
||||
private Date birthDate;
|
||||
|
||||
/** 死亡时间 */
|
||||
private Date deceasedDate;
|
||||
private String deceasedDate;
|
||||
|
||||
/** 婚姻状态 */
|
||||
private MaritalStatus maritalStatusEnum;
|
||||
private Integer maritalStatusEnum;
|
||||
|
||||
/** 职业编码 */
|
||||
private OccupationType prfsEnum;
|
||||
private Integer prfsEnum;
|
||||
|
||||
/** 电话 */
|
||||
private String phone;
|
||||
@@ -83,10 +83,10 @@ public class PatientInformationDto {
|
||||
private String wbStr;
|
||||
|
||||
/** 血型ABO */
|
||||
private String bloodAbo;
|
||||
private Integer bloodAbo;
|
||||
|
||||
/** 血型RH */
|
||||
private String bloodRh;
|
||||
private Integer bloodRh;
|
||||
|
||||
/** 工作单位 */
|
||||
private String workCompany;
|
||||
|
||||
@@ -47,6 +47,8 @@ user:
|
||||
|
||||
# Spring配置
|
||||
spring:
|
||||
main:
|
||||
allow-circular-references: true
|
||||
# 资源信息
|
||||
messages:
|
||||
# 国际化资源文件路径
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.openhis.web.basicservice.mapper.HealthcareServiceBizMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -6,6 +6,7 @@
|
||||
T5.id,
|
||||
T5.charge_name,
|
||||
T5.status_enum,
|
||||
T5.status_enum_text,
|
||||
T5.description,
|
||||
T5.effective_start,
|
||||
T5.effective_end,
|
||||
@@ -32,6 +33,12 @@
|
||||
T1.id,
|
||||
T1.charge_name,
|
||||
T1.status_enum,
|
||||
CASE
|
||||
WHEN T1.status_enum = 1 THEN '草稿'
|
||||
WHEN T1.status_enum = 2 THEN '有效'
|
||||
WHEN T1.status_enum = 3 THEN '停用'
|
||||
WHEN T1.status_enum = 4 THEN '未知'
|
||||
END AS status_enum_text,
|
||||
T1.description,
|
||||
T1.effective_start,
|
||||
T1.effective_end,
|
||||
@@ -69,6 +76,7 @@
|
||||
T5.id,
|
||||
T5.charge_name,
|
||||
T5.status_enum,
|
||||
T5.status_enum_text,
|
||||
T5.description,
|
||||
T5.effective_start,
|
||||
T5.effective_end,
|
||||
@@ -94,6 +102,12 @@
|
||||
T1.id,
|
||||
T1.charge_name,
|
||||
T1.status_enum,
|
||||
CASE
|
||||
WHEN T1.status_enum = 1 THEN '草稿'
|
||||
WHEN T1.status_enum = 2 THEN '有效'
|
||||
WHEN T1.status_enum = 3 THEN '停用'
|
||||
WHEN T1.status_enum = 4 THEN '未知'
|
||||
END AS status_enum_text,
|
||||
T1.description,
|
||||
T1.effective_start,
|
||||
T1.effective_end,
|
||||
@@ -130,6 +144,7 @@
|
||||
T5.id,
|
||||
T5.charge_name,
|
||||
T5.status_enum,
|
||||
T5.status_enum_text,
|
||||
T5.description,
|
||||
T5.effective_start,
|
||||
T5.effective_end,
|
||||
@@ -153,6 +168,12 @@
|
||||
T1.id,
|
||||
T1.charge_name,
|
||||
T1.status_enum,
|
||||
CASE
|
||||
WHEN T1.status_enum = 1 THEN '草稿'
|
||||
WHEN T1.status_enum = 2 THEN '有效'
|
||||
WHEN T1.status_enum = 3 THEN '停用'
|
||||
WHEN T1.status_enum = 4 THEN '未知'
|
||||
END AS status_enum_text,
|
||||
T1.description,
|
||||
T1.effective_start,
|
||||
T1.effective_end,
|
||||
|
||||
@@ -168,4 +168,80 @@
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="getList" resultType="com.openhis.web.datadictionary.dto.MedicationManageDto">
|
||||
SELECT T2.id,
|
||||
T2.medication_def_id,
|
||||
T2.status_enum,
|
||||
T2.org_id,
|
||||
T2.dose_form_code,
|
||||
T2.total_volume,
|
||||
T2.ingredient_item,
|
||||
T2.active_flag,
|
||||
T2.lot_number,
|
||||
T2.effective_date,
|
||||
T2.expiration_date,
|
||||
T2.method_code,
|
||||
T2.rate_code,
|
||||
T2.dose,
|
||||
T2.dose_unit_code,
|
||||
T2.max_unit,
|
||||
T2.definition,
|
||||
T1.bus_no,
|
||||
T1.name,
|
||||
T1.domain_enum,
|
||||
T1.version,
|
||||
T1.name_en,
|
||||
T1.py_str,
|
||||
T1.wb_str,
|
||||
T1.category_code,
|
||||
T1.merchandise_name,
|
||||
T1.merchandise_py_str,
|
||||
T1.merchandise_wb_str,
|
||||
T1.unit_code,
|
||||
T1.min_unit_code,
|
||||
T1.comprised_text,
|
||||
T1.ingredient,
|
||||
T1.part_percent,
|
||||
T1.dose_from,
|
||||
T1.approval_number,
|
||||
T1.yb_match_flag,
|
||||
T1.yb_no,
|
||||
T1.pharmacology_category_code,
|
||||
T1.skin_test_flag,
|
||||
T1.inject_flag,
|
||||
T1.manufacturer_id,
|
||||
T1.supply_id,
|
||||
T1.restricted_flag,
|
||||
T1.restricted_scope,
|
||||
T1.children_flag,
|
||||
T1.characteristic
|
||||
FROM med_medication_definition T1
|
||||
LEFT JOIN med_medication T2 on T1.id = T2.medication_def_id
|
||||
<where>
|
||||
T1.delete_flag = '0'
|
||||
<if test="searchKey!=null and searchKey!='' ">
|
||||
AND ( T1.name LIKE CONCAT(CONCAT('%', #{searchKey}),'%') OR
|
||||
T1.name_en LIKE CONCAT(CONCAT('%', #{searchKey}),'%') OR
|
||||
T1.merchandise_name LIKE CONCAT(CONCAT('%', #{searchKey}),'%') OR
|
||||
T1.bus_no LIKE CONCAT(CONCAT('%', #{searchKey}),'%') OR
|
||||
T1.py_str LIKE CONCAT(CONCAT('%', #{searchKey}),'%') OR
|
||||
T1.wb_str LIKE CONCAT(CONCAT('%', #{searchKey}),'%') OR
|
||||
T1.merchandise_py_str LIKE CONCAT(CONCAT('%', #{searchKey}),'%') OR
|
||||
T1.merchandise_wb_str LIKE CONCAT(CONCAT('%', #{searchKey}),'%'))
|
||||
</if>
|
||||
<if test="ybMatchFlag!= -1">
|
||||
AND T1.yb_match_flag = #{ybMatchFlag}
|
||||
</if>
|
||||
<if test="statusEnum!= -1">
|
||||
AND T2.status_enum = #{statusEnum}
|
||||
</if>
|
||||
<if test="categoryCode!=null and categoryCode!='' ">
|
||||
AND T1.category_code = #{categoryCode}
|
||||
</if>
|
||||
<if test="tenantId!= null">
|
||||
AND T1.tenant_id = #{tenantId}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY T1.bus_no
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.openhis.common.enums;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.EnumValue;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum ActivityDefCategory {
|
||||
MEDICAL_SERVICE_ITEM(1, "medical_service_item", "医疗服务项"),
|
||||
|
||||
TREATMENT_SURGERY(2, "treatment_surgery", "手术与治疗");
|
||||
|
||||
@EnumValue
|
||||
private final Integer value;
|
||||
private final String code;
|
||||
private final String info;
|
||||
}
|
||||
@@ -12,7 +12,8 @@ public enum ConditionDefinitionSource {
|
||||
DIAGNOSIS_BY_DISEASE_CATALOG(3, "03", "按病种目录付费诊断"),
|
||||
DAY_SURGERY_TREATMENT_DISEASE(4, "04", "日间手术治疗病种"),
|
||||
TRADITIONAL_CHINESE_MEDICINE_DIAGNOSIS(5, "05", "中医诊断"),
|
||||
TRADITIONAL_CHINESE_MEDICINE_SYNDROME_CATALOG(6, "06", "中医证候目录");
|
||||
TRADITIONAL_CHINESE_MEDICINE_SYNDROME_CATALOG(6, "06", "中医证候目录"),
|
||||
TUMOR_MORPHOLOGY_CATALOG(7, "07", "肿瘤形态学目录");
|
||||
@EnumValue
|
||||
private final Integer value;
|
||||
private final String code;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.openhis.common.enums;
|
||||
import com.baomidou.mybatisplus.annotation.EnumValue;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@@ -16,7 +17,14 @@ public enum PublicationStatus {
|
||||
|
||||
UNKNOWN(4, "unknown", "未知");
|
||||
|
||||
PublicationStatus(int value, String code, String info) {
|
||||
this.value = value;
|
||||
this.code = code;
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
@EnumValue
|
||||
@JsonValue // 标记响应json值
|
||||
private final Integer value;
|
||||
private final String code;
|
||||
private final String info;
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.openhis.common.enums;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.EnumValue;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 是否
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum WhetherContainUnknown {
|
||||
NO(0, "no", "否"),
|
||||
YES(1, "yes", "是"),
|
||||
UNKNOWN(2, "unknown", "未知");
|
||||
@EnumValue
|
||||
private final Integer value;
|
||||
private final String code;
|
||||
private final String info;
|
||||
}
|
||||
@@ -35,6 +35,50 @@ public class HisQueryUtils {
|
||||
QueryWrapper<T> queryWrapper = new QueryWrapper<>();
|
||||
// 添加租户id查询条件
|
||||
queryWrapper.eq(CommonConstants.Common.TENANT_ID, getCurrentTenantId());
|
||||
// 处理模糊查询关键字
|
||||
if (searchKey != null && !searchKey.isEmpty() && searchFields != null && !searchFields.isEmpty()) {
|
||||
queryWrapper.and(wrapper -> {
|
||||
for (String field : searchFields) {
|
||||
wrapper.or().like(field, searchKey);
|
||||
}
|
||||
});
|
||||
}
|
||||
// 处理时间段查询
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DateUtils.YYYY_MM_DD);
|
||||
if (request != null) {
|
||||
Map<String, String[]> parameterMap = request.getParameterMap();
|
||||
for (Map.Entry<String, String[]> entry : parameterMap.entrySet()) {
|
||||
String paramName = entry.getKey();
|
||||
// 检查参数名是否以 "STime" 或 "ETime" 结尾
|
||||
if (paramName.endsWith(CommonConstants.Common.S_TIME)
|
||||
|| paramName.endsWith(CommonConstants.Common.E_TIME)) {
|
||||
// 提取字段名(去掉 "STime" 或 "ETime" 后缀)
|
||||
String fieldName = paramName.substring(0, paramName.length() - 5);
|
||||
// 驼峰转下划线
|
||||
String dbFieldName = camelToUnderline(fieldName);
|
||||
// 获取对应的 STime 和 ETime 值
|
||||
String startValue = getParameterValue(request, fieldName + CommonConstants.Common.S_TIME);
|
||||
String endValue = getParameterValue(request, fieldName + CommonConstants.Common.E_TIME);
|
||||
// 如果 Start 和 End 都有值,则添加时间段查询条件
|
||||
if (startValue != null && endValue != null) {
|
||||
try {
|
||||
SimpleDateFormat dateFormat;
|
||||
if (isValidFormat(formatter, startValue)) {
|
||||
dateFormat = new SimpleDateFormat(DateUtils.YYYY_MM_DD);
|
||||
} else {
|
||||
dateFormat = new SimpleDateFormat(DateUtils.YYYY_MM_DD_HH_MM_SS);
|
||||
}
|
||||
Date startDate = dateFormat.parse(startValue);
|
||||
Date endDate = dateFormat.parse(endValue);
|
||||
queryWrapper.ge(dbFieldName, startDate); // 大于等于 STime
|
||||
queryWrapper.le(dbFieldName, endDate); // 小于等于 ETime
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (entity == null) {
|
||||
return queryWrapper;
|
||||
}
|
||||
@@ -54,48 +98,6 @@ public class HisQueryUtils {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
// 处理模糊查询关键字
|
||||
if (searchKey != null && !searchKey.isEmpty() && searchFields != null && !searchFields.isEmpty()) {
|
||||
queryWrapper.and(wrapper -> {
|
||||
for (String field : searchFields) {
|
||||
wrapper.or().like(field, searchKey);
|
||||
}
|
||||
});
|
||||
}
|
||||
// 处理时间段查询
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DateUtils.YYYY_MM_DD);
|
||||
Map<String, String[]> parameterMap = request.getParameterMap();
|
||||
for (Map.Entry<String, String[]> entry : parameterMap.entrySet()) {
|
||||
String paramName = entry.getKey();
|
||||
// 检查参数名是否以 "STime" 或 "ETime" 结尾
|
||||
if (paramName.endsWith(CommonConstants.Common.S_TIME)
|
||||
|| paramName.endsWith(CommonConstants.Common.E_TIME)) {
|
||||
// 提取字段名(去掉 "STime" 或 "ETime" 后缀)
|
||||
String fieldName = paramName.substring(0, paramName.length() - 5);
|
||||
// 驼峰转下划线
|
||||
String dbFieldName = camelToUnderline(fieldName);
|
||||
// 获取对应的 STime 和 ETime 值
|
||||
String startValue = getParameterValue(request, fieldName + CommonConstants.Common.S_TIME);
|
||||
String endValue = getParameterValue(request, fieldName + CommonConstants.Common.E_TIME);
|
||||
// 如果 Start 和 End 都有值,则添加时间段查询条件
|
||||
if (startValue != null && endValue != null) {
|
||||
try {
|
||||
SimpleDateFormat dateFormat;
|
||||
if (isValidFormat(formatter, startValue)) {
|
||||
dateFormat = new SimpleDateFormat(DateUtils.YYYY_MM_DD);
|
||||
} else {
|
||||
dateFormat = new SimpleDateFormat(DateUtils.YYYY_MM_DD_HH_MM_SS);
|
||||
}
|
||||
Date startDate = dateFormat.parse(startValue);
|
||||
Date endDate = dateFormat.parse(endValue);
|
||||
queryWrapper.ge(dbFieldName, startDate); // 大于等于 STime
|
||||
queryWrapper.le(dbFieldName, endDate); // 小于等于 ETime
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return queryWrapper;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package com.openhis.administration.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import com.core.common.core.domain.HisBaseEntity;
|
||||
import com.openhis.common.enums.DeviceCategory;
|
||||
import com.openhis.common.enums.PublicationStatus;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
@@ -81,7 +81,7 @@ public class DeviceDefinition extends HisBaseEntity {
|
||||
private Integer ybMatchFlag;
|
||||
|
||||
/** 状态 */
|
||||
private Integer statusEnum;
|
||||
private PublicationStatus statusEnum;
|
||||
|
||||
/** 生产厂家 */
|
||||
private Long manufacturerId;
|
||||
@@ -107,5 +107,4 @@ public class DeviceDefinition extends HisBaseEntity {
|
||||
/** 过敏标记 */
|
||||
private Integer allergenFlag;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,12 +1,8 @@
|
||||
package com.openhis.administration.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import com.core.common.core.domain.HisBaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
@@ -44,7 +40,7 @@ public class HealthcareService extends HisBaseEntity {
|
||||
private String specialtyCode;
|
||||
|
||||
/** 地点 */
|
||||
private String locationId;
|
||||
private Long locationId;
|
||||
|
||||
/** 服务名称 */
|
||||
private String name;
|
||||
|
||||
@@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.core.common.core.domain.HisBaseEntity;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.openhis.common.enums.OrganizationClass;
|
||||
import com.openhis.common.enums.OrganizationType;
|
||||
|
||||
@@ -25,6 +27,7 @@ public class Organization extends HisBaseEntity {
|
||||
|
||||
/** ID */
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
/** 编码 */
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.openhis.administration.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import com.core.common.core.domain.HisBaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 机构位置关系管理Entity实体
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-22
|
||||
*/
|
||||
@Data
|
||||
@TableName("adm_organization_location")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class OrganizationLocation extends HisBaseEntity {
|
||||
|
||||
/** ID */
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/** 机构编码 */
|
||||
private Long organizationId;
|
||||
|
||||
/** 位置编码 */
|
||||
private Long locationId;
|
||||
|
||||
/** 默认药房 */
|
||||
private Long defLocationId;
|
||||
|
||||
/** 药品类别 */
|
||||
private String medCategoryCode;
|
||||
|
||||
/** 开始时间 */
|
||||
private Date startTime;
|
||||
|
||||
/** 结束时间 */
|
||||
private Date endTime;
|
||||
|
||||
/** 显示顺序 */
|
||||
private Integer displayOrder;
|
||||
|
||||
}
|
||||
@@ -1,16 +1,13 @@
|
||||
package com.openhis.administration.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import com.core.common.core.domain.HisBaseEntity;
|
||||
import com.openhis.common.enums.AdministrativeGender;
|
||||
import com.openhis.common.enums.MaritalStatus;
|
||||
import com.openhis.common.enums.OccupationType;
|
||||
import com.openhis.common.enums.*;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
@@ -95,10 +92,10 @@ public class Patient extends HisBaseEntity {
|
||||
private String wbStr;
|
||||
|
||||
/** 血型ABO */
|
||||
private String bloodAbo;
|
||||
private BloodTypeABO bloodAbo;
|
||||
|
||||
/** 血型RH */
|
||||
private String bloodRh;
|
||||
private BloodTypeRH bloodRh;
|
||||
|
||||
/** 工作单位 */
|
||||
private String workCompany;
|
||||
@@ -124,5 +121,4 @@ public class Patient extends HisBaseEntity {
|
||||
/** 机构Id */
|
||||
private Long organizationId;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.openhis.administration.mapper;
|
||||
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.openhis.administration.domain.OrganizationLocation;
|
||||
|
||||
/**
|
||||
* 机构位置关系管理Mapper接口
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-22
|
||||
*/
|
||||
@Repository
|
||||
public interface OrganizationLocationMapper extends BaseMapper<OrganizationLocation> {
|
||||
|
||||
}
|
||||
@@ -11,4 +11,19 @@ import com.openhis.administration.domain.DeviceDefinition;
|
||||
*/
|
||||
public interface IDeviceDefinitionService extends IService<DeviceDefinition> {
|
||||
|
||||
/**
|
||||
* 新增器材目录
|
||||
*
|
||||
* @param deviceDefinition 耗材器材实体
|
||||
* @return
|
||||
*/
|
||||
boolean addDevice(DeviceDefinition deviceDefinition);
|
||||
|
||||
/**
|
||||
* 新增医保器材目录
|
||||
*
|
||||
* @param deviceDefinition 器材目录实体
|
||||
* @return
|
||||
*/
|
||||
boolean addYbDevice(DeviceDefinition deviceDefinition);
|
||||
}
|
||||
@@ -11,4 +11,6 @@ import com.openhis.administration.domain.HealthcareService;
|
||||
*/
|
||||
public interface IHealthcareServiceService extends IService<HealthcareService> {
|
||||
|
||||
HealthcareService addHealthcareService(HealthcareService healthcareService);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.openhis.administration.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.openhis.administration.domain.OrganizationLocation;
|
||||
|
||||
/**
|
||||
* 机构位置关系管理Service接口
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-25
|
||||
*/
|
||||
public interface IOrganizationLocationService extends IService<OrganizationLocation> {}
|
||||
@@ -10,5 +10,5 @@ import com.openhis.administration.domain.Organization;
|
||||
* @date 2025-02-21
|
||||
*/
|
||||
public interface IOrganizationService extends IService<Organization> {
|
||||
boolean changeOrgFlag(Long orgId);
|
||||
boolean activeChange(Long orgId);
|
||||
}
|
||||
@@ -1,19 +1,50 @@
|
||||
package com.openhis.administration.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.openhis.administration.domain.DeviceDefinition;
|
||||
import com.openhis.administration.mapper.DeviceDefinitionMapper;
|
||||
import com.openhis.administration.service.IDeviceDefinitionService;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* 器材定义管理Service业务层处理
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class DeviceDefinitionServiceImpl extends ServiceImpl<DeviceDefinitionMapper, DeviceDefinition> implements IDeviceDefinitionService {
|
||||
@AllArgsConstructor
|
||||
public class DeviceDefinitionServiceImpl extends ServiceImpl<DeviceDefinitionMapper, DeviceDefinition>
|
||||
implements IDeviceDefinitionService {
|
||||
|
||||
private final DeviceDefinitionMapper deviceDefinitionMapper;
|
||||
|
||||
@Override
|
||||
public boolean addDevice(DeviceDefinition deviceDefinition) {
|
||||
// 根据器材编码判断器材是否存在
|
||||
List<DeviceDefinition> activityDefinitions = deviceDefinitionMapper.selectList(
|
||||
new LambdaQueryWrapper<DeviceDefinition>().eq(DeviceDefinition::getBusNo, deviceDefinition.getBusNo()));
|
||||
if (activityDefinitions.size() > 0) {
|
||||
return false;
|
||||
}
|
||||
// 新增器材项目
|
||||
int insert = deviceDefinitionMapper.insert(deviceDefinition);
|
||||
if (insert != 1) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addYbDevice(DeviceDefinition deviceDefinition) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -16,4 +16,10 @@ import com.openhis.administration.service.IHealthcareServiceService;
|
||||
@Service
|
||||
public class HealthcareServiceServiceImpl extends ServiceImpl<HealthcareServiceMapper, HealthcareService> implements IHealthcareServiceService {
|
||||
|
||||
@Override
|
||||
public HealthcareService addHealthcareService(HealthcareService healthcareService){
|
||||
baseMapper.insert(healthcareService);
|
||||
return healthcareService;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.openhis.administration.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.openhis.administration.domain.OrganizationLocation;
|
||||
import com.openhis.administration.mapper.OrganizationLocationMapper;
|
||||
import com.openhis.administration.service.IOrganizationLocationService;
|
||||
|
||||
/**
|
||||
* 机构位置关系管理Service业务层处理
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-25
|
||||
*/
|
||||
@Service
|
||||
public class OrganizationLocationServiceImpl extends ServiceImpl<OrganizationLocationMapper, OrganizationLocation>
|
||||
implements IOrganizationLocationService {
|
||||
|
||||
}
|
||||
@@ -23,20 +23,25 @@ public class OrganizationServiceImpl extends ServiceImpl<OrganizationMapper, Org
|
||||
private OrganizationMapper organizationMapper;
|
||||
|
||||
@Override
|
||||
public boolean changeOrgFlag(Long orgId) {
|
||||
|
||||
public boolean activeChange(Long orgId) {
|
||||
if (orgId != null) {
|
||||
Organization organization = organizationMapper.selectById(orgId);
|
||||
if (organization.getActiveFlag().equals(AccountStatus.ACTIVE.getValue())) {
|
||||
organization.setActiveFlag(AccountStatus.INACTIVE.getValue());
|
||||
return true;
|
||||
} else {
|
||||
organization.setActiveFlag(AccountStatus.ACTIVE.getValue());
|
||||
if (organization != null) {
|
||||
Integer activeFlag = organization.getActiveFlag();
|
||||
switch (activeFlag ) {
|
||||
case 1:
|
||||
organization.setActiveFlag(AccountStatus.INACTIVE.getValue());
|
||||
break;
|
||||
case 2:
|
||||
organization.setActiveFlag(AccountStatus.ACTIVE.getValue());
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
organizationMapper.updateById(organization);
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,13 +1,12 @@
|
||||
package com.openhis.workflow.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import com.core.common.core.domain.HisBaseEntity;
|
||||
import com.openhis.common.enums.ActivityDefCategory;
|
||||
import com.openhis.common.enums.PublicationStatus;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
@@ -29,7 +28,7 @@ public class ActivityDefinition extends HisBaseEntity {
|
||||
private Long id;
|
||||
|
||||
/** 目录类别 */
|
||||
private Integer categoryEnum;
|
||||
private ActivityDefCategory categoryEnum;
|
||||
|
||||
/** 编码 */
|
||||
private String busNo;
|
||||
@@ -44,7 +43,7 @@ public class ActivityDefinition extends HisBaseEntity {
|
||||
private String wbStr;
|
||||
|
||||
/** 类型 */
|
||||
private Integer typeEnum;
|
||||
private String typeCode;
|
||||
|
||||
/** 使用单位 */
|
||||
private String permittedUnitCode;
|
||||
@@ -59,7 +58,7 @@ public class ActivityDefinition extends HisBaseEntity {
|
||||
private Integer ybMatchFlag;
|
||||
|
||||
/** 状态 */
|
||||
private Integer statusEnum;
|
||||
private PublicationStatus statusEnum;
|
||||
|
||||
/** 身体部位 */
|
||||
private String bodySiteCode;
|
||||
@@ -68,10 +67,9 @@ public class ActivityDefinition extends HisBaseEntity {
|
||||
private String specimenCode;
|
||||
|
||||
/** 说明 */
|
||||
private String description;
|
||||
private String descriptionText;
|
||||
|
||||
/** 规则id */
|
||||
private Integer ruleId;
|
||||
|
||||
|
||||
}
|
||||
@@ -11,4 +11,19 @@ import com.openhis.workflow.domain.ActivityDefinition;
|
||||
*/
|
||||
public interface IActivityDefinitionService extends IService<ActivityDefinition> {
|
||||
|
||||
/**
|
||||
* 新增诊疗目录
|
||||
*
|
||||
* @param activityDefinition 诊疗目录实体
|
||||
* @return
|
||||
*/
|
||||
boolean addDiagnosisTreatment(ActivityDefinition activityDefinition);
|
||||
|
||||
/**
|
||||
* 新增医保诊疗目录
|
||||
*
|
||||
* @param activityDefinition 诊疗目录实体
|
||||
* @return
|
||||
*/
|
||||
boolean addYbDiagnosisTreatment(ActivityDefinition activityDefinition);
|
||||
}
|
||||
@@ -1,19 +1,58 @@
|
||||
package com.openhis.workflow.service.impl;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.openhis.workflow.domain.ActivityDefinition;
|
||||
import com.openhis.workflow.mapper.ActivityDefinitionMapper;
|
||||
import com.openhis.workflow.service.IActivityDefinitionService;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* 诊疗定义管理Service业务层处理
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-02-20
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class ActivityDefinitionServiceImpl extends ServiceImpl<ActivityDefinitionMapper, ActivityDefinition> implements IActivityDefinitionService {
|
||||
@AllArgsConstructor
|
||||
public class ActivityDefinitionServiceImpl extends ServiceImpl<ActivityDefinitionMapper, ActivityDefinition>
|
||||
implements IActivityDefinitionService {
|
||||
private final ActivityDefinitionMapper activityDefinitionMapper;
|
||||
|
||||
/**
|
||||
* 增加外来诊疗项目
|
||||
*
|
||||
* @param activityDefinition 诊疗项目实体
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean addDiagnosisTreatment(ActivityDefinition activityDefinition) {
|
||||
// 根据诊疗编码判断诊疗项目是否存在
|
||||
List<ActivityDefinition> activityDefinitions =
|
||||
activityDefinitionMapper.selectList(new LambdaQueryWrapper<ActivityDefinition>()
|
||||
.eq(ActivityDefinition::getBusNo, activityDefinition.getBusNo()));
|
||||
if (activityDefinitions.size() > 0) {
|
||||
return false;
|
||||
}
|
||||
// 新增诊疗项目
|
||||
int insert = activityDefinitionMapper.insert(activityDefinition);
|
||||
if (insert != 1) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addYbDiagnosisTreatment(ActivityDefinition activityDefinition) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.openhis.administration.mapper.OrganizationLocationMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -27,6 +27,7 @@
|
||||
"fuse.js": "6.6.2",
|
||||
"js-cookie": "3.0.5",
|
||||
"jsencrypt": "3.3.2",
|
||||
"moment": "^2.30.1",
|
||||
"nprogress": "0.2.0",
|
||||
"pinia": "2.1.7",
|
||||
"province-city-china": "^8.5.8",
|
||||
|
||||
264
openhis-ui-vue3/src/utils/his.js
Normal file
264
openhis-ui-vue3/src/utils/his.js
Normal file
@@ -0,0 +1,264 @@
|
||||
|
||||
|
||||
// 日期格式化
|
||||
export function parseTime(time, pattern) {
|
||||
if (arguments.length === 0 || !time) {
|
||||
return null
|
||||
}
|
||||
const format = pattern || '{y}-{m}-{d} {h}:{i}:{s}'
|
||||
let date
|
||||
if (typeof time === 'object') {
|
||||
date = time
|
||||
} else {
|
||||
if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) {
|
||||
time = parseInt(time)
|
||||
} else if (typeof time === 'string') {
|
||||
time = time.replace(new RegExp(/-/gm), '/').replace('T', ' ').replace(new RegExp(/\.[\d]{3}/gm), '');
|
||||
}
|
||||
if ((typeof time === 'number') && (time.toString().length === 10)) {
|
||||
time = time * 1000
|
||||
}
|
||||
date = new Date(time)
|
||||
}
|
||||
const formatObj = {
|
||||
y: date.getFullYear(),
|
||||
m: date.getMonth() + 1,
|
||||
d: date.getDate(),
|
||||
h: date.getHours(),
|
||||
i: date.getMinutes(),
|
||||
s: date.getSeconds(),
|
||||
a: date.getDay()
|
||||
}
|
||||
const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => {
|
||||
let value = formatObj[key]
|
||||
// Note: getDay() returns 0 on Sunday
|
||||
if (key === 'a') { return ['日', '一', '二', '三', '四', '五', '六'][value] }
|
||||
if (result.length > 0 && value < 10) {
|
||||
value = '0' + value
|
||||
}
|
||||
return value || 0
|
||||
})
|
||||
return time_str
|
||||
}
|
||||
|
||||
// 表单重置
|
||||
export function resetForm(refName) {
|
||||
if (this.$refs[refName]) {
|
||||
this.$refs[refName].resetFields();
|
||||
}
|
||||
}
|
||||
|
||||
// 添加日期范围
|
||||
export function addDateRange(params, dateRange, propName) {
|
||||
let search = params;
|
||||
search.params = typeof (search.params) === 'object' && search.params !== null && !Array.isArray(search.params) ? search.params : {};
|
||||
dateRange = Array.isArray(dateRange) ? dateRange : [];
|
||||
if (typeof (propName) === 'undefined') {
|
||||
search.params['beginTime'] = dateRange[0];
|
||||
search.params['endTime'] = dateRange[1];
|
||||
} else {
|
||||
search.params['begin' + propName] = dateRange[0];
|
||||
search.params['end' + propName] = dateRange[1];
|
||||
}
|
||||
return search;
|
||||
}
|
||||
export function addDateRanges(params, dateRange1, dateRange2, propName) {
|
||||
let search = params;
|
||||
search.params = typeof (search.params) === 'object' && search.params !== null && !Array.isArray(search.params) ? search.params : {};
|
||||
dateRange1 = Array.isArray(dateRange1) ? dateRange1 : [];
|
||||
dateRange2 = Array.isArray(dateRange2) ? dateRange2 : [];
|
||||
if (typeof (propName) === 'undefined') {
|
||||
search.params['beginTime'] = dateRange1[0];
|
||||
search.params['endTime'] = dateRange1[1];
|
||||
search.params['timeFrom'] = dateRange2[0];
|
||||
search.params['timeTo'] = dateRange2[1];
|
||||
} else {
|
||||
search.params['begin' + propName] = dateRange1[0];
|
||||
search.params['end' + propName] = dateRange1[1];
|
||||
search.params['from' + propName] = dateRange2[0];
|
||||
search.params['to' + propName] = dateRange2[1];
|
||||
}
|
||||
return search;
|
||||
}
|
||||
|
||||
// 回显数据字典
|
||||
export function selectDictLabel(datas, value) {
|
||||
if (value === undefined) {
|
||||
return "";
|
||||
}
|
||||
var actions = [];
|
||||
Object.keys(datas).some((key) => {
|
||||
if (datas[key].value == ('' + value)) {
|
||||
actions.push(datas[key].label);
|
||||
return true;
|
||||
}
|
||||
})
|
||||
if (actions.length === 0) {
|
||||
actions.push(value);
|
||||
}
|
||||
return actions.join('');
|
||||
}
|
||||
|
||||
// 回显数据字典(字符串数组)
|
||||
export function selectDictLabels(datas, value, separator) {
|
||||
if (value === undefined || value.length ===0) {
|
||||
return "";
|
||||
}
|
||||
if (Array.isArray(value)) {
|
||||
value = value.join(",");
|
||||
}
|
||||
var actions = [];
|
||||
var currentSeparator = undefined === separator ? "," : separator;
|
||||
var temp = value.split(currentSeparator);
|
||||
Object.keys(value.split(currentSeparator)).some((val) => {
|
||||
var match = false;
|
||||
Object.keys(datas).some((key) => {
|
||||
if (datas[key].value == ('' + temp[val])) {
|
||||
actions.push(datas[key].label + currentSeparator);
|
||||
match = true;
|
||||
}
|
||||
})
|
||||
if (!match) {
|
||||
actions.push(temp[val] + currentSeparator);
|
||||
}
|
||||
})
|
||||
return actions.join('').substring(0, actions.join('').length - 1);
|
||||
}
|
||||
|
||||
// 字符串格式化(%s )
|
||||
export function sprintf(str) {
|
||||
var args = arguments, flag = true, i = 1;
|
||||
str = str.replace(/%s/g, function () {
|
||||
var arg = args[i++];
|
||||
if (typeof arg === 'undefined') {
|
||||
flag = false;
|
||||
return '';
|
||||
}
|
||||
return arg;
|
||||
});
|
||||
return flag ? str : '';
|
||||
}
|
||||
|
||||
// 转换字符串,undefined,null等转化为""
|
||||
export function parseStrEmpty(str) {
|
||||
if (!str || str == "undefined" || str == "null") {
|
||||
return "";
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
// 千位分隔
|
||||
export function thousandNumber (num) {
|
||||
return String(num).replace(/\B(?=(\d{3})+(?!\d))/g, ','); // 3是千分位,4是万分位
|
||||
};
|
||||
|
||||
// 数据合并
|
||||
export function mergeRecursive(source, target) {
|
||||
for (var p in target) {
|
||||
try {
|
||||
if (target[p].constructor == Object) {
|
||||
source[p] = mergeRecursive(source[p], target[p]);
|
||||
} else {
|
||||
source[p] = target[p];
|
||||
}
|
||||
} catch (e) {
|
||||
source[p] = target[p];
|
||||
}
|
||||
}
|
||||
return source;
|
||||
};
|
||||
|
||||
/**
|
||||
* 构造树型结构数据
|
||||
* @param {*} data 数据源
|
||||
* @param {*} id id字段 默认 'id'
|
||||
* @param {*} parentId 父节点字段 默认 'parentId'
|
||||
* @param {*} children 孩子节点字段 默认 'children'
|
||||
*/
|
||||
export function handleTree(data, id, parentId, children) {
|
||||
let config = {
|
||||
id: id || 'id',
|
||||
parentId: parentId || 'parentId',
|
||||
childrenList: children || 'children'
|
||||
};
|
||||
|
||||
var childrenListMap = {};
|
||||
var nodeIds = {};
|
||||
var tree = [];
|
||||
|
||||
for (let d of data) {
|
||||
let parentId = d[config.parentId];
|
||||
if (childrenListMap[parentId] == null) {
|
||||
childrenListMap[parentId] = [];
|
||||
}
|
||||
nodeIds[d[config.id]] = d;
|
||||
childrenListMap[parentId].push(d);
|
||||
}
|
||||
|
||||
for (let d of data) {
|
||||
let parentId = d[config.parentId];
|
||||
if (nodeIds[parentId] == null) {
|
||||
tree.push(d);
|
||||
}
|
||||
}
|
||||
|
||||
for (let t of tree) {
|
||||
adaptToChildrenList(t);
|
||||
}
|
||||
|
||||
function adaptToChildrenList(o) {
|
||||
if (childrenListMap[o[config.id]] !== null) {
|
||||
o[config.childrenList] = childrenListMap[o[config.id]];
|
||||
}
|
||||
if (o[config.childrenList]) {
|
||||
for (let c of o[config.childrenList]) {
|
||||
adaptToChildrenList(c);
|
||||
}
|
||||
}
|
||||
}
|
||||
return tree;
|
||||
}
|
||||
|
||||
/**
|
||||
* 参数处理
|
||||
* @param {*} params 参数
|
||||
*/
|
||||
export function tansParams(params) {
|
||||
let result = ''
|
||||
for (const propName of Object.keys(params)) {
|
||||
const value = params[propName];
|
||||
var part = encodeURIComponent(propName) + "=";
|
||||
if (value !== null && value !== "" && typeof (value) !== "undefined") {
|
||||
if (typeof value === 'object') {
|
||||
for (const key of Object.keys(value)) {
|
||||
if (value[key] !== null && value[key] !== "" && typeof (value[key]) !== 'undefined') {
|
||||
let params = propName + '[' + key + ']';
|
||||
var subPart = encodeURIComponent(params) + "=";
|
||||
result += subPart + encodeURIComponent(value[key]) + "&";
|
||||
}
|
||||
}
|
||||
} else {
|
||||
result += part + encodeURIComponent(value) + "&";
|
||||
}
|
||||
}
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
|
||||
// 返回项目路径
|
||||
export function getNormalPath(p) {
|
||||
if (p.length === 0 || !p || p == 'undefined') {
|
||||
return p
|
||||
};
|
||||
let res = p.replace('//', '/')
|
||||
if (res[res.length - 1] === '/') {
|
||||
return res.slice(0, res.length - 1)
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
// 验证是否为blob格式
|
||||
export function blobValidate(data) {
|
||||
return data.type !== 'application/json'
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function getList(queryParams) {
|
||||
return request({
|
||||
url: '/basedatamanage/organization/organization',
|
||||
method: 'get',
|
||||
param: queryParams
|
||||
})
|
||||
}
|
||||
|
||||
export function addOrganization(data) {
|
||||
return request({
|
||||
url: '/basedatamanage/organization/organization',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function updateOrganization(data) {
|
||||
return request({
|
||||
url: '/basedatamanage/organization/organization',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function deleteOrganization(param) {
|
||||
return request({
|
||||
url: '/basedatamanage/organization/organization',
|
||||
method: 'delete',
|
||||
params: param
|
||||
})
|
||||
}
|
||||
|
||||
export function getOrgDetail(id) {
|
||||
return request({
|
||||
url: '/basedatamanage/organization/organization?orgId=' + id,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
export function initOrgTypeOption() {
|
||||
return request({
|
||||
url: '/basedatamanage/organization/init',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
export function disableOrg(id) {
|
||||
return request({
|
||||
url: '/basedatamanage/organization/organization-inactive?orgId=' + id,
|
||||
method: 'put',
|
||||
})
|
||||
}
|
||||
|
||||
export function enableOrg(id) {
|
||||
return request({
|
||||
url: '/basedatamanage/organization/organization-active?orgId=' + id,
|
||||
method: 'put',
|
||||
})
|
||||
}
|
||||
296
openhis-ui-vue3/src/views/basicmanage/organization/index.vue
Normal file
296
openhis-ui-vue3/src/views/basicmanage/organization/index.vue
Normal file
@@ -0,0 +1,296 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd"
|
||||
>新增</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-tooltip
|
||||
:content="selectRowIds.length == 0 ? '至少选择一条数据' : ''"
|
||||
placement="top"
|
||||
:disabled="selectRowIds.length != 0"
|
||||
>
|
||||
<el-button
|
||||
type=""
|
||||
plain
|
||||
icon="Delete"
|
||||
:disabled="selectRowIds.length == 0"
|
||||
@click="handleDelete"
|
||||
>删除</el-button
|
||||
>
|
||||
</el-tooltip>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="" plain icon="Download" @click="handleExport"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="" plain icon="Refresh" @click="getPageList"
|
||||
>刷新</el-button
|
||||
>
|
||||
</el-col>
|
||||
<right-toolbar
|
||||
v-model:showSearch="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
</el-row>
|
||||
<el-table
|
||||
ref="orgTableRef"
|
||||
v-loading="loading"
|
||||
:data="organization"
|
||||
row-key="id"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="科室名称" align="left" prop="name" />
|
||||
<el-table-column label="科室类型" align="center" prop="typeEnum" />
|
||||
<el-table-column label="状态" align="center" prop="activeFlag" />
|
||||
<el-table-column label="操作" align="center">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@click="handelEdit(scope.row)"
|
||||
v-hasPermi="['system:dict:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@click="handleDisabled(scope.row.id)"
|
||||
v-hasPermi="['system:dict:remove']"
|
||||
v-if="scope.row.activeFlag == '1'"
|
||||
>停用</el-button
|
||||
>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@click="handleDisabled(scope.row.id)"
|
||||
v-hasPermi="['system:dict:remove']"
|
||||
v-else
|
||||
>启用</el-button
|
||||
>
|
||||
<!-- <el-button
|
||||
link
|
||||
type="primary"
|
||||
@click="handleAddInferior(scope.row)"
|
||||
v-hasPermi="['system:dict:edit']"
|
||||
>添加下级</el-button
|
||||
> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改参数配置对话框 -->
|
||||
<el-dialog title="添加科室" v-model="open" width="600px" append-to-body>
|
||||
<el-form ref="orgRef" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="科室编号" prop="busNo">
|
||||
<el-input v-model="form.busNo" placeholder="请输入科室编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="科室名称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入科室名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="科室类型" prop="typeEnum">
|
||||
<el-select
|
||||
v-model="form.typeEnum"
|
||||
placeholder="请选择科室类型"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in orgTypeOption"
|
||||
:key="item.value"
|
||||
:label="item.code"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-col>
|
||||
<el-form-item label="上级科室" prop="busNoParent">
|
||||
<el-tree-select
|
||||
style="width: 100%"
|
||||
v-model="form.busNoParent"
|
||||
:data="organization"
|
||||
:props="{ value: 'busNo', label: 'name', children: 'children' }"
|
||||
value-key="id"
|
||||
check-strictly
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-form-item label="状态" prop="status"> </el-form-item> -->
|
||||
<!-- <el-form-item label="备注" prop="remark">
|
||||
<el-input
|
||||
v-model="form.remark"
|
||||
type="textarea"
|
||||
placeholder="请输入内容"
|
||||
></el-input>
|
||||
</el-form-item> -->
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="organization">
|
||||
import {
|
||||
getList,
|
||||
deleteOrganization,
|
||||
addOrganization,
|
||||
updateOrganization,
|
||||
disableOrg,
|
||||
initOrgTypeOption,
|
||||
getOrgDetail,
|
||||
enableOrg,
|
||||
} from "./components/api";
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { org_type } = proxy.useDict("org_type");
|
||||
const loading = ref(true);
|
||||
const organization = ref([]);
|
||||
const queryParams = ref({});
|
||||
const open = ref(false);
|
||||
const form = ref({});
|
||||
const orgTableRef = ref();
|
||||
const orgTypeOption = ref([]);
|
||||
const selectRowIds = ref([]);
|
||||
const total = ref(0);
|
||||
const rules = ref({
|
||||
busNo: [{ required: true, message: "请输入科室编号", trigger: "change" }],
|
||||
name: [
|
||||
{ required: true, message: "请输入科室名称", trigger: "change" },
|
||||
{ min: 2, max: 20, message: "长度在 2 到 20 个字符", trigger: "change" },
|
||||
],
|
||||
typeEnum: [{ required: true, message: "请选择科室类型", trigger: "change" }],
|
||||
});
|
||||
|
||||
getPageList();
|
||||
|
||||
function initOption() {
|
||||
if (orgTypeOption.value.length == 0) {
|
||||
initOrgTypeOption().then((res) => {
|
||||
orgTypeOption.value = res.data;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function reset() {
|
||||
form.value.busNo = undefined;
|
||||
form.value.name = undefined;
|
||||
form.value.typeEnum = undefined;
|
||||
form.value.busNoParent = undefined;
|
||||
proxy.resetForm("orgRef");
|
||||
}
|
||||
|
||||
function getPageList() {
|
||||
loading.value = false;
|
||||
getList(queryParams.value).then((res) => {
|
||||
organization.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
function handleAdd() {
|
||||
reset();
|
||||
initOption();
|
||||
open.value = true;
|
||||
console.log(form.value);
|
||||
}
|
||||
|
||||
function handelEdit(row) {
|
||||
reset();
|
||||
initOption();
|
||||
// if (row.busNo.lastIndexOf(".") != -1) {
|
||||
// row.busNoParent = row.busNo.substring(0, row.busNo.lastIndexOf("."));
|
||||
// row.busNo = row.busNo.substring(
|
||||
// row.busNo.lastIndexOf(".") + 1,
|
||||
// row.busNo.length
|
||||
// );
|
||||
// }
|
||||
form.value.busNo = row.busNo;
|
||||
form.value.name = row.name;
|
||||
form.value.typeEnum = row.typeEnum;
|
||||
form.value.busNoParent = undefined;
|
||||
open.value = true;
|
||||
}
|
||||
|
||||
function cancel() {
|
||||
open.value = false;
|
||||
reset();
|
||||
}
|
||||
|
||||
function submitForm() {
|
||||
proxy.$refs["orgRef"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (form.value.busNoParent) {
|
||||
form.value.busNo = form.value.busNoParent + "." + form.value.busNo;
|
||||
}
|
||||
if (form.value.id == undefined) {
|
||||
addOrganization(form.value).then((res) => {
|
||||
proxy.$modal.msgSuccess(res.msg);
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
} else {
|
||||
updateOrganization(form.value).then((res) => {
|
||||
proxy.$modal.msgSuccess(res.msg);
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function handleDelete() {
|
||||
loading.value = true;
|
||||
deleteOrganization({ ids: selectRowIds.value.join(",") }).then((res) => {
|
||||
proxy.$modal.msgSuccess(res.msg);
|
||||
loading.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
|
||||
function handleDisabled(id) {
|
||||
disableOrg(id).then((res) => {
|
||||
proxy.$modal.msgSuccess(res.msg);
|
||||
getList();
|
||||
});
|
||||
}
|
||||
|
||||
function handelEnable(id){
|
||||
enableOrg(id).then((res) => {
|
||||
proxy.$modal.msgSuccess(res.msg);
|
||||
getList();
|
||||
});
|
||||
}
|
||||
|
||||
function handleSelectionChange() {
|
||||
selectRowIds.value = orgTableRef.value
|
||||
.getSelectionRows()
|
||||
.map((item) => item.id);
|
||||
}
|
||||
|
||||
// function handleAddInferior(row) {
|
||||
// initOption();
|
||||
// proxy.resetForm("orgRef");
|
||||
// open.value = true;
|
||||
// form.value.busNoParent = row.busNo;
|
||||
// row.busNo = undefined;
|
||||
// }
|
||||
</script>
|
||||
@@ -13,7 +13,7 @@ export function getDiseaseList(query) {
|
||||
// 查询病种目录详细
|
||||
export function getDiseaseOne(id) {
|
||||
return request({
|
||||
url: '/datadictionary/disease/information-one' + parseStrEmpty(id),
|
||||
url: '/datadictionary/disease/information-one/' + parseStrEmpty(id),
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
@@ -36,18 +36,36 @@ export function editDisease(data) {
|
||||
})
|
||||
}
|
||||
|
||||
// 删除病种目录
|
||||
export function delUser(userId) {
|
||||
return request({
|
||||
url: '/system/user/' + userId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
// // 删除病种目录
|
||||
// export function delUser(userId) {
|
||||
// return request({
|
||||
// url: '/system/user/' + userId,
|
||||
// method: 'delete'
|
||||
// })
|
||||
// }
|
||||
|
||||
// 病种目录分类查询
|
||||
export function getDiseaseCategory() {
|
||||
return request({
|
||||
url: '/datadictionary/disease/information-category',
|
||||
url: '/datadictionary/disease/information-init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 停用病种目录
|
||||
export function stopDisease(ids) {
|
||||
return request({
|
||||
url: '/datadictionary/disease/information-stop',
|
||||
method: 'put',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
// 启用病种目录
|
||||
export function startDisease(ids) {
|
||||
return request({
|
||||
url: '/datadictionary/disease/information-start',
|
||||
method: 'put',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
@@ -12,19 +12,33 @@
|
||||
style="margin-bottom: 20px"
|
||||
/>
|
||||
</div> -->
|
||||
<!-- <div class="head-container">
|
||||
<div class="head-container">
|
||||
<el-tree
|
||||
:data="conditionDefinitionOptions"
|
||||
:props="{ label: 'label', children: 'children' }"
|
||||
:props="{ label: 'info', children: 'children' }"
|
||||
:expand-on-click-node="false"
|
||||
:filter-node-method="filterNode"
|
||||
ref="deptTreeRef"
|
||||
node-key="id"
|
||||
node-key="value"
|
||||
highlight-current
|
||||
default-expand-all
|
||||
@node-click="handleNodeClick"
|
||||
/>
|
||||
</div> -->
|
||||
>
|
||||
<template v-slot="{ node, data }">
|
||||
<span class="custom-tree-node">
|
||||
<i
|
||||
:class="{
|
||||
'el-icon-folder': !node.expanded && !data.children.length,
|
||||
'el-icon-folder-opened': node.expanded,
|
||||
'el-icon-document': data.children.length === 0,
|
||||
}"
|
||||
style="color: #409eff"
|
||||
/>
|
||||
<span>{{ node.label }}</span>
|
||||
</span>
|
||||
</template>
|
||||
</el-tree>
|
||||
</div>
|
||||
</el-col>
|
||||
<!--用户数据-->
|
||||
<el-col :span="20" :xs="24">
|
||||
@@ -35,26 +49,26 @@
|
||||
v-show="showSearch"
|
||||
label-width="68px"
|
||||
>
|
||||
<el-form-item label="疾病:" prop="diseaseName">
|
||||
<el-form-item label="疾病:" prop="searchKey">
|
||||
<el-input
|
||||
v-model="queryParams.diseaseName"
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="名称/ICD10编码/拼音助记码"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否停用" prop="status">
|
||||
<el-form-item label="是否停用" prop="statusEnum">
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
v-model="queryParams.statusEnum"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in sys_normal_disable"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
v-for="status in statusFlagOptions"
|
||||
:key="status.value"
|
||||
:label="status.info"
|
||||
:value="status.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -287,23 +301,29 @@ import {
|
||||
addDisease,
|
||||
getDiseaseCategory,
|
||||
getDiseaseOne,
|
||||
stopDisease,
|
||||
startDisease
|
||||
} from "./components/disease";
|
||||
|
||||
const router = useRouter();
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { sys_normal_disable, sys_user_sex } = proxy.useDict( "sys_normal_disable","sys_user_sex");
|
||||
const { sys_normal_disable, sys_user_sex } = proxy.useDict(
|
||||
"sys_normal_disable",
|
||||
"sys_user_sex"
|
||||
);
|
||||
|
||||
const diseaseList = ref([]);
|
||||
const open = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref([]);
|
||||
const selectedData = ref([]); // 存储选择的行数据
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref("");
|
||||
const conditionDefinitionOptions = ref(undefined);
|
||||
// 是否停用
|
||||
const statusFlagOptions = ref(undefined);
|
||||
// const initPassword = ref(undefined);
|
||||
// const postOptions = ref([]);
|
||||
// const roleOptions = ref([]);
|
||||
@@ -313,16 +333,15 @@ const data = reactive({
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 50,
|
||||
diseaseName: undefined, // 疾病名称
|
||||
status: undefined, // 状态(包括 1:预置,2:启用,3:停用)
|
||||
searchKey: undefined, // 疾病名称
|
||||
statusEnum: undefined, // 状态(包括 1:预置,2:启用,3:停用)
|
||||
sourceEnum: undefined, // 来源(包括 1:病种目录分类,2:自定义)
|
||||
},
|
||||
rules: {
|
||||
name: [
|
||||
{ required: true, message: "名称不能为空", trigger: "blur" },
|
||||
],
|
||||
name: [{ required: true, message: "名称不能为空", trigger: "blur" }],
|
||||
conditionCode: [
|
||||
{ required: true, message: "编码不能为空", trigger: "blur" },
|
||||
]
|
||||
],
|
||||
},
|
||||
});
|
||||
|
||||
@@ -341,12 +360,16 @@ const filterNode = (value, data) => {
|
||||
function getDiseaseCategoryList() {
|
||||
getDiseaseCategory().then((response) => {
|
||||
console.log(response, "response病种目录分类查询下拉树结构");
|
||||
conditionDefinitionOptions.value = response.data;
|
||||
conditionDefinitionOptions.value = response.data.diseaseCategoryList;
|
||||
statusFlagOptions.value = response.data.statusFlagOptions;
|
||||
|
||||
});
|
||||
}
|
||||
/** 查询病种目录列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
// queryParams.value.statusEnum = +queryParams.value.statusEnum
|
||||
console.log(queryParams.value, "queryParams.value");
|
||||
getDiseaseList(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
console.log(res, "res");
|
||||
@@ -357,7 +380,7 @@ function getList() {
|
||||
}
|
||||
/** 节点单击事件 */
|
||||
function handleNodeClick(data) {
|
||||
queryParams.value.deptId = data.id;
|
||||
queryParams.value.sourceEnum = data.id;
|
||||
handleQuery();
|
||||
}
|
||||
/** 搜索按钮操作 */
|
||||
@@ -374,17 +397,12 @@ function handleQuery() {
|
||||
// handleQuery();
|
||||
// };
|
||||
/** 启用按钮操作 */
|
||||
function handleStart() {
|
||||
selectedData.value.forEach((item) => {
|
||||
item.statusEnum = "2";
|
||||
});
|
||||
const data = selectedData.value;
|
||||
// selectedData
|
||||
console.log(data, "data");
|
||||
function handleStart(row) {
|
||||
const stardIds = row.id || ids.value;
|
||||
proxy.$modal
|
||||
.confirm("是否确定启用数据!")
|
||||
.then(function () {
|
||||
return editDisease(data);
|
||||
return startDisease(stardIds);
|
||||
})
|
||||
.then(() => {
|
||||
getList();
|
||||
@@ -393,16 +411,12 @@ function handleStart() {
|
||||
.catch(() => {});
|
||||
}
|
||||
/** 停用按钮操作 */
|
||||
function handleClose() {
|
||||
selectedData.value.forEach((item) => {
|
||||
item.statusEnum = "3";
|
||||
});
|
||||
const data = selectedData.value;
|
||||
console.log(data, "data");
|
||||
function handleClose(row) {
|
||||
const stopIds = row.id || ids.value;
|
||||
proxy.$modal
|
||||
.confirm("是否确认停用数据!")
|
||||
.then(function () {
|
||||
return editDisease(data);
|
||||
return stopDisease(stopIds);
|
||||
})
|
||||
.then(() => {
|
||||
getList();
|
||||
@@ -435,7 +449,8 @@ function handleExport() {
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
console.log(selection, "selection");
|
||||
selectedData.value = selection.map((item) => ({ ...item })); // 存储选择的行数据
|
||||
// selectedData.value = selection.map((item) => ({ ...item })); // 存储选择的行数据
|
||||
ids.value = selection.map(item => item.userId);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
@@ -487,9 +502,7 @@ function submitForm() {
|
||||
// ? (form.value.statusEnum = "3")
|
||||
// : (form.value.statusEnum = "2");
|
||||
console.log(form.value, "editDisease", form.value.statusEnum);
|
||||
let param = [];
|
||||
param.push(form.value);
|
||||
editDisease(param).then((response) => {
|
||||
editDisease(form.value).then((response) => {
|
||||
proxy.$modal.msgSuccess("修改成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
@@ -518,3 +531,9 @@ function handleView(row) {
|
||||
getDiseaseCategoryList();
|
||||
getList();
|
||||
</script>
|
||||
<style scoped>
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
@@ -1,43 +1,42 @@
|
||||
import request from '@/utils/request'
|
||||
import { parseStrEmpty } from "@/utils/openhis";
|
||||
|
||||
// 查询病种目录列表
|
||||
export function getDiseaseList(query) {
|
||||
// 查询药品目录列表
|
||||
export function getMedicationList(query) {
|
||||
return request({
|
||||
url: '/datadictionary/disease/information-page',
|
||||
url: '/datadictionary/medication/information-page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询病种目录详细
|
||||
export function getDiseaseOne(id) {
|
||||
// 查询药品目录详细
|
||||
export function getMedicationOne(id) {
|
||||
return request({
|
||||
url: '/datadictionary/disease/information-one',
|
||||
method: 'get',
|
||||
params: id
|
||||
url: '/datadictionary/medication/information-one/' + parseStrEmpty(id),
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增病种目录
|
||||
export function addDisease(data) {
|
||||
// 新增药品目录
|
||||
export function addMedication(data) {
|
||||
return request({
|
||||
url: '/datadictionary/disease/information',
|
||||
url: '/datadictionary/medication/information',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改病种目录
|
||||
export function editDisease(data) {
|
||||
// 修改药品目录
|
||||
export function editMedication(data) {
|
||||
return request({
|
||||
url: '/datadictionary/disease/information',
|
||||
url: '/datadictionary/medication/information',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除病种目录
|
||||
// 删除药品目录
|
||||
export function delUser(userId) {
|
||||
return request({
|
||||
url: '/system/user/' + userId,
|
||||
@@ -45,10 +44,10 @@ export function delUser(userId) {
|
||||
})
|
||||
}
|
||||
|
||||
// 病种目录分类查询
|
||||
export function getDiseaseCategory() {
|
||||
// 药品目录分类查询
|
||||
export function getMedicationCategory() {
|
||||
return request({
|
||||
url: '/datadictionary/disease/information-category',
|
||||
url: '/datadictionary/medication/information-init',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -7,15 +7,15 @@
|
||||
<el-form
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
ref="diseaseRef"
|
||||
ref="medicationRef"
|
||||
label-width="110px"
|
||||
label-position="left"
|
||||
>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="编号" prop="conditionCode">
|
||||
<el-form-item label="编号" prop="busNo">
|
||||
<el-input
|
||||
v-model="form.conditionCode"
|
||||
v-model="form.busNo"
|
||||
placeholder="请输入编码"
|
||||
maxlength="30"
|
||||
:disabled="form.id != undefined"
|
||||
@@ -28,36 +28,58 @@
|
||||
v-model="form.name"
|
||||
placeholder="请输入药品名"
|
||||
maxlength="30"
|
||||
:disabled="form.id != undefined"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="拼音码(品名)" prop="name">
|
||||
<el-form-item label="拼音码(品名)" prop="pyStr">
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
v-model="form.pyStr"
|
||||
placeholder=""
|
||||
maxlength="30"
|
||||
:disabled="form.id != undefined"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="规格" prop="conditionCode">
|
||||
<el-form-item label="规格" prop="totalVolume">
|
||||
<el-input
|
||||
v-model="form.conditionCode"
|
||||
v-model="form.totalVolume"
|
||||
placeholder=""
|
||||
maxlength="30"
|
||||
:disabled="form.id != undefined"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="小规格含量" prop="name">
|
||||
<el-input v-model="form.name" placeholder="" maxlength="30" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="商品名" prop="merchandiseName">
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
v-model="form.merchandiseName"
|
||||
placeholder=""
|
||||
maxlength="30"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="厂家/产地" prop="manufacturerId">
|
||||
<el-input
|
||||
v-model="form.manufacturerId"
|
||||
placeholder=""
|
||||
maxlength="30"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="包装单位" prop="unitCode">
|
||||
<el-input
|
||||
v-model="form.unitCode"
|
||||
placeholder=""
|
||||
maxlength="30"
|
||||
:disabled="form.id != undefined"
|
||||
@@ -65,9 +87,9 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="商品名" prop="name">
|
||||
<el-form-item label="最小单位" prop="minUnitCode">
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
v-model="form.minUnitCode"
|
||||
placeholder=""
|
||||
maxlength="30"
|
||||
:disabled="form.id != undefined"
|
||||
@@ -77,41 +99,9 @@
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="厂家/产地" prop="conditionCode">
|
||||
<el-form-item label="拆零比" prop="partPercent">
|
||||
<el-input
|
||||
v-model="form.conditionCode"
|
||||
placeholder=""
|
||||
maxlength="30"
|
||||
:disabled="form.id != undefined"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="包装单位" prop="name">
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
placeholder=""
|
||||
maxlength="30"
|
||||
:disabled="form.id != undefined"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="最小单位" prop="name">
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
placeholder=""
|
||||
maxlength="30"
|
||||
:disabled="form.id != undefined"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="拆零比" prop="conditionCode">
|
||||
<el-input
|
||||
v-model="form.conditionCode"
|
||||
v-model="form.partPercent"
|
||||
placeholder=""
|
||||
maxlength="30"
|
||||
:disabled="form.id != undefined"
|
||||
@@ -141,33 +131,22 @@
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="批准文号" prop="conditionCode">
|
||||
<el-form-item label="批准文号" prop="approvalNumber">
|
||||
<el-input
|
||||
v-model="form.conditionCode"
|
||||
v-model="form.approvalNumber"
|
||||
placeholder=""
|
||||
maxlength="30"
|
||||
:disabled="form.id != undefined"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="采购单价" prop="name">
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
placeholder=""
|
||||
maxlength="30"
|
||||
:disabled="form.id != undefined"
|
||||
/>
|
||||
<el-input v-model="form.name" placeholder="" maxlength="30" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="采购拆零价" prop="name">
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
placeholder=""
|
||||
maxlength="30"
|
||||
:disabled="form.id != undefined"
|
||||
/>
|
||||
<el-input v-model="form.name" placeholder="" maxlength="30" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -178,13 +157,13 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="皮试判别" prop="name">
|
||||
<el-checkbox v-model="form.status"></el-checkbox>
|
||||
<el-form-item label="皮试判别" prop="skinTestFlag">
|
||||
<el-checkbox v-model="form.skinTestFlag"></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="注射药品" prop="name">
|
||||
<el-checkbox v-model="form.status"></el-checkbox>
|
||||
<el-form-item label="注射药品" prop="injectFlag">
|
||||
<el-checkbox v-model="form.injectFlag"></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -208,41 +187,49 @@
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="给药途径" prop="conditionCode">
|
||||
<el-select v-model="queryParams.status" clearable>
|
||||
<el-option
|
||||
v-for="dict in sys_normal_disable"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="用药频次" prop="name">
|
||||
<el-select v-model="queryParams.status" clearable>
|
||||
<el-option
|
||||
v-for="dict in sys_normal_disable"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="单次剂量" prop="name" inline>
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
placeholder=""
|
||||
maxlength="30"
|
||||
:disabled="form.id != undefined"
|
||||
style="width: 49%"
|
||||
/>
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
clearable
|
||||
:disabled="form.id != undefined"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in sys_normal_disable"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="用药频次" prop="rateCode">
|
||||
<el-select
|
||||
v-model="queryParams.rateCode"
|
||||
clearable
|
||||
:disabled="form.id != undefined"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in sys_normal_disable"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="单次剂量" prop="dose" inline>
|
||||
<el-input
|
||||
v-model="form.dose"
|
||||
placeholder=""
|
||||
maxlength="30"
|
||||
style="width: 49%"
|
||||
/>
|
||||
<el-select
|
||||
v-model="queryParams.doseUnitCode"
|
||||
clearable
|
||||
style="width: 49%"
|
||||
:disabled="form.id != undefined"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in sys_normal_disable"
|
||||
@@ -256,8 +243,12 @@
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="剂型" prop="conditionCode">
|
||||
<el-select v-model="queryParams.status" clearable>
|
||||
<el-form-item label="剂型" prop="doseFormCode">
|
||||
<el-select
|
||||
v-model="queryParams.doseFormCode"
|
||||
clearable
|
||||
:disabled="form.id != undefined"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in sys_normal_disable"
|
||||
:key="dict.value"
|
||||
@@ -269,7 +260,11 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="病案结算项" prop="name">
|
||||
<el-select v-model="queryParams.status" clearable>
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
clearable
|
||||
:disabled="form.id != undefined"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in sys_normal_disable"
|
||||
:key="dict.value"
|
||||
@@ -281,14 +276,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="剂量单位换算比" prop="name">
|
||||
<el-select v-model="queryParams.status" clearable>
|
||||
<el-option
|
||||
v-for="dict in sys_normal_disable"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
<el-input v-model="form.name" placeholder="" maxlength="30" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -349,7 +337,11 @@
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="库存预警量(最小单位)" prop="conditionCode" class="custom-label-spacing">
|
||||
<el-form-item
|
||||
label="库存预警量(最小单位)"
|
||||
prop="conditionCode"
|
||||
class="custom-label-spacing"
|
||||
>
|
||||
<el-input
|
||||
v-model="form.conditionCode"
|
||||
placeholder=""
|
||||
@@ -364,7 +356,11 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="取消批次号管理" prop="name" class="custom-label-spacing">
|
||||
<el-form-item
|
||||
label="取消批次号管理"
|
||||
prop="name"
|
||||
class="custom-label-spacing"
|
||||
>
|
||||
<el-checkbox v-model="form.status"></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -410,9 +406,9 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="限制使用范围" prop="name">
|
||||
<el-form-item label="限制使用范围" prop="restrictedScope">
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
v-model="form.restrictedScope"
|
||||
placeholder=""
|
||||
maxlength="30"
|
||||
:disabled="form.id != undefined"
|
||||
@@ -420,9 +416,9 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label=" 限制使用标记" prop="name">
|
||||
<el-form-item label="限制使用标记" prop="restrictedFlag">
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
v-model="form.restrictedFlag"
|
||||
placeholder=""
|
||||
maxlength="30"
|
||||
:disabled="form.id != undefined"
|
||||
@@ -503,7 +499,7 @@
|
||||
<el-form-item label="说明" prop="status">
|
||||
<el-input
|
||||
v-model="textarea2"
|
||||
:autosize="{ minRows: 4, maxRows: 10}"
|
||||
:autosize="{ minRows: 4, maxRows: 10 }"
|
||||
type="textarea"
|
||||
placeholder=""
|
||||
/>
|
||||
@@ -539,23 +535,9 @@ const { sys_normal_disable, sys_user_sex } = proxy.useDict(
|
||||
"sys_user_sex"
|
||||
);
|
||||
|
||||
const diseaseList = ref([]);
|
||||
const open = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref([]);
|
||||
const selectedData = ref([]); // 存储选择的行数据
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref("");
|
||||
const dateRange = ref([]);
|
||||
const deptName = ref("");
|
||||
const visible = ref(false);
|
||||
const conditionDefinitionOptions = ref(undefined);
|
||||
// const initPassword = ref(undefined);
|
||||
// const postOptions = ref([]);
|
||||
// const roleOptions = ref([]);
|
||||
const emits = defineEmits(['submit']); // 声明自定义事件
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
@@ -566,23 +548,76 @@ const data = reactive({
|
||||
status: undefined, // 状态(包括 1:预置,2:启用,3:停用)
|
||||
},
|
||||
rules: {
|
||||
name: [{ required: true, message: "名称不能为空", trigger: "blur" }],
|
||||
conditionCode: [
|
||||
{ required: true, message: "编码不能为空", trigger: "blur" },
|
||||
],
|
||||
// busNo: [{ required: true, message: "编码不能为空", trigger: "blur" }],
|
||||
// name: [{ required: true, message: "名称不能为空", trigger: "blur" }],
|
||||
// conditionCode: [
|
||||
// { required: true, message: "编码不能为空", trigger: "blur" },
|
||||
// ],
|
||||
},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
const props = defineProps({
|
||||
item: {
|
||||
type: Object,
|
||||
required: false,
|
||||
},
|
||||
});
|
||||
|
||||
// 显示弹框
|
||||
function show() {
|
||||
// queryParams.roleId = props.roleId;
|
||||
// getList();
|
||||
visible.value = true;
|
||||
}
|
||||
// 显示弹框
|
||||
function edit() {
|
||||
// queryParams.roleId = props.roleId;
|
||||
// getList();
|
||||
console.log(props, "22222");
|
||||
console.log(props.item);
|
||||
console.log("props.item");
|
||||
form.value = props.item;
|
||||
visible.value = true;
|
||||
}
|
||||
/** 重置操作表单 */
|
||||
function reset() {
|
||||
form.value = {
|
||||
id: undefined,
|
||||
busNo: undefined, // 编码
|
||||
name: undefined, // 名称
|
||||
pyStr: undefined, // 拼音码(品名)
|
||||
totalVolume: undefined, // 规格
|
||||
merchandiseName: undefined, // 商品名称
|
||||
manufacturerId: undefined, // 厂商ID
|
||||
unitCode: undefined, // 包装单位
|
||||
minUnitCode: undefined, // 最小单位
|
||||
partPercent: undefined, // 拆零比
|
||||
approvalNumber: undefined, // 批准文号
|
||||
skinTestFlag: undefined, // 皮试标志
|
||||
injectFlag: undefined, // 注射标志
|
||||
rateCode: undefined, // 医保支付比例编码
|
||||
doseCode: undefined, // 单次剂量
|
||||
doseUnitCode: undefined, // 单次剂量单位
|
||||
doseFormCode: undefined, // 剂型
|
||||
restrictedScope: undefined, // 限制范围
|
||||
restrictedFlag: undefined, // 限制标志
|
||||
};
|
||||
proxy.resetForm("medicationRef");
|
||||
}
|
||||
/** 提交按钮 */
|
||||
function submitForm() {
|
||||
proxy.$refs["medicationRef"].validate((valid) => {
|
||||
if (valid) {
|
||||
// 将表单数据发送给父组件
|
||||
emits("submit", form.value);
|
||||
}
|
||||
});
|
||||
}
|
||||
defineExpose({
|
||||
show,
|
||||
edit,
|
||||
});
|
||||
</script>
|
||||
<style scoped>
|
||||
|
||||
@@ -0,0 +1,363 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 添加或修改用户配置对话框 -->
|
||||
<el-dialog :title="title" v-model="visible" width="800px" append-to-body>
|
||||
<el-form
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
ref="diseaseRef"
|
||||
label-width="110px"
|
||||
label-position="left"
|
||||
>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="编号" prop="busNo">
|
||||
<el-input
|
||||
v-model="form.busNo"
|
||||
placeholder="请输入编码"
|
||||
maxlength="30"
|
||||
:disabled="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="品名" prop="name">
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
placeholder="请输入药品名"
|
||||
maxlength="30"
|
||||
:disabled="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="拼音码(品名)" prop="name">
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
placeholder=""
|
||||
maxlength="30"
|
||||
:disabled="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="厂家/产地" prop="conditionCode">
|
||||
<el-select v-model="queryParams.status" clearable>
|
||||
<el-option
|
||||
v-for="dict in sys_normal_disable"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="批准文号" prop="name">
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
placeholder=""
|
||||
maxlength="30"
|
||||
:disabled="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="条形码" prop="name">
|
||||
<el-input v-model="form.name" placeholder="" maxlength="30" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="单位" prop="conditionCode">
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
clearable
|
||||
:disabled="true"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in sys_normal_disable"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="零售价" prop="name">
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
placeholder=""
|
||||
maxlength="30"
|
||||
:disabled="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="规格" prop="name">
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
placeholder=""
|
||||
maxlength="30"
|
||||
:disabled="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item
|
||||
label="最小单位"
|
||||
prop="conditionCode"
|
||||
>
|
||||
<el-select v-model="queryParams.status" clearable :disabled="true">
|
||||
<el-option
|
||||
v-for="dict in sys_normal_disable"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="拆零比" prop="conditionCode">
|
||||
<el-input
|
||||
v-model="form.conditionCode"
|
||||
placeholder=""
|
||||
maxlength="30"
|
||||
:disabled="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="拆零零售价" prop="name">
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
placeholder=""
|
||||
maxlength="30"
|
||||
:disabled="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="处方限量(最小单位)" prop="conditionCode" class="custom-label-spacing">
|
||||
<el-input
|
||||
v-model="form.conditionCode"
|
||||
placeholder=""
|
||||
maxlength="30"
|
||||
:disabled="form.id != undefined"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="皮试判别" prop="name">
|
||||
<el-checkbox v-model="form.status" :disabled="true"></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="注射药品" prop="name">
|
||||
<el-checkbox v-model="form.status" :disabled="true"></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="给药途径" prop="conditionCode">
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
clearable
|
||||
:disabled="true"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in sys_normal_disable"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="用药频次" prop="name" :disabled="true">
|
||||
<el-select v-model="queryParams.status" clearable :disabled="true">
|
||||
<el-option
|
||||
v-for="dict in sys_normal_disable"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="单次剂量" prop="name" inline :disabled="true">
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
placeholder=""
|
||||
maxlength="30"
|
||||
:disabled="form.id != undefined"
|
||||
style="width: 49%"
|
||||
/>
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
clearable
|
||||
style="width: 49%"
|
||||
:disabled="true"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in sys_normal_disable"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="剂型" prop="conditionCode">
|
||||
<el-select v-model="queryParams.status" clearable :disabled="true">
|
||||
<el-option
|
||||
v-for="dict in sys_normal_disable"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="结算项目" prop="name">
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
clearable
|
||||
:disabled="true"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in sys_normal_disable"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="16">
|
||||
<el-form-item label="说明" prop="status">
|
||||
<el-input
|
||||
v-model="textarea2"
|
||||
:autosize="{ minRows: 4, maxRows: 10 }"
|
||||
type="textarea"
|
||||
placeholder=""
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="MedicineDialog">
|
||||
// import {
|
||||
// getDiseaseList,
|
||||
// editDisease,
|
||||
// addDisease,
|
||||
// getDiseaseCategory,
|
||||
// getDiseaseOne,
|
||||
// } from "./components/medicine";
|
||||
|
||||
const router = useRouter();
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { sys_normal_disable, sys_user_sex } = proxy.useDict(
|
||||
"sys_normal_disable",
|
||||
"sys_user_sex"
|
||||
);
|
||||
|
||||
const diseaseList = ref([]);
|
||||
const open = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref([]);
|
||||
const selectedData = ref([]); // 存储选择的行数据
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref("");
|
||||
const dateRange = ref([]);
|
||||
const deptName = ref("");
|
||||
const visible = ref(false);
|
||||
const conditionDefinitionOptions = ref(undefined);
|
||||
// const initPassword = ref(undefined);
|
||||
// const postOptions = ref([]);
|
||||
// const roleOptions = ref([]);
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 50,
|
||||
diseaseName: undefined, // 疾病名称
|
||||
status: undefined, // 状态(包括 1:预置,2:启用,3:停用)
|
||||
},
|
||||
rules: {
|
||||
name: [{ required: true, message: "名称不能为空", trigger: "blur" }],
|
||||
conditionCode: [
|
||||
{ required: true, message: "编码不能为空", trigger: "blur" },
|
||||
],
|
||||
},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
const props = defineProps({
|
||||
item: {
|
||||
type: Object,
|
||||
required: false,
|
||||
},
|
||||
});
|
||||
|
||||
// 显示弹框
|
||||
function show() {
|
||||
// queryParams.roleId = props.roleId;
|
||||
// getList();
|
||||
visible.value = true;
|
||||
}
|
||||
// 显示弹框
|
||||
function edit() {
|
||||
// queryParams.roleId = props.roleId;
|
||||
// getList();
|
||||
console.log(props, "22222");
|
||||
console.log(props.item);
|
||||
console.log("props.item");
|
||||
form.value = props.item;
|
||||
visible.value = true;
|
||||
}
|
||||
defineExpose({
|
||||
show,
|
||||
edit,
|
||||
});
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-form--inline .el-form-item {
|
||||
display: inline-flex;
|
||||
vertical-align: middle;
|
||||
margin-right: 10px !important;
|
||||
}
|
||||
|
||||
/* 使用深度选择器 */
|
||||
.custom-label-spacing :deep(.el-form-item__label) {
|
||||
line-height: 1.2; /* 调整行间距 */
|
||||
margin-bottom: 4px; /* 调整 label 和输入框之间的间距 */
|
||||
}
|
||||
</style>
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="20">
|
||||
<!--疾病目录数据-->
|
||||
<!--药品目录-->
|
||||
<el-col :span="4" :xs="24">
|
||||
<!-- <div class="head-container">
|
||||
<el-input
|
||||
@@ -12,21 +12,21 @@
|
||||
style="margin-bottom: 20px"
|
||||
/>
|
||||
</div> -->
|
||||
<!-- <div class="head-container">
|
||||
<div class="head-container">
|
||||
<el-tree
|
||||
:data="conditionDefinitionOptions"
|
||||
:props="{ label: 'label', children: 'children' }"
|
||||
:data="medicationOptions"
|
||||
:props="{ label: 'info', children: 'children' }"
|
||||
:expand-on-click-node="false"
|
||||
:filter-node-method="filterNode"
|
||||
ref="deptTreeRef"
|
||||
ref="medicationTreeRef"
|
||||
node-key="id"
|
||||
highlight-current
|
||||
default-expand-all
|
||||
@node-click="handleNodeClick"
|
||||
/>
|
||||
</div> -->
|
||||
</div>
|
||||
</el-col>
|
||||
<!--用户数据-->
|
||||
<!--药品目录-->
|
||||
<el-col :span="20" :xs="24">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
@@ -37,9 +37,9 @@
|
||||
>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="药品" prop="diseaseName" label-width="40">
|
||||
<el-form-item label="药品" prop="searchKey" label-width="40">
|
||||
<el-input
|
||||
v-model="queryParams.diseaseName"
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="品名/商品名/英文品名/编码/拼音"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@@ -53,7 +53,7 @@
|
||||
prop="status"
|
||||
label-width="100"
|
||||
>
|
||||
<el-select v-model="queryParams.status" clearable>
|
||||
<el-select v-model="queryParams.statusEnum" clearable>
|
||||
<el-option
|
||||
v-for="dict in sys_normal_disable"
|
||||
:key="dict.value"
|
||||
@@ -70,7 +70,7 @@
|
||||
label-width="100"
|
||||
>
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
v-model="queryParams.ybMatchFlag"
|
||||
placeholder="用户状态"
|
||||
clearable
|
||||
>
|
||||
@@ -83,7 +83,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<!-- <el-col :span="4">
|
||||
<el-form-item label="已发生业务" prop="status" label-width="100">
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
@@ -98,7 +98,7 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
<el-col :span="4">
|
||||
<el-form-item label="医保等级" prop="status" label-width="80">
|
||||
<el-select
|
||||
@@ -116,7 +116,6 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- <el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
@@ -129,7 +128,7 @@
|
||||
type="primary"
|
||||
plain
|
||||
icon="Plus"
|
||||
@click="openMedicineDialog"
|
||||
@click="openAddMedicine"
|
||||
v-hasPermi="['system:user:add']"
|
||||
>添加新项目</el-button
|
||||
>
|
||||
@@ -154,7 +153,7 @@
|
||||
>停用</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
@@ -164,7 +163,7 @@
|
||||
v-hasPermi="['system:user:remove']"
|
||||
>启用</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
@@ -189,7 +188,7 @@
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="diseaseList"
|
||||
:data="medicationList"
|
||||
@selection-change="handleSelectionChange"
|
||||
width="90%"
|
||||
>
|
||||
@@ -197,8 +196,8 @@
|
||||
<el-table-column
|
||||
label="编码"
|
||||
align="center"
|
||||
key="conditionCode"
|
||||
prop="conditionCode"
|
||||
key="busNo"
|
||||
prop="busNo"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
@@ -211,23 +210,23 @@
|
||||
<el-table-column
|
||||
label="规格"
|
||||
align="center"
|
||||
key="pyStr"
|
||||
prop="pyStr"
|
||||
key="totalVolume"
|
||||
prop="totalVolume"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="厂家(产地)"
|
||||
align="center"
|
||||
key="ybNo"
|
||||
prop="ybNo"
|
||||
key="manufacturerId"
|
||||
prop="manufacturerId"
|
||||
:show-overflow-tooltip="true"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
label="单位"
|
||||
align="center"
|
||||
key="ybName"
|
||||
prop="ybName"
|
||||
key="unitCode"
|
||||
prop="unitCode"
|
||||
:show-overflow-tooltip="true"
|
||||
width="50"
|
||||
/>
|
||||
@@ -255,8 +254,8 @@
|
||||
<el-table-column
|
||||
label="拆零比"
|
||||
align="center"
|
||||
key="statusEnum"
|
||||
rop="statusEnum"
|
||||
key="partPercent"
|
||||
rop="partPercent"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
@@ -269,18 +268,18 @@
|
||||
<el-table-column
|
||||
label="医保编码"
|
||||
align="center"
|
||||
key="statusEnum"
|
||||
rop="statusEnum"
|
||||
key="ybNo"
|
||||
rop="ybNo"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
label="医保已对码"
|
||||
align="center"
|
||||
key="statusEnum"
|
||||
rop="statusEnum"
|
||||
key="ybMatchFlag"
|
||||
rop="ybMatchFlag"
|
||||
:show-overflow-tooltip="true"
|
||||
width="100"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
label="医保等级"
|
||||
@@ -299,16 +298,16 @@
|
||||
<el-table-column
|
||||
label="限制使用标记"
|
||||
align="center"
|
||||
key="statusEnum"
|
||||
rop="statusEnum"
|
||||
key="restrictedFlag"
|
||||
rop="restrictedFlag"
|
||||
:show-overflow-tooltip="true"
|
||||
width="110"
|
||||
width="110"
|
||||
/>
|
||||
<el-table-column
|
||||
label="限制使用范围"
|
||||
align="center"
|
||||
key="statusEnum"
|
||||
rop="statusEnum"
|
||||
key="restrictedScope"
|
||||
rop="restrictedScope"
|
||||
:show-overflow-tooltip="true"
|
||||
width="110"
|
||||
/>
|
||||
@@ -400,7 +399,7 @@
|
||||
link
|
||||
type="primary"
|
||||
icon="Edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
@click="openEditMedicine(scope.row)"
|
||||
v-hasPermi="['system:user:edit']"
|
||||
>编辑</el-button
|
||||
>
|
||||
@@ -408,7 +407,7 @@
|
||||
link
|
||||
type="primary"
|
||||
icon="View"
|
||||
@click="handleView(scope.row)"
|
||||
@click="openViewMedicine(scope.row)"
|
||||
v-hasPermi="['system:user:remove']"
|
||||
>查看</el-button
|
||||
>
|
||||
@@ -424,10 +423,19 @@
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<medicine-dialog ref="medicineRef" :roleId="queryParams.roleId" @ok="handleQuery" />
|
||||
<medicine-dialog
|
||||
ref="medicineRef"
|
||||
:item="currentData"
|
||||
@submit="submitForm"
|
||||
/>
|
||||
<medicine-view-dialog
|
||||
ref="medicineViewRef"
|
||||
:item="viewData"
|
||||
:viewFlg="viewFlg"
|
||||
/>
|
||||
<!-- 添加或修改用户配置对话框 -->
|
||||
<!-- <el-dialog :title="title" v-model="open" width="600px" append-to-body>
|
||||
<el-form :model="form" :rules="rules" ref="diseaseRef" label-width="80px">
|
||||
<el-form :model="form" :rules="rules" ref="medicationRef" label-width="80px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="名称" prop="name">
|
||||
@@ -473,15 +481,17 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="Disease">
|
||||
<script setup name="Medication">
|
||||
import {
|
||||
getDiseaseList,
|
||||
editDisease,
|
||||
addDisease,
|
||||
getDiseaseCategory,
|
||||
getDiseaseOne,
|
||||
getMedicationList,
|
||||
editMedication,
|
||||
addMedication,
|
||||
getMedicationCategory,
|
||||
getMedicationOne,
|
||||
} from "./components/medicine";
|
||||
import medicineDialog from "./components/medicineDialog";
|
||||
import medicineViewDialog from "./components/medicineViewDialog";
|
||||
import { nextTick } from "vue";
|
||||
|
||||
const router = useRouter();
|
||||
const { proxy } = getCurrentInstance();
|
||||
@@ -490,19 +500,20 @@ const { sys_normal_disable, sys_user_sex } = proxy.useDict(
|
||||
"sys_user_sex"
|
||||
);
|
||||
|
||||
const diseaseList = ref([]);
|
||||
const medicationList = ref([]);
|
||||
const open = ref(false);
|
||||
const loading = ref(true);
|
||||
const showSearch = ref(true);
|
||||
const ids = ref([]);
|
||||
const selectedData = ref([]); // 存储选择的行数据
|
||||
const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const title = ref("");
|
||||
const dateRange = ref([]);
|
||||
const deptName = ref("");
|
||||
const conditionDefinitionOptions = ref(undefined);
|
||||
const medicationOptions = ref(undefined);
|
||||
// 使用 ref 定义当前药品数据
|
||||
const currentData = ref({});
|
||||
// 使用 ref 定义当前查看药品数据
|
||||
const viewData = ref({});
|
||||
// const initPassword = ref(undefined);
|
||||
// const postOptions = ref([]);
|
||||
// const roleOptions = ref([]);
|
||||
@@ -512,14 +523,16 @@ const data = reactive({
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 50,
|
||||
diseaseName: undefined, // 疾病名称
|
||||
searchKey: undefined, // 品名/商品名/英文品名/编码/拼音
|
||||
statusEnum: undefined, // 状态(包括 1:预置,2:启用,3:停用)
|
||||
ybMatchFlag: undefined, // 是否医保匹配(包括 1:是,0:否)
|
||||
status: undefined, // 状态(包括 1:预置,2:启用,3:停用)
|
||||
},
|
||||
rules: {
|
||||
name: [{ required: true, message: "名称不能为空", trigger: "blur" }],
|
||||
conditionCode: [
|
||||
{ required: true, message: "编码不能为空", trigger: "blur" },
|
||||
],
|
||||
// name: [{ required: true, message: "名称不能为空", trigger: "blur" }],
|
||||
// conditionCode: [
|
||||
// { required: true, message: "编码不能为空", trigger: "blur" },
|
||||
// ],
|
||||
},
|
||||
});
|
||||
|
||||
@@ -535,20 +548,20 @@ const filterNode = (value, data) => {
|
||||
// proxy.$refs["deptTreeRef"].filter(val);
|
||||
// });
|
||||
/** 病种目录分类查询下拉树结构 */
|
||||
function getDiseaseCategoryList() {
|
||||
getDiseaseCategory().then((response) => {
|
||||
console.log(response, "response病种目录分类查询下拉树结构");
|
||||
conditionDefinitionOptions.value = response.data;
|
||||
function getMedicationCategoryList() {
|
||||
getMedicationCategory().then((response) => {
|
||||
console.log(response, "response药品目录分类查询下拉树结构");
|
||||
medicationOptions.value = response.data;
|
||||
});
|
||||
}
|
||||
/** 查询病种目录列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
getDiseaseList(queryParams.value).then((res) => {
|
||||
getMedicationList(queryParams.value).then((res) => {
|
||||
loading.value = false;
|
||||
console.log(res, "res");
|
||||
diseaseList.value = res.data.records;
|
||||
total.value = res.total;
|
||||
medicationList.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
});
|
||||
}
|
||||
/** 节点单击事件 */
|
||||
@@ -573,7 +586,7 @@ function handleStart() {
|
||||
proxy.$modal
|
||||
.confirm("是否确定启用数据!")
|
||||
.then(function () {
|
||||
return editDisease(data);
|
||||
return editMedication(data);
|
||||
})
|
||||
.then(() => {
|
||||
getList();
|
||||
@@ -591,7 +604,7 @@ function handleClose() {
|
||||
proxy.$modal
|
||||
.confirm("是否确认停用数据!")
|
||||
.then(function () {
|
||||
return editDisease(data);
|
||||
return editMedication(data);
|
||||
})
|
||||
.then(() => {
|
||||
getList();
|
||||
@@ -635,17 +648,45 @@ function reset() {
|
||||
status: undefined,
|
||||
statusEnum: undefined,
|
||||
};
|
||||
proxy.resetForm("diseaseRef");
|
||||
proxy.resetForm("medicationRef");
|
||||
}
|
||||
/** 取消按钮 */
|
||||
function cancel() {
|
||||
open.value = false;
|
||||
reset();
|
||||
}
|
||||
/** 打开新增/编辑弹窗 */
|
||||
function openMedicineDialog() {
|
||||
/** 打开新增弹窗 */
|
||||
function openAddMedicine() {
|
||||
proxy.$refs["medicineRef"].show();
|
||||
}
|
||||
/** 打开编辑弹窗 */
|
||||
function openEditMedicine(row) {
|
||||
currentData.value = row;
|
||||
console.log(currentData.value, "currentData");
|
||||
// 确保子组件已经接收到最新的 props
|
||||
nextTick(() => {
|
||||
proxy.$refs["medicineRef"].edit();
|
||||
});
|
||||
// proxy.$refs["medicineRef"].edit();
|
||||
}
|
||||
/** 打开查看弹窗 */
|
||||
function openViewMedicine(row) {
|
||||
// viewData.value = row;
|
||||
reset();
|
||||
getMedicationOne(row.id).then((response) => {
|
||||
viewData.value = response.data;
|
||||
nextTick(() => {
|
||||
proxy.$refs["medicineViewRef"].edit();
|
||||
});
|
||||
getList();
|
||||
});
|
||||
console.log(viewData.value, "currentData");
|
||||
// 确保子组件已经接收到最新的 props
|
||||
nextTick(() => {
|
||||
proxy.$refs["medicineViewRef"].edit();
|
||||
});
|
||||
// proxy.$refs["medicineRef"].edit();
|
||||
}
|
||||
/** 新增按钮操作 */
|
||||
function handleAdd() {
|
||||
reset();
|
||||
@@ -661,43 +702,37 @@ function handleUpdate(row) {
|
||||
title.value = "病种编辑";
|
||||
}
|
||||
/** 提交按钮 */
|
||||
function submitForm() {
|
||||
proxy.$refs["diseaseRef"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (form.value.id != undefined) {
|
||||
form.value.status
|
||||
? (form.value.statusEnum = "3")
|
||||
: (form.value.statusEnum = "2");
|
||||
console.log(form.value, "editDisease", form.value.statusEnum);
|
||||
let param = [];
|
||||
param.push(form.value);
|
||||
editDisease(param).then((response) => {
|
||||
proxy.$modal.msgSuccess("修改成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
} else {
|
||||
addDisease(form.value).then((response) => {
|
||||
proxy.$modal.msgSuccess("新增成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
function submitForm(formData) {
|
||||
if (formData.id != undefined) {
|
||||
// form.value.status
|
||||
// ? (form.value.statusEnum = "3")
|
||||
// : (form.value.statusEnum = "2");
|
||||
// console.log(form.value, "editMedication", form.value.statusEnum);
|
||||
editMedication(formData).then((response) => {
|
||||
proxy.$modal.msgSuccess("修改成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
} else {
|
||||
addMedication(formData).then((response) => {
|
||||
proxy.$modal.msgSuccess("新增成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/** 详细按钮操作 */
|
||||
function handleView(row) {
|
||||
reset();
|
||||
open.value = true;
|
||||
getDiseaseOne(row.id).then((response) => {
|
||||
getMedicationOne(row.id).then((response) => {
|
||||
console.log(response, "responsebbbb", row.id);
|
||||
form.value = response.data;
|
||||
// getList();
|
||||
});
|
||||
}
|
||||
getDiseaseCategoryList();
|
||||
getMedicationCategoryList();
|
||||
getList();
|
||||
</script>
|
||||
<style scoped>
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询费用定价信息列表
|
||||
export function listDefinition(query) {
|
||||
return request({
|
||||
url: '/dict-dictionary/definition/item-definition-page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 初始化下拉选
|
||||
export function initOption(query) {
|
||||
return request({
|
||||
url: '/dict-dictionary/definition/init',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 修改费用定价信息
|
||||
export function updateDefinition(data) {
|
||||
return request({
|
||||
url: '/dict-dictionary/definition/item-definition',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改费用定价信息
|
||||
export function getOptions() {
|
||||
return request({
|
||||
url: '/dict-dictionary/definition/status-enum-option',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,220 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
:title="title"
|
||||
v-model="localOpen"
|
||||
width="800px"
|
||||
append-to-body
|
||||
@close="cancel"
|
||||
>
|
||||
<template #header>
|
||||
<div class="custom-header">
|
||||
<span>{{ title }}</span>
|
||||
</div>
|
||||
</template>
|
||||
<div class="scrollable-content">
|
||||
<el-form ref="definitionRef" :model="fromModel" label-width="140px">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label-width="100" label="项目编号" prop="itemNo">
|
||||
<el-input v-model="fromModel.itemNo" disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label-width="100" label="项目名称" prop="chargeName">
|
||||
<el-input v-model="fromModel.chargeName" disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label-width="100" label="规格" prop="totalVolume">
|
||||
<el-input v-model="fromModel.totalVolume" disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label-width="100" label="单位" prop="unitCode">
|
||||
<el-input v-model="fromModel.unitCode" disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label-width="100" label="拆零比" prop="partPercent">
|
||||
<el-input-number
|
||||
v-model="fromModel.partPercent"
|
||||
:min="0"
|
||||
:max="999999.99"
|
||||
:step="0.01"
|
||||
:precision="2"
|
||||
controls-position="right"
|
||||
:controls="false"
|
||||
disabled="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item
|
||||
label-width="100"
|
||||
label="指导价"
|
||||
prop="conditionYbCode"
|
||||
>
|
||||
<el-input-number
|
||||
v-model="fromModel.conditionYbCode"
|
||||
:min="0"
|
||||
:max="999999.99"
|
||||
:step="0.01"
|
||||
:precision="2"
|
||||
controls-position="right"
|
||||
:controls="false"
|
||||
disabled="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label-width="100" label="价格" prop="amount">
|
||||
<el-input-number
|
||||
v-model="fromModel.amount"
|
||||
:min="0"
|
||||
:max="999999.99"
|
||||
:step="0.01"
|
||||
:precision="2"
|
||||
controls-position="right"
|
||||
:controls="false"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item
|
||||
label-width="100"
|
||||
label="拆零最小单位"
|
||||
prop="partMinUnitCode"
|
||||
>
|
||||
<el-input v-model="fromModel.partMinUnitCode" disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item
|
||||
label-width="100"
|
||||
label="拆零指导价"
|
||||
prop="partConditionPrice"
|
||||
>
|
||||
<el-input-number
|
||||
v-model="fromModel.partConditionPrice"
|
||||
:min="0"
|
||||
:max="999999.99"
|
||||
:step="0.01"
|
||||
:precision="2"
|
||||
controls-position="right"
|
||||
:controls="false"
|
||||
disabled="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label-width="100" label="拆零价格" prop="price">
|
||||
<el-input-number
|
||||
v-model="fromModel.price"
|
||||
:min="0"
|
||||
:max="999999.99"
|
||||
:step="0.01"
|
||||
:precision="2"
|
||||
:controls="false"
|
||||
controls-position="right"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label-width="100" label="状态" prop="statusEnum">
|
||||
<el-select
|
||||
v-model="fromModel.statusEnum"
|
||||
placeholder="请选择状态"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label-width="100" label="调价说明" prop="description">
|
||||
<el-input
|
||||
v-model="fromModel.description"
|
||||
style="width: 100%"
|
||||
autosize
|
||||
type="textarea"
|
||||
placeholder="请输入调价说明"
|
||||
maxlength="200"
|
||||
show-word-limit
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script setup>
|
||||
const emit = defineEmits(["submit", "update:open"]);
|
||||
const props = defineProps({
|
||||
title: String,
|
||||
open: Boolean,
|
||||
formData: Object,
|
||||
statusOptions: Object
|
||||
});
|
||||
const localOpen = ref(props.open);
|
||||
const definitionRef = ref(null);
|
||||
const fromModel = ref(props.formData);
|
||||
const options = ref([]);
|
||||
/**
|
||||
* 提交表单函数
|
||||
*/
|
||||
const submitForm = () => {
|
||||
// 调用表单引用上的validate方法进行表单验证
|
||||
definitionRef.value.validate((valid) => {
|
||||
if (valid) {
|
||||
// 验证成功,触发'submit'事件并传递表单数据
|
||||
fromModel.value.statusEnum = Number(fromModel.value.statusEnum);
|
||||
// fromModel.value.statusEnum = "active"
|
||||
emit("submit", fromModel.value);
|
||||
} else {
|
||||
// 验证失败,显示错误消息
|
||||
ElMessage.warning("请确认后再提交");
|
||||
return false;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 取消操作的函数
|
||||
*/
|
||||
const cancel = () => {
|
||||
definitionRef.value.resetFields();
|
||||
emit("update:open", false);
|
||||
};
|
||||
|
||||
watch(
|
||||
() => props.open,
|
||||
(newVal) => {
|
||||
localOpen.value = newVal;
|
||||
fromModel.value = props.formData;
|
||||
options.value = props.statusOptions
|
||||
if (!newVal) {
|
||||
// 如果对话框关闭,重置表单
|
||||
definitionRef.value.resetFields();
|
||||
}
|
||||
}
|
||||
);
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
:deep(.el-input-number .el-input__inner){
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: textfield;
|
||||
text-align: left;
|
||||
line-height: 1;
|
||||
}
|
||||
</style>
|
||||
780
openhis-ui-vue3/src/views/datadictionary/definition/index.vue
Normal file
780
openhis-ui-vue3/src/views/datadictionary/definition/index.vue
Normal file
@@ -0,0 +1,780 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="90px"
|
||||
>
|
||||
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
||||
<el-tab-pane label="药品定价" name="1">
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="4" style="width: 20%">
|
||||
<el-form-item
|
||||
label-width="100"
|
||||
label="收费项目"
|
||||
style="width: 100%"
|
||||
prop="chargeItem"
|
||||
>
|
||||
<el-select
|
||||
v-model="queryParams.chargeItem"
|
||||
placeholder="请选择收费项目"
|
||||
size="large"
|
||||
style="width: 240px"
|
||||
@change="handleQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4" style="width: 20%">
|
||||
<el-form-item
|
||||
label-width="100"
|
||||
label="名称"
|
||||
style="width: 100%"
|
||||
prop="searchKey"
|
||||
>
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="名称/编码/拼音"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
@blur="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="definitionList"
|
||||
tooltip-effect="dark"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="40"
|
||||
align="center"
|
||||
fixed="left"
|
||||
/>
|
||||
<el-table-column
|
||||
label="项目编号"
|
||||
width="150"
|
||||
prop="itemNo"
|
||||
align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.itemNo ? scope.row.itemNo : "-" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="项目名称"
|
||||
width="150"
|
||||
prop="chargeName"
|
||||
align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.chargeName ? scope.row.chargeName : "-" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="规格"
|
||||
width="150"
|
||||
prop="totalVolume"
|
||||
align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.totalVolume ? scope.row.totalVolume : "-" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="单位"
|
||||
width="150"
|
||||
prop="unitCode"
|
||||
align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.unitCode ? scope.row.unitCode : "-" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="拆零比"
|
||||
width="150"
|
||||
prop="partPercent"
|
||||
align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.partPercent ? thousandNumber(scope.row.partPercent) : "-" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="指导价"
|
||||
width="150"
|
||||
prop="conditionYbCode"
|
||||
align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{
|
||||
scope.row.conditionYbCode ? thousandNumber(scope.row.conditionYbCode) : "-"
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="实际价格"
|
||||
width="150"
|
||||
prop="amount"
|
||||
align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.amount ? thousandNumber(scope.row.amount) : "-" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="拆零最小单位"
|
||||
width="150"
|
||||
prop="partMinUnitCode"
|
||||
align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{
|
||||
scope.row.partMinUnitCode ? scope.row.partMinUnitCode : "-"
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="拆零指导价"
|
||||
width="150"
|
||||
prop="partConditionPrice"
|
||||
align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{
|
||||
scope.row.partConditionPrice
|
||||
? thousandNumber(scope.row.partConditionPrice)
|
||||
: "-"
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="拆零价格"
|
||||
width="150"
|
||||
prop="price"
|
||||
align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.price ? thousandNumber(scope.row.price) : "-" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="调价说明"
|
||||
width="150"
|
||||
prop="description"
|
||||
align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.description ? scope.row.description : "-" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="调价时间"
|
||||
width="200"
|
||||
prop="updateTime"
|
||||
align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.updateTime ? moment(scope.row.updateTime).format("YYYY-MM-DD HH:mm:ss") : "-" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="状态"
|
||||
width="150"
|
||||
prop="statusEnumText"
|
||||
align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.statusEnumText ? scope.row.statusEnumText : "-" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
min-width="290"
|
||||
label="操作"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
fixed="right"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" @click="handleUpdate(scope.row)"
|
||||
>修改</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="器具定价" name="2">
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="4" style="width: 20%">
|
||||
<el-form-item
|
||||
label-width="100"
|
||||
label="收费项目"
|
||||
style="width: 100%"
|
||||
prop="chargeItem"
|
||||
>
|
||||
<el-select
|
||||
v-model="queryParams.chargeItem"
|
||||
placeholder="请选择收费项目"
|
||||
size="large"
|
||||
style="width: 240px"
|
||||
@change="handleQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4" style="width: 20%">
|
||||
<el-form-item
|
||||
label-width="100"
|
||||
label="名称"
|
||||
style="width: 100%"
|
||||
prop="searchKey"
|
||||
>
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="名称/编码/拼音"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
@blur="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="definitionList"
|
||||
tooltip-effect="dark"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="40"
|
||||
align="center"
|
||||
fixed="left"
|
||||
/>
|
||||
<el-table-column
|
||||
label="项目编号"
|
||||
width="150"
|
||||
prop="itemNo"
|
||||
align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.itemNo ? scope.row.itemNo : "-" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="项目名称"
|
||||
width="150"
|
||||
prop="chargeName"
|
||||
align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.chargeName ? scope.row.chargeName : "-" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="规格"
|
||||
width="150"
|
||||
prop="totalVolume"
|
||||
align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.totalVolume ? scope.row.totalVolume : "-" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="单位"
|
||||
width="150"
|
||||
prop="unitCode"
|
||||
align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.unitCode ? scope.row.unitCode : "-" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="拆零比"
|
||||
width="150"
|
||||
prop="partPercent"
|
||||
align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.partPercent ? thousandNumber(scope.row.partPercent) : "-" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="指导价"
|
||||
width="150"
|
||||
prop="conditionYbCode"
|
||||
align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{
|
||||
scope.row.conditionYbCode ? thousandNumber(scope.row.conditionYbCode) : "-"
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="价格"
|
||||
width="150"
|
||||
prop="price"
|
||||
align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.price ? thousandNumber(scope.row.price) : "-" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="拆零最小单位"
|
||||
width="150"
|
||||
prop="partMinUnitCode"
|
||||
align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{
|
||||
scope.row.partMinUnitCode ? scope.row.partMinUnitCode : "-"
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="拆零指导价"
|
||||
width="150"
|
||||
prop="partConditionPrice"
|
||||
align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{
|
||||
scope.row.partConditionPrice
|
||||
? thousandNumber(scope.row.partConditionPrice)
|
||||
: "-"
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="拆零价格"
|
||||
width="150"
|
||||
prop="price"
|
||||
align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.price ? thousandNumber(scope.row.price) : "-" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="调价说明"
|
||||
width="150"
|
||||
prop="description"
|
||||
align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.description ? scope.row.description : "-" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="调价时间"
|
||||
width="200"
|
||||
prop="updateTime"
|
||||
align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.updateTime ? moment(scope.row.updateTime).format("YYYY-MM-DD HH:mm:ss") : "-" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="状态"
|
||||
width="150"
|
||||
prop="statusEnumText"
|
||||
align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.statusEnumText ? scope.row.statusEnumText : "-" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
min-width="290"
|
||||
label="操作"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
fixed="right"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" @click="handleUpdate(scope.row)"
|
||||
>修改</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="活动定价" name="3">
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="4" style="width: 20%">
|
||||
<el-form-item
|
||||
label-width="100"
|
||||
label="收费项目"
|
||||
style="width: 100%"
|
||||
prop="chargeItem"
|
||||
>
|
||||
<el-select
|
||||
v-model="queryParams.chargeItem"
|
||||
placeholder="请选择收费项目"
|
||||
size="large"
|
||||
style="width: 240px"
|
||||
@change="handleQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4" style="width: 20%">
|
||||
<el-form-item
|
||||
label-width="100"
|
||||
label="名称"
|
||||
style="width: 100%"
|
||||
prop="searchKey"
|
||||
>
|
||||
<el-input
|
||||
v-model="queryParams.searchKey"
|
||||
placeholder="名称/编码/拼音"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
@blur="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="definitionList"
|
||||
tooltip-effect="dark"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="40"
|
||||
align="center"
|
||||
fixed="left"
|
||||
/>
|
||||
<el-table-column
|
||||
label="项目编号"
|
||||
width="150"
|
||||
prop="itemNo"
|
||||
align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.itemNo ? scope.row.itemNo : "-" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="项目名称"
|
||||
width="150"
|
||||
prop="chargeName"
|
||||
align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.chargeName ? scope.row.chargeName : "-" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="规格"
|
||||
width="150"
|
||||
prop="totalVolume"
|
||||
align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.totalVolume ? scope.row.totalVolume : "-" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="单位"
|
||||
width="150"
|
||||
prop="unitCode"
|
||||
align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.unitCode ? scope.row.unitCode : "-" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="拆零比"
|
||||
width="150"
|
||||
prop="partPercent"
|
||||
align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.partPercent ? thousandNumber(scope.row.partPercent) : "-" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="指导价"
|
||||
width="150"
|
||||
prop="conditionYbCode"
|
||||
align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{
|
||||
scope.row.conditionYbCode ? thousandNumber(scope.row.conditionYbCode) : "-"
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="价格"
|
||||
width="150"
|
||||
prop="price"
|
||||
align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.price ? thousandNumber(scope.row.price) : "-" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="拆零最小单位"
|
||||
width="150"
|
||||
prop="partMinUnitCode"
|
||||
align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{
|
||||
scope.row.partMinUnitCode ? scope.row.partMinUnitCode : "-"
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="拆零指导价"
|
||||
width="150"
|
||||
prop="partConditionPrice"
|
||||
align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{
|
||||
scope.row.partConditionPrice
|
||||
? thousandNumber(scope.row.partConditionPrice)
|
||||
: "-"
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="拆零价格"
|
||||
width="150"
|
||||
prop="price"
|
||||
align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.price ? thousandNumber(scope.row.price) : "-" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="调价说明"
|
||||
width="150"
|
||||
prop="description"
|
||||
align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.description ? scope.row.description : "-" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="调价时间"
|
||||
width="200"
|
||||
prop="updateTime"
|
||||
align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.updateTime ? moment(scope.row.updateTime).format("YYYY-MM-DD HH:mm:ss") : "-" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="状态"
|
||||
width="150"
|
||||
prop="statusEnumText"
|
||||
align="center"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.statusEnumText ? scope.row.statusEnumText : "-" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
min-width="290"
|
||||
label="操作"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
fixed="right"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" @click="handleUpdate(scope.row)"
|
||||
>修改</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-form>
|
||||
<edit :title="title" :open="open" :statusOptions="statusOptions" :formData="form" @submit="submitForm" @update:open="handleOpenChange"
|
||||
@update:form="handleFormChange" />
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { listDefinition, initOption, updateDefinition, getOptions } from "./components/definition";
|
||||
import Edit from './components/edit.vue'
|
||||
import moment from 'moment'
|
||||
import { thousandNumber } from '@/utils/his.js'
|
||||
|
||||
const activeName = ref("1");
|
||||
const showSearch = ref("true");
|
||||
const loading = ref(true);
|
||||
const definitionList = ref([]);
|
||||
const total = ref(0);
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const options = ref([]);
|
||||
const statusOptions = ref([]);
|
||||
const title = ref("");
|
||||
const open = ref(false);
|
||||
|
||||
const data = reactive({
|
||||
form:{},
|
||||
queryParams: {
|
||||
search: "",
|
||||
definitionType: "",
|
||||
chargeItem: "",
|
||||
searchKey: "",
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
});
|
||||
|
||||
const { queryParams, form } = toRefs(data);
|
||||
const handleClick = (tab, event) => {
|
||||
console.log(tab, event);
|
||||
activeName.value = tab.props.name;
|
||||
queryParams.value.pageNo = 1;
|
||||
handleInit();
|
||||
getList();
|
||||
};
|
||||
|
||||
/** 查询委托单信息列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
queryParams.value.definitionType = activeName.value;
|
||||
listDefinition(queryParams.value).then((response) => {
|
||||
definitionList.value = response.data.records;
|
||||
total.value = response.data.total;
|
||||
loading.value = false;
|
||||
});
|
||||
getStatusOptions()
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNo = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
// 表单重置
|
||||
function reset() {
|
||||
form.value = {
|
||||
id: null,
|
||||
itemNo: null,
|
||||
chargeName: null,
|
||||
totalVolume: null,
|
||||
unitCode: null,
|
||||
partPercent: null,
|
||||
conditionYbCode: null,
|
||||
price: null,
|
||||
amount: null,
|
||||
partMinUnitCode: null,
|
||||
partConditionPrice: null,
|
||||
partPrice: null,
|
||||
description: null,
|
||||
statusEnum: null,
|
||||
itemId: null,
|
||||
};
|
||||
proxy.resetForm("einfoRef");
|
||||
}
|
||||
|
||||
/** 修改按钮操作 */
|
||||
function handleUpdate(row) {
|
||||
reset();
|
||||
form.value = row;
|
||||
open.value = true;
|
||||
title.value = "修改项目定价";
|
||||
}
|
||||
/** 搜索按钮操作 */
|
||||
function handleInit() {
|
||||
queryParams.value.definitionType = activeName.value;
|
||||
initOption(queryParams.value).then((response) => {
|
||||
options.value = response.data;
|
||||
});
|
||||
}
|
||||
|
||||
const handleOpenChange = (value) => {
|
||||
open.value = value;
|
||||
};
|
||||
|
||||
const handleFormChange = (newForm) => {
|
||||
form.value = { ...newForm };
|
||||
};
|
||||
|
||||
/** 提交按钮 */
|
||||
function submitForm(form) {
|
||||
updateDefinition(form).then(response => {
|
||||
proxy.$modal.msgSuccess("操作成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
|
||||
/**获取状态下拉列表 */
|
||||
const getStatusOptions = () => {
|
||||
getOptions({}).then((response) => {
|
||||
statusOptions.value = response.data;
|
||||
});
|
||||
};
|
||||
|
||||
handleInit();
|
||||
getList();
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
:deep(.demo-tabs > .el-tabs__content) {
|
||||
color: #6b778c;
|
||||
font-size: 32px;
|
||||
font-weight: 600;
|
||||
}
|
||||
:deep(.el-input__wrapper) {
|
||||
height: 32px;
|
||||
}
|
||||
:deep(.el-input__inner) {
|
||||
height: 30px;
|
||||
}
|
||||
:deep(.el-tabs__content) {
|
||||
height: 80vh;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user