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 散点, 清理修订痕迹为最终态描述。
89 lines
2.3 KiB
Go
89 lines
2.3 KiB
Go
// Code generated by ent, DO NOT EDIT.
|
|
|
|
package ent
|
|
|
|
import (
|
|
"bj_power_mes/ent/predicate"
|
|
"bj_power_mes/ent/stationshift"
|
|
"context"
|
|
|
|
"entgo.io/ent/dialect/sql"
|
|
"entgo.io/ent/dialect/sql/sqlgraph"
|
|
"entgo.io/ent/schema/field"
|
|
)
|
|
|
|
// StationShiftDelete is the builder for deleting a StationShift entity.
|
|
type StationShiftDelete struct {
|
|
config
|
|
hooks []Hook
|
|
mutation *StationShiftMutation
|
|
}
|
|
|
|
// Where appends a list predicates to the StationShiftDelete builder.
|
|
func (_d *StationShiftDelete) Where(ps ...predicate.StationShift) *StationShiftDelete {
|
|
_d.mutation.Where(ps...)
|
|
return _d
|
|
}
|
|
|
|
// Exec executes the deletion query and returns how many vertices were deleted.
|
|
func (_d *StationShiftDelete) Exec(ctx context.Context) (int, error) {
|
|
return withHooks(ctx, _d.sqlExec, _d.mutation, _d.hooks)
|
|
}
|
|
|
|
// ExecX is like Exec, but panics if an error occurs.
|
|
func (_d *StationShiftDelete) ExecX(ctx context.Context) int {
|
|
n, err := _d.Exec(ctx)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (_d *StationShiftDelete) sqlExec(ctx context.Context) (int, error) {
|
|
_spec := sqlgraph.NewDeleteSpec(stationshift.Table, sqlgraph.NewFieldSpec(stationshift.FieldID, field.TypeInt))
|
|
if ps := _d.mutation.predicates; len(ps) > 0 {
|
|
_spec.Predicate = func(selector *sql.Selector) {
|
|
for i := range ps {
|
|
ps[i](selector)
|
|
}
|
|
}
|
|
}
|
|
affected, err := sqlgraph.DeleteNodes(ctx, _d.driver, _spec)
|
|
if err != nil && sqlgraph.IsConstraintError(err) {
|
|
err = &ConstraintError{msg: err.Error(), wrap: err}
|
|
}
|
|
_d.mutation.done = true
|
|
return affected, err
|
|
}
|
|
|
|
// StationShiftDeleteOne is the builder for deleting a single StationShift entity.
|
|
type StationShiftDeleteOne struct {
|
|
_d *StationShiftDelete
|
|
}
|
|
|
|
// Where appends a list predicates to the StationShiftDelete builder.
|
|
func (_d *StationShiftDeleteOne) Where(ps ...predicate.StationShift) *StationShiftDeleteOne {
|
|
_d._d.mutation.Where(ps...)
|
|
return _d
|
|
}
|
|
|
|
// Exec executes the deletion query.
|
|
func (_d *StationShiftDeleteOne) Exec(ctx context.Context) error {
|
|
n, err := _d._d.Exec(ctx)
|
|
switch {
|
|
case err != nil:
|
|
return err
|
|
case n == 0:
|
|
return &NotFoundError{stationshift.Label}
|
|
default:
|
|
return nil
|
|
}
|
|
}
|
|
|
|
// ExecX is like Exec, but panics if an error occurs.
|
|
func (_d *StationShiftDeleteOne) ExecX(ctx context.Context) {
|
|
if err := _d.Exec(ctx); err != nil {
|
|
panic(err)
|
|
}
|
|
}
|