diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/chargemanage/appservice/impl/OutpatientChargeAppServiceImpl.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/chargemanage/appservice/impl/OutpatientChargeAppServiceImpl.java index dda17367..a65b9922 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/chargemanage/appservice/impl/OutpatientChargeAppServiceImpl.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/chargemanage/appservice/impl/OutpatientChargeAppServiceImpl.java @@ -119,6 +119,7 @@ public class OutpatientChargeAppServiceImpl implements IOutpatientChargeAppServi = outpatientChargeAppMapper.selectEncounterPatientPrescription(encounterId, ChargeItemContext.ACTIVITY.getValue(), ChargeItemContext.MEDICATION.getValue(), ChargeItemContext.DEVICE.getValue(), ChargeItemContext.REGISTER.getValue(), + ChargeItemContext.WESTERN_MEDICINE.getValue(), ChargeItemContext.CHINESE_PATENT_MEDICINE.getValue(), ChargeItemStatus.PLANNED.getValue(), ChargeItemStatus.BILLABLE.getValue(), ChargeItemStatus.BILLED.getValue(), ChargeItemStatus.REFUNDING.getValue(), ChargeItemStatus.REFUNDED.getValue(), ChargeItemStatus.PART_REFUND.getValue(), diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/chargemanage/appservice/impl/OutpatientPricingAppServiceImpl.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/chargemanage/appservice/impl/OutpatientPricingAppServiceImpl.java index a349312b..dd32d54d 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/chargemanage/appservice/impl/OutpatientPricingAppServiceImpl.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/chargemanage/appservice/impl/OutpatientPricingAppServiceImpl.java @@ -75,8 +75,9 @@ public class OutpatientPricingAppServiceImpl implements IOutpatientPricingAppSer } // 门诊划价:不要强制 pricingFlag=1 参与过滤(wor_activity_definition.pricing_flag 可能为 0), // 否则会导致诊疗项目(adviceType=3)查询结果为空 records=[] + String categoryCode = adviceBaseDto != null ? adviceBaseDto.getCategoryCode() : null; return iDoctorStationAdviceAppService.getAdviceBaseInfo(adviceBaseDto, searchKey, locationId, null, - organizationId, pageNo, pageSize, null, adviceTypes, null); + organizationId, pageNo, pageSize, null, adviceTypes, null, categoryCode); } } diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/chargemanage/controller/OutpatientPricingController.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/chargemanage/controller/OutpatientPricingController.java index a9dc09c3..c5761fa9 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/chargemanage/controller/OutpatientPricingController.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/chargemanage/controller/OutpatientPricingController.java @@ -61,7 +61,12 @@ public class OutpatientPricingController { @RequestParam(value = "locationId", required = false) Long locationId, @RequestParam(value = "organizationId") Long organizationId, @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, - @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) { + @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, + @RequestParam(value = "categoryCode", required = false) String categoryCode) { + // 将 categoryCode 设置到 adviceBaseDto 中 + if (categoryCode != null && !categoryCode.isEmpty()) { + adviceBaseDto.setCategoryCode(categoryCode); + } return R.ok(iOutpatientPricingAppService.getAdviceBaseInfo(adviceBaseDto, searchKey, locationId, organizationId, pageNo, pageSize)); } diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/chargemanage/mapper/OutpatientChargeAppMapper.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/chargemanage/mapper/OutpatientChargeAppMapper.java index 537186c7..9039cdba 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/chargemanage/mapper/OutpatientChargeAppMapper.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/chargemanage/mapper/OutpatientChargeAppMapper.java @@ -42,6 +42,8 @@ public interface OutpatientChargeAppMapper { * @param medication 药品 * @param device 耗材 * @param register 挂号费 + * @param westernMedicine 西药 + * @param chinesePatentMedicine 中成药 * @param planned 收费状态:待收费 * @param billable 收费状态:待结算 * @param billed 收费状态:已结算 @@ -53,7 +55,9 @@ public interface OutpatientChargeAppMapper { */ List selectEncounterPatientPrescription(@Param("encounterId") Long encounterId, @Param("activity") Integer activity, @Param("medication") Integer medication, @Param("device") Integer device, - @Param("register") Integer register, @Param("planned") Integer planned, @Param("billable") Integer billable, + @Param("register") Integer register, @Param("westernMedicine") Integer westernMedicine, + @Param("chinesePatentMedicine") Integer chinesePatentMedicine, + @Param("planned") Integer planned, @Param("billable") Integer billable, @Param("billed") Integer billed, @Param("refunding") Integer refunding, @Param("refunded") Integer refunded, @Param("partRefund") Integer partRefund, @Param("worDeviceRequest") String worDeviceRequest); diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/IDoctorStationAdviceAppService.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/IDoctorStationAdviceAppService.java index 45dde116..5d110c65 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/IDoctorStationAdviceAppService.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/IDoctorStationAdviceAppService.java @@ -31,7 +31,7 @@ public interface IDoctorStationAdviceAppService { */ IPage getAdviceBaseInfo(AdviceBaseDto adviceBaseDto, String searchKey, Long locationId, List adviceDefinitionIdParamList, Long organizationId, Integer pageNo, Integer pageSize, - Integer pricingFlag, List adviceTypes, String orderPricing); + Integer pricingFlag, List adviceTypes, String orderPricing, String categoryCode); /** * 查询医嘱绑定信息 diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/IDoctorStationInspectionLabApplyService.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/IDoctorStationInspectionLabApplyService.java index 6790f25c..7e04abfa 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/IDoctorStationInspectionLabApplyService.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/IDoctorStationInspectionLabApplyService.java @@ -19,11 +19,4 @@ public interface IDoctorStationInspectionLabApplyService { * @return 删除结果 */ R deleteInspectionLabApply(String applyNo); - - /** - * 生成检验申请单号 - * 规则:LS + YYYYMMDD + 5位流水号(每日从1开始递增) - * @return 申请单号 - */ - String generateApplyNo(); } diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorStationAdviceAppServiceImpl.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorStationAdviceAppServiceImpl.java index 6d70080d..192bf778 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorStationAdviceAppServiceImpl.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorStationAdviceAppServiceImpl.java @@ -26,6 +26,7 @@ import com.openhis.common.constant.PromptMsgConstant; import com.openhis.common.enums.*; import com.openhis.common.utils.EnumUtils; import com.openhis.common.utils.HisQueryUtils; +import com.openhis.medication.domain.MedicationDispense; import com.openhis.medication.domain.MedicationRequest; import com.openhis.medication.service.IMedicationDispenseService; import com.openhis.medication.service.IMedicationRequestService; @@ -44,6 +45,8 @@ import com.openhis.workflow.service.IActivityDefinitionService; import com.openhis.workflow.service.IDeviceDispenseService; import com.openhis.workflow.service.IDeviceRequestService; import com.openhis.workflow.service.IServiceRequestService; +import com.openhis.workflow.domain.InventoryItem; +import com.openhis.workflow.service.IInventoryItemService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -111,6 +114,9 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp @Resource IEncounterService iEncounterService; + @Resource + IInventoryItemService inventoryItemService; + // 缓存 key 前缀 private static final String ADVICE_BASE_INFO_CACHE_PREFIX = "advice:base:info:"; // 缓存过期时间(小时) @@ -135,7 +141,7 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp @Override public IPage getAdviceBaseInfo(AdviceBaseDto adviceBaseDto, String searchKey, Long locationId, List adviceDefinitionIdParamList, Long organizationId, Integer pageNo, Integer pageSize, - Integer pricingFlag, List adviceTypes, String orderPricing) { + Integer pricingFlag, List adviceTypes, String orderPricing, String categoryCode) { // 生成缓存键,处理可能的null值 String safeSearchKey = searchKey != null ? searchKey : ""; @@ -203,7 +209,7 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp new Page<>(pageNo, pageSize), PublicationStatus.ACTIVE.getValue(), organizationId, CommonConstants.TableName.MED_MEDICATION_DEFINITION, CommonConstants.TableName.ADM_DEVICE_DEFINITION, CommonConstants.TableName.WOR_ACTIVITY_DEFINITION, pricingFlag, adviceDefinitionIdParamList, - adviceTypes, searchKey, + adviceTypes, searchKey, categoryCode, queryWrapper); List adviceBaseDtoList = adviceBaseInfo.getRecords(); @@ -932,7 +938,7 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp deviceAdviceDto.setAdviceTableName(CommonConstants.TableName.ADM_DEVICE_DEFINITION); IPage devicePage = getAdviceBaseInfo(deviceAdviceDto, null, null, null, adviceSaveDto.getFounderOrgId(), 1, 1, Whether.NO.getValue(), - List.of(ItemType.DEVICE.getValue()), null); + List.of(ItemType.DEVICE.getValue()), null, null); if (devicePage == null || devicePage.getRecords().isEmpty()) { log.warn("无法找到耗材定价信息: deviceDefId={}", boundDevice.getDevActId()); @@ -1428,26 +1434,26 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp // 只有在签发时 if (is_sign) { - // 发送跨系统申请 - adviceSaveDto.setRequestId(serviceRequest.getId()); - try { - // 查询诊疗定义 - ActivityDefinition activityDefinition - = iActivityDefinitionService.getById(adviceSaveDto.getAdviceDefinitionId()); - if (activityDefinition != null) { - // 检验 或 检查 - if (ActivityType.PROOF.getValue().equals(activityDefinition.getTypeEnum()) - || ActivityType.TEST.getValue().equals(activityDefinition.getTypeEnum())) { - doctorStationSendApplyUtil.sendCrossSystemApply(adviceSaveDto, organizationId, curDate); - } - } - } catch (Exception e) { - if (!Whether.YES.getCode() - .equals(TenantOptionUtil.getOptionContent(TenantOptionDict.LIS_PACS_ERROR_IGNORE))) { - throw e; - } - log.error(e.getMessage(), e); - } + // 发送跨系统申请 - 已注释,项目未使用LIS/PACS系统 + // adviceSaveDto.setRequestId(serviceRequest.getId()); + // try { + // // 查询诊疗定义 + // ActivityDefinition activityDefinition + // = iActivityDefinitionService.getById(adviceSaveDto.getAdviceDefinitionId()); + // if (activityDefinition != null) { + // // 检验 或 检查 + // if (ActivityType.PROOF.getValue().equals(activityDefinition.getTypeEnum()) + // || ActivityType.TEST.getValue().equals(activityDefinition.getTypeEnum())) { + // doctorStationSendApplyUtil.sendCrossSystemApply(adviceSaveDto, organizationId, curDate); + // } + // } + // } catch (Exception e) { + // if (!Whether.YES.getCode() + // .equals(TenantOptionUtil.getOptionContent(TenantOptionDict.LIS_PACS_ERROR_IGNORE))) { + // throw e; + // } + // log.error(e.getMessage(), e); + // } } } } @@ -1512,15 +1518,60 @@ public class DoctorStationAdviceAppServiceImpl implements IDoctorStationAdviceAp iChargeItemService.updatePaymentStatus(chargeItemIdList, ChargeItemStatus.DRAFT.getValue()); } - // 🔧 BugFix: 直接对所有requestId进行作废操作 - log.info("BugFix#219: signOffAdvice - 作废所有请求, requestIdList={}", requestIdList); + // 🔧 新增:签退时回滚库存 + // 查询已发放的药品记录(用于回滚库存) + List dispensedList = iMedicationDispenseService.list( + new LambdaQueryWrapper() + .in(MedicationDispense::getMedReqId, requestIdList) + .eq(MedicationDispense::getStatusEnum, DispenseStatus.COMPLETED.getValue()) + ); - // 尝试作废药品请求(只有存在的才会更新) - iMedicationRequestService.updateCancelledStatusBatch(requestIdList, null, null); - // 尝试作废耗材请求(只有存在的才会更新) - iDeviceRequestService.updateCancelledStatusBatch(requestIdList); - // 尝试作废诊疗请求(只有存在的才会更新) - iServiceRequestService.updateCancelledStatusBatch(requestIdList); + if (dispensedList != null && !dispensedList.isEmpty()) { + // 需要回滚的库存列表 + List inventoryUpdateList = new ArrayList<>(); + + for (MedicationDispense dispense : dispensedList) { + // 查询对应的库存记录(根据批号和药品ID) + if (dispense.getMedicationId() != null && dispense.getLotNumber() != null) { + InventoryItem inventoryItem = inventoryItemService.getOne( + new LambdaQueryWrapper() + .eq(InventoryItem::getItemId, dispense.getMedicationId()) + .eq(InventoryItem::getLotNumber, dispense.getLotNumber()) + ); + + if (inventoryItem != null) { + // 计算回滚后的数量(加上已发放的数量) + BigDecimal currentQuantity = inventoryItem.getQuantity() != null ? inventoryItem.getQuantity() : BigDecimal.ZERO; + BigDecimal dispenseQuantity = dispense.getQuantity() != null ? dispense.getQuantity() : BigDecimal.ZERO; + inventoryUpdateList.add(new InventoryItem() + .setId(inventoryItem.getId()) + .setQuantity(currentQuantity.add(dispenseQuantity)) + ); + } + } + + // 更新发药记录状态为已退药 + dispense.setStatusEnum(DispenseStatus.RETURNED.getValue()); + } + + // 批量更新库存(回滚数量) + if (!inventoryUpdateList.isEmpty()) { + inventoryItemService.updateBatchById(inventoryUpdateList); + } + + // 更新发药记录状态 + iMedicationDispenseService.updateBatchById(dispensedList); + } + + // 🔧 BugFix: 直接对所有requestId进行签退操作,将状态改为待签发 + log.info("BugFix: signOffAdvice - 签退所有请求,状态改为待签发, requestIdList={}", requestIdList); + + // 尝试签退药品请求(只有存在的才会更新) + iMedicationRequestService.updateDraftStatusBatch(requestIdList, null, null); + // 尝试签退耗材请求(只有存在的才会更新) + iDeviceRequestService.updateDraftStatusBatch(requestIdList); + // 尝试签退诊疗请求(只有存在的才会更新) + iServiceRequestService.updateDraftStatusBatch(requestIdList); log.info("BugFix#219: signOffAdvice - 所有请求作废完成"); diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorStationChineseMedicalAppServiceImpl.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorStationChineseMedicalAppServiceImpl.java index 59ce1151..e620735e 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorStationChineseMedicalAppServiceImpl.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorStationChineseMedicalAppServiceImpl.java @@ -369,7 +369,7 @@ public class DoctorStationChineseMedicalAppServiceImpl implements IDoctorStation adviceBaseDto.setAdviceType(1); // 医嘱类型为药品 adviceBaseDto.setCategoryCode(MedCategoryCode.CHINESE_HERBAL_MEDICINE.getValue());// 中草药 return iDoctorStationAdviceAppService.getAdviceBaseInfo(adviceBaseDto, searchKey, locationId, - adviceDefinitionIdParamList, organizationId, pageNo, pageSize, pricingFlag, List.of(1, 2, 3), null); + adviceDefinitionIdParamList, organizationId, pageNo, pageSize, pricingFlag, List.of(1, 2, 3), null, null); } /** @@ -613,7 +613,7 @@ public class DoctorStationChineseMedicalAppServiceImpl implements IDoctorStation // 对应的诊疗医嘱信息 AdviceBaseDto activityAdviceBaseDto = iDoctorStationAdviceAppService.getAdviceBaseInfo(adviceBaseDto, null, - null, null, organizationId, 1, 1, Whether.NO.getValue(), List.of(3), null).getRecords().get(0); + null, null, organizationId, 1, 1, Whether.NO.getValue(), List.of(3), null, null).getRecords().get(0); if (activityAdviceBaseDto != null) { // 费用定价 AdvicePriceDto advicePriceDto = activityAdviceBaseDto.getPriceList().get(0); diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorStationLabApplyServiceImpl.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorStationLabApplyServiceImpl.java index 756832ad..b66d60a9 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorStationLabApplyServiceImpl.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/appservice/impl/DoctorStationLabApplyServiceImpl.java @@ -94,8 +94,39 @@ public class DoctorStationLabApplyServiceImpl implements IDoctorStationInspectio * 保存检验申请单信息逻辑 * 保存检验申请单信息同时根据检验申请单检验项目数据保存检验申请单明细信息 */ - log.debug("保存检验申请单信息:{}", doctorStationLabApplyDto); - log.debug("保存申请单明细信息:{}",doctorStationLabApplyDto.getLabApplyItemList()); + + // 申请单号为空或"待生成"时,由后端生成新单号 + String applyNo = doctorStationLabApplyDto.getApplyNo(); + boolean isNewApplyNo = false; + if (applyNo == null || applyNo.trim().isEmpty() || "待生成".equals(applyNo) || "自动生成".equals(applyNo)) { + applyNo = generateApplyNo(); + isNewApplyNo = true; + } + // 将生成的单号设置回 DTO + doctorStationLabApplyDto.setApplyNo(applyNo); + + try { + // 执行保存逻辑 + doSaveInspectionLabApply(doctorStationLabApplyDto, applyNo); + } catch (Exception e) { + // 记录废号日志(申请单号已生成但保存失败) + if (isNewApplyNo) { + log.error("申请单号 {} 因保存失败成为废号,原因:{}", applyNo, e.getMessage()); + } + throw e; // 重新抛出异常,让事务回滚 + } + + // 返回生成的申请单号 + Map result = new HashMap<>(); + result.put("applyNo", applyNo); + return R.ok(result); + } + + /** + * 执行保存检验申请单的实际逻辑 + */ + private void doSaveInspectionLabApply(DoctorStationLabApplyDto doctorStationLabApplyDto, String applyNo) { + //获取当前登陆用户 ID String userId = String.valueOf(SecurityUtils.getLoginUser().getUserId()); InspectionLabApply inspectionLabApply = new InspectionLabApply(); @@ -108,18 +139,30 @@ public class DoctorStationLabApplyServiceImpl implements IDoctorStationInspectio inspectionLabApply.setOperatorId(userId); inspectionLabApply.setCreateTime(new Date()); inspectionLabApply.setDeleteFlag(DelFlag.NO.getCode()); + // 申请日期使用服务器当前系统时间 + inspectionLabApply.setApplyTime(new Date()); - log.debug("保存检验申请单信息:{}", inspectionLabApply); inspectionLabApplyService.saveOrUpdate(inspectionLabApply); + // 金额校验和重算:后端重新计算金额,防止前端篡改 + java.math.BigDecimal totalAmount = java.math.BigDecimal.ZERO; + int index = 0; //遍历 doctorStationLabApplyDto.getLabApplyItemList() - int index = 0; for (DoctorStationLabApplyItemDto doctorStationLabApplyItemDto : doctorStationLabApplyDto.getLabApplyItemList()) { //将 dto 数据复制到 InspectionLabApplyItem 对象中 InspectionLabApplyItem inspectionLabApplyItem = new InspectionLabApplyItem(); BeanUtils.copyProperties(doctorStationLabApplyItemDto, inspectionLabApplyItem); + // 后端重新计算金额:金额 = 单价 × 数量 + java.math.BigDecimal itemPrice = doctorStationLabApplyItemDto.getItemPrice(); + java.math.BigDecimal itemQty = doctorStationLabApplyItemDto.getItemQty(); + if (itemPrice != null && itemQty != null) { + java.math.BigDecimal calculatedAmount = itemPrice.multiply(itemQty).setScale(2, java.math.RoundingMode.HALF_UP); + inspectionLabApplyItem.setItemAmount(calculatedAmount); + totalAmount = totalAmount.add(calculatedAmount); + } + //设置从表申请单明细的申请单号 inspectionLabApplyItem.setApplyNo(doctorStationLabApplyDto.getApplyNo()); //执行科室代码,取值于检验申请单明细(前端传递的字典值) @@ -131,7 +174,6 @@ public class DoctorStationLabApplyServiceImpl implements IDoctorStationInspectio index++; inspectionLabApplyItem.setDeleteFlag(DelFlag.NO.getCode()); - log.debug("保存申请单明细信息:{}", inspectionLabApplyItem); inspectionLabApplyItemService.saveOrUpdate(inspectionLabApplyItem); //创建条码对象 @@ -147,8 +189,6 @@ public class DoctorStationLabApplyServiceImpl implements IDoctorStationInspectio barCode.setCreateTime(new Date()); barCode.setDeleteFlag(DelFlag.NO.getCode()); - - log.debug("插入条码数据前,barCode:{}",barCode); inspectionLabBarCodeService.saveOrUpdate(barCode); } @@ -195,15 +235,12 @@ public class DoctorStationLabApplyServiceImpl implements IDoctorStationInspectio ); if (organization != null) { positionId = organization.getId(); - } else { - log.warn("未找到执行科室代码对应的科室:{}", performDeptCode); } } // 如果没有指定执行科室,使用当前医生所在的科室作为默认执行科室 if (positionId == null) { positionId = SecurityUtils.getDeptId(); - log.debug("检验项目未指定执行科室,使用当前科室:{}", positionId); } // 4. 创建医嘱保存对象 @@ -282,12 +319,7 @@ public class DoctorStationLabApplyServiceImpl implements IDoctorStationInspectio adviceSaveParam.setAdviceSaveList(adviceSaveList); // 调用门诊医嘱保存接口,创建关联的医嘱记录 - try { - iDoctorStationAdviceAppService.saveAdvice(adviceSaveParam, "1"); // "1"表示保存操作 - } catch (Exception e) { - throw new RuntimeException("创建关联医嘱记录失败", e); - } - return R.ok(); + iDoctorStationAdviceAppService.saveAdvice(adviceSaveParam, "1"); // "1"表示保存操作 } /** @@ -559,8 +591,7 @@ public class DoctorStationLabApplyServiceImpl implements IDoctorStationInspectio * 支持并发安全:使用 Redis 原子递增保证唯一性 * @return 申请单号 */ - @Override - public String generateApplyNo() { + private String generateApplyNo() { // 获取当前日期 LocalDate today = LocalDate.now(); String dateStr = today.format(DateTimeFormatter.ofPattern("yyyyMMdd")); @@ -574,8 +605,8 @@ public class DoctorStationLabApplyServiceImpl implements IDoctorStationInspectio // 使用 Redis 原子递增获取流水号(并发安全) long sequence = redisCache.incr(redisKey, 1); - // 设置 Redis key 过期时间为 2 天,避免数据积累 - redisCache.expire(redisKey, 2 * 24 * 60 * 60); + // 设置 Redis key 过期时间(每天的 key 按日期独立,隔天不再使用,25小时确保跨午夜场景安全) + redisCache.expire(redisKey, 25 * 60 * 60); // 格式化流水号为5位,不足前补0 String sequenceStr = String.format("%05d", sequence); @@ -583,7 +614,6 @@ public class DoctorStationLabApplyServiceImpl implements IDoctorStationInspectio // 生成完整的申请单号 String applyNo = prefix + sequenceStr; - log.debug("生成检验申请单号:{}", applyNo); return applyNo; } diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/controller/DoctorStationAdviceController.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/controller/DoctorStationAdviceController.java index 3524eaa0..67438fe6 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/controller/DoctorStationAdviceController.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/controller/DoctorStationAdviceController.java @@ -52,7 +52,7 @@ public class DoctorStationAdviceController { @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) { return R.ok(iDoctorStationAdviceAppService.getAdviceBaseInfo(adviceBaseDto, searchKey, locationId, - adviceDefinitionIdParamList, organizationId, pageNo, pageSize, Whether.NO.getValue(), adviceTypes, null)); + adviceDefinitionIdParamList, organizationId, pageNo, pageSize, Whether.NO.getValue(), adviceTypes, null, null)); } /** diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/controller/DoctorStationInspectionLabApplyController.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/controller/DoctorStationInspectionLabApplyController.java index a18b91ee..6677e0c8 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/controller/DoctorStationInspectionLabApplyController.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/controller/DoctorStationInspectionLabApplyController.java @@ -64,18 +64,4 @@ public class DoctorStationInspectionLabApplyController { log.debug("删除检验申请单:{}", applyNo); return R.ok(iDoctorStationInspectionLabApplyService.deleteInspectionLabApply(applyNo)); } - - /** - * 生成检验申请单号 - * 规则:LS + YYYYMMDD + 5位流水号(每日从1开始递增) - * @return 申请单号 - */ - @GetMapping(value = "/generate-apply-no") - public R generateApplyNo(){ - log.debug("生成检验申请单号"); - String applyNo = iDoctorStationInspectionLabApplyService.generateApplyNo(); - Map result = new HashMap<>(); - result.put("applyNo", applyNo); - return R.ok(result); - } } diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/mapper/DoctorStationAdviceAppMapper.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/mapper/DoctorStationAdviceAppMapper.java index a0fa057d..ddb365b2 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/mapper/DoctorStationAdviceAppMapper.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/mapper/DoctorStationAdviceAppMapper.java @@ -38,6 +38,7 @@ public interface DoctorStationAdviceAppMapper { @Param("adviceDefinitionIdParamList") List adviceDefinitionIdParamList, @Param("adviceTypes") List adviceTypes, @Param("searchKey") String searchKey, + @Param("categoryCode") String categoryCode, @Param(Constants.WRAPPER) QueryWrapper queryWrapper); /** diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/utils/AdviceUtils.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/utils/AdviceUtils.java index 1b8eab18..3278124b 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/utils/AdviceUtils.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/utils/AdviceUtils.java @@ -364,7 +364,7 @@ public class AdviceUtils { // 对应的子项诊疗医嘱信息 AdviceBaseDto activityAdviceBaseDto = iDoctorStationAdviceAppService.getAdviceBaseInfo(adviceBaseDto, null, null, null, organizationId, 1, - 1, Whether.NO.getValue(), List.of(1, 2, 3), null).getRecords().get(0); + 1, Whether.NO.getValue(), List.of(1, 2, 3), null, null).getRecords().get(0); if (activityAdviceBaseDto != null) { // 费用定价 AdvicePriceDto advicePriceDto = activityAdviceBaseDto.getPriceList().get(0); diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/utils/PrescriptionUtils.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/utils/PrescriptionUtils.java index 5b4f9271..e55e13a3 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/utils/PrescriptionUtils.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/doctorstation/utils/PrescriptionUtils.java @@ -32,9 +32,11 @@ public class PrescriptionUtils { if (medicineList == null || medicineList.isEmpty()) { return; } - // 1. 按诊断ID分组(不同诊断必须分开) + // 1. 按诊断ID分组(不同诊断必须分开,null值归为一组) Map> diagnosisGroups = - medicineList.stream().collect(Collectors.groupingBy(AdviceSaveDto::getConditionDefinitionId)); + medicineList.stream().collect(Collectors.groupingBy(dto -> + dto.getConditionDefinitionId() != null ? dto.getConditionDefinitionId() : 0L + )); // 2. 处理每个诊断组 diagnosisGroups.values().forEach(this::processDiagnosisGroup); } @@ -46,9 +48,11 @@ public class PrescriptionUtils { if (diagnosisGroup.isEmpty()) { return; } - // 1. 按药品性质分组 + // 1. 按药品性质分组(null值归为普通药品) Map> pharmacologyGroups = - diagnosisGroup.stream().collect(Collectors.groupingBy(AdviceSaveDto::getPharmacologyCategoryCode)); + diagnosisGroup.stream().collect(Collectors.groupingBy(dto -> + dto.getPharmacologyCategoryCode() != null ? dto.getPharmacologyCategoryCode() : "0" + )); // 2. 处理每个药品性质组 pharmacologyGroups.values().forEach(pharmaGroup -> { // 2.1 先处理有分组ID的药品(确保它们不会被拆分) diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/inhospitalnursestation/appservice/impl/AdviceProcessAppServiceImpl.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/inhospitalnursestation/appservice/impl/AdviceProcessAppServiceImpl.java index 46dc1a61..242aa9ea 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/inhospitalnursestation/appservice/impl/AdviceProcessAppServiceImpl.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/inhospitalnursestation/appservice/impl/AdviceProcessAppServiceImpl.java @@ -702,7 +702,7 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService { = medUseExeList.stream().map(MedicationRequestUseExe::getMedicationId).collect(Collectors.toList()); // 医嘱详细信息 List medicationInfos = doctorStationAdviceAppService.getAdviceBaseInfo(null, null, null, - medicationDefinitionIdList, 0L, 1, 500, Whether.NO.getValue(), List.of(1), null).getRecords(); + medicationDefinitionIdList, 0L, 1, 500, Whether.NO.getValue(), List.of(1), null, null).getRecords(); // 当前时间 Date curDate = new Date(); @@ -979,7 +979,7 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService { = actUseExeList.stream().map(ServiceRequestUseExe::getActivityId).collect(Collectors.toList()); // 医嘱详细信息 List activityInfos = doctorStationAdviceAppService.getAdviceBaseInfo(null, null, null, - activityDefinitionIdList, 0L, 1, 500, Whether.NO.getValue(), List.of(3), null).getRecords(); + activityDefinitionIdList, 0L, 1, 500, Whether.NO.getValue(), List.of(3), null, null).getRecords(); // 当前时间 Date curDate = new Date(); @@ -1146,7 +1146,7 @@ public class AdviceProcessAppServiceImpl implements IAdviceProcessAppService { // 耗材医嘱详细信息 List deviceInfos = doctorStationAdviceAppService - .getAdviceBaseInfo(null, null, null, deviceIds, 0L, 1, 500, Whether.NO.getValue(), List.of(2), null) + .getAdviceBaseInfo(null, null, null, deviceIds, 0L, 1, 500, Whether.NO.getValue(), List.of(2), null, null) .getRecords(); DeviceRequest deviceRequest; diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/inhospitalnursestation/appservice/impl/EncounterAutoRollAppServiceImpl.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/inhospitalnursestation/appservice/impl/EncounterAutoRollAppServiceImpl.java index b37c2325..cf1f44fe 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/inhospitalnursestation/appservice/impl/EncounterAutoRollAppServiceImpl.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/inhospitalnursestation/appservice/impl/EncounterAutoRollAppServiceImpl.java @@ -201,7 +201,7 @@ public class EncounterAutoRollAppServiceImpl implements IEncounterAutoRollAppSer .map(AutoRollNursingDto::getActivityDefinitionId).collect(Collectors.toList()); // 诊疗医嘱信息 List activityInfos = doctorStationAdviceAppService.getAdviceBaseInfo(null, null, null, - activityDefinitionIdList, 0L, 1, 500, Whether.NO.getValue(), List.of(3), orderPricing).getRecords(); + activityDefinitionIdList, 0L, 1, 500, Whether.NO.getValue(), List.of(3), orderPricing, null).getRecords(); // 计费 ChargeItem chargeItem; @@ -295,7 +295,7 @@ public class EncounterAutoRollAppServiceImpl implements IEncounterAutoRollAppSer .map(AutoRollBasicServiceDto::getActivityDefinitionId).collect(Collectors.toList()); // 诊疗医嘱信息 List activityInfos = doctorStationAdviceAppService.getAdviceBaseInfo(null, null, null, - activityDefinitionIdList, 0L, 1, 500, Whether.NO.getValue(), List.of(3), orderPricing).getRecords(); + activityDefinitionIdList, 0L, 1, 500, Whether.NO.getValue(), List.of(3), orderPricing, null).getRecords(); // 计费 ChargeItem chargeItem; for (AutoRollBasicServiceDto autoRollBasicServiceDto : autoRollBasicService) { diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/paymentmanage/appservice/impl/PaymentRecServiceImpl.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/paymentmanage/appservice/impl/PaymentRecServiceImpl.java index bf1ecefb..aee60702 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/paymentmanage/appservice/impl/PaymentRecServiceImpl.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/paymentmanage/appservice/impl/PaymentRecServiceImpl.java @@ -2095,7 +2095,7 @@ public class PaymentRecServiceImpl implements IPaymentRecService { adviceBaseDto.setAdviceDefinitionId(activityDeviceDto.getDevActId()); // 对应的诊疗医嘱信息 AdviceBaseDto activityAdviceBaseDto = iDoctorStationAdviceAppService.getAdviceBaseInfo(adviceBaseDto, null, - null, null, organizationId, 1, 1, Whether.NO.getValue(), List.of(1, 2, 3), null).getRecords().get(0); + null, null, organizationId, 1, 1, Whether.NO.getValue(), List.of(1, 2, 3), null, null).getRecords().get(0); // 价格信息 if (activityAdviceBaseDto != null) { // 费用定价 diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/personalization/appservice/impl/OrdersGroupPackageAppServiceImpl.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/personalization/appservice/impl/OrdersGroupPackageAppServiceImpl.java index 72d401b3..8dbee4eb 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/personalization/appservice/impl/OrdersGroupPackageAppServiceImpl.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/personalization/appservice/impl/OrdersGroupPackageAppServiceImpl.java @@ -197,7 +197,7 @@ public class OrdersGroupPackageAppServiceImpl implements IOrdersGroupPackageAppS // 医嘱下拉详细信息 List personalRecords = iDoctorStationAdviceAppService.getAdviceBaseInfo(null, null, null, orderDefinitionIdParamList, - organizationId, 1, 100, Whether.NO.getValue(), List.of(1, 2, 3), null).getRecords(); + organizationId, 1, 100, Whether.NO.getValue(), List.of(1, 2, 3), null, null).getRecords(); // 创建AdviceBaseDto的映射,以adviceDefinitionId为key Map adviceMap = personalRecords.stream().collect(Collectors .toMap(AdviceBaseDto::getAdviceDefinitionId, advice -> advice, (existing, replacement) -> existing // 如果有重复key,保留第一个 @@ -248,7 +248,7 @@ public class OrdersGroupPackageAppServiceImpl implements IOrdersGroupPackageAppS // 医嘱下拉详细信息 List personalRecords = iDoctorStationAdviceAppService.getAdviceBaseInfo(null, null, null, orderDefinitionIdParamList, - organizationId, 1, 100, Whether.NO.getValue(), List.of(1, 2, 3), null).getRecords(); + organizationId, 1, 100, Whether.NO.getValue(), List.of(1, 2, 3), null, null).getRecords(); // 创建AdviceBaseDto的映射,以adviceDefinitionId为key Map adviceMap = personalRecords.stream().collect(Collectors .toMap(AdviceBaseDto::getAdviceDefinitionId, advice -> advice, (existing, replacement) -> existing // 如果有重复key,保留第一个 @@ -297,7 +297,7 @@ public class OrdersGroupPackageAppServiceImpl implements IOrdersGroupPackageAppS // 医嘱下拉详细信息 List personalRecords = iDoctorStationAdviceAppService.getAdviceBaseInfo(null, null, null, orderDefinitionIdParamList, - organizationId, 1, 100, Whether.NO.getValue(), List.of(1, 2, 3), null).getRecords(); + organizationId, 1, 100, Whether.NO.getValue(), List.of(1, 2, 3), null, null).getRecords(); // 创建AdviceBaseDto的映射,以adviceDefinitionId为key Map adviceMap = personalRecords.stream().collect(Collectors .toMap(AdviceBaseDto::getAdviceDefinitionId, advice -> advice, (existing, replacement) -> existing // 如果有重复key,保留第一个 diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/regdoctorstation/appservice/impl/SpecialAdviceAppServiceImpl.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/regdoctorstation/appservice/impl/SpecialAdviceAppServiceImpl.java index bbd3e9d3..d2d374ec 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/regdoctorstation/appservice/impl/SpecialAdviceAppServiceImpl.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/regdoctorstation/appservice/impl/SpecialAdviceAppServiceImpl.java @@ -161,7 +161,7 @@ public class SpecialAdviceAppServiceImpl implements ISpecialAdviceAppService { adviceBaseDto.setAdviceDefinitionId(definitionId); // 医嘱定义id // 对应的诊疗医嘱信息 activityAdviceBaseDto = iDoctorStationAdviceAppService.getAdviceBaseInfo(adviceBaseDto, null, null, - null, null, 1, 1, Whether.NO.getValue(), List.of(3), null).getRecords().get(0); + null, null, 1, 1, Whether.NO.getValue(), List.of(3), null, null).getRecords().get(0); // 逻辑1---------------------直接新增 longServiceRequest.setStatusEnum(RequestStatus.DRAFT.getValue());// 请求状态 longServiceRequest.setOccurrenceStartTime(startTime); // 医嘱开始时间 @@ -208,7 +208,7 @@ public class SpecialAdviceAppServiceImpl implements ISpecialAdviceAppService { adviceBaseDto.setAdviceDefinitionId(definitionId); // 医嘱定义id // 对应的诊疗医嘱信息 activityAdviceBaseDto = iDoctorStationAdviceAppService - .getAdviceBaseInfo(adviceBaseDto, null, null, null, null, 1, 1, Whether.NO.getValue(), List.of(3), null) + .getAdviceBaseInfo(adviceBaseDto, null, null, null, null, 1, 1, Whether.NO.getValue(), List.of(3), null, null) .getRecords().get(0); longServiceRequest.setStatusEnum(RequestStatus.DRAFT.getValue());// 请求状态 @@ -348,7 +348,7 @@ public class SpecialAdviceAppServiceImpl implements ISpecialAdviceAppService { adviceBaseDto.setAdviceDefinitionId(transferOrganizationDefinitionId); // 医嘱定义id // 转科的医嘱信息 AdviceBaseDto activityAdviceBaseDto = iDoctorStationAdviceAppService - .getAdviceBaseInfo(adviceBaseDto, null, null, null, null, 1, 1, Whether.NO.getValue(), List.of(3), null) + .getAdviceBaseInfo(adviceBaseDto, null, null, null, null, 1, 1, Whether.NO.getValue(), List.of(3), null, null) .getRecords().get(0); // 保存转科医嘱请求 ServiceRequest serviceRequest = new ServiceRequest(); @@ -430,7 +430,7 @@ public class SpecialAdviceAppServiceImpl implements ISpecialAdviceAppService { // 出院的医嘱信息 AdviceBaseDto activityAdviceBaseDto = iDoctorStationAdviceAppService.getAdviceBaseInfo(null, null, null, - List.of(transferOrganizationDefinitionId), null, 1, 1, Whether.NO.getValue(), List.of(3), null).getRecords() + List.of(transferOrganizationDefinitionId), null, 1, 1, Whether.NO.getValue(), List.of(3), null, null).getRecords() .get(0); // 保存出院医嘱请求 ServiceRequest serviceRequest = new ServiceRequest(); diff --git a/openhis-server-new/openhis-application/src/main/resources/mapper/doctorstation/DoctorStationAdviceAppMapper.xml b/openhis-server-new/openhis-application/src/main/resources/mapper/doctorstation/DoctorStationAdviceAppMapper.xml index a609ba45..0e560d10 100644 --- a/openhis-server-new/openhis-application/src/main/resources/mapper/doctorstation/DoctorStationAdviceAppMapper.xml +++ b/openhis-server-new/openhis-application/src/main/resources/mapper/doctorstation/DoctorStationAdviceAppMapper.xml @@ -101,6 +101,9 @@ AND 1 = 2 + + AND t1.category_code = #{categoryCode} + AND (t1.name ILIKE '%' || #{searchKey} || '%' OR t1.py_str ILIKE '%' || #{searchKey} || '%') diff --git a/openhis-server-new/openhis-common/src/main/java/com/openhis/common/enums/ChargeItemContext.java b/openhis-server-new/openhis-common/src/main/java/com/openhis/common/enums/ChargeItemContext.java index 856b5bcd..61ce45e0 100644 --- a/openhis-server-new/openhis-common/src/main/java/com/openhis/common/enums/ChargeItemContext.java +++ b/openhis-server-new/openhis-common/src/main/java/com/openhis/common/enums/ChargeItemContext.java @@ -31,10 +31,20 @@ public enum ChargeItemContext implements HisEnumInterface { */ ACTIVITY(3, "3", "项目"), + /** + * 西药 + */ + WESTERN_MEDICINE(5, "5", "西药"), + + /** + * 中成药 + */ + CHINESE_PATENT_MEDICINE(6, "6", "中成药"), + /** * 挂号 */ - REGISTER(4, "4", "挂号"); + REGISTER(7, "7", "挂号"); private final Integer value; private final String code; diff --git a/openhis-server-new/openhis-common/src/main/java/com/openhis/common/enums/DispenseStatus.java b/openhis-server-new/openhis-common/src/main/java/com/openhis/common/enums/DispenseStatus.java index f2bd03a3..3a82fffa 100644 --- a/openhis-server-new/openhis-common/src/main/java/com/openhis/common/enums/DispenseStatus.java +++ b/openhis-server-new/openhis-common/src/main/java/com/openhis/common/enums/DispenseStatus.java @@ -86,7 +86,12 @@ public enum DispenseStatus implements HisEnumInterface { /** * 待退药 */ - PENDING_REFUND(16, "PRD", "待退药"); + PENDING_REFUND(16, "PRD", "待退药"), + + /** + * 已退药 + */ + RETURNED(17, "RT", "已退药"); private Integer value; private String code; diff --git a/openhis-ui-vue3/src/views/clinicmanagement/bargain/component/adviceBaseList.vue b/openhis-ui-vue3/src/views/clinicmanagement/bargain/component/adviceBaseList.vue index efc91a6d..f539c535 100644 --- a/openhis-ui-vue3/src/views/clinicmanagement/bargain/component/adviceBaseList.vue +++ b/openhis-ui-vue3/src/views/clinicmanagement/bargain/component/adviceBaseList.vue @@ -53,17 +53,20 @@ const currentSelectRow = ref({}); const queryParams = ref({ pageSize: 100, pageNum: 1, + adviceType: undefined, + categoryCode: '', }); const adviceBaseList = ref([]); // 节流函数 const throttledGetList = throttle( () => { + // 触发数据加载 getList(); }, 300, { leading: true, trailing: true } ); -watch( + watch( () => props.adviceQueryParams, (newValue) => { // 只有在弹窗打开时才响应 adviceQueryParams 的变化,避免选择项目后弹窗关闭时触发不必要的请求 @@ -72,6 +75,7 @@ watch( } queryParams.value.searchKey = newValue?.searchKey; queryParams.value.adviceType = newValue?.adviceType; + queryParams.value.categoryCode = newValue?.categoryCode; throttledGetList(); }, { deep: true } @@ -86,6 +90,11 @@ watch( if (props.adviceQueryParams) { queryParams.value.searchKey = props.adviceQueryParams.searchKey; queryParams.value.adviceType = props.adviceQueryParams.adviceType; + queryParams.value.categoryCode = props.adviceQueryParams.categoryCode; + console.log('[adviceBaseList] 弹窗打开,参数:', JSON.stringify({ + adviceType: queryParams.value.adviceType, + categoryCode: queryParams.value.categoryCode + })); } // 主动触发数据加载 getList(); diff --git a/openhis-ui-vue3/src/views/clinicmanagement/bargain/component/prescriptionlist.vue b/openhis-ui-vue3/src/views/clinicmanagement/bargain/component/prescriptionlist.vue index dbcfc5f5..911d8b4e 100644 --- a/openhis-ui-vue3/src/views/clinicmanagement/bargain/component/prescriptionlist.vue +++ b/openhis-ui-vue3/src/views/clinicmanagement/bargain/component/prescriptionlist.vue @@ -18,28 +18,29 @@ @row-dblclick="clickRowDb" :expand-row-keys="expandOrder" > - +