From 60a06fc40c1c5959eb07494ee3982660fd468061 Mon Sep 17 00:00:00 2001 From: spudding <1115683088@qq.com> Date: Thu, 26 Nov 2026 09:28:51 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E6=9B=B4=E6=96=B0=20README=20=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E7=BB=93=E6=9E=84=E4=B8=8E=E6=9C=AC=E5=9C=B0=E5=90=AF?= =?UTF-8?q?=E5=8A=A8=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 同步壳子版本至 1.11.3,补充 cardreader/erpsdk/fileshare/printkit 等共享库说明,本地启动命令改为以仓库根目录为起点。 --- README.md | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 368239b..6faffb0 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ HR 业务流程自动化平台:覆盖 HRBP OA 审批、EHR 数据核对/导出 │ │ ├── frontend/ # 控制台前端(Vue3 + Element Plus + Vite,dev 3006) │ │ ├── migrations/ # 增量 SQL(手工在中心机 MySQL 执行后重启服务) │ │ └── schema_*.sql # 现网库只读快照 / cool 框架表 DDL -│ ├── electron-shell/ # 执行机桌面壳(现役宿主,当前 1.10.10) +│ ├── electron-shell/ # 执行机桌面壳(现役宿主,当前 1.11.2) │ │ ├── electron/ # 主进程 41 个模块:本地服务、插件/SDK 同步、调度/执行/队列/流程、壳子自更新、托盘 │ │ ├── frontend/ # 壳自有 Vue3 前端源码(构建 → renderer/dist) │ │ ├── renderer/dist/ # 打进 asar 的前端产物 @@ -69,9 +69,13 @@ HR 业务流程自动化平台:覆盖 HRBP OA 审批、EHR 数据核对/导出 │ └── README.md # 影刀版开发指南 ├── libs/ # 跨方向共享的独立 Python 库(非业务代码) │ ├── desktopauto/ # 桌面自动化:识图点击 / 图像存在判断 / OCR 文字坐标 / 键鼠 / 窗口 / 进程 -│ ├── hr_sdk/ # HR(RedseaPlatform)接口封装:台账导出 / 花名册 / 审批 / 考勤 / 封存 +│ ├── cardreader/ # 卡证识别:身份证/银行卡照片定位 + 多视角 OCR 号码读取(自带模型) +│ ├── hr_sdk/ # HR(RedseaPlatform)接口封装:台账导出 / 花名册 / 审批 / 考勤 / 工资 / 社保导入 │ ├── dingtalk/ # 钉钉 SDK:群机器人 / 企业应用鉴权 / dws 单聊群聊推送 / AI 表格 │ ├── hotel_report/ # 金贵系统 SDK:交班 / 销售明细 / 营业日报 / 会员卡统计(WCF 只读) +│ ├── erpsdk/ # 金蝶云星空 ERP WebAPI SDK:登录 / 单据读写 / 报表取数 / 即时库存 +│ ├── fileshare/ # 共享(UNC)文件目录列举与按选择复制到本地(零三方依赖) +│ ├── printkit/ # 网络打印:IPP over TLS 直连 / PDF·图片·表格排版(无驱动无弹窗) │ └── aitable/ # 钉钉 AI 表格读写 + 月报/周报采集 ├── tools/ │ ├── agent_cli.py # 统一发版 CLI(插件/SDK 发布与转正、授权、壳子/环境包 file push) @@ -90,7 +94,7 @@ HR 业务流程自动化平台:覆盖 HRBP OA 审批、EHR 数据核对/导出 > `dist-plugin/`、`dist-sdk/` 分别是插件与 SDK zip 的本地打包输出(`.gitignore` 忽略,不入库);`app/`(早期模块化蓝图)、`desktop/controlplane/`(旧 FastAPI 中心机)、`desktop/webhost/`(旧执行机底座)均已从仓库移除;`.skills/` 为本地 Agent 技能目录(不入库)。 > -> `libs/` 里 4 个库走 **SDK 版本化下发**(`sdk.json` + `tools/sdk_pack.py` 打包,执行机按插件 `requires.sdks` 下载挂载);`aitable/` 仍走环境包预装或插件 vendored。SDK **不得**预装进 python-env(同名包会让挂载 fail-fast)。 +> `libs/` 中 8 个库(`desktopauto/`、`cardreader/`、`hr_sdk/`、`dingtalk/`、`hotel_report/`、`erpsdk/`、`fileshare/`、`printkit/`)均带 `sdk.json`,走 **SDK 版本化下发**(`tools/sdk_pack.py` 打包,执行机按插件 `requires.sdks` 下载挂载);`aitable/` 仍走环境包预装或插件 vendored。SDK **不得**预装进 python-env(同名包会让挂载 fail-fast)。 ## 核心功能 @@ -125,7 +129,7 @@ HR 业务流程自动化平台:覆盖 HRBP OA 审批、EHR 数据核对/导出 | 文件服务器 | Python FastAPI + uvicorn,文件落盘 + MySQL 元数据(未配库时 JSON 兜底) | | 发版工具 | `tools/agent_cli.py`(Python,走控制面 admin HTTP 接口) | -> Python 侧一律使用项目本地虚拟环境 `d:\work\code\37duAutomation\.venv`(`.venv\Scripts\python.exe`),不使用全局 Python、不使用沙箱。 +> Python 侧一律使用项目根目录的本地虚拟环境 `.venv\`(`.venv\Scripts\python.exe`),不使用全局 Python、不使用沙箱;以下命令均以仓库根目录为起始 cwd。 ## 快速开始 @@ -139,22 +143,23 @@ pip install -r requirements.txt ### 桌面端(本地开发) ```powershell +# 以下每段均从一个新终端的仓库根目录开始 # 1) 文件服务器(cwd = desktop/) -cd d:\work\code\37duAutomation\desktop +cd desktop ..\.venv\Scripts\python.exe -m fileserver.main # http://127.0.0.1:8802 # 2) 中心机后端(controlplane-next,本地默认 8001) -cd d:\work\code\37duAutomation\desktop\controlplane-next\server +cd desktop\controlplane-next\server npm install npm run dev # 3) 控制台前端(dev 3006,/api → 127.0.0.1:8001) -cd d:\work\code\37duAutomation\desktop\controlplane-next\frontend +cd desktop\controlplane-next\frontend pnpm install pnpm dev # 4) 执行机客户端 -cd d:\work\code\37duAutomation\desktop\electron-shell +cd desktop\electron-shell npm install npm run copy-renderer # frontend/ → renderer/dist(前端有改动时) npm run electron # Electron 窗口模式;npm start = 纯 Node CLI 模式