PayrollManagementSystem/backend/tests/unit
liuwenxin 680661a80b feat(allocation): 二次分配方案录入/替换/终态门槛(分摊计算待澄清另批)
- SecondaryAllocationIn/Out:比例走金额红线口径(str 入参、两位小数、
  超 100 拒绝不静默舍入);参与人 schema 层去重(uk 前置友好提示)
- create/update 同事务写入(replace_allocations,先删后 flush 再插——
  uk 表防御写法);create 放编号重试循环内,rollback 后方案随业务重来
- 人员在职复用 ensure_active(label=分摊参与),personnel_name 冗余固化;
  FK RESTRICT:被方案引用人员禁删,方案回显不静默失联
- 合计不强制 100%(需求原文):详情 allocation_hint 只展示合计/余额,
  余额归属待澄清 #2 不落库
- 单测 13 例(比例边界/去重)+ 集成 9 例(回显/替换清空/离职 400/
  终态禁改/RESTRICT 保护)

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-10-15 18:31:27 +08:00
..
__init__.py chore: 初始化项目结构与登录鉴权模块 2026-10-09 18:46:36 +08:00
test_audit_serialization.py fix(system): code-review 15 项修复(预览基数/维度校验/脱敏穿透/并发版本号等) 2026-10-13 02:28:20 +08:00
test_audit_service.py feat(system): 完成后端系统管理(审计/角色/操作日志/日志查询) 2026-10-10 16:28:04 +08:00
test_auth_schemas.py chore: 初始化项目结构与登录鉴权模块 2026-10-09 18:46:36 +08:00
test_captcha.py chore: 初始化项目结构与登录鉴权模块 2026-10-09 18:46:36 +08:00
test_config.py chore: 初始化项目结构与登录鉴权模块 2026-10-09 18:46:36 +08:00
test_exception_handlers.py chore: 初始化项目结构与登录鉴权模块 2026-10-09 18:46:36 +08:00
test_formula.py fix(business): 行金额乘积显式两位固化,计提比例对负天数钳制 2026-10-14 18:58:30 +08:00
test_jwt.py chore: 初始化项目结构与登录鉴权模块 2026-10-09 18:46:36 +08:00
test_log_schemas.py feat(system): 完成后端系统管理(审计/角色/操作日志/日志查询) 2026-10-10 16:28:04 +08:00
test_logging.py chore: 初始化项目结构与登录鉴权模块 2026-10-09 18:46:36 +08:00
test_login_limiter.py chore: 初始化项目结构与登录鉴权模块 2026-10-09 18:46:36 +08:00
test_models.py feat(migration): V6 系统设置/二次分配/审批表与角色参数种子 2026-10-15 17:25:23 +08:00
test_param_registry.py feat(migration): V6 系统设置/二次分配/审批表与角色参数种子 2026-10-15 17:25:23 +08:00
test_param_snapshot.py feat(system): 计提参数版本管理、变更留痕与计算预览接口 2026-10-12 20:24:17 +08:00
test_product_schema.py fix(product): 删除引用保护/单价小数位校验,IntegrityError 全局兜底转 400 2026-10-14 18:48:32 +08:00
test_response.py chore: 初始化项目结构与登录鉴权模块 2026-10-09 18:46:36 +08:00
test_role_schemas.py feat(system): 完成后端系统管理(审计/角色/操作日志/日志查询) 2026-10-10 16:28:04 +08:00
test_secondary_allocation_schema.py feat(allocation): 二次分配方案录入/替换/终态门槛(分摊计算待澄清另批) 2026-10-15 18:31:27 +08:00
test_security.py chore: 初始化项目结构与登录鉴权模块 2026-10-09 18:46:36 +08:00
test_token_blacklist.py chore: 初始化项目结构与登录鉴权模块 2026-10-09 18:46:36 +08:00