CCL_QMS检验
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
han\hanst a2531cbc74 设备采集exe 1 week ago
..
dist 设备采集exe 1 week ago
README.md 设备采集exe 1 week ago
build_exe.bat 设备采集exe 1 week ago
client_file_collector.py 设备采集exe 1 week ago
requirements.txt 设备采集exe 1 week ago

README.md

文件采集客户端(支持最多3行配置)

客户端按轮询秒定时将本地目录文件上传到 cclqms-java,服务端统一落盘到:

  • D:\qms-dataCollection\<equipmentNo>\

当前需求对应关系

  • 客户端只需录入:
    • 系统地址
    • 轮询秒
    • 最多3行配置(site + buNo + equipmentNo + 本地目录
  • 双击打开 EXE 后,录入并保存配置即可按轮询秒自动同步。
  • 服务端收到每行配置上传的文件后,会自动写入 D:\qms-dataCollection\equipmentNo

服务端接口

  • POST /collector/client/upload
    • form-data:
      • file
      • site
      • buNo
      • equipmentNo

客户端行为说明

  • 每轮轮询会扫描每行配置的本地目录。
  • 仅同步新增或修改过的文件(避免重复上传同一文件)。
  • 不会删除本地文件。
  • Windows 下首次启动 QMSFileCollector.exe 时,会自动写入当前用户自启动项(优先写入 Startup 启动文件夹,失败时回退注册表 HKCU\Software\Microsoft\Windows\CurrentVersion\Run)。

打包步骤

  1. 安装 Python 3.10+。
  2. 在当前目录执行:(在文件夹client-file-collector下打开cmd,然后输入build_exe.bat,回车就可以了,QMSFileCollector.exe在client-file-collector目录下的dist下)
build_exe.bat
  1. 生成文件:
  • dist/QMSFileCollector.exe

常见问题

  • 找不到 dist/QMSFileCollector.exe

    • 请先看脚本输出是否有 Python3 interpreter not found
    • 若机器上 python --version2.7,不会执行成功。
  • pip 下载超时

    • 脚本已内置镜像重试(清华 -> 阿里 -> 官方)。
    • 网络不稳定时可重试执行 build_exe.bat