106 Commits

Author SHA1 Message Date
liuyun
989b113a4c feat(abnormal): 异常照片上传端点(POST /abnormal/photo)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-10-21 15:11:14 +08:00
liuyun
bc6910bff6 chore: 加 .dockerignore(部署时排除 node_modules/dist,避免 docker build context 过大) 2026-10-21 15:08:15 +08:00
liuyun
497dbcc903 fix: 统一响应补 hint 字段(对齐 api-contract)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-21 15:00:25 +08:00
liuyun
bbf87b2805 fix: tenant_super_admin 纳入身份证明文查看口径 + 建档失败清理评估副本孤儿对象
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-21 14:59:22 +08:00
liuyun
c18187e658 fix: 异常 client_md5 幂等 + checkin/checkout 更新工单状态
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-10-21 14:56:40 +08:00
liuyun
394d7a9731 feat(security): id_card_no 存储层 AES-256-GCM 加密 + SHA-256 哈希唯一
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-10-21 12:03:43 +08:00
liuyun
29fc5e9432 fix(db): 迁移链 squash 到 0_baseline(修复 c1_elder RENAME INDEX 早于表重命名导致的干净回放失败)
- 删除 15 个旧迁移,合并为单一 0_baseline(37 表,utf8mb4_general_ci)
- 现有库 migrate resolve --applied 0_baseline,数据保留
- 干净回放验证通过(仅 Prisma 内部 _prisma_migrations 为 unicode_ci)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-21 11:52:10 +08:00
liuyun
292300c344 fix: 非事务多写包裹 \$transaction(plan/elder-svc/record/abnormal/qc)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-10-21 11:49:33 +08:00
liuyun
6ea9ad097b feat(record): 照片 presigned URL 端点(GET /record/photo/:id/url)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-10-21 11:41:37 +08:00
liuyun
2a4b7003ed fix(c5): nurse 角色补 abnormal.report(异常上报/扑空 403)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-15 19:20:38 +08:00
liuyun
c825ff8a5f fix(seed-demo): itemSnapshot 返回类型 InputJsonObject,修 tsc 类型错误
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-15 10:18:10 +08:00
liuyun
266ce08dd4 fix(order): today 返回附加 elderName 供 APP 卡片显示
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-10-15 08:59:10 +08:00
liuyun
f0e3deb6c8 feat(c5): 角色权限矩阵 + 测试机构 seed-demo
- BUSINESS_ROLES 补全业务权限(director 只读/qc 主角色/leader 派单/nurse 留痕)
- seed-demo.ts 初始化「投云养老服务机构」+ 5 账号 + 完整样例数据

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-15 08:36:09 +08:00
liuyun
9d1a3b2374 fix(c5): 终审 R6-R9 溯源/null过滤/操作人/权限
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-10-15 08:04:06 +08:00
liuyun
5cba51abb8 fix(c5): agency.update 改 upsert 补齐 provisioning
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-10-15 07:57:36 +08:00
liuyun
b09015151f fix(c5): 补 document/export 权限 seed
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-10-15 07:49:52 +08:00
liuyun
94f0fb2bb5 fix(c5): dockingTier 枚举约束 A/B/C
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-10-15 07:40:56 +08:00
liuyun
16937fcf17 feat(c5): 拍照分档批量改 + 机构配置 + 文书导出
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-10-15 07:36:58 +08:00
liuyun
9a0ffc6fc7 style(c5): agency 新增字段保持纯增量(还原既有行对齐)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-10-15 07:31:24 +08:00
liuyun
11955c4f55 feat(c5): svc_org photo_tier + agency 机构配置字段
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-10-15 07:30:08 +08:00
liuyun
9fea4efe0f feat(qc): 质控闸门 R9-R12 修复(权限/批量原子化/异常老人校验/退回幂等)
- R9:质控员角色补全 qc 六权限 + abnormal.list/handle
- R10:batchPass 两阶段全量预检,整批通过才逐条放行(原子不部分放行)
- R11:exceptionLink 校验 abnormal 关联老人与计划变更老人一致(46008)
- R12:return 增加幂等守卫(非 pending 抛 QC_ALREADY_HANDLED)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-10-15 02:06:03 +08:00
liuyun
a808581e60 fix(c4): 异常处理返回坐标 Decimal 转 string,防泄漏 {s,e,d}
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-10-15 01:58:47 +08:00
liuyun
00c258dda5 fix(c4): 异常处理 handle_status 枚举统一为 handling
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-10-15 01:51:38 +08:00
liuyun
ba7f2397d7 feat(c4): 质控异常处理端点(handle_status/handle_result)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-10-15 01:50:42 +08:00
liuyun
915745226f fix(c4): 质控放行自检顺序 + 补正≥3次进质控重点
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-10-15 01:37:56 +08:00
liuyun
f24b86064f feat(c4): 质控模块(全量质控/放行退回/五类推送/异常联动/补正)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-10-15 01:32:26 +08:00
liuyun
8f9177e36a feat(c4): qc + record_correction 数据模型
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-10-15 01:23:41 +08:00
liuyun
2828a9da58 feat(c4): qc 权限码/错误码/APIS 2026-10-15 01:22:17 +08:00
liuyun
9f232356e0 fix(c3): 结转幂等 + offlineSync 扑空拒签 + 坐标全路径序列化
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-10-15 01:08:36 +08:00
liuyun
5f060292c6 fix(c3): 扑空 not_met_reason 截断 50 + report 坐标 Decimal 转字符串
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-10-15 01:07:18 +08:00
liuyun
c00c4ee007 fix(c3): record 坐标 Decimal 返回前转字符串,防泄漏 {s,e,d}
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-10-15 01:00:06 +08:00
liuyun
ab09210d28 fix(c3): 异常列表 visitLat/visitLng Decimal 转字符串
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-10-15 01:00:05 +08:00
liuyun
169b4e2c51 fix(c3): 垫付结转 R9 门控——仅待遇已转正常享受(active)可结转
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-10-15 00:49:24 +08:00
liuyun
1966a68bc8 fix(c3): record 必拍档不可被 extraFlag 绕过 + 未派单离线补传守卫
- resolvePhotoRequired 先按 svcId 查 order.item_list,命中以 photo_tier 为准,
  忽略客户端 extraFlag/photo_required;仅无对应项才回退 DTO
