Files
bj_power/bj_power_wms/schema/dock.go
T
SunYF 37f10d3a13 refactor: 重构产线工位与备料流程,移除冗余字段
1. 移除工单、工件、日排产中的冗余工位组合/接驳台字段
2. 新增工位接驳台编码字段与唯一约束,关联WMS接驳台主数据
3. 重构日排产为工位产量分配模式,替代原接驳台列表
4. 新增备料单工位级字段与分批出库支持
5. 移除定时同步可生产数量,改为WMS实时拉取接口
6. 过滤操作日志,排除登录/退出相关日志
7. 调整仪表盘工序展示逻辑为今日派工路线
8. 新增接驳台维护菜单与基础数据
2026-09-19 07:50:21 +08:00

37 lines
1.5 KiB
Go
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.
package schema
import (
"entgo.io/ent"
"entgo.io/ent/schema/field"
"entgo.io/ent/schema/index"
)
// Dock 接驳台主数据:21 个固定编码 DOCK01~DOCK20(产线,DOCK n ↔ 工位 n+ DOCK21(库房收货)。
// has_pallet 标记该接驳台当前是否有托盘;来源:PLC 托盘传感器(MES 同步) 或 AGV 到位/卸货自动维护。
type Dock struct {
ent.Schema
}
func (Dock) Fields() []ent.Field {
return []ent.Field{
field.String("dock_code").Unique().MaxLen(20).Comment("接驳台编码 DOCK01..21"),
field.String("name").Default("").MaxLen(64).Comment("接驳台名称"),
// type: line(产线) / store(库房) / other(其他,如缓存区、线边暂存位)
field.String("dock_type").Default("line").MaxLen(16).Comment("类型 line产线/store库房/other其他"),
// 关联工位(产线接驳台 DOCKn↔工位n,1:1);库房/其他接驳台不挂工位,为 0
field.Int("station_no").Default(0).Comment("关联工位号(与工位1:1,非产线为0)"),
field.Bool("has_pallet").Default(false).Comment("当前是否有托盘"),
// 有托盘时的关联出库/任务(便于查这个托盘是哪批料、要送到哪)
field.String("pallet_ref").Default("").MaxLen(64).Optional().Comment("托盘关联(出库单号/备料单号)"),
// ENABLED / DISABLED
field.String("status").Default("ENABLED").MaxLen(20),
field.Int64("created_at").DefaultFunc(nowUnix).Comment("创建时间"),
}
}
func (Dock) Indexes() []ent.Index {
return []ent.Index{
index.Fields("dock_code").Unique(),
index.Fields("dock_type"),
}
}