feat: AGV三段链安全机制、补料/损耗/下班闭环、接驳台左右互换
AGV 调度: - 任务重构为 GO_LOAD/TRANSPORT/EMPTY_RETURN/FREE 三段链,到位即停(ARRIVED)需人工确认装卸 - 自由调度单点步进,每段强制弹"请确保路径畅通无杂物";托盘回收独立工作台 - 接驳台 PLC 传感器检测到托盘即自动卸货放行,传感器故障由人工按钮兜底(无轮询) - 车辆状态只读展示(海康3.1.7 queryAgvStatus),调度仍由 RCS 负责 物料闭环: - 补料管理(SHORTAGE):工位申请 + 主管审批调增叫料池额度,与借料/差异补发三轨并行 - 损耗台账(loss_ledger):退料实际 < 理论必填原因、后审核,工单不记损耗 - 退料强制指定左/右接驳台,WMS 库管可代工位退料 下班闭环: - 工位终端自检接驳台剩余物料后下班;库管收货 + 托盘拉走后事件驱动自动结班 - 退出登录未下班仅作安全提示(不强制拦截、不新增责任审批) 接驳台左右按操作员朝向建模(dock.side 字段),废除"奇左偶右"隐式约定; 看板标签 / seed / 迁移补丁 / 布局文档统一为中文左/右。 产线布局说明:C1 前线头 AGV 点、C15 后线尾 AGV 点、外部 O1/O2/O3 散点, 清理修订痕迹为最终态描述。
This commit is contained in:
+9
-26
@@ -4,8 +4,6 @@ package ent
|
||||
|
||||
import (
|
||||
"context"
|
||||
stdsql "database/sql"
|
||||
"fmt"
|
||||
"sync"
|
||||
|
||||
"entgo.io/ent/dialect"
|
||||
@@ -42,6 +40,8 @@ type Tx struct {
|
||||
InspectionRecord *InspectionRecordClient
|
||||
// LinePoint is the client for interacting with the LinePoint builders.
|
||||
LinePoint *LinePointClient
|
||||
// LossLedger is the client for interacting with the LossLedger builders.
|
||||
LossLedger *LossLedgerClient
|
||||
// Material is the client for interacting with the Material builders.
|
||||
Material *MaterialClient
|
||||
// MaterialQtyReport is the client for interacting with the MaterialQtyReport builders.
|
||||
@@ -64,8 +64,12 @@ type Tx struct {
|
||||
Role *RoleClient
|
||||
// SemiFlow is the client for interacting with the SemiFlow builders.
|
||||
SemiFlow *SemiFlowClient
|
||||
// ShortageRequest is the client for interacting with the ShortageRequest builders.
|
||||
ShortageRequest *ShortageRequestClient
|
||||
// Station is the client for interacting with the Station builders.
|
||||
Station *StationClient
|
||||
// StationShift is the client for interacting with the StationShift builders.
|
||||
StationShift *StationShiftClient
|
||||
// StationState is the client for interacting with the StationState builders.
|
||||
StationState *StationStateClient
|
||||
// StepCriterion is the client for interacting with the StepCriterion builders.
|
||||
@@ -237,6 +241,7 @@ func (tx *Tx) init() {
|
||||
tx.FlowMaterial = NewFlowMaterialClient(tx.config)
|
||||
tx.InspectionRecord = NewInspectionRecordClient(tx.config)
|
||||
tx.LinePoint = NewLinePointClient(tx.config)
|
||||
tx.LossLedger = NewLossLedgerClient(tx.config)
|
||||
tx.Material = NewMaterialClient(tx.config)
|
||||
tx.MaterialQtyReport = NewMaterialQtyReportClient(tx.config)
|
||||
tx.MaterialRequest = NewMaterialRequestClient(tx.config)
|
||||
@@ -248,7 +253,9 @@ func (tx *Tx) init() {
|
||||
tx.ProductProcessItem = NewProductProcessItemClient(tx.config)
|
||||
tx.Role = NewRoleClient(tx.config)
|
||||
tx.SemiFlow = NewSemiFlowClient(tx.config)
|
||||
tx.ShortageRequest = NewShortageRequestClient(tx.config)
|
||||
tx.Station = NewStationClient(tx.config)
|
||||
tx.StationShift = NewStationShiftClient(tx.config)
|
||||
tx.StationState = NewStationStateClient(tx.config)
|
||||
tx.StepCriterion = NewStepCriterionClient(tx.config)
|
||||
tx.StepData = NewStepDataClient(tx.config)
|
||||
@@ -324,27 +331,3 @@ func (tx *txDriver) Query(ctx context.Context, query string, args, v any) error
|
||||
}
|
||||
|
||||
var _ dialect.Driver = (*txDriver)(nil)
|
||||
|
||||
// ExecContext allows calling the underlying ExecContext method of the transaction if it is supported by it.
|
||||
// See, database/sql#Tx.ExecContext for more information.
|
||||
func (tx *txDriver) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error) {
|
||||
ex, ok := tx.tx.(interface {
|
||||
ExecContext(context.Context, string, ...any) (stdsql.Result, error)
|
||||
})
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("Tx.ExecContext is not supported")
|
||||
}
|
||||
return ex.ExecContext(ctx, query, args...)
|
||||
}
|
||||
|
||||
// QueryContext allows calling the underlying QueryContext method of the transaction if it is supported by it.
|
||||
// See, database/sql#Tx.QueryContext for more information.
|
||||
func (tx *txDriver) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error) {
|
||||
q, ok := tx.tx.(interface {
|
||||
QueryContext(context.Context, string, ...any) (*stdsql.Rows, error)
|
||||
})
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("Tx.QueryContext is not supported")
|
||||
}
|
||||
return q.QueryContext(ctx, query, args...)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user