版本更新
This commit is contained in:
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.personalization.appservice;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.web.datadictionary.dto.DeviceManageSelParam;
|
||||
import com.openhis.web.datadictionary.dto.DiagnosisTreatmentSelParam;
|
||||
import com.openhis.web.personalization.dto.ActivityDeviceDto;
|
||||
|
||||
/**
|
||||
* 诊疗耗材绑定 service
|
||||
*
|
||||
* @author zwh
|
||||
* @date 2025-04-09
|
||||
*/
|
||||
public interface IActivityDeviceAppService {
|
||||
|
||||
/**
|
||||
* 查询诊疗项目分页列表
|
||||
*
|
||||
* @param diagnosisTreatmentSelParam 查询条件
|
||||
* @param searchKey 查询条件-模糊查询
|
||||
* @param pageNo 当前页码
|
||||
* @param pageSize 查询条数
|
||||
* @param request http请求
|
||||
* @return 诊疗项目分页列表
|
||||
*/
|
||||
R<?> getActivityPage(DiagnosisTreatmentSelParam diagnosisTreatmentSelParam, String searchKey, Integer pageNo,
|
||||
Integer pageSize, HttpServletRequest request);
|
||||
|
||||
/**
|
||||
* 查询耗材分页列表
|
||||
*
|
||||
* @param deviceManageSelParam 查询条件
|
||||
* @param searchKey 查询条件-模糊查询
|
||||
* @param pageNo 当前页码
|
||||
* @param pageSize 查询条数
|
||||
* @param request http请求
|
||||
* @return 耗材分页列表
|
||||
*/
|
||||
R<?> getDevicePage(DeviceManageSelParam deviceManageSelParam, String searchKey, Integer pageNo, Integer pageSize,
|
||||
HttpServletRequest request);
|
||||
|
||||
/**
|
||||
* 新增/编辑诊疗耗材绑定记录
|
||||
*
|
||||
* @param activityDeviceDto 绑定信息
|
||||
* @return 操作结果
|
||||
*/
|
||||
R<?> addOrEditActivityDeviceBind(ActivityDeviceDto activityDeviceDto);
|
||||
|
||||
/**
|
||||
* 查询诊疗耗材绑定项目分页列表
|
||||
*
|
||||
* @param activityDeviceDto 查询条件
|
||||
* @param searchKey 查询条件-模糊查询
|
||||
* @param pageNo 当前页码
|
||||
* @param pageSize 查询条数
|
||||
* @return 诊疗耗材绑定项目分页列表
|
||||
*/
|
||||
R<?> getActivityDeviceBindPage(ActivityDeviceDto activityDeviceDto, String searchKey, Integer pageNo,
|
||||
Integer pageSize);
|
||||
|
||||
/**
|
||||
* 删除绑定记录
|
||||
*
|
||||
* @param bindId 绑定id
|
||||
* @return 操作结果
|
||||
*/
|
||||
R<?> deleteActivityDeviceBind(Long bindId);
|
||||
|
||||
/**
|
||||
* 诊疗耗材绑定页面初始化
|
||||
*
|
||||
* @return 初始化信息
|
||||
*/
|
||||
R<?> activityDeviceInit();
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.openhis.web.personalization.appservice;
|
||||
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.web.personalization.dto.OrderGroupDto;
|
||||
|
||||
/**
|
||||
* 组套 service
|
||||
*
|
||||
* @author yangmo
|
||||
* @date 2025-04-10
|
||||
*/
|
||||
public interface IOrderGroupAppService {
|
||||
|
||||
/**
|
||||
* 查询组套信息
|
||||
*
|
||||
* @return 组套信息
|
||||
*/
|
||||
R<?> getOrderGroup(OrderGroupDto orderGroupDto, String searchKey);
|
||||
|
||||
/**
|
||||
* 新增组套信息
|
||||
*
|
||||
* @param orderGroupDto 组套信息
|
||||
* @return 操作结果
|
||||
*/
|
||||
R<?> addOrderGroup(OrderGroupDto orderGroupDto);
|
||||
|
||||
/**
|
||||
* 编辑组套信息
|
||||
*
|
||||
* @param orderGroupDto 组套信息
|
||||
* @return 操作结果
|
||||
*/
|
||||
R<?> editOrderGroup(OrderGroupDto orderGroupDto);
|
||||
|
||||
/**
|
||||
* 删除组套信息
|
||||
*
|
||||
* @param id 组套id
|
||||
* @return 操作结果
|
||||
*/
|
||||
R<?> deleteOrderGroup(Long id);
|
||||
|
||||
/**
|
||||
* 组套页面初始化
|
||||
*
|
||||
* @return 初始化信息
|
||||
*/
|
||||
R<?> init();
|
||||
}
|
||||
@@ -0,0 +1,176 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.personalization.appservice.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.core.common.utils.MessageUtils;
|
||||
import com.openhis.common.constant.CommonConstants;
|
||||
import com.openhis.common.constant.PromptMsgConstant;
|
||||
import com.openhis.common.enums.PublicationStatus;
|
||||
import com.openhis.common.utils.EnumUtils;
|
||||
import com.openhis.common.utils.HisQueryUtils;
|
||||
import com.openhis.template.domain.ActivityDevice;
|
||||
import com.openhis.template.service.IActivityDeviceService;
|
||||
import com.openhis.web.datadictionary.appservice.IDeviceManageAppService;
|
||||
import com.openhis.web.datadictionary.appservice.IDiagTreatMAppService;
|
||||
import com.openhis.web.datadictionary.dto.DeviceManageSelParam;
|
||||
import com.openhis.web.datadictionary.dto.DiagnosisTreatmentSelParam;
|
||||
import com.openhis.web.personalization.appservice.IActivityDeviceAppService;
|
||||
import com.openhis.web.personalization.dto.ActivityDeviceDto;
|
||||
import com.openhis.web.personalization.dto.ActivityDeviceInitDto;
|
||||
import com.openhis.web.personalization.mapper.ActivityDeviceAppMapper;
|
||||
|
||||
/**
|
||||
* 诊疗耗材绑定 实现类
|
||||
*
|
||||
* @author zwh
|
||||
* @date 2025-04-09
|
||||
*/
|
||||
@Service
|
||||
public class ActivityDeviceAppServiceImpl implements IActivityDeviceAppService {
|
||||
|
||||
@Resource
|
||||
private IDiagTreatMAppService diagnosisTreatmentManageAppService;
|
||||
@Resource
|
||||
private IDeviceManageAppService deviceManageAppService;
|
||||
@Resource
|
||||
private IActivityDeviceService activityDeviceService;
|
||||
@Resource
|
||||
private ActivityDeviceAppMapper activityDeviceAppMapper;
|
||||
|
||||
/**
|
||||
* 诊疗耗材绑定页面初始化
|
||||
*
|
||||
* @return 初始化信息
|
||||
*/
|
||||
@Override
|
||||
public R<?> activityDeviceInit() {
|
||||
ActivityDeviceInitDto initDto = new ActivityDeviceInitDto();
|
||||
// 状态
|
||||
List<ActivityDeviceInitDto.statusOption> statusOptions = new ArrayList<>();
|
||||
statusOptions.add(new ActivityDeviceInitDto.statusOption(PublicationStatus.ACTIVE.getValue(),
|
||||
PublicationStatus.ACTIVE.getInfo()));
|
||||
statusOptions.add(new ActivityDeviceInitDto.statusOption(PublicationStatus.RETIRED.getValue(),
|
||||
PublicationStatus.RETIRED.getInfo()));
|
||||
initDto.setStatusOptions(statusOptions);
|
||||
return R.ok(initDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询诊疗项目分页列表
|
||||
*
|
||||
* @param diagnosisTreatmentSelParam 查询条件
|
||||
* @param searchKey 查询条件-模糊查询
|
||||
* @param pageNo 当前页码
|
||||
* @param pageSize 查询条数
|
||||
* @param request http请求
|
||||
* @return 诊疗项目分页列表
|
||||
*/
|
||||
@Override
|
||||
public R<?> getActivityPage(DiagnosisTreatmentSelParam diagnosisTreatmentSelParam, String searchKey, Integer pageNo,
|
||||
Integer pageSize, HttpServletRequest request) {
|
||||
return diagnosisTreatmentManageAppService.getDiseaseTreatmentPage(diagnosisTreatmentSelParam, searchKey, pageNo,
|
||||
pageSize, request);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询耗材分页列表
|
||||
*
|
||||
* @param deviceManageSelParam 查询条件
|
||||
* @param searchKey 查询条件-模糊查询
|
||||
* @param pageNo 当前页码
|
||||
* @param pageSize 查询条数
|
||||
* @param request http请求
|
||||
* @return 耗材分页列表
|
||||
*/
|
||||
@Override
|
||||
public R<?> getDevicePage(DeviceManageSelParam deviceManageSelParam, String searchKey, Integer pageNo,
|
||||
Integer pageSize, HttpServletRequest request) {
|
||||
// 只查询单次消耗类耗材
|
||||
deviceManageSelParam.setCategoryCode(CommonConstants.BusinessName.SINGLE_CONSUMPTION);
|
||||
return deviceManageAppService.getDevicePage(deviceManageSelParam, searchKey, pageNo, pageSize, request);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增/编辑诊疗耗材绑定记录
|
||||
*
|
||||
* @param activityDeviceDto 绑定信息
|
||||
* @return 操作结果
|
||||
*/
|
||||
@Override
|
||||
public R<?> addOrEditActivityDeviceBind(ActivityDeviceDto activityDeviceDto) {
|
||||
ActivityDevice activityDevice = new ActivityDevice();
|
||||
if (activityDeviceDto.getId() != null) {
|
||||
activityDeviceService.update(new LambdaUpdateWrapper<ActivityDevice>()
|
||||
.set(ActivityDevice::getQuantity, activityDeviceDto.getQuantity())
|
||||
.set(ActivityDevice::getRangeCode, activityDeviceDto.getRangeCode())
|
||||
.set(ActivityDevice::getStatusEnum, activityDeviceDto.getStatusEnum())
|
||||
.set(ActivityDevice::getDevActTable, activityDeviceDto.getDevActTable())
|
||||
.eq(ActivityDevice::getId, activityDeviceDto.getId()));
|
||||
return R.ok();
|
||||
} else {
|
||||
activityDevice.setDevActId(activityDeviceDto.getDevActId())
|
||||
.setDevActTable(activityDeviceDto.getDevActTable()).setItemNo(activityDeviceDto.getItemNo())
|
||||
.setQuantity(activityDeviceDto.getQuantity()).setRangeCode(activityDeviceDto.getRangeCode())
|
||||
.setTypeCode(activityDeviceDto.getTypeCode());
|
||||
activityDeviceService.save(activityDevice);
|
||||
}
|
||||
return R.ok(activityDevice.getId().toString());
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询诊疗耗材绑定项目分页列表
|
||||
*
|
||||
* @param activityDeviceDto 查询条件
|
||||
* @param searchKey 查询条件-模糊查询
|
||||
* @param pageNo 当前页码
|
||||
* @param pageSize 查询条数
|
||||
* @return 诊疗耗材绑定项目分页列表
|
||||
*/
|
||||
@Override
|
||||
public R<?> getActivityDeviceBindPage(ActivityDeviceDto activityDeviceDto, String searchKey, Integer pageNo,
|
||||
Integer pageSize) {
|
||||
|
||||
// 构建查询条件
|
||||
QueryWrapper<ActivityDeviceDto> queryWrapper = HisQueryUtils.buildQueryWrapper(activityDeviceDto, searchKey,
|
||||
new HashSet<>(Arrays.asList(CommonConstants.FieldName.ActivityName, CommonConstants.FieldName.ActivityWbStr,
|
||||
CommonConstants.FieldName.ActivityPyStr, CommonConstants.FieldName.DevicePyStr,
|
||||
CommonConstants.FieldName.DeviceWbStr, CommonConstants.FieldName.DeviceName)),
|
||||
null);
|
||||
|
||||
// 查询诊疗耗材绑定项目分页列表
|
||||
Page<ActivityDeviceDto> activityDevicePage =
|
||||
activityDeviceAppMapper.selectActivityDevicePage(new Page<>(pageNo, pageSize), queryWrapper);
|
||||
activityDevicePage.getRecords().forEach(e -> {
|
||||
// 状态
|
||||
e.setStatusEnum_enumText(EnumUtils.getInfoByValue(PublicationStatus.class, e.getStatusEnum()));
|
||||
});
|
||||
return R.ok(activityDevicePage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除绑定记录
|
||||
*
|
||||
* @param bindId 绑定id
|
||||
* @return 操作结果
|
||||
*/
|
||||
@Override
|
||||
public R<?> deleteActivityDeviceBind(Long bindId) {
|
||||
activityDeviceService.removeById(bindId);
|
||||
return R.ok(MessageUtils.createMessage(PromptMsgConstant.Common.M00005, null));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,157 @@
|
||||
package com.openhis.web.personalization.appservice.impl;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
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.SecurityUtils;
|
||||
import com.openhis.common.constant.CommonConstants;
|
||||
import com.openhis.common.constant.PromptMsgConstant;
|
||||
import com.openhis.common.enums.OrderGroupType;
|
||||
import com.openhis.common.utils.EnumUtils;
|
||||
import com.openhis.common.utils.HisQueryUtils;
|
||||
import com.openhis.template.domain.OrderGroup;
|
||||
import com.openhis.template.mapper.OrderGroupMapper;
|
||||
import com.openhis.template.service.OrderGroupService;
|
||||
import com.openhis.web.personalization.appservice.IOrderGroupAppService;
|
||||
import com.openhis.web.personalization.dto.OrderGroupDto;
|
||||
import com.openhis.web.personalization.dto.OrderGroupInitDto;
|
||||
import com.openhis.web.personalization.mapper.OrderGroupAppMapper;
|
||||
|
||||
/**
|
||||
* 组套 实现类
|
||||
*
|
||||
* @author yangmo
|
||||
* @date 2025-04-10
|
||||
*/
|
||||
@Service
|
||||
public class IOrderGroupAppServiceImpl implements IOrderGroupAppService {
|
||||
|
||||
@Resource
|
||||
private OrderGroupAppMapper orderGroupAppMapper;
|
||||
|
||||
@Resource
|
||||
private OrderGroupMapper orderGroupMapper;
|
||||
|
||||
@Resource
|
||||
private OrderGroupService orderGroupService;
|
||||
|
||||
/**
|
||||
* 组套页面初始化
|
||||
*
|
||||
* @return 初始化信息
|
||||
*/
|
||||
@Override
|
||||
public R<?> init() {
|
||||
OrderGroupInitDto initDto = new OrderGroupInitDto();
|
||||
// 状态
|
||||
List<OrderGroupInitDto.typeOption> typeOptions = Stream.of(OrderGroupType.values())
|
||||
.map(
|
||||
orderGroupType -> new OrderGroupInitDto.typeOption(orderGroupType.getValue(), orderGroupType.getInfo()))
|
||||
.collect(Collectors.toList());
|
||||
initDto.setTypeOptions(typeOptions);
|
||||
return R.ok(initDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询组套信息
|
||||
*
|
||||
* @return 组套信息
|
||||
*/
|
||||
@Override
|
||||
public R<?> getOrderGroup(OrderGroupDto orderGroupDto, String searchKey) {
|
||||
// 构建查询条件
|
||||
QueryWrapper<OrderGroupDto> queryWrapper = HisQueryUtils.buildQueryWrapper(orderGroupDto, searchKey,
|
||||
new HashSet<>(List.of(CommonConstants.FieldName.Name)), null);
|
||||
|
||||
// 分页查询
|
||||
Page<OrderGroupDto> orderGroupPage = orderGroupAppMapper.selectOrderGroup(new Page<>(1, 50), queryWrapper);
|
||||
orderGroupPage.getRecords().forEach(e -> {
|
||||
// 组套类型
|
||||
e.setTypeEnum_enumText(EnumUtils.getInfoByValue(OrderGroupType.class, e.getTypeEnum()));
|
||||
});
|
||||
return R.ok(orderGroupPage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增组套信息
|
||||
*
|
||||
* @param orderGroupDto 组套信息
|
||||
* @return 操作结果
|
||||
*/
|
||||
@Override
|
||||
public R<?> addOrderGroup(OrderGroupDto orderGroupDto) {
|
||||
|
||||
boolean exists = orderGroupMapper
|
||||
.exists(new LambdaQueryWrapper<OrderGroup>().eq(OrderGroup::getName, orderGroupDto.getName())
|
||||
.eq(OrderGroup::getRangeCode, orderGroupDto.getRangeCode()));
|
||||
if (exists) {
|
||||
return R.fail("该名称已存在");
|
||||
}
|
||||
|
||||
// 组套
|
||||
OrderGroup orderGroup = new OrderGroup();
|
||||
// 新增组套信息
|
||||
orderGroup.setName(orderGroupDto.getName()).setTypeEnum(orderGroupDto.getTypeEnum())
|
||||
.setRangeCode(orderGroupDto.getRangeCode())
|
||||
.setPractitionerId(SecurityUtils.getLoginUser().getPractitionerId())
|
||||
.setOrgId(SecurityUtils.getLoginUser().getOrgId()).setGroupJson(orderGroupDto.getGroupJson())
|
||||
.setVersionNo(orderGroupDto.getVersionNo());
|
||||
boolean result = orderGroupService.save(orderGroup);
|
||||
if (result) {
|
||||
return R.ok(MessageUtils.createMessage(PromptMsgConstant.Common.M00002, null));
|
||||
}
|
||||
return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00010, null));
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑组套信息
|
||||
*
|
||||
* @param orderGroupDto 组套信息
|
||||
* @return 操作结果
|
||||
*/
|
||||
@Override
|
||||
public R<?> editOrderGroup(OrderGroupDto orderGroupDto) {
|
||||
boolean exists = orderGroupMapper
|
||||
.exists(new LambdaQueryWrapper<OrderGroup>().eq(OrderGroup::getName, orderGroupDto.getName())
|
||||
.eq(OrderGroup::getRangeCode, orderGroupDto.getRangeCode()).ne(OrderGroup::getId, orderGroupDto));
|
||||
if (exists) {
|
||||
return R.fail("该名称已存在");
|
||||
}
|
||||
// 组套
|
||||
OrderGroup orderGroup = new OrderGroup();
|
||||
// 修改组套信息
|
||||
orderGroup.setId(orderGroup.getId()).setName(orderGroupDto.getName()).setTypeEnum(orderGroupDto.getTypeEnum())
|
||||
.setRangeCode(orderGroupDto.getRangeCode())
|
||||
.setPractitionerId(SecurityUtils.getLoginUser().getPractitionerId())
|
||||
.setOrgId(SecurityUtils.getLoginUser().getOrgId()).setGroupJson(orderGroupDto.getGroupJson())
|
||||
.setVersionNo(orderGroupDto.getVersionNo());
|
||||
boolean result = orderGroupService.saveOrUpdate(orderGroup);
|
||||
if (result) {
|
||||
return R.ok(MessageUtils.createMessage(PromptMsgConstant.Common.M00002, null));
|
||||
}
|
||||
return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00010, null));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除组套信息
|
||||
*
|
||||
* @param id 组套id
|
||||
* @return 操作结果
|
||||
*/
|
||||
@Override
|
||||
public R<?> deleteOrderGroup(Long id) {
|
||||
orderGroupService.removeById(id);
|
||||
return R.ok(MessageUtils.createMessage(PromptMsgConstant.Common.M00005, null));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,121 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.personalization.controller;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.web.datadictionary.dto.DeviceManageSelParam;
|
||||
import com.openhis.web.datadictionary.dto.DiagnosisTreatmentSelParam;
|
||||
import com.openhis.web.personalization.appservice.IActivityDeviceAppService;
|
||||
import com.openhis.web.personalization.dto.ActivityDeviceDto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* 耗材诊疗绑定 controller
|
||||
*
|
||||
* @author zwh
|
||||
* @date 2025-04-09
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/personalization/activity-device")
|
||||
@Slf4j
|
||||
@AllArgsConstructor
|
||||
public class ActivityDeviceController {
|
||||
|
||||
@Resource
|
||||
private IActivityDeviceAppService activityDeviceAppService;
|
||||
|
||||
/**
|
||||
* 诊疗耗材绑定页面初始化
|
||||
*
|
||||
* @return 初始化信息
|
||||
*/
|
||||
@GetMapping(value = "/init")
|
||||
public R<?> activityDeviceInit() {
|
||||
return activityDeviceAppService.activityDeviceInit();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询诊疗项目分页列表
|
||||
*
|
||||
* @param diagnosisTreatmentSelParam 查询条件
|
||||
* @param searchKey 查询条件-模糊查询
|
||||
* @param pageNo 当前页码
|
||||
* @param pageSize 查询条数
|
||||
* @param request http请求
|
||||
* @return 诊疗项目分页列表
|
||||
*/
|
||||
@GetMapping("/activity-page")
|
||||
public R<?> getActivityPage(DiagnosisTreatmentSelParam diagnosisTreatmentSelParam,
|
||||
@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
|
||||
return activityDeviceAppService.getActivityPage(diagnosisTreatmentSelParam, searchKey, pageNo, pageSize,
|
||||
request);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询耗材分页列表
|
||||
*
|
||||
* @param deviceManageSelParam 查询条件
|
||||
* @param searchKey 查询条件-模糊查询
|
||||
* @param pageNo 当前页码
|
||||
* @param pageSize 查询条数
|
||||
* @param request http请求
|
||||
* @return 耗材分页列表
|
||||
*/
|
||||
@GetMapping("/device-page")
|
||||
public R<?> getDevicePage(DeviceManageSelParam deviceManageSelParam,
|
||||
@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "50") Integer pageSize, HttpServletRequest request) {
|
||||
return activityDeviceAppService.getDevicePage(deviceManageSelParam, searchKey, pageNo, pageSize, request);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询诊疗耗材绑定项目分页列表
|
||||
*
|
||||
* @param activityDeviceDto 查询条件
|
||||
* @param searchKey 查询条件-模糊查询
|
||||
* @param pageNo 当前页码
|
||||
* @param pageSize 查询条数
|
||||
* @return 诊疗耗材绑定项目分页列表
|
||||
*/
|
||||
@GetMapping("/activity-device")
|
||||
public R<?> getActivityDeviceBindPage(ActivityDeviceDto activityDeviceDto,
|
||||
@RequestParam(value = "searchKey", defaultValue = "") String searchKey,
|
||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
return activityDeviceAppService.getActivityDeviceBindPage(activityDeviceDto, searchKey, pageNo, pageSize);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增/编辑诊疗耗材绑定记录
|
||||
*
|
||||
* @param activityDeviceDto 绑定信息
|
||||
* @return 操作结果
|
||||
*/
|
||||
@PostMapping("/activity-device")
|
||||
public R<?> addOrEditActivityDeviceBind(@Validated @RequestBody ActivityDeviceDto activityDeviceDto) {
|
||||
return activityDeviceAppService.addOrEditActivityDeviceBind(activityDeviceDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除绑定记录
|
||||
*
|
||||
* @param bindId 绑定id
|
||||
* @return 操作结果
|
||||
*/
|
||||
@DeleteMapping("/activity-device")
|
||||
public R<?> deleteActivityDeviceBind(Long bindId) {
|
||||
return activityDeviceAppService.deleteActivityDeviceBind(bindId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.personalization.controller;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.web.personalization.appservice.IOrderGroupAppService;
|
||||
import com.openhis.web.personalization.dto.OrderGroupDto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* 组套 controller
|
||||
*
|
||||
* @author yangmo
|
||||
* @date 2025-04-10
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/personalization/order-group")
|
||||
@Slf4j
|
||||
@AllArgsConstructor
|
||||
public class OrderGroupController {
|
||||
|
||||
@Resource
|
||||
private IOrderGroupAppService orderGroupAppService;
|
||||
|
||||
/**
|
||||
* 组套页面初始化
|
||||
*
|
||||
* @return 初始化信息
|
||||
*/
|
||||
@GetMapping(value = "/init")
|
||||
public R<?> init() {
|
||||
return orderGroupAppService.init();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询组套信息
|
||||
*
|
||||
* @return 组套信息
|
||||
*/
|
||||
@GetMapping("/order-group")
|
||||
public R<?> getOrderGroup(OrderGroupDto orderGroupDto, String searchKey) {
|
||||
return orderGroupAppService.getOrderGroup(orderGroupDto, searchKey);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增组套信息
|
||||
*
|
||||
* @param orderGroupDto 组套信息
|
||||
* @return 操作结果
|
||||
*/
|
||||
@PostMapping("/order-group")
|
||||
public R<?> addOrderGroup(@Validated @RequestBody OrderGroupDto orderGroupDto) {
|
||||
return orderGroupAppService.addOrderGroup(orderGroupDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑组套信息
|
||||
*
|
||||
* @param orderGroupDto 组套信息
|
||||
* @return 操作结果
|
||||
*/
|
||||
@PutMapping("/order-group")
|
||||
public R<?> editOrderGroup(@Validated @RequestBody OrderGroupDto orderGroupDto) {
|
||||
return orderGroupAppService.editOrderGroup(orderGroupDto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除组套信息
|
||||
*
|
||||
* @param id 组套id
|
||||
* @return 操作结果
|
||||
*/
|
||||
@DeleteMapping("/order-group")
|
||||
public R<?> deleteOrderGroup(@RequestParam Long id) {
|
||||
return orderGroupAppService.deleteOrderGroup(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.personalization.dto;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.openhis.common.annotation.Dict;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 耗材诊疗绑定 dto
|
||||
*
|
||||
* @author zwh
|
||||
* @date 2025-04-09
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ActivityDeviceDto {
|
||||
|
||||
/** ID */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
/** 范围 */
|
||||
@Dict(dictCode = "use_range")
|
||||
private String rangeCode;
|
||||
private String rangeCode_dictText;
|
||||
|
||||
/** 类型 */
|
||||
@Dict(dictCode = "bind_type")
|
||||
private String typeCode;
|
||||
private String typeCode_dictText;
|
||||
|
||||
/** 诊疗/用法/号源的编码(id) */
|
||||
private String itemNo;
|
||||
|
||||
/** 耗材/诊疗id */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long devActId;
|
||||
|
||||
/**
|
||||
* 耗材/诊疗表名
|
||||
*/
|
||||
private String devActTable;
|
||||
|
||||
/** 耗材名称 */
|
||||
private String deviceName;
|
||||
|
||||
/** 耗材五笔码 */
|
||||
private String devicePyStr;
|
||||
|
||||
/** 耗材拼音码 */
|
||||
private String deviceWbStr;
|
||||
|
||||
/** 诊疗名称 */
|
||||
private String activityName;
|
||||
|
||||
/** 诊疗拼音码 */
|
||||
private String activityPyStr;
|
||||
|
||||
/** 诊疗五笔码 */
|
||||
private String activityWbStr;
|
||||
|
||||
/** 耗材数量 */
|
||||
private Integer quantity;
|
||||
|
||||
/** 状态 */
|
||||
private Integer statusEnum;
|
||||
private String statusEnum_enumText;
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.personalization.dto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 诊疗耗材绑定初始化
|
||||
*
|
||||
* @author zwh
|
||||
* @date 2025-04-09
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ActivityDeviceInitDto {
|
||||
|
||||
private List<ActivityDeviceInitDto.statusOption> statusOptions;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@Data
|
||||
public static class statusOption {
|
||||
private Integer value;
|
||||
private String info;
|
||||
|
||||
public statusOption(Integer value, String info) {
|
||||
this.value = value;
|
||||
this.info = info;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.personalization.dto;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import com.openhis.common.annotation.Dict;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 组套 dto
|
||||
*
|
||||
* @author yangmo
|
||||
* @date 2025-04-10
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class OrderGroupDto {
|
||||
|
||||
/** ID */
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
/** 名称 */
|
||||
private String name;
|
||||
|
||||
/** 类型 */
|
||||
private Integer typeEnum;
|
||||
private String typeEnum_enumText;
|
||||
|
||||
/** 范围 */
|
||||
@Dict(dictCode = "use_range")
|
||||
private String rangeCode;
|
||||
private String rangeCode_dictText;
|
||||
|
||||
/** 参与者ID */
|
||||
private Long practitionerId;
|
||||
|
||||
/** 机构ID */
|
||||
private Long orgId;
|
||||
|
||||
/** 组套信息 */
|
||||
private String groupJson;
|
||||
|
||||
/** 版本号 */
|
||||
private String versionNo;
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.personalization.dto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 组套初始化 dto
|
||||
*
|
||||
* @author yangmo
|
||||
* @date 2025-04-10
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class OrderGroupInitDto {
|
||||
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
private List<OrderGroupInitDto.typeOption> typeOptions;
|
||||
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
@Data
|
||||
public static class typeOption {
|
||||
private Integer value;
|
||||
private String info;
|
||||
|
||||
public typeOption(Integer value, String info) {
|
||||
this.value = value;
|
||||
this.info = info;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.personalization.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.openhis.web.personalization.dto.ActivityDeviceDto;
|
||||
|
||||
/**
|
||||
* 诊疗耗材绑定 appMapper
|
||||
*
|
||||
* @author zwh
|
||||
* @date 2025-04-09
|
||||
*/
|
||||
@Repository
|
||||
public interface ActivityDeviceAppMapper {
|
||||
|
||||
/**
|
||||
* 诊疗耗材绑定分页列表
|
||||
*
|
||||
* @param page 分页
|
||||
* @param queryWrapper 查询条件
|
||||
* @return 诊疗耗材绑定分页列表
|
||||
*/
|
||||
Page<ActivityDeviceDto> selectActivityDevicePage(@Param("page") Page<ActivityDeviceDto> page,
|
||||
@Param(Constants.WRAPPER) QueryWrapper<ActivityDeviceDto> queryWrapper);
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||
*/
|
||||
package com.openhis.web.personalization.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.openhis.web.personalization.dto.OrderGroupDto;
|
||||
|
||||
/**
|
||||
* 组套 Mapper
|
||||
*
|
||||
* @author zwh
|
||||
* @date 2025-05-16
|
||||
*/
|
||||
@Repository
|
||||
public interface OrderGroupAppMapper {
|
||||
|
||||
/**
|
||||
* 组套分页列表
|
||||
*
|
||||
* @param page 分页
|
||||
* @param queryWrapper 查询条件
|
||||
* @return 组套分页列表
|
||||
*/
|
||||
Page<OrderGroupDto> selectOrderGroup(@Param("page") Page<OrderGroupDto> page,
|
||||
@Param(Constants.WRAPPER) QueryWrapper<OrderGroupDto> queryWrapper);
|
||||
}
|
||||
Reference in New Issue
Block a user