feat(production): 持久化动作检查点并完善恢复重试流程
- production_runs 新增动作阶段、尝试次数、版本及人工确认字段 - 提供兼容 PostgreSQL 9.5 的幂等升级脚本和数据库结构检查 - 工序推进、动作完成检查点和审计记录使用同一事务 - 机器人命令单次发送,完成反馈先持久化再清握手 - 已完成动作恢复仅补握手或数据库记录,避免重复执行 - 恢复/重试按钮固定显示在清除报警前,加入明确人工处理选项 - 记录人工决定、操作人及现场核对信息,拒绝过期确认 - 区分普通暂停继续、故障恢复与终止后的视觉锁解除 - 补齐视觉目标跨重启校验、异步失败及迟到回调防护 - 检测结果关联动作和尝试次数,重试清除旧结果缓存
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include "../models/workpiece.h"
|
||||
|
||||
#include <QList>
|
||||
#include <functional>
|
||||
|
||||
class WorkpieceService
|
||||
{
|
||||
@@ -25,7 +26,8 @@ public:
|
||||
const QString &source,
|
||||
int durationMs,
|
||||
QString *error = nullptr,
|
||||
bool forceRestart = false);
|
||||
bool forceRestart = false,
|
||||
const std::function<bool(QString *)> &beforeCommit = {});
|
||||
bool recordInspection(int id, const QString &side, int rawResult,
|
||||
const QString &resultState, int plcStep,
|
||||
const QString &inspectionMode, const QString &source,
|
||||
@@ -38,7 +40,8 @@ public:
|
||||
const QString &resultState, int plcStep,
|
||||
const QString &inspectionMode,
|
||||
const QString &source,
|
||||
QString *error = nullptr);
|
||||
QString *error = nullptr,
|
||||
const std::function<bool(QString *)> &beforeCommit = {});
|
||||
|
||||
private:
|
||||
WorkpieceService() = default;
|
||||
|
||||
Reference in New Issue
Block a user