From 9215c288d31d61558184813ecd80f82d3fda5fe3 Mon Sep 17 00:00:00 2001 From: wangjian963 <15215920+aprilry@user.noreply.gitee.com> Date: Mon, 11 May 2026 13:51:47 +0800 Subject: [PATCH] =?UTF-8?q?506=20=E9=97=A8=E8=AF=8A=E6=8C=82=E5=8F=B7?= =?UTF-8?q?=EF=BC=9A=E9=97=A8=E8=AF=8A=E8=AF=8A=E5=89=8D=E9=80=80=E5=8F=B7?= =?UTF-8?q?=E5=90=8E=EF=BC=8C=E6=95=B0=E6=8D=AE=E5=BA=93=E5=A4=9A=E8=A1=A8?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E5=80=BC=E5=8F=98=E6=9B=B4=E4=B8=8E=20PRD=20?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E4=B8=8D=E7=AC=A6=20CommonConstants.Appointm?= =?UTF-8?q?entOrderStatus=20=E5=B8=B8=E9=87=8F=20=E2=86=92=20OrderStatus?= =?UTF-8?q?=20=E6=9E=9A=E4=B8=BE=E9=87=8D=E6=9E=84=20=20=20=20=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E6=9E=9A=E4=B8=BE=EF=BC=9A0=3D=E6=82=A3=E8=80=85?= =?UTF-8?q?=E5=8F=96=E6=B6=88=20/=201=3D=E6=9C=89=E6=95=88=20/=202=3D?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E5=8F=96=E6=B6=88=20/=203=3D=E5=B7=B2?= =?UTF-8?q?=E5=AE=8C=E6=88=90=20=20=20=20=E9=80=80=E5=8F=B7=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E5=8A=A0=E4=B9=90=E8=A7=82=E9=94=81=E9=98=B2=E5=B9=B6?= =?UTF-8?q?=E5=8F=91=EF=BC=8Cslot=20=E7=8A=B6=E6=80=81=E6=94=B9=E5=9B=9E?= =?UTF-8?q?=E5=BE=85=E7=BA=A6=EF=BC=8C=E9=80=80=E5=8F=B7=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E7=8B=AC=E7=AB=8B=E4=BA=8B=E5=8A=A1=20=E4=BF=AE=E5=A4=8D=20XML?= =?UTF-8?q?=20=E4=B8=AD=20Integer=20=E6=AF=94=E8=BE=83=E7=94=A8=E5=AD=97?= =?UTF-8?q?=E7=AC=A6=E4=B8=B2=E7=9A=84=E9=97=AE=E9=A2=98=20Bug=20#411=20?= =?UTF-8?q?=E2=80=94=20=E8=AF=8A=E5=AE=A4=E8=BF=87=E6=BB=A4=E6=A0=8F?= =?UTF-8?q?=E4=BB=8E=E7=A7=91=E5=AE=A4=E4=B8=8B=E6=8B=89=E6=A1=86=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=E8=AF=8A=E5=AE=A4=E6=8C=89=E9=92=AE=E7=BB=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../appservice/impl/TicketAppServiceImpl.java | 16 +- .../OutpatientRegistrationAppServiceImpl.java | 97 +++++--- .../impl/PaymentRecServiceImpl.java | 6 +- .../com/openhis/common/enums/OrderStatus.java | 63 +++++ .../service/impl/OrderServiceImpl.java | 15 +- .../service/impl/TicketServiceImpl.java | 11 +- .../administration/ScheduleSlotMapper.xml | 3 +- .../resources/mapper/clinical/OrderMapper.xml | 5 +- .../triageandqueuemanage/cardiology/index.vue | 215 ++++++++---------- 9 files changed, 259 insertions(+), 172 deletions(-) create mode 100644 openhis-server-new/openhis-common/src/main/java/com/openhis/common/enums/OrderStatus.java diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/appointmentmanage/appservice/impl/TicketAppServiceImpl.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/appointmentmanage/appservice/impl/TicketAppServiceImpl.java index 72c652fb..3a723a24 100755 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/appointmentmanage/appservice/impl/TicketAppServiceImpl.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/appointmentmanage/appservice/impl/TicketAppServiceImpl.java @@ -10,7 +10,7 @@ import com.openhis.clinical.service.ITicketService; import com.openhis.web.appointmentmanage.appservice.ITicketAppService; import com.openhis.web.appointmentmanage.dto.TicketDto; import com.openhis.common.constant.CommonConstants.SlotStatus; -import com.openhis.common.constant.CommonConstants.AppointmentOrderStatus; +import com.openhis.common.enums.OrderStatus; import org.springframework.stereotype.Service; import javax.annotation.Resource; @@ -198,10 +198,11 @@ public class TicketAppServiceImpl implements ITicketAppService { if (SlotStatus.CHECKED_IN.equals(slotStatus)) { dto.setStatus("已取号"); } else if (SlotStatus.BOOKED.equals(slotStatus)) { - if (AppointmentOrderStatus.CHECKED_IN.equals(raw.getOrderStatus())) { - dto.setStatus("已取号"); - } else if (AppointmentOrderStatus.RETURNED.equals(raw.getOrderStatus())) { + // order_main.status: 0=患者取消(已退号) 2=系统取消 其余=已预约 + if (OrderStatus.PATIENT_CANCELLED.getValue().equals(raw.getOrderStatus())) { dto.setStatus("已退号"); + } else if (OrderStatus.SYSTEM_CANCELLED.getValue().equals(raw.getOrderStatus())) { + dto.setStatus("系统取消"); } else { dto.setStatus("已预约"); } @@ -372,10 +373,11 @@ public class TicketAppServiceImpl implements ITicketAppService { if (SlotStatus.CHECKED_IN.equals(slotStatus)) { dto.setStatus("已取号"); } else if (SlotStatus.BOOKED.equals(slotStatus)) { - if (AppointmentOrderStatus.CHECKED_IN.equals(raw.getOrderStatus())) { - dto.setStatus("已取号"); - } else if (AppointmentOrderStatus.RETURNED.equals(raw.getOrderStatus())) { + // order_main.status: 0=患者取消(已退号) 2=系统取消 其余=已预约 + if (OrderStatus.PATIENT_CANCELLED.getValue().equals(raw.getOrderStatus())) { dto.setStatus("已退号"); + } else if (OrderStatus.SYSTEM_CANCELLED.getValue().equals(raw.getOrderStatus())) { + dto.setStatus("系统取消"); } else { dto.setStatus("已预约"); } diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/chargemanage/appservice/impl/OutpatientRegistrationAppServiceImpl.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/chargemanage/appservice/impl/OutpatientRegistrationAppServiceImpl.java index 861aaa60..6a3dd49f 100755 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/chargemanage/appservice/impl/OutpatientRegistrationAppServiceImpl.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/chargemanage/appservice/impl/OutpatientRegistrationAppServiceImpl.java @@ -2,6 +2,7 @@ package com.openhis.web.chargemanage.appservice.impl; 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.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.core.common.core.domain.R; @@ -329,16 +330,14 @@ public class OutpatientRegistrationAppServiceImpl implements IOutpatientRegistra } } - // 如果本次门诊挂号来自预约签到,同步把预约订单与号源槽位状态改为已退号 + // 退费成功后,同步回滚预约订单状态及号源;同时移除分诊队列 + Long refundOrderMainId = null; if (result != null && result.getCode() == 200) { - syncAppointmentReturnStatus(byId, cancelRegPaymentDto.getReason()); - - // 同步移除分诊队列中的记录 + refundOrderMainId = syncAppointmentReturnStatus(byId, cancelRegPaymentDto.getReason()); removeTriageQueueItem(byId.getId()); } - - // 记录退号日志 - recordRefundLog(cancelRegPaymentDto, byId, result, paymentRecon); + // 退号日志独立事务写入,无论退费成功与否均记录 + recordRefundLog(cancelRegPaymentDto, byId, result, paymentRecon, refundOrderMainId); // 2025/05/05 该处保存费用项后,会通过统一收费处理进行收费 return R.ok(paymentRecon, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, new Object[] {"退号"})); @@ -435,8 +434,6 @@ public class OutpatientRegistrationAppServiceImpl implements IOutpatientRegistra // 通过患者、科室、日期查找关联的预约订单 LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper() .eq(Order::getPatientId, encounter.getPatientId()) - .in(Order::getStatus, CommonConstants.AppointmentOrderStatus.BOOKED, - CommonConstants.AppointmentOrderStatus.CHECKED_IN) .orderByDesc(Order::getUpdateTime) .orderByDesc(Order::getCreateTime) .last("LIMIT 1"); @@ -590,20 +587,25 @@ public class OutpatientRegistrationAppServiceImpl implements IOutpatientRegistra } /** - * 同步预约号源状态为已退号。 - * 说明: - * 1) 门诊退号主流程不依赖该步骤成功与否,因此此方法内部异常仅记录日志,不向上抛出。 - * 2) 通过患者、科室、日期以及状态筛选最近一条预约订单,尽量避免误匹配。 + * 诊前退号:回滚预约订单、号源槽位、号源池统计。 + * + *

