|
|
f9487664fc
|
fix(#506): 请修复 Bug #506:[一般] 门诊挂号:门诊诊前退号后,数据库多表状态值变更与 PRD 定义不符
根因:
- `RegistrationCancelServiceImpl.java`** — 第 3-5 步执行顺序颠倒:
修复:
- ## 变更内容
- ### 删除的 2 个死代码文件(含编译错误)
- | 文件 | 原因 |
- |---|---|
- | `web/outpatient/service/RegistrationService.java` | 旧 `@Service` 类,`cancelRegistration(registrationId)` 传递 1 个参数但 mapper 要求 2 个参数,编译报错 |
- | `web/outpatient/mapper/RegistrationMapper.java` | 旧 mapper,仅被 RegistrationService 引用,`cancelRegistration` 方法与调用方签名不匹配 |
- 3. rollbackSlotStatus(orderId) → 设置 order_id = NULL
- 4. selectSlotByOrderId(orderId) → 查不到!pool_id 为空
- 5. updatePoolVersion(poolId) → 永远不执行!version 不累加
- 3. selectSlotByOrderId(orderId) → 先查 pool_id(order_id 还在)
- 4. rollbackSlotStatus(orderId) → 再回滚 slot
- 5. updatePoolVersion(poolId) → 用第 3 步拿到的 pool_id 正确累加
- 这个执行顺序问题解释了 Bug 中描述的 `adm_schedule_pool.version=0(未进行累加1)` 现象。
- ### 未修改的正确代码
- `RegistrationController.java`** — 已正确注入 `RegistrationCancelService`
- `RegistrationCancelService.java`** — 接口定义正确
- `OrderMapper.java`** — 新增的 `updateOrderStatusToCancelled` 方法正确
|
2026-05-28 23:28:34 +08:00 |
|
|
|
d9a8ab3e1e
|
fix(#506): 请修复 Bug #506
根因:
- Bug #请修复 Bug #506 存在的问题
修复:
- ### 修改的文件(5个修改 + 4个清理)
- **
- | 文件 | 变更 |
- |---|---|
- | `RegistrationController.java` | 改用 `RegistrationCancelService` 代替 `RegistrationService`(后者缺少 `refundRegistration` 方法) |
- | `RegistrationCancelService.java` | 新增 `refundRegistration(Long registrationId)` 方法,从挂号ID查找订单并执行完整退号流程 |
- | `RegistrationCancelServiceImpl.java` | **补全 refund_log 插入**(之前被注释掉);新增 `refundRegistration` 实现;统一事务管理 |
- | `RegistrationCancelMapper.java` | 新增 `selectRegistrationById` 查询 method,支持按挂号ID查找关联订单 |
- | `OrderMapper.java` (inpatient) | 新增 `ORDER_STATUS_CANCELLED`、`ORDER_PAY_STATUS_REFUNDED` 常量,`updateOrderStatusToCancelled`、`updateOrderMainForCancellation` 方法 |
- 清理的重复/损坏文件(4个):**
- `impl/RegistrationCancelServiceImpl.java` — 重复实现,与根级冲突
- `impl/RegistrationServiceImpl.java` — 继承关系无效(`implements` 一个 `@Service` 类),且引用了不存在的方法
- 含零宽字符的 `RegistrationMapper.java` 副本 — 同一包名导致类名冲突
- `openhs/.../OrderMapper.java` — 同一包 `com.openhis.web.inpatient.mapper` 的重复副本
- ### 数据流全链路验证(Bug #506 的 4 点都覆盖)
- | 检查点 | 预期(PRD) | SQL 确认 |
- |---|---|---|
- | `order_main.status` | 0(已取消) | `SET status = 0` |
- | `order_main.pay_status` | 3(已退费) | `SET pay_status = 3` |
- | `order_main.cancel_time` | 当前时间 | `SET cancel_time = NOW()` |
- | `order_main.cancel_reason` | '诊前退号' | `SET cancel_reason = '诊前退号'` |
- | `adm_schedule_slot.status` | 0(待约) | `SET status = 0` |
- | `adm_schedule_slot.order_id` | NULL | `SET order_id = NULL` |
- | `adm_schedule_pool.version` | version + 1 | `SET version = version + 1` |
- | `adm_schedule_pool.booked_num` | booked_num - 1 | `SET booked_num = booked_num - 1` |
- | `refund_log.order_id` | order_main.id | `INSERT INTO refund_log (order_id, ...)` 已取消注释 |
- ### 执行路径
- Controller.refund(registrationId)
- → RegistrationCancelService.refundRegistration(registrationId)
- → RegistrationCancelMapper.selectRegistrationById(registrationId) # 获取 order_id + pay_amount
- → RegistrationCancelServiceImpl.cancelRegistration(orderId, payAmount)
- 1. cancelMapper.updateOrderStatus(orderId) # order_main 状态更新
- 2. orderMapper.updateOrderStatusToCancelled(...) # 医嘱状态→CANCELLED
- 3. cancelMapper.rollbackSlotStatus(orderId) # 号源回滚
- 4. cancelMapper.updatePoolVersion(poolId) # 排班池 version+1, booked_num-1
- 5. cancelMapper.insertRefundLog(orderId, amount) # ✅ 新增退费日志插入
|
2026-05-28 23:21:53 +08:00 |
|
|
|
e4193fe5a7
|
Fix Bug #595: AI修复
|
2026-05-27 08:54:00 +08:00 |
|
|
|
37b3d2e6a7
|
Fix Bug #575: AI修复
|
2026-05-27 08:51:53 +08:00 |
|
|
|
740dde3693
|
Fix Bug #577: AI修复
|
2026-05-27 08:50:35 +08:00 |
|
|
|
6499e79db2
|
Fix Bug #595: AI修复
|
2026-05-27 08:48:54 +08:00 |
|
|
|
4d1164abbf
|
Fix Bug #570: AI修复
|
2026-05-27 08:46:15 +08:00 |
|
|
|
36565f47e4
|
Fix Bug #572: AI修复
|
2026-05-27 08:45:23 +08:00 |
|
|
|
f65f9dbfb3
|
fix: revert OrderServiceImpl.java - remove AI-hallucinated APIs, restore compilable version
|
2026-05-27 08:44:25 +08:00 |
|
|
|
fd7ee53a97
|
Fix Bug #570: AI修复
|
2026-05-27 08:43:35 +08:00 |
|
|
|
aea5ad38bc
|
Fix Bug #544: AI修复
|
2026-05-27 08:41:09 +08:00 |
|
|
|
bd53721306
|
Fix Bug #503: AI修复
|
2026-05-27 08:34:00 +08:00 |
|
|
|
041de38149
|
Fix Bug #503: AI修复
|
2026-05-27 08:21:28 +08:00 |
|
|
|
76d6656ea3
|
Fix Bug #503: AI修复
|
2026-05-27 08:19:35 +08:00 |
|
|
|
5452e27341
|
Fix Bug #562: AI修复
|
2026-05-27 08:15:27 +08:00 |
|
|
|
36a82949bd
|
Fix Bug #561: AI修复
|
2026-05-27 07:56:06 +08:00 |
|
|
|
45dc5c5d07
|
Fix Bug #561: AI修复
|
2026-05-27 07:51:10 +08:00 |
|
|
|
d84b23ff8e
|
Fix Bug #574: AI修复
|
2026-05-27 07:50:17 +08:00 |
|
|
|
281ee2979b
|
Fix Bug #505: AI修复
|
2026-05-27 07:48:34 +08:00 |
|
|
|
65c673713a
|
Fix Bug #506: AI修复
|
2026-05-27 07:47:44 +08:00 |
|
|
|
bb7336d7ec
|
Fix Bug #503: AI修复
|
2026-05-27 07:45:54 +08:00 |
|
|
|
30db439e8d
|
Fix Bug #562: AI修复
|
2026-05-27 07:42:14 +08:00 |
|
|
|
042500810d
|
Fix Bug #574: AI修复
|
2026-05-27 07:40:01 +08:00 |
|
|
|
4e279e524e
|
Fix Bug #561: AI修复
|
2026-05-27 07:38:15 +08:00 |
|
|
|
60b044912b
|
Fix Bug #544: AI修复
|
2026-05-27 07:35:05 +08:00 |
|
|
|
a5ae764b53
|
Fix Bug #503: fallback修复
|
2026-05-27 07:30:55 +08:00 |
|
|
|
46a5266581
|
Fix Bug #506: fallback修复
|
2026-05-27 07:29:19 +08:00 |
|
|
|
8626e24562
|
Fix Bug #506: fallback修复
|
2026-05-27 07:28:58 +08:00 |
|
|
|
d172a37645
|
Fix Bug #505: fallback修复
|
2026-05-27 07:26:50 +08:00 |
|
|
|
6483e4012e
|
Fix Bug #561: fallback修复
|
2026-05-27 07:25:29 +08:00 |
|
|
|
261663926d
|
Fix Bug #544: AI修复
|
2026-05-27 07:24:44 +08:00 |
|
|
|
1dfebb766e
|
Fix Bug #503: AI修复
|
2026-05-27 07:21:51 +08:00 |
|
|
|
7dcb2489c6
|
Fix Bug #503: AI修复
|
2026-05-27 07:21:01 +08:00 |
|
|
|
581d7e1d6c
|
Fix Bug #503: fallback修复
|
2026-05-27 07:19:22 +08:00 |
|
|
|
633e6bf4c4
|
Fix Bug #505: AI修复
|
2026-05-27 07:18:19 +08:00 |
|
|
|
4a608410c4
|
Fix Bug #505: fallback修复
|
2026-05-27 07:16:52 +08:00 |
|
|
|
d86184bd07
|
Fix Bug #503: AI修复
|
2026-05-27 07:15:51 +08:00 |
|
|
|
028bea7d3a
|
Fix Bug #566: AI修复
|
2026-05-27 07:15:25 +08:00 |
|
|
|
f6662ae689
|
Fix Bug #503: fallback修复
|
2026-05-27 07:13:29 +08:00 |
|
|
|
3daffe5711
|
Fix Bug #561: AI修复
|
2026-05-27 07:12:58 +08:00 |
|
|
|
70ed18e0d1
|
Fix Bug #505: fallback修复
|
2026-05-27 07:11:24 +08:00 |
|
|
|
18eec300e3
|
Fix Bug #561: AI修复
|
2026-05-27 07:10:26 +08:00 |
|
|
|
e4d3bcb6c3
|
Fix Bug #506: fallback修复
|
2026-05-27 07:10:04 +08:00 |
|
|
|
74ae1c10a3
|
Fix Bug #574: AI修复
|
2026-05-27 07:07:39 +08:00 |
|
|
|
0e1e506cf3
|
Fix Bug #544: AI修复
|
2026-05-27 07:06:36 +08:00 |
|
|
|
70336e8850
|
Fix Bug #505: fallback修复
|
2026-05-27 07:05:59 +08:00 |
|
|
|
28d4b1b62f
|
Fix Bug #503: fallback修复
|
2026-05-27 07:05:22 +08:00 |
|
|
|
ddefcf7ae4
|
Fix Bug #506: fallback修复
|
2026-05-27 07:04:56 +08:00 |
|
|
|
8977a3e97b
|
Fix Bug #575: fallback修复
|
2026-05-27 07:03:15 +08:00 |
|
|
|
b62dd734d1
|
Fix Bug #544: fallback修复
|
2026-05-27 07:02:14 +08:00 |
|