feat(T+): 完成数据贯通与自动接入闭环

打通 T+ 快照、业务、发货、回款和核算准备链路,保留来源差异并提供待补状态。
新增业务自动接入任务、跨平台读取服务托管、权限复核、来源关联和前端核对页面。
补充迁移、隔离集成测试、浏览器模拟验收及角色授权边界修复。
This commit is contained in:
liuwenxin committed 2026-11-05 18:47:13 +08:00
1 parent 3efe72c344
commit 1e53792ad6
151 files changed
+8842 -401

No files matched your search

@@ -70,3 +70,25 @@ def test_连接文件不接受sa或应用配置覆盖(tmp_path):
)
with pytest.raises(RuntimeError):
resolve_tplus_settings(settings)
@pytest.mark.parametrize(
("environment", "allowed", "accepted"),
[("dev", False, False), ("prod", True, False), ("dev", True, True)],
)
def test_sa仅允许显式启用的开发环境(environment, allowed, accepted):
settings = Settings(
_env_file=None,
app_secret_key="x" * 32,
app_env=environment,
t_plus_enabled=True,
t_plus_user="sa",
t_plus_database="test_source",
t_plus_odbc_driver="test_driver",
t_plus_allow_dev_sa=allowed,
)
if accepted:
assert resolve_tplus_settings(settings).t_plus_user == "sa"
else:
with pytest.raises(RuntimeError, match="不能使用 sa"):
resolve_tplus_settings(settings)