处理四件事: + *

    + *
  1. order_main → status=0(患者取消), pay_status=3(已退费), 写入取消时间和原因
  2. + *
  3. adm_schedule_slot → status=0(待约), order_id=NULL(释放号源)
  4. + *
  5. adm_schedule_pool → 重算统计值 + version+1
  6. + *
  7. 返回 order_main.id 供 refund_log 关联
  8. + *
+ * + *

异常仅记录日志不向上抛,不影响主流程返回成功。 */ - private void syncAppointmentReturnStatus(Encounter encounter, String reason) { + private Long syncAppointmentReturnStatus(Encounter encounter, String reason) { if (encounter == null || encounter.getPatientId() == null) { - return; + return null; } try { LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper() .eq(Order::getPatientId, encounter.getPatientId()) - .in(Order::getStatus, CommonConstants.AppointmentOrderStatus.BOOKED, - CommonConstants.AppointmentOrderStatus.CHECKED_IN) .orderByDesc(Order::getUpdateTime) .orderByDesc(Order::getCreateTime) .last("LIMIT 1"); @@ -625,35 +627,55 @@ public class OutpatientRegistrationAppServiceImpl implements IOutpatientRegistra Order appointmentOrder = orderService.getOne(queryWrapper, false); if (appointmentOrder == null) { - return; + return null; } - Date now = new Date(); - if (!CommonConstants.AppointmentOrderStatus.RETURNED.equals(appointmentOrder.getStatus())) { - Order updateOrder = new Order(); - updateOrder.setId(appointmentOrder.getId()); - updateOrder.setStatus(CommonConstants.AppointmentOrderStatus.RETURNED); - updateOrder.setPayStatus(0); - updateOrder.setCancelTime(now); - updateOrder.setCancelReason("门诊退号"); - updateOrder.setUpdateTime(now); - orderService.updateById(updateOrder); + // 只有有效订单(1)才能退号 + if (!OrderStatus.ACTIVE.getValue().equals(appointmentOrder.getStatus())) { + log.warn("退号跳过:订单状态非有效, orderId={}, status={}", + appointmentOrder.getId(), appointmentOrder.getStatus()); + return null; + } + + // 乐观锁更新:WHERE version = 旧值,防并发重复退号 + boolean updated = orderService.update( + new LambdaUpdateWrapper() + .set(Order::getStatus, OrderStatus.PATIENT_CANCELLED.getValue()) + .set(Order::getPayStatus, PaymentStatus.REFUND_ALL.getValue()) + .set(Order::getCancelTime, new Date()) + .set(Order::getCancelReason, + StringUtils.isNotEmpty(reason) ? reason : "诊前退号") + .set(Order::getUpdateTime, new Date()) + .setSql("version = version + 1") + .eq(Order::getId, appointmentOrder.getId()) + .eq(Order::getVersion, appointmentOrder.getVersion()) + ); + if (!updated) { + log.warn("退号乐观锁冲突,订单已被其他操作修改, orderId={}", appointmentOrder.getId()); + return null; } Long slotId = appointmentOrder.getSlotId(); if (slotId == null) { - return; + return appointmentOrder.getId(); } - int slotRows = scheduleSlotMapper.updateSlotStatus(slotId, CommonConstants.SlotStatus.RETURNED); + int slotRows = scheduleSlotMapper.updateSlotStatus(slotId, CommonConstants.SlotStatus.AVAILABLE); if (slotRows > 0) { Long poolId = scheduleSlotMapper.selectPoolIdBySlotId(slotId); if (poolId != null) { schedulePoolMapper.refreshPoolStats(poolId); + schedulePoolMapper.update(null, + new LambdaUpdateWrapper() + .setSql("version = version + 1") + .set(SchedulePool::getUpdateTime, new Date()) + .eq(SchedulePool::getId, poolId)); } } + return appointmentOrder.getId(); } catch (Exception e) { log.warn("同步预约号源已退号状态失败, encounterId={}", encounter.getId(), e); + return null; } } @@ -672,22 +694,29 @@ public class OutpatientRegistrationAppServiceImpl implements IOutpatientRegistra } /** - * 记录退号日志 + * 记录退号日志(独立事务)。 + * + *

REQUIRES_NEW 确保即使主事务回滚,退号审计日志也不丢失。 + * orderMainId 优先使用 order_main.id,若退费失败则 fallback 到 encounterId。 * * @param cancelRegPaymentDto 退号请求对象 * @param encounter 就诊信息 * @param result 退号结果 * @param paymentRecon 支付对账信息 + * @param orderMainId 预约订单主键(order_main.id),用于关联业务数据 */ @Transactional(propagation = Propagation.REQUIRES_NEW) public void recordRefundLog(CancelRegPaymentDto cancelRegPaymentDto, Encounter encounter, R result, - PaymentReconciliation paymentRecon) { + PaymentReconciliation paymentRecon, + Long orderMainId) { RefundLog refundLog = new RefundLog(); try { - // 1. 订单ID(唯一) - String orderId = String.valueOf(cancelRegPaymentDto.getEncounterId()); + // 1. 订单ID(关联 order_main.id) + String orderId = orderMainId != null + ? String.valueOf(orderMainId) + : String.valueOf(cancelRegPaymentDto.getEncounterId()); refundLog.setOrderId(orderId); // 已存在则不重复插入(防止唯一约束异常) 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 3db5481e..b3bd2cc4 100755 --- 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 @@ -1991,7 +1991,7 @@ public class PaymentRecServiceImpl implements IPaymentRecService { Order appointmentOrder = iOrderService.getOne( new LambdaQueryWrapper() .eq(Order::getPatientId, encounterFormData.getPatientId()) - .eq(Order::getStatus, CommonConstants.AppointmentOrderStatus.CHECKED_IN) + .eq(Order::getStatus, OrderStatus.ACTIVE.getValue()) // 有效订单(1) .eq(Order::getDeleteFlag, "0") .orderByDesc(Order::getCreateTime) .last("LIMIT 1") @@ -2114,11 +2114,11 @@ public class PaymentRecServiceImpl implements IPaymentRecService { Long queuePoolId = null; Long queueSlotId = null; try { - // 查询患者当天的待签到预约订单(status = 1 或 2 表示已预约或已取号) + // 查询患者当天有效订单(1);已取消(0/2)和已完成(3)的不参与排队 Order order = iOrderService.getOne( new LambdaQueryWrapper() .eq(Order::getPatientId, encounter.getPatientId()) - .in(Order::getStatus, 1, 2) // 1=BOOKED 已预约, 2=CHECKED_IN 已取号 + .eq(Order::getStatus, OrderStatus.ACTIVE.getValue()) // 有效(1) .eq(Order::getDeleteFlag, "0") .orderByDesc(Order::getCreateTime) .last("LIMIT 1") diff --git a/openhis-server-new/openhis-common/src/main/java/com/openhis/common/enums/OrderStatus.java b/openhis-server-new/openhis-common/src/main/java/com/openhis/common/enums/OrderStatus.java new file mode 100644 index 00000000..3458eac5 --- /dev/null +++ b/openhis-server-new/openhis-common/src/main/java/com/openhis/common/enums/OrderStatus.java @@ -0,0 +1,63 @@ +/* + * Copyright ©2023 CJB-CNIT Team. All rights reserved + */ +package com.openhis.common.enums; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * 订单状态 (order_main.status) + * + *

+ * 状态流转:
+ *   创建订单 → ACTIVE(1)
+ *   签到     → ACTIVE(1) 不变
+ *   患者退号 → PATIENT_CANCELLED(0)
+ *   系统取消 → SYSTEM_CANCELLED(2)
+ *   就诊完成 → COMPLETED(3)
+ * 
+ * + * @author wangjian963 + * @date 2026-05-09 + */ +@Getter +@AllArgsConstructor +public enum OrderStatus implements HisEnumInterface { + + /** + * 患者取消 + */ + PATIENT_CANCELLED(0, "0", "患者取消"), + + /** + * 有效 + */ + ACTIVE(1, "1", "有效"), + + /** + * 系统取消 + */ + SYSTEM_CANCELLED(2, "2", "系统取消"), + + /** + * 已完成 + */ + COMPLETED(3, "3", "已完成"); + + private Integer value; + private String code; + private String info; + + public static OrderStatus getByValue(Integer value) { + if (value == null) { + return null; + } + for (OrderStatus val : values()) { + if (val.getValue().equals(value)) { + return val; + } + } + return null; + } +} diff --git a/openhis-server-new/openhis-domain/src/main/java/com/openhis/clinical/service/impl/OrderServiceImpl.java b/openhis-server-new/openhis-domain/src/main/java/com/openhis/clinical/service/impl/OrderServiceImpl.java index 79a62992..10f7eec3 100755 --- a/openhis-server-new/openhis-domain/src/main/java/com/openhis/clinical/service/impl/OrderServiceImpl.java +++ b/openhis-server-new/openhis-domain/src/main/java/com/openhis/clinical/service/impl/OrderServiceImpl.java @@ -6,8 +6,8 @@ import com.core.common.utils.AssignSeqUtil; import com.openhis.clinical.domain.Order; import com.openhis.clinical.mapper.OrderMapper; import com.openhis.clinical.service.IOrderService; -import com.openhis.common.constant.CommonConstants.AppointmentOrderStatus; import com.openhis.common.enums.AssignSeqEnum; +import com.openhis.common.enums.OrderStatus; import org.springframework.stereotype.Service; import javax.annotation.Resource; @@ -124,7 +124,8 @@ public class OrderServiceImpl extends ServiceImpl implements : new Date(); // 兜底:正常业务不应走到这里 order.setAppointmentDate(appointmentDateTime); order.setAppointmentTime(appointmentDateTime); - order.setStatus(AppointmentOrderStatus.BOOKED); + // 订单状态: 0=患者取消 1=有效 2=系统取消 3=已完成 + order.setStatus(OrderStatus.ACTIVE.getValue()); order.setPayStatus(0); order.setVersion(0); @@ -169,10 +170,13 @@ public class OrderServiceImpl extends ServiceImpl implements if (order == null) { throw new RuntimeException("订单不存在"); } - if (AppointmentOrderStatus.CANCELLED.equals(order.getStatus())) { + // 已取消(患者取消0 或 系统取消2)不可再次取消 + if (OrderStatus.PATIENT_CANCELLED.getValue().equals(order.getStatus()) + || OrderStatus.SYSTEM_CANCELLED.getValue().equals(order.getStatus())) { throw new RuntimeException("订单已取消"); } - if (AppointmentOrderStatus.CHECKED_IN.equals(order.getStatus())) { + // 已完成(3)的订单不可取消 + if (OrderStatus.COMPLETED.getValue().equals(order.getStatus())) { throw new RuntimeException("订单已完成,无法取消"); } @@ -189,6 +193,7 @@ public class OrderServiceImpl extends ServiceImpl implements .eq(Order::getPatientId, patientId) .eq(Order::getTenantId, tenantId) .ge(Order::getCancelTime, startTime) - .eq(Order::getStatus, AppointmentOrderStatus.CANCELLED)); + // 只统计患者主动取消(0),不含系统取消(2) + .eq(Order::getStatus, OrderStatus.PATIENT_CANCELLED.getValue())); } } diff --git a/openhis-server-new/openhis-domain/src/main/java/com/openhis/clinical/service/impl/TicketServiceImpl.java b/openhis-server-new/openhis-domain/src/main/java/com/openhis/clinical/service/impl/TicketServiceImpl.java index cf1ff980..d7c9861a 100755 --- a/openhis-server-new/openhis-domain/src/main/java/com/openhis/clinical/service/impl/TicketServiceImpl.java +++ b/openhis-server-new/openhis-domain/src/main/java/com/openhis/clinical/service/impl/TicketServiceImpl.java @@ -13,8 +13,8 @@ import com.openhis.clinical.domain.Ticket; import com.openhis.clinical.mapper.TicketMapper; import com.openhis.clinical.service.IOrderService; import com.openhis.clinical.service.ITicketService; -import com.openhis.common.constant.CommonConstants.AppointmentOrderStatus; import com.openhis.common.constant.CommonConstants.SlotStatus; +import com.openhis.common.enums.OrderStatus; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; @@ -195,8 +195,8 @@ public class TicketServiceImpl extends ServiceImpl impleme Date startTime = Date.from(periodStart.atZone(ZoneId.systemDefault()).toInstant()); Date endTime = Date.from(periodEnd.atZone(ZoneId.systemDefault()).toInstant()); - // 预约去重以订单为准(order_main),因为预约成功会先落订单;clinical_ticket 不一定在此链路写入 - List effectiveOrderStatuses = Arrays.asList(AppointmentOrderStatus.BOOKED, AppointmentOrderStatus.CHECKED_IN); + // 预约去重以订单为准(order_main),有效订单(1)才参与去重 + List effectiveOrderStatuses = Arrays.asList(OrderStatus.ACTIVE.getValue()); int exists = orderMapper.countPatientDeptOrdersInPeriod(dto.getPatientId(), slot.getDepartmentId(), slot.getDepartmentName(), startTime, endTime, effectiveOrderStatuses); if (exists > 0) { @@ -314,9 +314,8 @@ public class TicketServiceImpl extends ServiceImpl impleme } Order latestOrder = orders.get(0); - // 1. 更新订单状态为已取号,并更新支付状态和支付时间 - orderService.updateOrderStatusById(latestOrder.getId(), AppointmentOrderStatus.CHECKED_IN); - // 更新支付状态为已支付,记录支付时间 + // 1. 签到不改变订单状态(仍为有效1),更新支付状态为已支付并记录支付时间 + orderService.updateOrderStatusById(latestOrder.getId(), OrderStatus.ACTIVE.getValue()); orderMapper.updatePayStatus(latestOrder.getId(), 1, new Date()); // 2. 查询号源槽位信息 diff --git a/openhis-server-new/openhis-domain/src/main/resources/mapper/administration/ScheduleSlotMapper.xml b/openhis-server-new/openhis-domain/src/main/resources/mapper/administration/ScheduleSlotMapper.xml index d92abec8..c8a4056f 100755 --- a/openhis-server-new/openhis-domain/src/main/resources/mapper/administration/ScheduleSlotMapper.xml +++ b/openhis-server-new/openhis-domain/src/main/resources/mapper/administration/ScheduleSlotMapper.xml @@ -160,11 +160,12 @@ AND delete_flag = '0' + UPDATE adm_schedule_slot SET status = #{status}, - + order_id = NULL, update_time = now() diff --git a/openhis-server-new/openhis-domain/src/main/resources/mapper/clinical/OrderMapper.xml b/openhis-server-new/openhis-domain/src/main/resources/mapper/clinical/OrderMapper.xml index 6bf5c677..0f489868 100755 --- a/openhis-server-new/openhis-domain/src/main/resources/mapper/clinical/OrderMapper.xml +++ b/openhis-server-new/openhis-domain/src/main/resources/mapper/clinical/OrderMapper.xml @@ -117,12 +117,14 @@ + + @@ -248,8 +250,9 @@ update order_main set status = #{status} where id = #{id} + - update order_main set status = 3, cancel_time = #{cancelTime}, cancel_reason = #{cancelReason} where id = #{id} + update order_main set status = 0, cancel_time = #{cancelTime}, cancel_reason = #{cancelReason} where id = #{id} diff --git a/openhis-ui-vue3/src/views/triageandqueuemanage/cardiology/index.vue b/openhis-ui-vue3/src/views/triageandqueuemanage/cardiology/index.vue index d9ead769..36810119 100755 --- a/openhis-ui-vue3/src/views/triageandqueuemanage/cardiology/index.vue +++ b/openhis-ui-vue3/src/views/triageandqueuemanage/cardiology/index.vue @@ -198,53 +198,52 @@ ↓ -
- - 只显示等待 - - - 显示全部状态 - -