- offlineSync 对 assigneeId 为 null(未派单)工单抛 RECORD_ORDER_INVALID,防 null 入 NOT NULL 列

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-10-15 00:36:54 +08:00
liuyun
55f432b8e7 chore(c3): 注册 record/abnormal 模块
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-10-15 00:36:36 +08:00
liuyun
563f5ab5b5 fix(c3): record 从 order 推导 photo_required 与 elder/assignee
- itemSave:photo_required 由 order.item_list 的 photo_tier 推导(must→required),
  extraFlag 临时加项才回退 DTO 值,防客户端传 false 绕过 3001 必拍校验
- offlineSync:elder_id/assignee_id 以 order 为准,忽略 DTO 字段,防 order/elder/assignee 不匹配

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-10-15 00:34:39 +08:00
liuyun
2e4c916949 fix(c3): 扑空转 not_met 前 requireOrder 校验(44003)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-10-15 00:33:56 +08:00
liuyun
5bfd0f4748 feat(c3): 履约留痕模块(签到/签退/项目/照片/离线/垫付结转)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-10-15 00:28:39 +08:00
liuyun
93e532aa7d feat(c3): 异常上报模块(9宫格/扑空转 not_met)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-10-15 00:26:15 +08:00
liuyun
4295683f04 feat(c3): record/item/photo/abnormal + settlement/report 数据模型
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-10-15 00:20:26 +08:00
liuyun
71b9155ccf feat(c3): record/abnormal 权限码/错误码/APIS
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-10-15 00:19:38 +08:00
liuyun
66da809a2e fix(c2): 属地项数提示级 + assign L2 放松 + reassign 守卫 + 时区标准化
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-10-14 23:41:20 +08:00
liuyun
8791ca494b fix(c2): 个人项目库允许保存空库(清空)
- R12: PutElderSvcDto.svcIds 移除 @ArrayNotEmpty,空数组=清空
- 补测 put 空 svcIds 清空项目库

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-10-14 23:07:02 +08:00
liuyun
00c8fa4d4c feat(c2): 工单按日列表接口(排班日视图 R11)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-10-14 23:06:03 +08:00
liuyun
9c4fd6f4ca feat(c2): 工单模块(派单/调单/冲突/批量推荐)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-10-14 22:42:15 +08:00
liuyun
161a1253ee fix(c2): plan create 置 active + confirm 不改状态 + change 校验同老人
- R7: create 置 planStatus=active(spec 权威);confirm 仅写确认字段不改状态
- R8: change 校验 oldPlan.elderId === dto.elderId,不匹配拒绝

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-10-14 22:32:59 +08:00
liuyun
418dfb9dae feat(c2): 服务计划 + 老人个人项目库模块
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-10-14 22:27:34 +08:00
liuyun
515e22453c feat(c2): plan/order 权限码/错误码/APIS 2026-10-14 22:13:53 +08:00
liuyun
766d8c7218 feat(c2): plan/plan_item/order/elder_svc 数据模型
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-10-14 22:08:40 +08:00
liuyun
312712f86c chore(c1): .env.example 修正 MinIO 端口 9010 与凭据 admin/admin111
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-14 22:01:19 +08:00