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:
SunYF
2026-11-03 18:29:31 +08:00
parent 2ccf9bb9ca
commit 42bcf395d2
123 changed files with 19472 additions and 247 deletions
+15 -9
View File
@@ -524,40 +524,46 @@ func init() {
returnorderDescStationNo := returnorderFields[4].Descriptor()
// returnorder.DefaultStationNo holds the default value on creation for the station_no field.
returnorder.DefaultStationNo = returnorderDescStationNo.Default.(int)
// returnorderDescReturnDock is the schema descriptor for return_dock field.
returnorderDescReturnDock := returnorderFields[5].Descriptor()
// returnorder.DefaultReturnDock holds the default value on creation for the return_dock field.
returnorder.DefaultReturnDock = returnorderDescReturnDock.Default.(string)
// returnorder.ReturnDockValidator is a validator for the "return_dock" field. It is called by the builders before save.
returnorder.ReturnDockValidator = returnorderDescReturnDock.Validators[0].(func(string) error)
// returnorderDescSn is the schema descriptor for sn field.
returnorderDescSn := returnorderFields[5].Descriptor()
returnorderDescSn := returnorderFields[6].Descriptor()
// returnorder.DefaultSn holds the default value on creation for the sn field.
returnorder.DefaultSn = returnorderDescSn.Default.(string)
// returnorderDescQty is the schema descriptor for qty field.
returnorderDescQty := returnorderFields[9].Descriptor()
returnorderDescQty := returnorderFields[10].Descriptor()
// returnorder.DefaultQty holds the default value on creation for the qty field.
returnorder.DefaultQty = returnorderDescQty.Default.(int)
// returnorderDescUnit is the schema descriptor for unit field.
returnorderDescUnit := returnorderFields[10].Descriptor()
returnorderDescUnit := returnorderFields[11].Descriptor()
// returnorder.DefaultUnit holds the default value on creation for the unit field.
returnorder.DefaultUnit = returnorderDescUnit.Default.(string)
// returnorderDescReason is the schema descriptor for reason field.
returnorderDescReason := returnorderFields[11].Descriptor()
returnorderDescReason := returnorderFields[12].Descriptor()
// returnorder.DefaultReason holds the default value on creation for the reason field.
returnorder.DefaultReason = returnorderDescReason.Default.(string)
// returnorderDescStatus is the schema descriptor for status field.
returnorderDescStatus := returnorderFields[12].Descriptor()
returnorderDescStatus := returnorderFields[13].Descriptor()
// returnorder.DefaultStatus holds the default value on creation for the status field.
returnorder.DefaultStatus = returnorderDescStatus.Default.(string)
// returnorderDescOperator is the schema descriptor for operator field.
returnorderDescOperator := returnorderFields[13].Descriptor()
returnorderDescOperator := returnorderFields[14].Descriptor()
// returnorder.DefaultOperator holds the default value on creation for the operator field.
returnorder.DefaultOperator = returnorderDescOperator.Default.(string)
// returnorderDescReceiveBy is the schema descriptor for receive_by field.
returnorderDescReceiveBy := returnorderFields[14].Descriptor()
returnorderDescReceiveBy := returnorderFields[15].Descriptor()
// returnorder.DefaultReceiveBy holds the default value on creation for the receive_by field.
returnorder.DefaultReceiveBy = returnorderDescReceiveBy.Default.(string)
// returnorderDescCreatedAt is the schema descriptor for created_at field.
returnorderDescCreatedAt := returnorderFields[15].Descriptor()
returnorderDescCreatedAt := returnorderFields[16].Descriptor()
// returnorder.DefaultCreatedAt holds the default value on creation for the created_at field.
returnorder.DefaultCreatedAt = returnorderDescCreatedAt.Default.(func() int64)
// returnorderDescReceiveAt is the schema descriptor for receive_at field.
returnorderDescReceiveAt := returnorderFields[16].Descriptor()
returnorderDescReceiveAt := returnorderFields[17].Descriptor()
// returnorder.DefaultReceiveAt holds the default value on creation for the receive_at field.
returnorder.DefaultReceiveAt = returnorderDescReceiveAt.Default.(int64)
roleFields := schema.Role{}.Fields()