fix(门诊预约): 修复取消预约次数限制逻辑错误

修复取消预约次数限制逻辑与配置不一致的问题,使用配置值而非硬编码值进行校验。同时优化诊前退号检查逻辑,增加病历记录、费用明细、班段结束时间等校验条件,防止不当退号操作。

refactor(检验申请): 优化检验申请单列表查询SQL
从明细表聚合项目名称和金额,避免直接查询申请单表导致的数据重复问题。
This commit is contained in:
wangjian963
2026-04-08 17:50:22 +08:00
parent 6fedfe1e40
commit f87afba566
4 changed files with 173 additions and 19 deletions

View File

@@ -164,7 +164,8 @@ public class TicketServiceImpl extends ServiceImpl<TicketMapper, Ticket> impleme
long cancelledCount = orderService.countPatientCancellations(patientId, tenantId, startTime);
if (cancelledCount >= config.getCancelAppointmentCount()) {
String periodName = getPeriodName(config.getCancelAppointmentType());
throw new RuntimeException("由于您在" + periodName + "内累计取消预约已达" + cancelledCount + "次,触发系统限制,暂时无法在线预约,请联系分诊台或咨询客服。");
int limitCount = config.getCancelAppointmentCount();
throw new RuntimeException("由于您在" + periodName + "内累计取消预约已达" + limitCount + "次,触发系统限制,暂时无法在线预约,请联系分诊台或咨询客服。");
}
}
}