Merge branch 'master' of https://codeup.aliyun.com/61c0318acd8b75daa5a125f7/medical/openhis
This commit is contained in:
@@ -0,0 +1,86 @@
|
|||||||
|
/*
|
||||||
|
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||||
|
*/
|
||||||
|
package com.core.common.enums;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收费项目
|
||||||
|
*
|
||||||
|
* @author zxy
|
||||||
|
* @date 2025-02-24
|
||||||
|
*/
|
||||||
|
public enum ChargeItemEnum {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 床位费
|
||||||
|
*/
|
||||||
|
BED_FEE(1, "床位费"),
|
||||||
|
/**
|
||||||
|
* 诊察费
|
||||||
|
*/
|
||||||
|
DIAGNOSTIC_FEE(2, "诊察费"),
|
||||||
|
/**
|
||||||
|
* 检查费
|
||||||
|
*/
|
||||||
|
CHECK_FEE(3, "检查费"),
|
||||||
|
/**
|
||||||
|
* 化验费
|
||||||
|
*/
|
||||||
|
DIAGNOSTIC_TEST_FEE(4, "化验费"),
|
||||||
|
/**
|
||||||
|
* 治疗费
|
||||||
|
*/
|
||||||
|
MEDICAL_EXPENSE_FEE(5, "治疗费"),
|
||||||
|
/**
|
||||||
|
* 手术费
|
||||||
|
*/
|
||||||
|
OPERATION_FEE(6, "手术费"),
|
||||||
|
/**
|
||||||
|
* 护理费
|
||||||
|
*/
|
||||||
|
NURSING_FEE(7, "护理费"),
|
||||||
|
/**
|
||||||
|
* 卫生材料费
|
||||||
|
*/
|
||||||
|
SANITARY_MATERIALS_FEE(8, "卫生材料费"),
|
||||||
|
/**
|
||||||
|
* 西药费
|
||||||
|
*/
|
||||||
|
WEST_MEDICINE(9, "西药费"),
|
||||||
|
/**
|
||||||
|
* 中药饮片费
|
||||||
|
*/
|
||||||
|
CHINESE_MEDICINE_SLICES_FEE(10, "中药饮片费"),
|
||||||
|
/**
|
||||||
|
* 中成药费
|
||||||
|
*/
|
||||||
|
CHINESE_MEDICINE_FEE(11, "中成药费"),
|
||||||
|
/**
|
||||||
|
* 一般诊疗费
|
||||||
|
*/
|
||||||
|
GENERAL_CONSULTATION_FEE(12, "一般诊疗费"),
|
||||||
|
/**
|
||||||
|
* 挂号费
|
||||||
|
*/
|
||||||
|
REGISTRATION_FEE(13, "挂号费"),
|
||||||
|
/**
|
||||||
|
* 其他费
|
||||||
|
*/
|
||||||
|
OTHER_FEE(14, "其他费");
|
||||||
|
|
||||||
|
private final Integer code;
|
||||||
|
private final String info;
|
||||||
|
|
||||||
|
ChargeItemEnum(Integer code, String info) {
|
||||||
|
this.code = code;
|
||||||
|
this.info = info;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getInfo() {
|
||||||
|
return info;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -22,7 +22,7 @@ import lombok.AllArgsConstructor;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 机构管理(科室)controller
|
* 机构管理controller
|
||||||
*
|
*
|
||||||
* @author
|
* @author
|
||||||
* @date 2025-02-21
|
* @date 2025-02-21
|
||||||
@@ -39,9 +39,9 @@ public class OrganizationController {
|
|||||||
private AssignSeqUtil assignSeqUtil;
|
private AssignSeqUtil assignSeqUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加科室信息
|
* 添加机构信息
|
||||||
*
|
*
|
||||||
* @param organization 科室信息
|
* @param organization 机构信息
|
||||||
*/
|
*/
|
||||||
@PostMapping("/organization")
|
@PostMapping("/organization")
|
||||||
public R<?> addOrganization(@Validated @RequestBody Organization organization) {
|
public R<?> addOrganization(@Validated @RequestBody Organization organization) {
|
||||||
@@ -52,19 +52,19 @@ public class OrganizationController {
|
|||||||
|
|
||||||
// 基础采番
|
// 基础采番
|
||||||
String code = assignSeqUtil.getSeq(AssignSeqEnum.TEST.getPrefix());
|
String code = assignSeqUtil.getSeq(AssignSeqEnum.TEST.getPrefix());
|
||||||
organization.setBus_no(code);
|
organization.setBusNo(code);
|
||||||
|
|
||||||
boolean saveOrganizationSuccess = organizationService.save(organization);
|
boolean saveOrgSuccess = organizationService.save(organization);
|
||||||
|
|
||||||
return saveOrganizationSuccess
|
return saveOrgSuccess
|
||||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00001, new Object[] {"科室信息"}))
|
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00001, new Object[] {"机构信息"}))
|
||||||
: R.fail(PromptMsgConstant.Common.M00007, null);
|
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00003, new Object[] {"机构信息"}));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 编辑科室信息
|
* 编辑机构信息
|
||||||
*
|
*
|
||||||
* @param organization 科室信息
|
* @param organization 机构信息
|
||||||
*/
|
*/
|
||||||
@PutMapping("/organization")
|
@PutMapping("/organization")
|
||||||
public R<?> editOrganization(@Validated @RequestBody Organization organization) {
|
public R<?> editOrganization(@Validated @RequestBody Organization organization) {
|
||||||
@@ -72,46 +72,48 @@ public class OrganizationController {
|
|||||||
// Organization organization = new Organization();
|
// Organization organization = new Organization();
|
||||||
// BeanUtils.copyProperties(organizationdto, organization);
|
// BeanUtils.copyProperties(organizationdto, organization);
|
||||||
|
|
||||||
boolean updateSuccess = organizationService.updateById(organization);
|
boolean updateOrgSuccess = organizationService.updateById(organization);
|
||||||
return updateSuccess
|
return updateOrgSuccess
|
||||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"科室信息"}))
|
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"机构信息"}))
|
||||||
: R.fail(PromptMsgConstant.Common.M00007, null);
|
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00007, new Object[] {"机构信息"}));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除科室信息
|
* 删除机构信息
|
||||||
*
|
*
|
||||||
* @param orgId 主表id
|
* @param orgId 主表id
|
||||||
*/
|
*/
|
||||||
@DeleteMapping("/organization")
|
@DeleteMapping("/organization")
|
||||||
public R<?> deleteSupplyRequest(@RequestParam Long orgId) {
|
public R<?> deleteSupplyRequest(@RequestParam Long orgId) {
|
||||||
|
|
||||||
boolean deleteSuccess = organizationService.removeById(orgId);
|
// 在service层做业务校验
|
||||||
|
boolean deleteOrgSuccess = organizationService.removeById(orgId);
|
||||||
|
|
||||||
return deleteSuccess
|
return deleteOrgSuccess
|
||||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00005, new Object[] {"科室信息"}))
|
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00005, new Object[] {"机构信息"}))
|
||||||
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00006, new Object[] {"科室信息删除失败"}));
|
: R.fail(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00006, new Object[] {"机构信息删除失败"}));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 科室分页列表
|
* 机构分页列表
|
||||||
*
|
*
|
||||||
* @param classEnum 机构分类枚举
|
* @param classEnum 机构分类枚举
|
||||||
* @param activeFlag 活动标识
|
* @param activeFlag 活动标识
|
||||||
* @param pageNo 当前页码
|
* @param pageNo 当前页码
|
||||||
* @param pageSize 查询条数
|
* @param pageSize 查询条数
|
||||||
* @param request 请求数据
|
* @param request 请求数据
|
||||||
* @return 科室分页列表
|
* @return 机构分页列表
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/organization")
|
@GetMapping(value = "/organization")
|
||||||
public R<?> getOrganizationPage(Integer classEnum, Integer activeFlag,
|
public R<?> getOrganizationPage(Integer classEnum, Integer activeFlag,
|
||||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
|
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
|
||||||
|
|
||||||
// 查询【科室】分页列表
|
// 查询【机构】分页列表
|
||||||
Page<Organization> organizationPage =
|
Page<Organization> organizationPage =
|
||||||
organizationService.getOrganizationPage(classEnum, activeFlag, pageNo, pageSize);
|
organizationService.getOrganizationPage(classEnum, activeFlag, pageNo, pageSize);
|
||||||
return R.ok(organizationPage);
|
return R.ok(organizationPage,
|
||||||
|
MessageUtils.createMessage(PromptMsgConstant.Common.M00007, new Object[] {"机构信息"}));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,19 +1,25 @@
|
|||||||
package com.openhis.web.datadictionary.controller;
|
package com.openhis.web.datadictionary.controller;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.core.common.core.domain.R;
|
import com.core.common.core.domain.R;
|
||||||
import com.core.common.utils.MessageUtils;
|
import com.core.common.utils.MessageUtils;
|
||||||
|
import com.core.common.utils.bean.BeanUtils;
|
||||||
import com.openhis.clinical.domain.ConditionDefinition;
|
import com.openhis.clinical.domain.ConditionDefinition;
|
||||||
import com.openhis.clinical.service.IConditionDefinitionService;
|
import com.openhis.clinical.service.IConditionDefinitionService;
|
||||||
import com.openhis.common.constant.PromptMsgConstant;
|
import com.openhis.common.constant.PromptMsgConstant;
|
||||||
import com.openhis.common.enums.ConditionDefinitionSource;
|
import com.openhis.common.enums.ConditionDefinitionSource;
|
||||||
|
import com.openhis.web.datadictionary.dto.DiseaseManageDto;
|
||||||
|
import com.openhis.web.datadictionary.dto.DiseaseSourceDto;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -40,7 +46,16 @@ public class DiseaseManageController {
|
|||||||
public R<?> getDiseaseCategory() {
|
public R<?> getDiseaseCategory() {
|
||||||
// 获取疾病目录种类
|
// 获取疾病目录种类
|
||||||
List<ConditionDefinitionSource> statusList = Arrays.asList(ConditionDefinitionSource.values());
|
List<ConditionDefinitionSource> statusList = Arrays.asList(ConditionDefinitionSource.values());
|
||||||
return R.ok(statusList);
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -63,8 +78,18 @@ public class DiseaseManageController {
|
|||||||
// 查询【病种目录】分页列表
|
// 查询【病种目录】分页列表
|
||||||
Page<ConditionDefinition> diseasePage =
|
Page<ConditionDefinition> diseasePage =
|
||||||
iConditionDefinitionService.getPage(searchKey, status, sourceEnum, pageNo, pageSize);
|
iConditionDefinitionService.getPage(searchKey, status, sourceEnum, pageNo, pageSize);
|
||||||
|
|
||||||
|
// 获取入病种目录列表
|
||||||
|
Page<DiseaseManageDto> diseaseManageDtoPage = new Page<>();
|
||||||
|
diseaseManageDtoPage.setRecords(diseasePage.getRecords().stream().map(entity -> {
|
||||||
|
// 定义【入病种目录列表DTO】
|
||||||
|
DiseaseManageDto dto = new DiseaseManageDto();
|
||||||
|
BeanUtils.copyProperties(entity, dto);
|
||||||
|
return dto;
|
||||||
|
}).collect(Collectors.toList()));
|
||||||
|
|
||||||
// 返回【病种目录列表DTO】分页
|
// 返回【病种目录列表DTO】分页
|
||||||
return R.ok(diseasePage);
|
return R.ok(diseaseManageDtoPage);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -73,8 +98,8 @@ public class DiseaseManageController {
|
|||||||
* @param id 疾病ID
|
* @param id 疾病ID
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("/information-one")
|
@GetMapping("/information-one/{id}")
|
||||||
public R<?> getDiseaseOne(@RequestParam(value = "id", required = false, defaultValue = "0") Long id) {
|
public R<?> getDiseaseOne(@PathVariable("id") Long id) {
|
||||||
|
|
||||||
// 根据ID查询【病种目录】
|
// 根据ID查询【病种目录】
|
||||||
ConditionDefinition byId = iConditionDefinitionService.getById(id);
|
ConditionDefinition byId = iConditionDefinitionService.getById(id);
|
||||||
@@ -84,11 +109,18 @@ public class DiseaseManageController {
|
|||||||
/**
|
/**
|
||||||
* 病种目录编辑
|
* 病种目录编辑
|
||||||
*
|
*
|
||||||
* @param conditionDefinitionList 病种目录实体列表
|
* @param diseaseManageDtos 病种目录列表
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PutMapping("/information")
|
@PutMapping("/information")
|
||||||
public R<?> editDisease(@RequestBody List<ConditionDefinition> conditionDefinitionList) {
|
public R<?> editDisease(@RequestBody List<DiseaseManageDto> diseaseManageDtos) {
|
||||||
|
List<ConditionDefinition> conditionDefinitionList = new ArrayList<>();
|
||||||
|
// 取得更新值
|
||||||
|
for (DiseaseManageDto detail : diseaseManageDtos) {
|
||||||
|
ConditionDefinition conditionDefinition = new ConditionDefinition();
|
||||||
|
BeanUtils.copyProperties(detail, conditionDefinition);
|
||||||
|
conditionDefinitionList.add(conditionDefinition);
|
||||||
|
}
|
||||||
// 更新病种信息
|
// 更新病种信息
|
||||||
return iConditionDefinitionService.updateBatchById(conditionDefinitionList)
|
return iConditionDefinitionService.updateBatchById(conditionDefinitionList)
|
||||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, null))
|
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, null))
|
||||||
@@ -98,11 +130,13 @@ public class DiseaseManageController {
|
|||||||
/**
|
/**
|
||||||
* 新增外来病种目录
|
* 新增外来病种目录
|
||||||
*
|
*
|
||||||
* @param conditionDefinition 病种目录实体
|
* @param diseaseManageDto 病种目录实体
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping("/information")
|
@PostMapping("/information")
|
||||||
public R<?> addDisease(@RequestBody ConditionDefinition conditionDefinition) {
|
public R<?> addDisease(@Validated @RequestBody DiseaseManageDto diseaseManageDto) {
|
||||||
|
ConditionDefinition conditionDefinition = new ConditionDefinition();
|
||||||
|
BeanUtils.copyProperties(diseaseManageDto, conditionDefinition);
|
||||||
// 新增外来病种目录
|
// 新增外来病种目录
|
||||||
return iConditionDefinitionService.addDisease(conditionDefinition)
|
return iConditionDefinitionService.addDisease(conditionDefinition)
|
||||||
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"疾病目录"}))
|
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"疾病目录"}))
|
||||||
@@ -117,5 +151,7 @@ public class DiseaseManageController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping("/information-yb")
|
@PostMapping("/information-yb")
|
||||||
void AddYbDisease(@RequestBody ConditionDefinition conditionDefinition) {}
|
public R<?> addYbDisease(@RequestBody ConditionDefinition conditionDefinition) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,8 +10,6 @@ import java.util.Map;
|
|||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
import com.core.common.enums.AssignSeqEnum;
|
|
||||||
import com.core.common.utils.AssignSeqUtil;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@@ -19,7 +17,10 @@ import org.springframework.web.bind.annotation.*;
|
|||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.core.common.core.domain.R;
|
import com.core.common.core.domain.R;
|
||||||
|
import com.core.common.enums.AssignSeqEnum;
|
||||||
|
import com.core.common.enums.ChargeItemEnum;
|
||||||
import com.core.common.enums.DefinitionTypeEnum;
|
import com.core.common.enums.DefinitionTypeEnum;
|
||||||
|
import com.core.common.utils.AssignSeqUtil;
|
||||||
import com.core.common.utils.MessageUtils;
|
import com.core.common.utils.MessageUtils;
|
||||||
import com.core.common.utils.bean.BeanUtils;
|
import com.core.common.utils.bean.BeanUtils;
|
||||||
import com.openhis.administration.domain.ChargeItemDefApp;
|
import com.openhis.administration.domain.ChargeItemDefApp;
|
||||||
@@ -28,6 +29,7 @@ import com.openhis.administration.service.IChargeItemDefAppService;
|
|||||||
import com.openhis.administration.service.IChargeItemDefinitionService;
|
import com.openhis.administration.service.IChargeItemDefinitionService;
|
||||||
import com.openhis.common.constant.PromptMsgConstant;
|
import com.openhis.common.constant.PromptMsgConstant;
|
||||||
import com.openhis.web.datadictionary.dto.ChargeItemDefPageDto;
|
import com.openhis.web.datadictionary.dto.ChargeItemDefPageDto;
|
||||||
|
import com.openhis.web.datadictionary.dto.ChargeItemOptionDto;
|
||||||
import com.openhis.web.datadictionary.dto.ItemDefSearchParam;
|
import com.openhis.web.datadictionary.dto.ItemDefSearchParam;
|
||||||
import com.openhis.web.datadictionary.dto.ItemDefinitionDto;
|
import com.openhis.web.datadictionary.dto.ItemDefinitionDto;
|
||||||
import com.openhis.web.datadictionary.mapper.ChargeItemDefSearchMapper;
|
import com.openhis.web.datadictionary.mapper.ChargeItemDefSearchMapper;
|
||||||
@@ -51,15 +53,74 @@ public class ItemDefinitionController {
|
|||||||
private IChargeItemDefAppService chargeItemDefAppService;
|
private IChargeItemDefAppService chargeItemDefAppService;
|
||||||
@Autowired(required = false)
|
@Autowired(required = false)
|
||||||
private ChargeItemDefSearchMapper chargeItemDefSearchMapper;
|
private ChargeItemDefSearchMapper chargeItemDefSearchMapper;
|
||||||
// @Autowired(required = false)
|
|
||||||
// private IMedicationDefinitionService medicationDefinitionService;
|
|
||||||
// @Autowired(required = false)
|
|
||||||
// private IDeviceDefinitionService deviceDefinitionService;
|
|
||||||
// @Autowired(required = false)
|
|
||||||
// private IActivityDefinitionService activityDefinitionService;
|
|
||||||
@Autowired(required = false)
|
@Autowired(required = false)
|
||||||
private AssignSeqUtil assignSeqUtil;
|
private AssignSeqUtil assignSeqUtil;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目定价列表
|
||||||
|
*
|
||||||
|
* @param itemDefSearchParam 查询条件
|
||||||
|
* @return 项目定价列表
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/init")
|
||||||
|
public R<?> getInitDefinitionOptions(ItemDefSearchParam itemDefSearchParam) {
|
||||||
|
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().setValue(ChargeItemEnum.CHINESE_MEDICINE_SLICES_FEE.getCode())
|
||||||
|
.setLabel(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().setValue(ChargeItemEnum.OTHER_FEE.getCode())
|
||||||
|
.setLabel(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().setValue(ChargeItemEnum.OTHER_FEE.getCode())
|
||||||
|
.setLabel(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().setValue(ChargeItemEnum.DIAGNOSTIC_FEE.getCode())
|
||||||
|
.setLabel(ChargeItemEnum.DIAGNOSTIC_FEE.getInfo()));
|
||||||
|
// 检查
|
||||||
|
chargeItemOptions.add(new ChargeItemOptionDto().setValue(ChargeItemEnum.CHECK_FEE.getCode())
|
||||||
|
.setLabel(ChargeItemEnum.CHECK_FEE.getInfo()));
|
||||||
|
// 化验
|
||||||
|
chargeItemOptions.add(new ChargeItemOptionDto().setValue(ChargeItemEnum.DIAGNOSTIC_TEST_FEE.getCode())
|
||||||
|
.setLabel(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().setValue(ChargeItemEnum.OPERATION_FEE.getCode())
|
||||||
|
.setLabel(ChargeItemEnum.OPERATION_FEE.getInfo()));
|
||||||
|
// 护理费
|
||||||
|
chargeItemOptions.add(new ChargeItemOptionDto().setValue(ChargeItemEnum.NURSING_FEE.getCode())
|
||||||
|
.setLabel(ChargeItemEnum.NURSING_FEE.getInfo()));
|
||||||
|
// 其他
|
||||||
|
chargeItemOptions.add(new ChargeItemOptionDto().setValue(ChargeItemEnum.GENERAL_CONSULTATION_FEE.getCode())
|
||||||
|
.setLabel(ChargeItemEnum.GENERAL_CONSULTATION_FEE.getInfo()));
|
||||||
|
// 挂号
|
||||||
|
chargeItemOptions.add(new ChargeItemOptionDto().setValue(ChargeItemEnum.REGISTRATION_FEE.getCode())
|
||||||
|
.setLabel(ChargeItemEnum.REGISTRATION_FEE.getInfo()));
|
||||||
|
// 其他
|
||||||
|
chargeItemOptions.add(new ChargeItemOptionDto().setValue(ChargeItemEnum.OTHER_FEE.getCode())
|
||||||
|
.setLabel(ChargeItemEnum.OTHER_FEE.getInfo()));
|
||||||
|
}
|
||||||
|
return R.ok(chargeItemOptions);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 项目定价列表
|
* 项目定价列表
|
||||||
*
|
*
|
||||||
@@ -72,60 +133,12 @@ public class ItemDefinitionController {
|
|||||||
@GetMapping(value = "/item-definition-page")
|
@GetMapping(value = "/item-definition-page")
|
||||||
public R<?> getDefinitionPage(ItemDefSearchParam itemDefSearchParam,
|
public R<?> getDefinitionPage(ItemDefSearchParam itemDefSearchParam,
|
||||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
|
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
|
||||||
// region
|
@RequestParam(value = "searchKey", required = false) String searchKey, HttpServletRequest request) {
|
||||||
/// todo: 代码未测试
|
|
||||||
// 获取定价查询条件
|
|
||||||
// ChargeItemDefinition chargeItemDefinition = new ChargeItemDefinition();
|
|
||||||
// BeanUtils.copyProperties(itemDefSearchParam, chargeItemDefinition);
|
|
||||||
|
|
||||||
// ====================================================================================
|
|
||||||
|
|
||||||
// 查询【费用定价管理】分页列表
|
|
||||||
// Page<ChargeItemDefinition> chargeItemDefinitionPage =
|
|
||||||
// chargeItemDefinitionMapper.getPage(itemDefSearchParam, pageNo, pageSize);
|
|
||||||
// if (chargeItemDefinitionPage.getRecords() != null) {
|
|
||||||
// List<ChargeItemDefApp> chargeItemDefAppList = chargeItemDefAppService.listByIds(chargeItemDefinitionPage
|
|
||||||
// .getRecords().stream().filter(e -> e.getInstanceTable().equals("adm_charge_item_def_app"))
|
|
||||||
// .map(ChargeItemDefinition::getInstanceId).collect(Collectors.toList()));
|
|
||||||
// // 通过 DefinitionType 区分药品定价/器具定价/手术定价
|
|
||||||
// if (DefinitionTypeEnum.MEDICATION.getCode().equals(itemDefSearchParam.getDefinitionType())) {
|
|
||||||
// // 获取药品定价列表
|
|
||||||
// List<MedicationDefinition> medicationList =
|
|
||||||
// medicationDefinitionService.listByIds(chargeItemDefinitionPage.getRecords().stream()
|
|
||||||
// .filter(e -> e.getInstanceTable().equals("med_medication_definition"))
|
|
||||||
// .map(ChargeItemDefinition::getInstanceId).collect(Collectors.toList()));
|
|
||||||
//
|
|
||||||
// return R.ok(ItemDefinitionAssembler.assembleMedDefinitionDto(chargeItemDefinitionPage,
|
|
||||||
// chargeItemDefAppList, medicationList, itemDefSearchParam));
|
|
||||||
// } else if (DefinitionTypeEnum.DEVICE.getCode().equals(itemDefSearchParam.getDefinitionType())) {
|
|
||||||
// // 获取器具定价列表
|
|
||||||
// List<DeviceDefinition> deviceDefinitionList = deviceDefinitionService.listByIds(chargeItemDefinitionPage
|
|
||||||
// .getRecords().stream().filter(e -> e.getInstanceTable().equals("adm_device_definition"))
|
|
||||||
// .map(ChargeItemDefinition::getInstanceId).collect(Collectors.toList()));
|
|
||||||
//
|
|
||||||
// return R.ok(ItemDefinitionAssembler.assembleDevDefinitionDto(chargeItemDefinitionPage,
|
|
||||||
// chargeItemDefAppList, deviceDefinitionList, itemDefSearchParam));
|
|
||||||
// } else if (DefinitionTypeEnum.ACTIVITY.getCode().equals(itemDefSearchParam.getDefinitionType())) {
|
|
||||||
// List<ActivityDefinition> activityDefinitionList =
|
|
||||||
// activityDefinitionService.listByIds(chargeItemDefinitionPage.getRecords().stream()
|
|
||||||
// .filter(e -> e.getInstanceTable().equals("wor_activity_definition"))
|
|
||||||
// .map(ChargeItemDefinition::getInstanceId).collect(Collectors.toList()));
|
|
||||||
//
|
|
||||||
// return R.ok(ItemDefinitionAssembler.assembleProDefinitionDto(chargeItemDefinitionPage,
|
|
||||||
// chargeItemDefAppList, activityDefinitionList, itemDefSearchParam));
|
|
||||||
// } else {
|
|
||||||
// return R.ok(new Page<ChargeItemDefPageDto>());
|
|
||||||
// }
|
|
||||||
// } else {
|
|
||||||
// return R.ok(new Page<ChargeItemDefPageDto>());
|
|
||||||
// }
|
|
||||||
// endregion
|
|
||||||
|
|
||||||
IPage<ChargeItemDefPageDto> chargeItemDefinitionPage = new Page<>();
|
IPage<ChargeItemDefPageDto> chargeItemDefinitionPage = new Page<>();
|
||||||
List<ChargeItemDefPageDto> chargeItemDefinitionList;
|
List<ChargeItemDefPageDto> chargeItemDefinitionList;
|
||||||
|
|
||||||
// TODO: 待测试
|
|
||||||
// 跳过的数量
|
// 跳过的数量
|
||||||
int skipCount = 0;
|
int skipCount = 0;
|
||||||
if (pageNo > 0) {
|
if (pageNo > 0) {
|
||||||
@@ -133,56 +146,31 @@ public class ItemDefinitionController {
|
|||||||
}
|
}
|
||||||
// 通过 DefinitionType 区分药品定价/器具定价/手术定价
|
// 通过 DefinitionType 区分药品定价/器具定价/手术定价
|
||||||
if (DefinitionTypeEnum.MEDICATION.getCode().equals(itemDefSearchParam.getDefinitionType())) {
|
if (DefinitionTypeEnum.MEDICATION.getCode().equals(itemDefSearchParam.getDefinitionType())) {
|
||||||
//获取定价列表
|
// 获取定价列表
|
||||||
chargeItemDefinitionList =
|
chargeItemDefinitionList =
|
||||||
chargeItemDefSearchMapper.getMedList(itemDefSearchParam, pageNo, pageSize, skipCount);
|
chargeItemDefSearchMapper.getMedList(itemDefSearchParam, pageNo, pageSize, searchKey, skipCount);
|
||||||
//设置分页条件
|
|
||||||
chargeItemDefinitionPage.setSize(pageSize);
|
|
||||||
chargeItemDefinitionPage.setCurrent(pageNo);
|
|
||||||
if (chargeItemDefinitionList.size() > 0) {
|
|
||||||
chargeItemDefinitionPage.setTotal(chargeItemDefinitionList.get(0).getTotalCount());
|
|
||||||
chargeItemDefinitionPage.setRecords(chargeItemDefinitionList);
|
|
||||||
} else {
|
|
||||||
chargeItemDefinitionPage.setTotal(0);
|
|
||||||
chargeItemDefinitionPage.setRecords(new ArrayList<>());
|
|
||||||
}
|
|
||||||
return R.ok(chargeItemDefinitionPage,
|
|
||||||
MessageUtils.createMessage(PromptMsgConstant.Common.M00009, null));
|
|
||||||
} else if (DefinitionTypeEnum.DEVICE.getCode().equals(itemDefSearchParam.getDefinitionType())) {
|
} else if (DefinitionTypeEnum.DEVICE.getCode().equals(itemDefSearchParam.getDefinitionType())) {
|
||||||
//获取定价列表
|
// 获取定价列表
|
||||||
chargeItemDefinitionList =
|
chargeItemDefinitionList =
|
||||||
chargeItemDefSearchMapper.getDevList(itemDefSearchParam, pageNo, pageSize, skipCount);
|
chargeItemDefSearchMapper.getDevList(itemDefSearchParam, pageNo, pageSize, searchKey, skipCount);
|
||||||
//设置分页条件
|
|
||||||
chargeItemDefinitionPage.setSize(pageSize);
|
|
||||||
chargeItemDefinitionPage.setCurrent(pageNo);
|
|
||||||
if (chargeItemDefinitionList.size() > 0) {
|
|
||||||
chargeItemDefinitionPage.setTotal(chargeItemDefinitionList.get(0).getTotalCount());
|
|
||||||
chargeItemDefinitionPage.setRecords(chargeItemDefinitionList);
|
|
||||||
} else {
|
|
||||||
chargeItemDefinitionPage.setTotal(0);
|
|
||||||
chargeItemDefinitionPage.setRecords(new ArrayList<>());
|
|
||||||
}
|
|
||||||
return R.ok(chargeItemDefinitionPage,
|
|
||||||
MessageUtils.createMessage(PromptMsgConstant.Common.M00009, null));
|
|
||||||
} else if (DefinitionTypeEnum.ACTIVITY.getCode().equals(itemDefSearchParam.getDefinitionType())) {
|
} else if (DefinitionTypeEnum.ACTIVITY.getCode().equals(itemDefSearchParam.getDefinitionType())) {
|
||||||
//获取定价列表
|
// 获取定价列表
|
||||||
chargeItemDefinitionList =
|
chargeItemDefinitionList =
|
||||||
chargeItemDefSearchMapper.getActList(itemDefSearchParam, pageNo, pageSize, skipCount);
|
chargeItemDefSearchMapper.getActList(itemDefSearchParam, pageNo, pageSize, searchKey, skipCount);
|
||||||
//设置分页条件
|
|
||||||
chargeItemDefinitionPage.setSize(pageSize);
|
|
||||||
chargeItemDefinitionPage.setCurrent(pageNo);
|
|
||||||
if (chargeItemDefinitionList.size() > 0) {
|
|
||||||
chargeItemDefinitionPage.setTotal(chargeItemDefinitionList.get(0).getTotalCount());
|
|
||||||
chargeItemDefinitionPage.setRecords(chargeItemDefinitionList);
|
|
||||||
} else {
|
|
||||||
chargeItemDefinitionPage.setTotal(0);
|
|
||||||
chargeItemDefinitionPage.setRecords(new ArrayList<>());
|
|
||||||
}
|
|
||||||
return R.ok(chargeItemDefinitionPage,
|
|
||||||
MessageUtils.createMessage(PromptMsgConstant.Common.M00009, null));
|
|
||||||
} else {
|
} else {
|
||||||
return R.ok(new Page<>(), MessageUtils.createMessage(PromptMsgConstant.Common.M00009, null));
|
chargeItemDefinitionList = new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
// 设置分页条件
|
||||||
|
chargeItemDefinitionPage.setSize(pageSize);
|
||||||
|
chargeItemDefinitionPage.setCurrent(pageNo);
|
||||||
|
if (chargeItemDefinitionList.size() > 0) {
|
||||||
|
chargeItemDefinitionPage.setTotal(chargeItemDefinitionList.get(0).getTotalCount());
|
||||||
|
chargeItemDefinitionPage.setRecords(chargeItemDefinitionList);
|
||||||
|
} else {
|
||||||
|
chargeItemDefinitionPage.setTotal(0);
|
||||||
|
chargeItemDefinitionPage.setRecords(new ArrayList<>());
|
||||||
|
}
|
||||||
|
return R.ok(chargeItemDefinitionPage, MessageUtils.createMessage(PromptMsgConstant.Common.M00009, null));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -220,34 +208,34 @@ public class ItemDefinitionController {
|
|||||||
// 基础采番
|
// 基础采番
|
||||||
String code = assignSeqUtil.getSeq(AssignSeqEnum.TEST.getPrefix());
|
String code = assignSeqUtil.getSeq(AssignSeqEnum.TEST.getPrefix());
|
||||||
// 控制长度采番(seqLength: 总长度)
|
// 控制长度采番(seqLength: 总长度)
|
||||||
String code1 = assignSeqUtil.getSeq(AssignSeqEnum.TEST.getPrefix(),8);
|
String code1 = assignSeqUtil.getSeq(AssignSeqEnum.TEST.getPrefix(), 8);
|
||||||
// 控制长度批量采番
|
// 控制长度批量采番
|
||||||
List<String> code2 = assignSeqUtil.getSeq(AssignSeqEnum.TEST.getPrefix(),8,3);
|
List<String> code2 = assignSeqUtil.getSeq(AssignSeqEnum.TEST.getPrefix(), 8, 3);
|
||||||
// 获取编号
|
// 获取编号
|
||||||
Integer code3 = assignSeqUtil.getSeqNo(AssignSeqEnum.TEST.getPrefix());
|
Integer code3 = assignSeqUtil.getSeqNo(AssignSeqEnum.TEST.getPrefix());
|
||||||
// 批量获取编号
|
// 批量获取编号
|
||||||
List<Integer> code4 = assignSeqUtil.getSeqNo(AssignSeqEnum.TEST.getPrefix(),3);
|
List<Integer> code4 = assignSeqUtil.getSeqNo(AssignSeqEnum.TEST.getPrefix(), 3);
|
||||||
// 每日采番
|
// 每日采番
|
||||||
String code5 = assignSeqUtil.getSeqByDay(AssignSeqEnum.TEST.getPrefix());
|
String code5 = assignSeqUtil.getSeqByDay(AssignSeqEnum.TEST.getPrefix());
|
||||||
// 每日按长度采番(seqLength: 日期后的数字位数)
|
// 每日按长度采番(seqLength: 日期后的数字位数)
|
||||||
String code6 = assignSeqUtil.getSeqByDay(AssignSeqEnum.TEST.getPrefix(),8);
|
String code6 = assignSeqUtil.getSeqByDay(AssignSeqEnum.TEST.getPrefix(), 8);
|
||||||
// 每日批量采番
|
// 每日批量采番
|
||||||
List<String> code7 = assignSeqUtil.getSeqByDay(AssignSeqEnum.TEST.getPrefix(),8,3);
|
List<String> code7 = assignSeqUtil.getSeqByDay(AssignSeqEnum.TEST.getPrefix(), 8, 3);
|
||||||
// 每日获取编号
|
// 每日获取编号
|
||||||
Integer code8 = assignSeqUtil.getSeqNoByDay(AssignSeqEnum.TEST.getPrefix());
|
Integer code8 = assignSeqUtil.getSeqNoByDay(AssignSeqEnum.TEST.getPrefix());
|
||||||
// 每日批量获取编号
|
// 每日批量获取编号
|
||||||
List<Integer> code9 = assignSeqUtil.getSeqNoByDay(AssignSeqEnum.TEST.getPrefix(),3);
|
List<Integer> code9 = assignSeqUtil.getSeqNoByDay(AssignSeqEnum.TEST.getPrefix(), 3);
|
||||||
Map<String, Object> map = new HashMap<>();
|
Map<String, Object> map = new HashMap<>();
|
||||||
map.put("code",code);
|
map.put("code", code);
|
||||||
map.put("code1",code1);
|
map.put("code1", code1);
|
||||||
map.put("code2",code2);
|
map.put("code2", code2);
|
||||||
map.put("code3",code3);
|
map.put("code3", code3);
|
||||||
map.put("code4",code4);
|
map.put("code4", code4);
|
||||||
map.put("code5",code5);
|
map.put("code5", code5);
|
||||||
map.put("code6",code6);
|
map.put("code6", code6);
|
||||||
map.put("code7",code7);
|
map.put("code7", code7);
|
||||||
map.put("code8",code8);
|
map.put("code8", code8);
|
||||||
map.put("code9",code9);
|
map.put("code9", code9);
|
||||||
return R.ok(map);
|
return R.ok(map);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,129 @@
|
|||||||
|
/*
|
||||||
|
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||||
|
*/
|
||||||
|
package com.openhis.web.datadictionary.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
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.Supplier;
|
||||||
|
import com.openhis.administration.service.ISupplierService;
|
||||||
|
import com.openhis.common.constant.PromptMsgConstant;
|
||||||
|
import com.openhis.web.datadictionary.dto.SupplierDto;
|
||||||
|
import com.openhis.web.datadictionary.dto.SupplierSearchParam;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import com.openhis.clinical.domain.ConditionDefinition;
|
||||||
|
import com.openhis.clinical.service.IConditionDefinitionService;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TODO:厂商/产地
|
||||||
|
*
|
||||||
|
* @author dh
|
||||||
|
* @date 2025-02-21
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/data-dictionary-supplier")
|
||||||
|
@Slf4j
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class SupplierManagementController {
|
||||||
|
private final ISupplierService supplierService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 厂商/产地查询
|
||||||
|
*
|
||||||
|
* @param supplierSearchParam 查询条件
|
||||||
|
* @param pageNo 查询条件
|
||||||
|
* @param pageSize 查询条件
|
||||||
|
* @return 厂商/产地查询结果
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/get-supplier-list")
|
||||||
|
public R<?> getSupplierList(SupplierSearchParam supplierSearchParam,
|
||||||
|
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
|
||||||
|
|
||||||
|
// 查询条件初始化
|
||||||
|
Supplier supplier = new Supplier();
|
||||||
|
BeanUtils.copyProperties(supplierSearchParam, supplier);
|
||||||
|
|
||||||
|
// 查询
|
||||||
|
Page<Supplier> supplierPage = supplierService.getPage(supplier,pageNo,pageSize);
|
||||||
|
// 定义【入库单据分页列表DTO】的分页,传入【页码】、【行数】、及上面分页的【总数】
|
||||||
|
Page<SupplierDto> returnPage =
|
||||||
|
new Page<>(supplierPage.getCurrent(), supplierPage.getSize(), supplierPage.getTotal());
|
||||||
|
// supplierPage
|
||||||
|
// supplierPage.map(item -> {
|
||||||
|
// SupplierDto supplierDto = new SupplierDto();
|
||||||
|
// BeanUtils.copyProperties(item, supplierDto); // 使用 BeanUtils 复制属性
|
||||||
|
// // 如果有特殊字段需要手动转换,可以在这里处理
|
||||||
|
// return supplierDto;
|
||||||
|
// });
|
||||||
|
|
||||||
|
return R.ok(returnPage);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加供应商信息
|
||||||
|
*
|
||||||
|
* @param supplierDto 供应商信息
|
||||||
|
*/
|
||||||
|
@PostMapping("/add-supplier")
|
||||||
|
public R<?> addSupplyRequest(@Validated @RequestBody SupplierDto supplierDto) {
|
||||||
|
// 初始化参数
|
||||||
|
Supplier supplier = new Supplier();
|
||||||
|
BeanUtils.copyProperties(supplierDto, supplier);
|
||||||
|
// 如果业务上不需要其它处理 直接调用service的保存方法
|
||||||
|
boolean saveSupplierSuccess = supplierService.save(supplier);
|
||||||
|
|
||||||
|
if (!saveSupplierSuccess) {
|
||||||
|
return R.fail(MessageUtils.createMessage(PromptMsgConstant.Common.M00006, null));
|
||||||
|
}
|
||||||
|
|
||||||
|
return saveSupplierSuccess
|
||||||
|
? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00001, new Object[] {"厂商/供应商信息"}))
|
||||||
|
: R.fail(PromptMsgConstant.Common.M00007, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑供应商信息
|
||||||
|
*
|
||||||
|
* @param supplierDto 供应商信息
|
||||||
|
*/
|
||||||
|
@PutMapping("/edit-supplier")
|
||||||
|
public R<?> editSupplyRequest(@Validated @RequestBody SupplierDto supplierDto) {
|
||||||
|
// 初始化参数
|
||||||
|
Supplier supplier = new Supplier();
|
||||||
|
BeanUtils.copyProperties(supplierDto, supplier);
|
||||||
|
|
||||||
|
return supplierService.updateById(supplier) ?
|
||||||
|
R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00002, new Object[] {"厂商/供应商信息"}))
|
||||||
|
: R.fail(PromptMsgConstant.Common.M00007, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 厂商/产地详细查询
|
||||||
|
*
|
||||||
|
* @param supplierId 查询条件
|
||||||
|
* @return 厂商/产地查询结果
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/get-supplier-detail")
|
||||||
|
public R<?> getSupplierDetail(@RequestParam(name = "id", required = true) String supplierId) {
|
||||||
|
|
||||||
|
|
||||||
|
// 查询
|
||||||
|
Supplier supplierDetail = supplierService.getById(supplierId);
|
||||||
|
return R.ok(supplierDetail);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
/*
|
||||||
|
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||||
|
*/
|
||||||
|
package com.openhis.web.datadictionary.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收费项目下拉框
|
||||||
|
*
|
||||||
|
* @author zxy
|
||||||
|
* @date 2025-02-24
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class ChargeItemOptionDto {
|
||||||
|
|
||||||
|
/** 值 */
|
||||||
|
private Integer value;
|
||||||
|
|
||||||
|
/** 标签 */
|
||||||
|
private String label;
|
||||||
|
}
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
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.ConditionDefinitionSource;
|
||||||
|
import com.openhis.common.enums.PublicationStatus;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 疾病目录分页Dto
|
||||||
|
*
|
||||||
|
* @author lpt
|
||||||
|
* @date 2025-02-25
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class DiseaseManageDto {
|
||||||
|
/** ID */
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 所属分类 */
|
||||||
|
private ConditionDefinitionSource sourceEnum;
|
||||||
|
|
||||||
|
/** 编码 */
|
||||||
|
@NotBlank(message = "疾病编码不能为空")
|
||||||
|
private String conditionCode;
|
||||||
|
|
||||||
|
/** 诊断名称 */
|
||||||
|
@NotBlank(message = "疾病名称不能为空")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/** 诊断名称拼音 */
|
||||||
|
private String pyStr;
|
||||||
|
|
||||||
|
/** 诊断名称五笔拼音 */
|
||||||
|
private String wbStr;
|
||||||
|
|
||||||
|
/** 类型 */
|
||||||
|
private String typeCode;
|
||||||
|
|
||||||
|
/** 描述 */
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
/** 医保标记 */
|
||||||
|
private Integer ybFlag;
|
||||||
|
|
||||||
|
/** 医保编码 */
|
||||||
|
private String ybNo;
|
||||||
|
|
||||||
|
/** 医保对码标记 */
|
||||||
|
private Integer ybMatchFlag;
|
||||||
|
|
||||||
|
/** 状态 */
|
||||||
|
private PublicationStatus statusEnum;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package com.openhis.web.datadictionary.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 疾病目录种别dto
|
||||||
|
*
|
||||||
|
* @author lpt
|
||||||
|
* @date 2025-02-25
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class DiseaseSourceDto {
|
||||||
|
private Integer value;
|
||||||
|
private String code;
|
||||||
|
private String info;
|
||||||
|
}
|
||||||
@@ -19,9 +19,7 @@ public class ItemDefSearchParam {
|
|||||||
/** 定价类型 */
|
/** 定价类型 */
|
||||||
private String definitionType;
|
private String definitionType;
|
||||||
/** 定价项目 */
|
/** 定价项目 */
|
||||||
private String chargeItem;
|
private Integer chargeItem;
|
||||||
/** 模糊搜索条件 */
|
/** 模糊搜索条件 */
|
||||||
private String searchKey;
|
private String searchKey;
|
||||||
/** 状态 */
|
|
||||||
private Integer statusEnum;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,56 @@
|
|||||||
|
/*
|
||||||
|
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||||
|
*/
|
||||||
|
package com.openhis.web.datadictionary.dto;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 供应商保存dto
|
||||||
|
*
|
||||||
|
* @author dh
|
||||||
|
* @date 2025-02-24
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class SupplierDto {
|
||||||
|
|
||||||
|
/** ID */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 编号 */
|
||||||
|
private String busNo;
|
||||||
|
|
||||||
|
/** 名称 */
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/** 类型 */
|
||||||
|
private Integer typeEnum;
|
||||||
|
|
||||||
|
/** 地址 */
|
||||||
|
private String address;
|
||||||
|
|
||||||
|
/** 拼音码 */
|
||||||
|
private String pyStr;
|
||||||
|
|
||||||
|
/** 五笔码 */
|
||||||
|
private String wbStr;
|
||||||
|
|
||||||
|
/** 联系人电话 */
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
/** 联系人邮箱 */
|
||||||
|
private String email;
|
||||||
|
|
||||||
|
/** 活动标识 */
|
||||||
|
private Integer activeFlag;
|
||||||
|
|
||||||
|
/** 机构编号 */
|
||||||
|
private Long orgId;
|
||||||
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
/*
|
||||||
|
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||||
|
*/
|
||||||
|
package com.openhis.web.datadictionary.dto;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 厂商/产地分页查询条件
|
||||||
|
*
|
||||||
|
* @author dh
|
||||||
|
* @date 2025-02-18
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class SupplierSearchParam implements Serializable {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编号
|
||||||
|
*/
|
||||||
|
@Schema(description = "编号")
|
||||||
|
private String busNo;
|
||||||
|
/**
|
||||||
|
* 名称*
|
||||||
|
*/
|
||||||
|
@Schema(description = "名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 名称*
|
||||||
|
*/
|
||||||
|
@Schema(description = "供应商类型")
|
||||||
|
private String typeEnum;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -25,11 +25,13 @@ public interface ChargeItemDefSearchMapper extends BaseMapper<ChargeItemDefiniti
|
|||||||
* @param itemDefSearchParam 查询条件
|
* @param itemDefSearchParam 查询条件
|
||||||
* @param pageNo 页码
|
* @param pageNo 页码
|
||||||
* @param pageSize 页面大小
|
* @param pageSize 页面大小
|
||||||
|
* @param searchKey 模糊搜索条件
|
||||||
* @param skipCount 跳过条数
|
* @param skipCount 跳过条数
|
||||||
* @return 分页查询
|
* @return 分页查询
|
||||||
*/
|
*/
|
||||||
List<ChargeItemDefPageDto> getMedList(@Param("itemDefSearchParam") ItemDefSearchParam itemDefSearchParam,
|
List<ChargeItemDefPageDto> getMedList(@Param("itemDefSearchParam") ItemDefSearchParam itemDefSearchParam,
|
||||||
@Param("pageNo") Integer pageNo, @Param("pageSize") Integer pageSize, @Param("skipCount") Integer skipCount);
|
@Param("pageNo") Integer pageNo, @Param("pageSize") Integer pageSize, @Param("searchKey") String searchKey,
|
||||||
|
@Param("skipCount") Integer skipCount);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 器具费用定价分页查询
|
* 器具费用定价分页查询
|
||||||
@@ -37,11 +39,13 @@ public interface ChargeItemDefSearchMapper extends BaseMapper<ChargeItemDefiniti
|
|||||||
* @param itemDefSearchParam 查询条件
|
* @param itemDefSearchParam 查询条件
|
||||||
* @param pageNo 页码
|
* @param pageNo 页码
|
||||||
* @param pageSize 页面大小
|
* @param pageSize 页面大小
|
||||||
|
* @param searchKey 模糊搜索条件
|
||||||
* @param skipCount 跳过条数
|
* @param skipCount 跳过条数
|
||||||
* @return 分页查询
|
* @return 分页查询
|
||||||
*/
|
*/
|
||||||
List<ChargeItemDefPageDto> getDevList(@Param("itemDefSearchParam") ItemDefSearchParam itemDefSearchParam,
|
List<ChargeItemDefPageDto> getDevList(@Param("itemDefSearchParam") ItemDefSearchParam itemDefSearchParam,
|
||||||
@Param("pageNo") Integer pageNo, @Param("pageSize") Integer pageSize, @Param("skipCount") int skipCount);
|
@Param("pageNo") Integer pageNo, @Param("pageSize") Integer pageSize, @Param("searchKey") String searchKey,
|
||||||
|
@Param("skipCount") int skipCount);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 活动费用定价分页查询
|
* 活动费用定价分页查询
|
||||||
@@ -49,9 +53,11 @@ public interface ChargeItemDefSearchMapper extends BaseMapper<ChargeItemDefiniti
|
|||||||
* @param itemDefSearchParam 查询条件
|
* @param itemDefSearchParam 查询条件
|
||||||
* @param pageNo 页码
|
* @param pageNo 页码
|
||||||
* @param pageSize 页面大小
|
* @param pageSize 页面大小
|
||||||
|
* @param searchKey 模糊搜索条件
|
||||||
* @param skipCount 跳过条数
|
* @param skipCount 跳过条数
|
||||||
* @return 分页查询
|
* @return 分页查询
|
||||||
*/
|
*/
|
||||||
List<ChargeItemDefPageDto> getActList(@Param("itemDefSearchParam") ItemDefSearchParam itemDefSearchParam,
|
List<ChargeItemDefPageDto> getActList(@Param("itemDefSearchParam") ItemDefSearchParam itemDefSearchParam,
|
||||||
@Param("pageNo") Integer pageNo, @Param("pageSize") Integer pageSize, @Param("skipCount") int skipCount);
|
@Param("pageNo") Integer pageNo, @Param("pageSize") Integer pageSize, @Param("searchKey") String searchKey,
|
||||||
|
@Param("skipCount") int skipCount);
|
||||||
}
|
}
|
||||||
@@ -3,17 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.inventorymanage.assembler;
|
package com.openhis.web.inventorymanage.assembler;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.function.Function;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import com.openhis.administration.domain.Patient;
|
|
||||||
import com.openhis.medication.domain.Medication;
|
|
||||||
import com.openhis.web.inventorymanage.dto.InventoryReceiptDto;
|
|
||||||
import com.openhis.workflow.domain.SupplyRequest;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 采购入库相关dto转换器
|
* 采购入库相关dto转换器
|
||||||
*
|
*
|
||||||
@@ -30,36 +19,36 @@ public class PurchaseInventoryAssembler {
|
|||||||
* @param patientList【患者管理Entity实体】列表
|
* @param patientList【患者管理Entity实体】列表
|
||||||
* @return 【入库单据分页列表DTO】分页
|
* @return 【入库单据分页列表DTO】分页
|
||||||
*/
|
*/
|
||||||
public static Page<InventoryReceiptDto> assembleInventoryReceiptDto(Page<SupplyRequest> supplyRequestPage,
|
// public static Page<InventoryReceiptDto> assembleInventoryReceiptDto(Page<SupplyRequest> supplyRequestPage,
|
||||||
List<Medication> medicationList, List<Patient> patientList) {
|
// List<Medication> medicationList, List<Patient> patientList) {
|
||||||
|
//
|
||||||
// 将查询到的【药品基本信息管理】列表,作成以ID为Key的Map
|
// // 将查询到的【药品基本信息管理】列表,作成以ID为Key的Map
|
||||||
Map<Long, Medication> medicationMap =
|
// Map<Long, Medication> medicationMap =
|
||||||
medicationList.stream().collect(Collectors.toMap(Medication::getId, Function.identity()));
|
// medicationList.stream().collect(Collectors.toMap(Medication::getId, Function.identity()));
|
||||||
|
//
|
||||||
// 将查询到的【患者管理】列表,作成以ID为Key的Map
|
// // 将查询到的【患者管理】列表,作成以ID为Key的Map
|
||||||
Map<Long, Patient> patientMap =
|
// Map<Long, Patient> patientMap =
|
||||||
patientList.stream().collect(Collectors.toMap(Patient::getId, Function.identity()));
|
// patientList.stream().collect(Collectors.toMap(Patient::getId, Function.identity()));
|
||||||
|
//
|
||||||
// 定义【入库单据分页列表DTO】的分页,传入【页码】、【行数】、及上面分页的【总数】
|
// // 定义【入库单据分页列表DTO】的分页,传入【页码】、【行数】、及上面分页的【总数】
|
||||||
Page<InventoryReceiptDto> returnPage =
|
// Page<InventoryReceiptDto> returnPage =
|
||||||
new Page<>(supplyRequestPage.getCurrent(), supplyRequestPage.getSize(), supplyRequestPage.getTotal());
|
// new Page<>(supplyRequestPage.getCurrent(), supplyRequestPage.getSize(), supplyRequestPage.getTotal());
|
||||||
|
//
|
||||||
// 将【供应申请管理】的分页转化为返回【入库单据分页列表DTO】的分页
|
// // 将【供应申请管理】的分页转化为返回【入库单据分页列表DTO】的分页
|
||||||
returnPage.setRecords(supplyRequestPage.getRecords().stream().map(entity -> {
|
// returnPage.setRecords(supplyRequestPage.getRecords().stream().map(entity -> {
|
||||||
// 定义【入库单据分页列表DTO】
|
// // 定义【入库单据分页列表DTO】
|
||||||
InventoryReceiptDto dto = new InventoryReceiptDto();
|
// InventoryReceiptDto dto = new InventoryReceiptDto();
|
||||||
// 从主表COPY需要的字段
|
// // 从主表COPY需要的字段
|
||||||
dto.setId(entity.getId());
|
// dto.setId(entity.getId());
|
||||||
dto.setCategoryEnum(1);
|
// dto.setCategoryEnum(1);
|
||||||
// 从【药品基本信息管理】Map取值,设置【药品基本信息管理】返回实体
|
// // 从【药品基本信息管理】Map取值,设置【药品基本信息管理】返回实体
|
||||||
dto.setMedication(medicationMap.getOrDefault(entity.getDispenseId(), null));
|
// dto.setMedication(medicationMap.getOrDefault(entity.getDispenseId(), null));
|
||||||
// 从【患者管理】Map取值,设置【患者管理】返回实体
|
// // 从【患者管理】Map取值,设置【患者管理】返回实体
|
||||||
dto.setPatient(patientMap.getOrDefault(entity.getPatientId(), null));
|
// dto.setPatient(patientMap.getOrDefault(entity.getPatientId(), null));
|
||||||
return dto;
|
// return dto;
|
||||||
}).collect(Collectors.toList()));
|
// }).collect(Collectors.toList()));
|
||||||
|
//
|
||||||
// 返回【入库单据分页列表DTO】分页
|
// // 返回【入库单据分页列表DTO】分页
|
||||||
return returnPage;
|
// return returnPage;
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,8 +3,7 @@
|
|||||||
*/
|
*/
|
||||||
package com.openhis.web.inventorymanage.controller;
|
package com.openhis.web.inventorymanage.controller;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.HashSet;
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
@@ -13,27 +12,27 @@ import org.springframework.validation.annotation.Validated;
|
|||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
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.core.domain.R;
|
||||||
import com.core.common.utils.MessageUtils;
|
import com.core.common.utils.MessageUtils;
|
||||||
import com.core.common.utils.bean.BeanUtils;
|
import com.core.common.utils.bean.BeanUtils;
|
||||||
import com.openhis.administration.domain.ChargeItem;
|
import com.openhis.administration.domain.ChargeItem;
|
||||||
import com.openhis.administration.domain.Location;
|
import com.openhis.administration.domain.Location;
|
||||||
import com.openhis.administration.domain.Patient;
|
|
||||||
import com.openhis.administration.service.IChargeItemService;
|
import com.openhis.administration.service.IChargeItemService;
|
||||||
import com.openhis.administration.service.ILocationService;
|
import com.openhis.administration.service.ILocationService;
|
||||||
import com.openhis.administration.service.IPatientService;
|
import com.openhis.administration.service.IPatientService;
|
||||||
import com.openhis.administration.service.ISupplierService;
|
import com.openhis.administration.service.ISupplierService;
|
||||||
|
import com.openhis.common.constant.CommonConstants;
|
||||||
import com.openhis.common.constant.PromptMsgConstant;
|
import com.openhis.common.constant.PromptMsgConstant;
|
||||||
import com.openhis.medication.domain.Medication;
|
import com.openhis.common.utils.HisQueryUtils;
|
||||||
import com.openhis.medication.service.IMedicationService;
|
import com.openhis.medication.service.IMedicationService;
|
||||||
import com.openhis.web.inventorymanage.assembler.PurchaseInventoryAssembler;
|
|
||||||
import com.openhis.web.inventorymanage.dto.InventoryDto;
|
import com.openhis.web.inventorymanage.dto.InventoryDto;
|
||||||
import com.openhis.web.inventorymanage.dto.InventoryReceiptInitDto;
|
import com.openhis.web.inventorymanage.dto.InventoryReceiptInitDto;
|
||||||
import com.openhis.web.inventorymanage.dto.InventorySearchParam;
|
import com.openhis.web.inventorymanage.dto.InventorySearchParam;
|
||||||
import com.openhis.web.inventorymanage.dto.SaveInventoryReceiptDto;
|
import com.openhis.web.inventorymanage.dto.SaveInventoryReceiptDto;
|
||||||
import com.openhis.workflow.domain.SupplyRequest;
|
import com.openhis.workflow.domain.SupplyRequest;
|
||||||
|
import com.openhis.workflow.mapper.SupplyRequestMapper;
|
||||||
import com.openhis.workflow.service.ISupplyRequestService;
|
import com.openhis.workflow.service.ISupplyRequestService;
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -61,6 +60,8 @@ public class PurchaseInventoryController {
|
|||||||
private ISupplierService supplierService;
|
private ISupplierService supplierService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private ILocationService locationService;
|
private ILocationService locationService;
|
||||||
|
@Autowired
|
||||||
|
private SupplyRequestMapper supplyRequestMapper;
|
||||||
|
|
||||||
@GetMapping(value = "/init")
|
@GetMapping(value = "/init")
|
||||||
public R<?> init() {
|
public R<?> init() {
|
||||||
@@ -81,14 +82,43 @@ public class PurchaseInventoryController {
|
|||||||
// 3.practitioner_role与practitioner联查获取对应location的管理员列表
|
// 3.practitioner_role与practitioner联查获取对应location的管理员列表
|
||||||
// 4.查询选定对应药品类型的药品信息列表
|
// 4.查询选定对应药品类型的药品信息列表
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 入库单据列表
|
||||||
|
*
|
||||||
|
* @param inventorySearchParam 查询条件
|
||||||
|
* @param pageNo 当前页码
|
||||||
|
* @param pageSize 查询条数
|
||||||
|
* @param searchKey 模糊查询关键字
|
||||||
|
* @param request 请求数据
|
||||||
|
* @return 入库单据分页列表
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/inventory-receipt-page")
|
||||||
|
public R<?> getPage(InventorySearchParam inventorySearchParam,
|
||||||
|
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
|
||||||
|
@RequestParam(name = "searchKey", required = false) String searchKey, HttpServletRequest request) {
|
||||||
|
|
||||||
|
// 设置模糊查询的字段名
|
||||||
|
HashSet<String> searchFields = new HashSet<>();
|
||||||
|
searchFields.add(CommonConstants.FieldName.BusNo);
|
||||||
|
|
||||||
|
// 构建查询条件
|
||||||
|
QueryWrapper<InventorySearchParam> queryWrapper =
|
||||||
|
HisQueryUtils.buildQueryWrapper(inventorySearchParam, searchKey, searchFields, request);
|
||||||
|
|
||||||
|
// Page<InventoryReceiptDto> inventoryReceiptPage= supplyRequestService.page(new
|
||||||
|
// Page<>(pageNo,pageSize),queryWrapper);
|
||||||
|
return R.ok();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加入库单据(生成供应请求)
|
* 添加入库单据(生成供应请求)
|
||||||
*
|
*
|
||||||
* @param inventoryDto 供应请求信息
|
* @param inventoryDto 入库单据
|
||||||
*/
|
*/
|
||||||
@PostMapping("/inventory-receipt")
|
@PostMapping("/inventory-receipt")
|
||||||
public R<?> addSupplyRequest(@Validated @RequestBody InventoryDto inventoryDto) {
|
public R<?> addInventoryReceipt(@Validated @RequestBody InventoryDto inventoryDto) {
|
||||||
// 生成待发送的入库单据supply_request
|
// 生成待发送的入库单据
|
||||||
SupplyRequest supplyRequest = new SupplyRequest();
|
SupplyRequest supplyRequest = new SupplyRequest();
|
||||||
BeanUtils.copyProperties(inventoryDto, supplyRequest);
|
BeanUtils.copyProperties(inventoryDto, supplyRequest);
|
||||||
// 如果业务上不需要其它处理 直接调用service的保存方法
|
// 如果业务上不需要其它处理 直接调用service的保存方法
|
||||||
@@ -120,7 +150,7 @@ public class PurchaseInventoryController {
|
|||||||
* @param saveInventoryReceiptDto 供应请求信息
|
* @param saveInventoryReceiptDto 供应请求信息
|
||||||
*/
|
*/
|
||||||
@PutMapping("/inventory-receipt")
|
@PutMapping("/inventory-receipt")
|
||||||
public R<?> editSupplyRequest(@Validated @RequestBody SaveInventoryReceiptDto saveInventoryReceiptDto) {
|
public R<?> editInventoryReceipt(@Validated @RequestBody SaveInventoryReceiptDto saveInventoryReceiptDto) {
|
||||||
// 更新supply_request信息
|
// 更新supply_request信息
|
||||||
SupplyRequest saveRequest = new SupplyRequest();
|
SupplyRequest saveRequest = new SupplyRequest();
|
||||||
BeanUtils.copyProperties(saveInventoryReceiptDto, saveRequest);
|
BeanUtils.copyProperties(saveInventoryReceiptDto, saveRequest);
|
||||||
@@ -140,7 +170,7 @@ public class PurchaseInventoryController {
|
|||||||
* @param supplyRequestId 主表id
|
* @param supplyRequestId 主表id
|
||||||
*/
|
*/
|
||||||
@DeleteMapping("/inventory-receipt")
|
@DeleteMapping("/inventory-receipt")
|
||||||
public R<?> deleteSupplyRequest(@RequestParam Long supplyRequestId) {
|
public R<?> deleteInventoryReceipt(@RequestParam Long supplyRequestId) {
|
||||||
// 全都是逻辑删除
|
// 全都是逻辑删除
|
||||||
|
|
||||||
boolean deleteSuccess = supplyRequestService.removeById(supplyRequestId);
|
boolean deleteSuccess = supplyRequestService.removeById(supplyRequestId);
|
||||||
@@ -155,48 +185,6 @@ public class PurchaseInventoryController {
|
|||||||
return deleteChargeItemSuccess ? R.ok() : R.fail();
|
return deleteChargeItemSuccess ? R.ok() : R.fail();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 入库单据详情列表
|
|
||||||
*
|
|
||||||
* @param inventorySearchParam 查询条件
|
|
||||||
* @param pageNo 当前页码
|
|
||||||
* @param pageSize 查询条数
|
|
||||||
* @param request 请求数据
|
|
||||||
* @return 入库单据分页列表
|
|
||||||
*/
|
|
||||||
@GetMapping(value = "/inventory-receipt-page")
|
|
||||||
public R<?> getDetailPage(InventorySearchParam inventorySearchParam,
|
|
||||||
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
|
|
||||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest request) {
|
|
||||||
|
|
||||||
// 查询条件初始化
|
|
||||||
Medication medication = new Medication();
|
|
||||||
BeanUtils.copyProperties(inventorySearchParam, medication);
|
|
||||||
|
|
||||||
SupplyRequest supplyRequest = new SupplyRequest();
|
|
||||||
BeanUtils.copyProperties(inventorySearchParam, supplyRequest);
|
|
||||||
|
|
||||||
// 获取供应请求信息
|
|
||||||
|
|
||||||
// ====================================================================================
|
|
||||||
|
|
||||||
// 查询【供应申请管理】分页列表
|
|
||||||
Page<SupplyRequest> supplyRequestPage = supplyRequestService.getPage(supplyRequest, pageNo, pageSize);
|
|
||||||
|
|
||||||
// 根据【发放id】查询【药品基本信息管理】列表
|
|
||||||
List<Medication> medicationList = medicationService.listByIds(
|
|
||||||
supplyRequestPage.getRecords().stream().map(SupplyRequest::getDispenseId).collect(Collectors.toList()));
|
|
||||||
|
|
||||||
// 根据【患者id】查询【患者管理】列表
|
|
||||||
List<Patient> patientList = patientService.listByIds(
|
|
||||||
supplyRequestPage.getRecords().stream().map(SupplyRequest::getPatientId).collect(Collectors.toList()));
|
|
||||||
|
|
||||||
// 装配并返回【入库单据分页列表DTO】分页
|
|
||||||
return R
|
|
||||||
.ok(PurchaseInventoryAssembler.assembleInventoryReceiptDto(supplyRequestPage, medicationList, patientList));
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 单据提交申请
|
* 单据提交申请
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -6,10 +6,15 @@ package com.openhis.web.inventorymanage.dto;
|
|||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* 入库
|
||||||
|
*
|
||||||
* @author ZhangYC
|
* @author ZhangYC
|
||||||
* @date 2025-02-20
|
* @date 2025-02-20
|
||||||
*/
|
*/
|
||||||
@@ -24,6 +29,7 @@ public class InventoryDto {
|
|||||||
private Integer itemQuantity;
|
private Integer itemQuantity;
|
||||||
|
|
||||||
/** 物品编码 */
|
/** 物品编码 */
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long code;
|
private Long code;
|
||||||
|
|
||||||
/** 物品计量单位 */
|
/** 物品计量单位 */
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ import java.util.Date;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.openhis.administration.domain.Patient;
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
import com.openhis.medication.domain.Medication;
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
@@ -24,68 +24,44 @@ import lombok.experimental.Accessors;
|
|||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
public class InventoryReceiptDto implements Serializable {
|
public class InventoryReceiptDto implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/** ID */
|
/** ID */
|
||||||
@TableId(type = IdType.ASSIGN_ID)
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
|
/** 单据号 */
|
||||||
|
private String busNo;
|
||||||
|
|
||||||
/** 类型 */
|
/** 类型 */
|
||||||
private Integer typeEnum;
|
private Integer typeEnum;
|
||||||
|
|
||||||
/** 状态 */
|
/** 状态 */
|
||||||
private Integer statusEnum;
|
private Integer statusEnum;
|
||||||
|
|
||||||
/** 意图 */
|
|
||||||
private Integer intentEnum;
|
|
||||||
|
|
||||||
/** 分类 */
|
/** 分类 */
|
||||||
private Integer categoryEnum;
|
private Integer categoryEnum;
|
||||||
|
|
||||||
/** 优先权 */
|
|
||||||
private Integer priorityEnum;
|
|
||||||
|
|
||||||
/** 汇总编号 */
|
|
||||||
private Long summaryId;
|
|
||||||
|
|
||||||
/** 交付 */
|
|
||||||
private Long deliverId;
|
|
||||||
|
|
||||||
/** 患者id */
|
|
||||||
private Long patientId;
|
|
||||||
|
|
||||||
/** 发放实体表名 */
|
|
||||||
private String dispenseTable;
|
|
||||||
|
|
||||||
/** 发放id */
|
|
||||||
private Long dispenseId;
|
|
||||||
|
|
||||||
/** 期望时间 */
|
|
||||||
private Date occurrenceTime;
|
|
||||||
|
|
||||||
/** 供应人 */
|
|
||||||
private Long practitionerId;
|
|
||||||
|
|
||||||
/** 供应商 */
|
/** 供应商 */
|
||||||
private Long supplierId;
|
private Long supplierId;
|
||||||
|
|
||||||
/** 理由 */
|
|
||||||
private String reason;
|
|
||||||
|
|
||||||
/** 源仓库类型 */
|
|
||||||
private Integer sourceType;
|
|
||||||
|
|
||||||
/** 源仓库 */
|
/** 源仓库 */
|
||||||
private Long sourceLocationId;
|
private Long sourceLocationId;
|
||||||
|
|
||||||
/** 源仓位 */
|
/** 目的仓库 */
|
||||||
private Long sourceLocationStoreId;
|
private Long purposeLocationId;
|
||||||
|
|
||||||
/** 目的类型 */
|
/** 审批人 */
|
||||||
private Integer purposeType;
|
private Long approverId;
|
||||||
|
|
||||||
/** 药品基本信息管理Entity实体 */
|
/** 审批时间 */
|
||||||
private Medication medication;
|
private Date approvalTime;
|
||||||
|
|
||||||
/** 患者管理Entity实体 */
|
/** 申请人 */
|
||||||
private Patient patient;
|
private Long applicantId;
|
||||||
|
|
||||||
|
/** 申请时间 */
|
||||||
|
private Date applyTime;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,9 @@
|
|||||||
package com.openhis.web.inventorymanage.dto;
|
package com.openhis.web.inventorymanage.dto;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import org.hibernate.validator.constraints.Length;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
@@ -18,4 +21,28 @@ import lombok.experimental.Accessors;
|
|||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
public class InventorySearchParam implements Serializable {
|
public class InventorySearchParam implements Serializable {
|
||||||
|
|
||||||
|
/** 单据号 */
|
||||||
|
@Length(max = 255)
|
||||||
|
private String busNo;
|
||||||
|
|
||||||
|
/** 状态 */
|
||||||
|
private Integer statusEnum;
|
||||||
|
|
||||||
|
/** 分类 */
|
||||||
|
private Integer categoryEnum;
|
||||||
|
|
||||||
|
/** 供应商 */
|
||||||
|
private Long supplierId;
|
||||||
|
|
||||||
|
/** 申请开始时间 */
|
||||||
|
private Date applyTimeStart;
|
||||||
|
|
||||||
|
/** 申请结束时间 */
|
||||||
|
private Date applyTimeEnd;
|
||||||
|
|
||||||
|
/** 目的仓库 */
|
||||||
|
private Long purposeLocationId;
|
||||||
|
|
||||||
|
/** 申请人 */
|
||||||
|
private Long applicantId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,13 +63,10 @@
|
|||||||
ON T3.id = T4.medication_def_id) T5
|
ON T3.id = T4.medication_def_id) T5
|
||||||
<where>
|
<where>
|
||||||
T5.instance_table = 'med_medication_definition'
|
T5.instance_table = 'med_medication_definition'
|
||||||
<if test="itemDefSearchParam.getSearchKey() != null">
|
<if test="searchKey != null">
|
||||||
AND T5.charge_name LIKE CONCAT('%', #{itemDefSearchParam.searchKey}, '%')
|
AND T5.charge_name LIKE CONCAT('%', #{searchKey}, '%')
|
||||||
OR T5.code LIKE CONCAT('%', #{itemDefSearchParam.searchKey}, '%')
|
OR T5.item_no LIKE CONCAT('%', #{searchKey}, '%')
|
||||||
OR T5.py_code LIKE CONCAT('%', #{itemDefSearchParam.searchKey}, '%')
|
OR T5.py_str LIKE CONCAT('%', #{searchKey}, '%')
|
||||||
</if>
|
|
||||||
<if test="itemDefSearchParam.getStatusEnum() != null">
|
|
||||||
AND T5.status_enum = #{itemDefSearchParam.statusEnum}
|
|
||||||
</if>
|
</if>
|
||||||
<if test="itemDefSearchParam.getChargeItem() != null">
|
<if test="itemDefSearchParam.getChargeItem() != null">
|
||||||
AND T5.category_code = #{itemDefSearchParam.chargeItem}
|
AND T5.category_code = #{itemDefSearchParam.chargeItem}
|
||||||
@@ -101,8 +98,8 @@
|
|||||||
T5.priority,
|
T5.priority,
|
||||||
T5.amount,
|
T5.amount,
|
||||||
T5.item_no,
|
T5.item_no,
|
||||||
T5.py_code,
|
T5.py_str,
|
||||||
T5.wb_code,
|
T5.wb_str,
|
||||||
T5.unit_code,
|
T5.unit_code,
|
||||||
T5.category_code,
|
T5.category_code,
|
||||||
T5.lot_number,
|
T5.lot_number,
|
||||||
@@ -125,11 +122,11 @@
|
|||||||
T2.condition_yb_code,
|
T2.condition_yb_code,
|
||||||
T2.priority,
|
T2.priority,
|
||||||
T2.amount,
|
T2.amount,
|
||||||
T3.code AS item_no,
|
T3.bus_no AS item_no,
|
||||||
T3.py_code,
|
T3.py_str,
|
||||||
T3.wb_code,
|
T3.wb_str,
|
||||||
T3.unit_code AS unit_code,
|
T3.unit_code AS unit_code,
|
||||||
T3.device_class AS category_code,
|
T3.category_enum AS category_code,
|
||||||
T4.lot_number
|
T4.lot_number
|
||||||
FROM
|
FROM
|
||||||
adm_charge_item_definition T1
|
adm_charge_item_definition T1
|
||||||
@@ -138,16 +135,13 @@
|
|||||||
LEFT JOIN adm_device_definition T3
|
LEFT JOIN adm_device_definition T3
|
||||||
ON T1.instance_id = T3.id
|
ON T1.instance_id = T3.id
|
||||||
LEFT JOIN adm_device T4
|
LEFT JOIN adm_device T4
|
||||||
ON T3.id = T4.def_id) T5
|
ON T3.id = T4.device_def_id) T5
|
||||||
<where>
|
<where>
|
||||||
T5.instance_table = 'adm_device_definition'
|
T5.instance_table = 'adm_device_definition'
|
||||||
<if test="itemDefSearchParam.getSearchKey() != null">
|
<if test="searchKey != null">
|
||||||
AND T5.charge_name LIKE CONCAT('%', #{itemDefSearchParam.searchKey}, '%')
|
AND T5.charge_name LIKE CONCAT('%', #{searchKey}, '%')
|
||||||
OR T5.code LIKE CONCAT('%', #{itemDefSearchParam.searchKey}, '%')
|
OR T5.item_no LIKE CONCAT('%', #{searchKey}, '%')
|
||||||
OR T5.py_code LIKE CONCAT('%', #{itemDefSearchParam.searchKey}, '%')
|
OR T5.py_str LIKE CONCAT('%', #{searchKey}, '%')
|
||||||
</if>
|
|
||||||
<if test="itemDefSearchParam.getStatusEnum() != null">
|
|
||||||
AND T5.status_enum = #{itemDefSearchParam.statusEnum}
|
|
||||||
</if>
|
</if>
|
||||||
<if test="itemDefSearchParam.getChargeItem() != null">
|
<if test="itemDefSearchParam.getChargeItem() != null">
|
||||||
AND T5.category_code = #{itemDefSearchParam.chargeItem}
|
AND T5.category_code = #{itemDefSearchParam.chargeItem}
|
||||||
@@ -179,8 +173,8 @@
|
|||||||
T5.priority,
|
T5.priority,
|
||||||
T5.amount,
|
T5.amount,
|
||||||
T5.item_no,
|
T5.item_no,
|
||||||
T5.py_code,
|
T5.py_str,
|
||||||
T5.wb_code,
|
T5.wb_str,
|
||||||
T5.unit_code,
|
T5.unit_code,
|
||||||
T5.category_code,
|
T5.category_code,
|
||||||
COUNT(1) OVER() AS TOTAL_COUNT
|
COUNT(1) OVER() AS TOTAL_COUNT
|
||||||
@@ -202,10 +196,10 @@
|
|||||||
T2.condition_yb_code,
|
T2.condition_yb_code,
|
||||||
T2.priority,
|
T2.priority,
|
||||||
T2.amount,
|
T2.amount,
|
||||||
T3.code AS item_no,
|
T3.bus_no AS item_no,
|
||||||
T3.py_code,
|
T3.py_str,
|
||||||
T3.wb_code,
|
T3.wb_str,
|
||||||
T3.permitted_unit AS unit_code,
|
T3.permitted_unit_code AS unit_code,
|
||||||
T3.type_enum AS category_code
|
T3.type_enum AS category_code
|
||||||
FROM
|
FROM
|
||||||
adm_charge_item_definition T1
|
adm_charge_item_definition T1
|
||||||
@@ -215,13 +209,10 @@
|
|||||||
ON T1.instance_id = T3.id) T5
|
ON T1.instance_id = T3.id) T5
|
||||||
<where>
|
<where>
|
||||||
T5.instance_table = 'wor_activity_definition'
|
T5.instance_table = 'wor_activity_definition'
|
||||||
<if test="itemDefSearchParam.getSearchKey() != null">
|
<if test="searchKey != null">
|
||||||
AND T5.charge_name LIKE CONCAT('%', #{itemDefSearchParam.searchKey}, '%')
|
AND T5.charge_name LIKE CONCAT('%', #{searchKey}, '%')
|
||||||
OR T5.code LIKE CONCAT('%', #{itemDefSearchParam.searchKey}, '%')
|
OR T5.item_no LIKE CONCAT('%', #{searchKey}, '%')
|
||||||
OR T5.py_code LIKE CONCAT('%', #{itemDefSearchParam.searchKey}, '%')
|
OR T5.py_str LIKE CONCAT('%', #{searchKey}, '%')
|
||||||
</if>
|
|
||||||
<if test="itemDefSearchParam.getStatusEnum() != null">
|
|
||||||
AND T5.status_enum = #{itemDefSearchParam.statusEnum}
|
|
||||||
</if>
|
</if>
|
||||||
<if test="itemDefSearchParam.getChargeItem() != null">
|
<if test="itemDefSearchParam.getChargeItem() != null">
|
||||||
AND T5.category_code = #{itemDefSearchParam.chargeItem}
|
AND T5.category_code = #{itemDefSearchParam.chargeItem}
|
||||||
|
|||||||
@@ -1,18 +1,52 @@
|
|||||||
package com.openhis.common.constant;
|
package com.openhis.common.constant;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 共通常量
|
* 常量
|
||||||
*
|
*
|
||||||
* @author system
|
* @author system
|
||||||
*/
|
*/
|
||||||
public class CommonConstants {
|
public class CommonConstants {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 租户ID字段名称
|
* 共同常量
|
||||||
*/
|
*/
|
||||||
public static final String TENANT_ID = "tenant_id";
|
public interface Common {
|
||||||
|
/**
|
||||||
|
* 租户ID字段名称
|
||||||
|
*/
|
||||||
|
String TENANT_ID = "tenant_id";
|
||||||
|
|
||||||
public static final String S_TIME = "STime";
|
/**
|
||||||
|
* 开始时间(用于分页条件查询)
|
||||||
|
*/
|
||||||
|
String S_TIME = "STime";
|
||||||
|
|
||||||
public static final String E_TIME = "ETime";
|
/**
|
||||||
|
* 结束时间(用于分页条件查询)
|
||||||
|
*/
|
||||||
|
String E_TIME = "ETime";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 表名常量
|
||||||
|
*/
|
||||||
|
public interface TableName {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务管理
|
||||||
|
*/
|
||||||
|
String ADM_HEALTHCARE_SERVICE = "adm_healthcare_service";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 字段名常量
|
||||||
|
*/
|
||||||
|
public interface FieldName {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 业务编码
|
||||||
|
*/
|
||||||
|
String BusNo = "bus_no";
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
|
/*
|
||||||
|
* Copyright ©2023 CJB-CNIT Team. All rights reserved
|
||||||
|
*/
|
||||||
package com.openhis.common.constant;
|
package com.openhis.common.constant;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* APL消息ID常量类
|
* APL消息ID常量类
|
||||||
|
*
|
||||||
|
* @author zwh
|
||||||
|
* @date 2025-02-25
|
||||||
*/
|
*/
|
||||||
public interface PromptMsgConstant {
|
public class PromptMsgConstant {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 共用
|
* 共用
|
||||||
*/
|
*/
|
||||||
interface Common {
|
public interface Common {
|
||||||
/**
|
/**
|
||||||
* {0}添加成功
|
* {0}添加成功
|
||||||
*/
|
*/
|
||||||
@@ -47,6 +53,4 @@ public interface PromptMsgConstant {
|
|||||||
String M00009 = "apl.common.M00009";
|
String M00009 = "apl.common.M00009";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
package com.openhis.common.constant;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 表名常量
|
|
||||||
*
|
|
||||||
* @author system
|
|
||||||
*/
|
|
||||||
public class TableNameConstants {
|
|
||||||
/**
|
|
||||||
* 服务管理
|
|
||||||
*/
|
|
||||||
public static final String ADM_HEALTHCARE_SERVICE = "adm_healthcare_service";
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
package com.openhis.common.utils;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
public class HisPageUtils {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行分页查询并转换为目标类型
|
||||||
|
*
|
||||||
|
* @param mapper MyBatis Plus Mapper 接口
|
||||||
|
* @param queryWrapper 查询条件
|
||||||
|
* @param pageNo 当前页
|
||||||
|
* @param pageSize 每页大小
|
||||||
|
* @param targetClass 目标类(如 MedicationDto.class)
|
||||||
|
* @param <T> 源对象类型(数据库实体类)
|
||||||
|
* @param <R> 目标对象类型(DTO 类)
|
||||||
|
* @return 分页结果(目标类型)
|
||||||
|
*/
|
||||||
|
public static <T, R> Page<R> selectPage(BaseMapper<T> mapper, QueryWrapper<T> queryWrapper,
|
||||||
|
int pageNo, int pageSize, Class<R> targetClass) {
|
||||||
|
// 构建分页对象
|
||||||
|
Page<T> page = new Page<>(pageNo, pageSize);
|
||||||
|
// 执行分页查询
|
||||||
|
Page<T> sourcePage = mapper.selectPage(page, queryWrapper);
|
||||||
|
// 转换为目标类型的分页对象
|
||||||
|
Page<R> targetPage = new Page<>();
|
||||||
|
// 复制分页信息
|
||||||
|
BeanUtils.copyProperties(sourcePage, targetPage);
|
||||||
|
// 转换记录列表
|
||||||
|
targetPage.setRecords(convertToDtoList(sourcePage.getRecords(), targetClass));
|
||||||
|
return targetPage;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将源对象列表转换为目标对象列表
|
||||||
|
*
|
||||||
|
* @param sourceList 源对象列表
|
||||||
|
* @param targetClass 目标类
|
||||||
|
* @param <T> 源对象类型
|
||||||
|
* @param <R> 目标对象类型
|
||||||
|
* @return 目标对象列表
|
||||||
|
*/
|
||||||
|
private static <T, R> List<R> convertToDtoList(List<T> sourceList, Class<R> targetClass) {
|
||||||
|
return sourceList.stream()
|
||||||
|
.map(source -> convertToDto(source, targetClass))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将源对象转换为目标对象
|
||||||
|
*
|
||||||
|
* @param source 源对象
|
||||||
|
* @param targetClass 目标类
|
||||||
|
* @param <T> 源对象类型
|
||||||
|
* @param <R> 目标对象类型
|
||||||
|
* @return 目标对象
|
||||||
|
*/
|
||||||
|
private static <T, R> R convertToDto(T source, Class<R> targetClass) {
|
||||||
|
try {
|
||||||
|
// 创建目标对象实例
|
||||||
|
R target = targetClass.getDeclaredConstructor().newInstance();
|
||||||
|
BeanUtils.copyProperties(source, target); // 复制属性
|
||||||
|
return target;
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException("Failed to convert object to DTO", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,11 +1,5 @@
|
|||||||
package com.openhis.common.utils;
|
package com.openhis.common.utils;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
||||||
import com.core.common.utils.DateUtils;
|
|
||||||
import com.core.common.utils.SecurityUtils;
|
|
||||||
import com.openhis.common.constant.CommonConstants;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
@@ -15,6 +9,13 @@ import java.util.Date;
|
|||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.core.common.utils.DateUtils;
|
||||||
|
import com.core.common.utils.SecurityUtils;
|
||||||
|
import com.openhis.common.constant.CommonConstants;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* His查询工具类
|
* His查询工具类
|
||||||
*/
|
*/
|
||||||
@@ -29,10 +30,11 @@ public class HisQueryUtils {
|
|||||||
* @param request 请求
|
* @param request 请求
|
||||||
* @return 构造条件
|
* @return 构造条件
|
||||||
*/
|
*/
|
||||||
public static <T> QueryWrapper<T> buildQueryWrapper(T entity, String searchKey, HashSet<String> searchFields, HttpServletRequest request) {
|
public static <T> QueryWrapper<T> buildQueryWrapper(Object entity, String searchKey, HashSet<String> searchFields,
|
||||||
|
HttpServletRequest request) {
|
||||||
QueryWrapper<T> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<T> queryWrapper = new QueryWrapper<>();
|
||||||
// 添加租户id查询条件
|
// 添加租户id查询条件
|
||||||
queryWrapper.eq(CommonConstants.TENANT_ID, getCurrentTenantId());
|
queryWrapper.eq(CommonConstants.Common.TENANT_ID, getCurrentTenantId());
|
||||||
if (entity == null) {
|
if (entity == null) {
|
||||||
return queryWrapper;
|
return queryWrapper;
|
||||||
}
|
}
|
||||||
@@ -43,7 +45,6 @@ public class HisQueryUtils {
|
|||||||
try {
|
try {
|
||||||
Object value = field.get(entity);
|
Object value = field.get(entity);
|
||||||
if (value != null && !value.toString().equals("")) {
|
if (value != null && !value.toString().equals("")) {
|
||||||
//String fieldName = field.getName();
|
|
||||||
// 将驼峰命名的字段名转换为下划线命名的数据库字段名
|
// 将驼峰命名的字段名转换为下划线命名的数据库字段名
|
||||||
String fieldName = camelToUnderline(field.getName());
|
String fieldName = camelToUnderline(field.getName());
|
||||||
// 处理等于条件
|
// 处理等于条件
|
||||||
@@ -63,19 +64,19 @@ public class HisQueryUtils {
|
|||||||
}
|
}
|
||||||
// 处理时间段查询
|
// 处理时间段查询
|
||||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DateUtils.YYYY_MM_DD);
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DateUtils.YYYY_MM_DD);
|
||||||
// DateTimeFormatter formatter2 = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
||||||
Map<String, String[]> parameterMap = request.getParameterMap();
|
Map<String, String[]> parameterMap = request.getParameterMap();
|
||||||
for (Map.Entry<String, String[]> entry : parameterMap.entrySet()) {
|
for (Map.Entry<String, String[]> entry : parameterMap.entrySet()) {
|
||||||
String paramName = entry.getKey();
|
String paramName = entry.getKey();
|
||||||
// 检查参数名是否以 "STime" 或 "ETime" 结尾
|
// 检查参数名是否以 "STime" 或 "ETime" 结尾
|
||||||
if (paramName.endsWith(CommonConstants.S_TIME) || paramName.endsWith(CommonConstants.E_TIME)) {
|
if (paramName.endsWith(CommonConstants.Common.S_TIME)
|
||||||
|
|| paramName.endsWith(CommonConstants.Common.E_TIME)) {
|
||||||
// 提取字段名(去掉 "STime" 或 "ETime" 后缀)
|
// 提取字段名(去掉 "STime" 或 "ETime" 后缀)
|
||||||
String fieldName = paramName.substring(0, paramName.length() - 5);
|
String fieldName = paramName.substring(0, paramName.length() - 5);
|
||||||
// 驼峰转下划线
|
// 驼峰转下划线
|
||||||
String dbFieldName = camelToUnderline(fieldName);
|
String dbFieldName = camelToUnderline(fieldName);
|
||||||
// 获取对应的 STime 和 ETime 值
|
// 获取对应的 STime 和 ETime 值
|
||||||
String startValue = getParameterValue(request, fieldName + CommonConstants.S_TIME);
|
String startValue = getParameterValue(request, fieldName + CommonConstants.Common.S_TIME);
|
||||||
String endValue = getParameterValue(request, fieldName + CommonConstants.E_TIME);
|
String endValue = getParameterValue(request, fieldName + CommonConstants.Common.E_TIME);
|
||||||
// 如果 Start 和 End 都有值,则添加时间段查询条件
|
// 如果 Start 和 End 都有值,则添加时间段查询条件
|
||||||
if (startValue != null && endValue != null) {
|
if (startValue != null && endValue != null) {
|
||||||
try {
|
try {
|
||||||
@@ -88,7 +89,7 @@ public class HisQueryUtils {
|
|||||||
Date startDate = dateFormat.parse(startValue);
|
Date startDate = dateFormat.parse(startValue);
|
||||||
Date endDate = dateFormat.parse(endValue);
|
Date endDate = dateFormat.parse(endValue);
|
||||||
queryWrapper.ge(dbFieldName, startDate); // 大于等于 STime
|
queryWrapper.ge(dbFieldName, startDate); // 大于等于 STime
|
||||||
queryWrapper.le(dbFieldName, endDate); // 小于等于 ETime
|
queryWrapper.le(dbFieldName, endDate); // 小于等于 ETime
|
||||||
} catch (ParseException e) {
|
} catch (ParseException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
@@ -102,7 +103,7 @@ public class HisQueryUtils {
|
|||||||
* 检查时间字符串是否符合指定格式
|
* 检查时间字符串是否符合指定格式
|
||||||
*
|
*
|
||||||
* @param formatter 时间格式
|
* @param formatter 时间格式
|
||||||
* @param dateStr 时间字符串
|
* @param dateStr 时间字符串
|
||||||
* @return 是否匹配
|
* @return 是否匹配
|
||||||
*/
|
*/
|
||||||
private static boolean isValidFormat(DateTimeFormatter formatter, String dateStr) {
|
private static boolean isValidFormat(DateTimeFormatter formatter, String dateStr) {
|
||||||
|
|||||||
@@ -1,15 +1,12 @@
|
|||||||
package com.openhis.administration.domain;
|
package com.openhis.administration.domain;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
|
||||||
import com.core.common.core.domain.HisBaseEntity;
|
import com.core.common.core.domain.HisBaseEntity;
|
||||||
import com.openhis.common.enums.OrganizationClass;
|
import com.openhis.common.enums.OrganizationClass;
|
||||||
import com.openhis.common.enums.OrganizationType;
|
import com.openhis.common.enums.OrganizationType;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
@@ -31,7 +28,7 @@ public class Organization extends HisBaseEntity {
|
|||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/** 编码 */
|
/** 编码 */
|
||||||
private String bus_no;
|
private String busNo;
|
||||||
|
|
||||||
/** 名称 */
|
/** 名称 */
|
||||||
private String name;
|
private String name;
|
||||||
@@ -60,5 +57,4 @@ public class Organization extends HisBaseEntity {
|
|||||||
/** 显示顺序 */
|
/** 显示顺序 */
|
||||||
private Integer displayOrder;
|
private Integer displayOrder;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,14 +5,13 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
|||||||
import com.openhis.administration.domain.Organization;
|
import com.openhis.administration.domain.Organization;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 机构管理(科室)Service接口
|
* 机构管理Service接口
|
||||||
*
|
*
|
||||||
* @author system
|
* @author system
|
||||||
* @date 2025-02-21
|
* @date 2025-02-21
|
||||||
*/
|
*/
|
||||||
public interface IOrganizationService extends IService<Organization> {
|
public interface IOrganizationService extends IService<Organization> {
|
||||||
Page<Organization> getOrganizationPage(Integer classEnum,Integer activeFlag, Integer pageNo, Integer pageSize);
|
Page<Organization> getOrganizationPage(Integer classEnum, Integer activeFlag, Integer pageNo, Integer pageSize);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过机构ID查询机构名称
|
* 通过机构ID查询机构名称
|
||||||
|
|||||||
@@ -1,14 +1,31 @@
|
|||||||
package com.openhis.administration.service;
|
package com.openhis.administration.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.core.common.core.domain.R;
|
||||||
import com.openhis.administration.domain.Supplier;
|
import com.openhis.administration.domain.Supplier;
|
||||||
|
import com.openhis.workflow.domain.SupplyRequest;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 供应商管理Service接口
|
* 供应商管理Service接口
|
||||||
*
|
*
|
||||||
* @author system
|
* @author dh
|
||||||
* @date 2025-02-20
|
* @date 2025-02-20
|
||||||
*/
|
*/
|
||||||
public interface ISupplierService extends IService<Supplier> {
|
public interface ISupplierService extends IService<Supplier> {
|
||||||
|
/**
|
||||||
|
* 查询厂商/供应商分页列表
|
||||||
|
*
|
||||||
|
* @param supplier 查询条件
|
||||||
|
* @param pageNo 查询条件
|
||||||
|
* @param pageSize 查询条件
|
||||||
|
* @return 供应申请列表
|
||||||
|
*/
|
||||||
|
Page<Supplier> getPage(Supplier supplier, Integer pageNo, Integer pageSize);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,19 +1,18 @@
|
|||||||
package com.openhis.administration.service.impl;
|
package com.openhis.administration.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.openhis.administration.domain.Organization;
|
import com.openhis.administration.domain.Organization;
|
||||||
import com.openhis.administration.mapper.OrganizationMapper;
|
import com.openhis.administration.mapper.OrganizationMapper;
|
||||||
import com.openhis.administration.service.IOrganizationService;
|
import com.openhis.administration.service.IOrganizationService;
|
||||||
import com.openhis.common.enums.DelFlag;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 机构管理(科室)Service业务层处理
|
* 机构管理Service业务层处理
|
||||||
*
|
*
|
||||||
* @author system
|
* @author system
|
||||||
* @date 2025-02-21
|
* @date 2025-02-21
|
||||||
@@ -26,14 +25,15 @@ public class OrganizationServiceImpl extends ServiceImpl<OrganizationMapper, Org
|
|||||||
private OrganizationMapper organizationMapper;
|
private OrganizationMapper organizationMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询科室列表
|
* 查询机构列表
|
||||||
*
|
*
|
||||||
* @param classEnum 机构分类枚举
|
* @param classEnum 机构分类枚举
|
||||||
* @param activeFlag 活动标识
|
* @param activeFlag 活动标识
|
||||||
* @return 科室列表
|
* @return 机构列表
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Page<Organization> getOrganizationPage(Integer classEnum,Integer activeFlag, Integer pageNo, Integer pageSize) {
|
public Page<Organization> getOrganizationPage(Integer classEnum, Integer activeFlag, Integer pageNo,
|
||||||
|
Integer pageSize) {
|
||||||
|
|
||||||
LambdaQueryWrapper<Organization> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<Organization> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
|
||||||
@@ -42,12 +42,12 @@ public class OrganizationServiceImpl extends ServiceImpl<OrganizationMapper, Org
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (activeFlag != null) {
|
if (activeFlag != null) {
|
||||||
queryWrapper.eq(Organization::getTypeEnum, activeFlag);
|
queryWrapper.eq(Organization::getActiveFlag, activeFlag);
|
||||||
}
|
}
|
||||||
|
|
||||||
Page<Organization> organizationPage = organizationMapper.selectPage(new Page<>(pageNo, pageSize), queryWrapper);
|
Page<Organization> organizationPage = organizationMapper.selectPage(new Page<>(pageNo, pageSize), queryWrapper);
|
||||||
|
|
||||||
// 返回科室信息列表
|
// 返回机构信息列表
|
||||||
return organizationPage;
|
return organizationPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -60,7 +60,7 @@ public class OrganizationServiceImpl extends ServiceImpl<OrganizationMapper, Org
|
|||||||
@Override
|
@Override
|
||||||
public Organization getByCode(String code) {
|
public Organization getByCode(String code) {
|
||||||
QueryWrapper<Organization> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<Organization> queryWrapper = new QueryWrapper<>();
|
||||||
//设置查询条件为机构Id code
|
// 设置查询条件为机构Id code
|
||||||
queryWrapper.eq("code", code);
|
queryWrapper.eq("code", code);
|
||||||
return organizationMapper.selectOne(queryWrapper);
|
return organizationMapper.selectOne(queryWrapper);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,13 @@
|
|||||||
package com.openhis.administration.service.impl;
|
package com.openhis.administration.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.core.common.utils.StringUtils;
|
||||||
|
import com.core.common.utils.bean.BeanUtils;
|
||||||
|
import com.openhis.common.enums.DelFlag;
|
||||||
|
import com.openhis.workflow.domain.SupplyRequest;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
@@ -13,7 +21,47 @@ import com.openhis.administration.service.ISupplierService;
|
|||||||
* @author system
|
* @author system
|
||||||
* @date 2025-02-20
|
* @date 2025-02-20
|
||||||
*/
|
*/
|
||||||
|
@Slf4j
|
||||||
@Service
|
@Service
|
||||||
|
@AllArgsConstructor
|
||||||
public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, Supplier> implements ISupplierService {
|
public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, Supplier> implements ISupplierService {
|
||||||
|
|
||||||
|
private final SupplierMapper supplierMapper;
|
||||||
|
/**
|
||||||
|
* 查询厂商/产地列表
|
||||||
|
*
|
||||||
|
* @param supplier 查询条件
|
||||||
|
* @param pageNo 查询条件
|
||||||
|
* @param pageSize 查询条件
|
||||||
|
* @return 厂商/产地列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Page<Supplier> getPage(Supplier supplier, Integer pageNo, Integer pageSize) {
|
||||||
|
Page<Supplier> supplierList = new Page<>();
|
||||||
|
// // 判断入库数量
|
||||||
|
// if (supplyRequest.getItemQuantity() != 0) {
|
||||||
|
// // 查询供应申请信息列表
|
||||||
|
// supplyRequestList = supplyRequestMapper.selectPage(new Page<>(pageNo, pageSize),
|
||||||
|
// new LambdaQueryWrapper<SupplyRequest>().eq(SupplyRequest::getDeleteFlag, DelFlag.NO.getValue()));
|
||||||
|
// } else {
|
||||||
|
// return null;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// 设置查询条件
|
||||||
|
LambdaQueryWrapper<Supplier> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
if (StringUtils.isNotEmpty(supplier.getBusNo())) {
|
||||||
|
lambdaQueryWrapper.eq(Supplier::getBusNo, supplier.getBusNo());
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotEmpty(supplier.getName())) {
|
||||||
|
lambdaQueryWrapper.eq(Supplier::getName, supplier.getName());
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotNull(supplier.getTypeEnum())) {
|
||||||
|
lambdaQueryWrapper.eq(Supplier::getTypeEnum, supplier.getTypeEnum());
|
||||||
|
}
|
||||||
|
lambdaQueryWrapper.eq(Supplier::getDeleteFlag, DelFlag.NO.getValue());
|
||||||
|
|
||||||
|
supplierList = supplierMapper.selectPage(new Page<>(pageNo, pageSize), lambdaQueryWrapper);
|
||||||
|
// 返回入库信息列表
|
||||||
|
return supplierList;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,13 +1,12 @@
|
|||||||
package com.openhis.workflow.domain;
|
package com.openhis.workflow.domain;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
|
||||||
import com.core.common.core.domain.HisBaseEntity;
|
import com.core.common.core.domain.HisBaseEntity;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
@@ -28,6 +27,9 @@ public class SupplyRequest extends HisBaseEntity {
|
|||||||
@TableId(type = IdType.ASSIGN_ID)
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
|
/** 单据号 */
|
||||||
|
private String busNo;
|
||||||
|
|
||||||
/** 类型 */
|
/** 类型 */
|
||||||
private Integer typeEnum;
|
private Integer typeEnum;
|
||||||
|
|
||||||
@@ -118,5 +120,4 @@ public class SupplyRequest extends HisBaseEntity {
|
|||||||
/** 申请时间 */
|
/** 申请时间 */
|
||||||
private Date applyTime;
|
private Date applyTime;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
import { parseStrEmpty } from "@/utils/openhis";
|
||||||
|
|
||||||
|
// 查询病种目录列表
|
||||||
|
export function getDiseaseList(query) {
|
||||||
|
return request({
|
||||||
|
url: '/datadictionary/disease/information-page',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询病种目录详细
|
||||||
|
export function getDiseaseOne(id) {
|
||||||
|
return request({
|
||||||
|
url: '/datadictionary/disease/information-one' + parseStrEmpty(id),
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增病种目录
|
||||||
|
export function addDisease(data) {
|
||||||
|
return request({
|
||||||
|
url: '/datadictionary/disease/information',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改病种目录
|
||||||
|
export function editDisease(data) {
|
||||||
|
return request({
|
||||||
|
url: '/datadictionary/disease/information',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除病种目录
|
||||||
|
export function delUser(userId) {
|
||||||
|
return request({
|
||||||
|
url: '/system/user/' + userId,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 病种目录分类查询
|
||||||
|
export function getDiseaseCategory() {
|
||||||
|
return request({
|
||||||
|
url: '/datadictionary/disease/information-category',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
519
openhis-ui-vue3/src/views/catalog/disease/index.vue
Normal file
519
openhis-ui-vue3/src/views/catalog/disease/index.vue
Normal file
@@ -0,0 +1,519 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<!--疾病目录数据-->
|
||||||
|
<el-col :span="4" :xs="24">
|
||||||
|
<!-- <div class="head-container">
|
||||||
|
<el-input
|
||||||
|
v-model="deptName"
|
||||||
|
placeholder="请输入部门名称"
|
||||||
|
clearable
|
||||||
|
prefix-icon="Search"
|
||||||
|
style="margin-bottom: 20px"
|
||||||
|
/>
|
||||||
|
</div> -->
|
||||||
|
<!-- <div class="head-container">
|
||||||
|
<el-tree
|
||||||
|
:data="conditionDefinitionOptions"
|
||||||
|
:props="{ label: 'label', children: 'children' }"
|
||||||
|
:expand-on-click-node="false"
|
||||||
|
:filter-node-method="filterNode"
|
||||||
|
ref="deptTreeRef"
|
||||||
|
node-key="id"
|
||||||
|
highlight-current
|
||||||
|
default-expand-all
|
||||||
|
@node-click="handleNodeClick"
|
||||||
|
/>
|
||||||
|
</div> -->
|
||||||
|
</el-col>
|
||||||
|
<!--用户数据-->
|
||||||
|
<el-col :span="20" :xs="24">
|
||||||
|
<el-form
|
||||||
|
:model="queryParams"
|
||||||
|
ref="queryRef"
|
||||||
|
:inline="true"
|
||||||
|
v-show="showSearch"
|
||||||
|
label-width="68px"
|
||||||
|
>
|
||||||
|
<el-form-item label="疾病:" prop="diseaseName ">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.diseaseName"
|
||||||
|
placeholder="名称/ICD10编码/拼音助记码"
|
||||||
|
clearable
|
||||||
|
style="width: 240px"
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="是否停用" prop="status">
|
||||||
|
<el-select
|
||||||
|
v-model="queryParams.status"
|
||||||
|
clearable
|
||||||
|
style="width: 240px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in sys_normal_disable"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="是否系统预置:" prop="status" label-width="120">
|
||||||
|
<el-select
|
||||||
|
v-model="queryParams.status"
|
||||||
|
placeholder="用户状态"
|
||||||
|
clearable
|
||||||
|
style="width: 240px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in sys_normal_disable"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item> -->
|
||||||
|
<!-- <el-form-item>
|
||||||
|
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item> -->
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="Plus"
|
||||||
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['system:user:add']"
|
||||||
|
>添加新项目</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<!-- <el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="Plus"
|
||||||
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['system:user:add']"
|
||||||
|
>添加为本机构项目</el-button>
|
||||||
|
</el-col> -->
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
plain
|
||||||
|
icon="Remove"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleClose"
|
||||||
|
v-hasPermi="['system:user:edit']"
|
||||||
|
>停用</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
plain
|
||||||
|
icon="CirclePlus"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleStart"
|
||||||
|
v-hasPermi="['system:user:remove']"
|
||||||
|
>启用</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="Search"
|
||||||
|
@click="getList"
|
||||||
|
v-hasPermi="['system:user:import']"
|
||||||
|
>查询</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
|
icon="Download"
|
||||||
|
@click="handleExport"
|
||||||
|
v-hasPermi="['system:user:export']"
|
||||||
|
>导出Excel</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="diseaseList"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
>
|
||||||
|
<el-table-column type="selection" width="50" align="center" />
|
||||||
|
<el-table-column
|
||||||
|
label="编码"
|
||||||
|
align="center"
|
||||||
|
key="conditionCode"
|
||||||
|
prop="conditionCode"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="名称"
|
||||||
|
align="center"
|
||||||
|
key="name"
|
||||||
|
prop="name"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="拼音助记码"
|
||||||
|
align="center"
|
||||||
|
key="pyStr"
|
||||||
|
prop="pyStr"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="医保编码 "
|
||||||
|
align="center"
|
||||||
|
key="ybNo"
|
||||||
|
prop="ybNo"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="医保名称"
|
||||||
|
align="center"
|
||||||
|
key="ybName"
|
||||||
|
prop="ybName"
|
||||||
|
width="120"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="医保对码标志"
|
||||||
|
align="center"
|
||||||
|
key="ybMatchflag"
|
||||||
|
prop="ybMatchflag"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="停用"
|
||||||
|
align="center"
|
||||||
|
key="statusEnum"
|
||||||
|
rop="statusEnum"
|
||||||
|
width="160"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="操作"
|
||||||
|
align="center"
|
||||||
|
width="150"
|
||||||
|
class-name="small-padding fixed-width"
|
||||||
|
>
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button
|
||||||
|
link
|
||||||
|
type="primary"
|
||||||
|
icon="Edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['system:user:edit']"
|
||||||
|
>编辑</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
link
|
||||||
|
type="primary"
|
||||||
|
icon="View"
|
||||||
|
@click="handleView(scope.row)"
|
||||||
|
v-hasPermi="['system:user:remove']"
|
||||||
|
>查看</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-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<!-- 添加或修改用户配置对话框 -->
|
||||||
|
<el-dialog :title="title" v-model="open" width="600px" append-to-body>
|
||||||
|
<el-form :model="form" :rules="rules" ref="diseaseRef" label-width="80px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<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="12">
|
||||||
|
<el-form-item label="编码" prop="conditionCode">
|
||||||
|
<el-input
|
||||||
|
v-model="form.conditionCode"
|
||||||
|
placeholder="请输入编码"
|
||||||
|
maxlength="30"
|
||||||
|
:disabled="form.id != undefined"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="拼音" prop="pyStr">
|
||||||
|
<el-input v-model="form.pyStr" maxlength="11" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="停用" prop="status">
|
||||||
|
<el-checkbox v-model="form.status"></el-checkbox>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</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="Disease">
|
||||||
|
import {
|
||||||
|
getDiseaseList,
|
||||||
|
editDisease,
|
||||||
|
addDisease,
|
||||||
|
getDiseaseCategory,
|
||||||
|
getDiseaseOne,
|
||||||
|
} 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 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 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 filterNode = (value, data) => {
|
||||||
|
if (!value) return true;
|
||||||
|
return data.label.indexOf(value) !== -1;
|
||||||
|
};
|
||||||
|
// /** 根据名称筛选部门树 */
|
||||||
|
// watch(deptName, val => {
|
||||||
|
// proxy.$refs["deptTreeRef"].filter(val);
|
||||||
|
// });
|
||||||
|
/** 病种目录分类查询下拉树结构 */
|
||||||
|
function getDiseaseCategoryList() {
|
||||||
|
getDiseaseCategory().then((response) => {
|
||||||
|
console.log(response, "response病种目录分类查询下拉树结构");
|
||||||
|
conditionDefinitionOptions.value = response.data;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/** 查询病种目录列表 */
|
||||||
|
function getList() {
|
||||||
|
loading.value = true;
|
||||||
|
getDiseaseList(queryParams.value).then((res) => {
|
||||||
|
loading.value = false;
|
||||||
|
console.log(res, "res");
|
||||||
|
diseaseList.value = res.data.records;
|
||||||
|
total.value = res.total;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/** 节点单击事件 */
|
||||||
|
function handleNodeClick(data) {
|
||||||
|
queryParams.value.deptId = data.id;
|
||||||
|
handleQuery();
|
||||||
|
}
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
function handleQuery() {
|
||||||
|
queryParams.value.pageNum = 1;
|
||||||
|
getList();
|
||||||
|
}
|
||||||
|
// /** 重置按钮操作 */
|
||||||
|
// function resetQuery() {
|
||||||
|
// dateRange.value = [];
|
||||||
|
// proxy.resetForm("queryRef");
|
||||||
|
// queryParams.value.deptId = undefined;
|
||||||
|
// proxy.$refs.deptTreeRef.setCurrentKey(null);
|
||||||
|
// handleQuery();
|
||||||
|
// };
|
||||||
|
/** 启用按钮操作 */
|
||||||
|
function handleStart() {
|
||||||
|
selectedData.value.forEach((item) => {
|
||||||
|
item.statusEnum = "2";
|
||||||
|
});
|
||||||
|
const data = selectedData.value;
|
||||||
|
// selectedData
|
||||||
|
console.log(data, "data");
|
||||||
|
proxy.$modal
|
||||||
|
.confirm("是否确定启用数据!")
|
||||||
|
.then(function () {
|
||||||
|
return editDisease(data);
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
getList();
|
||||||
|
proxy.$modal.msgSuccess("启用成功");
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
}
|
||||||
|
/** 停用按钮操作 */
|
||||||
|
function handleClose() {
|
||||||
|
selectedData.value.forEach((item) => {
|
||||||
|
item.statusEnum = "3";
|
||||||
|
});
|
||||||
|
const data = selectedData.value;
|
||||||
|
console.log(data, "data");
|
||||||
|
proxy.$modal
|
||||||
|
.confirm("是否确认停用数据!")
|
||||||
|
.then(function () {
|
||||||
|
return editDisease(data);
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
getList();
|
||||||
|
proxy.$modal.msgSuccess("停用成功");
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
}
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
function handleExport() {
|
||||||
|
proxy.download(
|
||||||
|
"system/user/export",
|
||||||
|
{
|
||||||
|
...queryParams.value,
|
||||||
|
},
|
||||||
|
`user_${new Date().getTime()}.xlsx`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
// /** 用户状态修改 */
|
||||||
|
// function handleStatusChange(row) {
|
||||||
|
// let text = row.status === "0" ? "启用" : "停用";
|
||||||
|
// proxy.$modal.confirm('确认要"' + text + '""' + row.userName + '"用户吗?').then(function () {
|
||||||
|
// return changeUserStatus(row.userId, row.status);
|
||||||
|
// }).then(() => {
|
||||||
|
// proxy.$modal.msgSuccess(text + "成功");
|
||||||
|
// }).catch(function () {
|
||||||
|
// row.status = row.status === "0" ? "1" : "0";
|
||||||
|
// });
|
||||||
|
// };
|
||||||
|
|
||||||
|
/** 选择条数 */
|
||||||
|
function handleSelectionChange(selection) {
|
||||||
|
console.log(selection, "selection");
|
||||||
|
selectedData.value = selection.map((item) => ({ ...item })); // 存储选择的行数据
|
||||||
|
single.value = selection.length != 1;
|
||||||
|
multiple.value = !selection.length;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 下载模板操作 */
|
||||||
|
function importTemplate() {
|
||||||
|
proxy.download(
|
||||||
|
"system/user/importTemplate",
|
||||||
|
{},
|
||||||
|
`user_template_${new Date().getTime()}.xlsx`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
/** 重置操作表单 */
|
||||||
|
function reset() {
|
||||||
|
form.value = {
|
||||||
|
id: undefined,
|
||||||
|
conditionCode: undefined,
|
||||||
|
pyStr: undefined,
|
||||||
|
status: undefined,
|
||||||
|
statusEnum: undefined,
|
||||||
|
};
|
||||||
|
proxy.resetForm("diseaseRef");
|
||||||
|
}
|
||||||
|
/** 取消按钮 */
|
||||||
|
function cancel() {
|
||||||
|
open.value = false;
|
||||||
|
reset();
|
||||||
|
}
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
function handleAdd() {
|
||||||
|
reset();
|
||||||
|
open.value = true;
|
||||||
|
title.value = "新增";
|
||||||
|
}
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
function handleUpdate(row) {
|
||||||
|
reset();
|
||||||
|
console.log(row, "row");
|
||||||
|
form.value = row;
|
||||||
|
open.value = true;
|
||||||
|
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 handleView(row) {
|
||||||
|
reset();
|
||||||
|
open.value = true;
|
||||||
|
getDiseaseOne(row.id).then((response) => {
|
||||||
|
console.log(response, "responsebbbb", row.id);
|
||||||
|
form.value = response.data;
|
||||||
|
// getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
getDiseaseCategoryList();
|
||||||
|
getList();
|
||||||
|
</script>
|
||||||
Reference in New Issue
Block a user