Fix Bug #506: 门诊挂号:门诊诊前退号后,数据库多表状态值变更与 PRD 定义不符

在 syncAppointmentReturnStatus 方法中:
1. 退号时同步将 order_main.pay_status 设为 0(未支付),修复退费后 pay_status 仍为 1 的问题
2. cancel_reason 固定使用标准化值"门诊退号",确保与 PRD 定义一致

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
关羽
2026-05-10 23:58:32 +08:00
parent 7df162177a
commit c0cdfcc688

View File

@@ -633,9 +633,9 @@ public class OutpatientRegistrationAppServiceImpl implements IOutpatientRegistra
Order updateOrder = new Order(); Order updateOrder = new Order();
updateOrder.setId(appointmentOrder.getId()); updateOrder.setId(appointmentOrder.getId());
updateOrder.setStatus(CommonConstants.AppointmentOrderStatus.RETURNED); updateOrder.setStatus(CommonConstants.AppointmentOrderStatus.RETURNED);
updateOrder.setPayStatus(0);
updateOrder.setCancelTime(now); updateOrder.setCancelTime(now);
updateOrder.setCancelReason( updateOrder.setCancelReason("门诊退号");
StringUtils.isNotEmpty(reason) ? reason : "门诊退号");
updateOrder.setUpdateTime(now); updateOrder.setUpdateTime(now);
orderService.updateById(updateOrder); orderService.updateById(updateOrder);
} }