restore: 恢复 11-06~11-09 本地未提交改动

- libs: 新增 hr_sdk / hotel_report / dingtalk,更新 desktopauto
- controlplane-next: SDK 管理模块(controller/entity/migrations)与前端视图
- electron-shell: 插件同步、注册表、runner 调整
- plugins: XQ0035/XQ0041/XQ0042/XQ0045_XQ0046/XQ0048/XQ0076/XQ0078 等版本更新
- tests/tools: 新增 SDK 兼容性检查与打包工具(sdk_pack.py、sdk_compat_check.py)
This commit is contained in:
2026-11-09 17:27:10 +08:00
parent 19078629d1
commit 1664821117
327 changed files with 29670 additions and 718 deletions
+46
View File
@@ -0,0 +1,46 @@
"""临时联调:按壳子方式加载 xq0079 并跑 run(login_mode=人工登录,缓存 token 有效时应直接复用)。"""
import importlib.util
import os
import sys
import tempfile
if hasattr(sys.stdout, "reconfigure"):
sys.stdout.reconfigure(encoding="utf-8", errors="replace")
REPO = r"d:\work\code\37duAutomation"
sys.path.insert(0, os.path.join(REPO, "desktop", "electron-shell", "python"))
PLUGIN_DIR = os.path.join(REPO, "plugins", "XQ0001-0100", "XQ0079 金色湖畔扫码数据导出")
class FakeCtx:
def log(self, msg, level="INFO"):
print(f"[{level}] {msg}", flush=True)
def progress(self, pct):
pass
spec = importlib.util.spec_from_file_location(
"xq0079", os.path.join(PLUGIN_DIR, "__init__.py"),
submodule_search_locations=[PLUGIN_DIR])
mod = importlib.util.module_from_spec(spec)
sys.modules["xq0079"] = mod
spec.loader.exec_module(mod)
plugin = mod.PLUGINS.find("xq0079")
fields = {
"tq_account1": "13629779871",
"tq_password1": "Qq201201",
"tq_account2": "",
"tq_password2": "",
"login_mode": "人工登录",
"date_from": "",
"date_to": "",
"save_dir": os.path.join(tempfile.gettempdir(), "xq0079_test"),
"debug_mode": False,
}
result = plugin.run(fields, FakeCtx())
print("\nsummary:", result.get("summary"))
for note in result.get("notes") or []:
print("note:", note)