packServer/backend/database/migrations/20261024102000-add-workstation-camera-label-flag.js
liufumingren f8aa4c4899 feat(工作台): 成员扫码登入、面单摄像头与虚拟通道
- 工作台成员扫码登入:workstation_login_records 记录谁在什么时候登入/下线了哪台工作台,
  超时(团购 1h / 散单 30min)由 schedule/workstation_idle_offline 自动下线;
  运单查询的 packers 取当时的登入成员
- 面单摄像头识别:workstation_cameras.is_label_camera + service/label_scan 下发本机该跑的识别配置,
  设备端(桌面端 LabelScan 工作线程)按配置做面单识别并上报
- 虚拟通道 CAM-<工作台id>:工作台没接扫码枪时,面单摄像头那一路顶替扫码枪上报,records 规则按 ws_type 区分
- 桌面端:新增 LabelScanMonitor/LabelScanWorker/ScanDeviceKind 与面单预览页,扫描通道支持改名,静默窗口 5s

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-10-29 17:19:24 +08:00

24 lines
777 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

'use strict';
/**
* 工作台-摄像头绑定:面单摄像头标记
*
* 散单工作台在「绑定管理」里可以把某一路摄像头设为**面单摄像头**(正对运单特写的画面)。
* 团购工作台没有这个概念:接口拒绝对团购工作台设置,存量值固定为 0。
*/
module.exports = {
async up(queryInterface, Sequelize) {
await queryInterface.addColumn('workstation_cameras', 'is_label_camera', {
type: Sequelize.TINYINT.UNSIGNED,
allowNull: false,
defaultValue: 0,
after: 'stream_type',
comment: '是否面单摄像头:1 是 0 否(仅散单工作台)',
});
},
async down(queryInterface) {
await queryInterface.removeColumn('workstation_cameras', 'is_label_camera');
},
};