feat: 五项目业务实现并对接完成
- MES(B): 工单/BOM/备料/工序字典/PLC下发/拧紧/扫码报工/半成品/AGV/追溯逻辑,WMS与海康RCS客户端,看板Redis缓存API(概览/设备/进度/报警/趋势)+SSE - WMS(C): JWT滑动续签、Excel导入、盘点、内部API、种子数据、独立Postgres配置 - WMS客户端(E): Go网关8891反向代理+内嵌Vue3十页 - 工位终端(D): SQLite本地缓存+模拟拧紧源+内嵌Vue3页面 - Dashboard(A): 看板数据改接MES内部缓存API,SSE实时刷新+vite代理 - 清理各项目球形磨遗留代码,新增部署手册.md
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
package schema
|
||||
|
||||
import (
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/schema/field"
|
||||
"entgo.io/ent/schema/index"
|
||||
)
|
||||
|
||||
// SemiFinished 半成品库存
|
||||
// 记录已完成工序,支持流转
|
||||
type SemiFinished struct {
|
||||
ent.Schema
|
||||
}
|
||||
|
||||
func (SemiFinished) Fields() []ent.Field {
|
||||
return []ent.Field{
|
||||
field.String("sn").Unique().Comment("半成品 SN"),
|
||||
field.String("material_code").Comment("物料编码"),
|
||||
field.String("completed_process").Optional().Comment("已完成工序(如 135)"),
|
||||
field.Int("quantity").Default(1).Comment("数量"),
|
||||
field.String("zone_code").Optional().Comment("所在区域"),
|
||||
field.String("status").Default("在库").Comment("在库/出库/使用"),
|
||||
field.String("order_no").Optional().Comment("关联工单"),
|
||||
field.Int64("created_at").DefaultFunc(nowUnix),
|
||||
field.Int64("updated_at").DefaultFunc(nowUnix),
|
||||
}
|
||||
}
|
||||
|
||||
func (SemiFinished) Indexes() []ent.Index {
|
||||
return []ent.Index{
|
||||
index.Fields("material_code"),
|
||||
index.Fields("status"),
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user