feat: 核心业务实体扩充(混产模板/产品BOM/试制记录)、WMS 库存检验增强与前端通用能力
- MES 新增实体:混产模板、产品BOM、产品工艺物料、试制记录(schema + ent 生成码 + logic/handler/前端页) - WMS 实体增强:检验记录、库存、半成品重构;新增序列号库存与短缺代报 - AGV 与产能:AGV 手动点位与链路、物料守卫、短缺预测、原因字典 - 前端通用能力:新增下一步引导组件 NextStepBar,统一帮助文档/布局/请求拦截与操作列 - 工位终端:界面与各 handler 调整(api/store/绑定/PLC/拧紧/上报等) - 配置与文档:更新 mes-api.yaml、WMS README 及案例/产线API/问题记录/项目说明/流程说明
This commit is contained in:
@@ -542,6 +542,33 @@ func (_u *InventoryUpdate) ClearRecordedBy() *InventoryUpdate {
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetRecordedByID sets the "recorded_by_id" field.
|
||||
func (_u *InventoryUpdate) SetRecordedByID(v int64) *InventoryUpdate {
|
||||
_u.mutation.ResetRecordedByID()
|
||||
_u.mutation.SetRecordedByID(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetNillableRecordedByID sets the "recorded_by_id" field if the given value is not nil.
|
||||
func (_u *InventoryUpdate) SetNillableRecordedByID(v *int64) *InventoryUpdate {
|
||||
if v != nil {
|
||||
_u.SetRecordedByID(*v)
|
||||
}
|
||||
return _u
|
||||
}
|
||||
|
||||
// AddRecordedByID adds value to the "recorded_by_id" field.
|
||||
func (_u *InventoryUpdate) AddRecordedByID(v int64) *InventoryUpdate {
|
||||
_u.mutation.AddRecordedByID(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// ClearRecordedByID clears the value of the "recorded_by_id" field.
|
||||
func (_u *InventoryUpdate) ClearRecordedByID() *InventoryUpdate {
|
||||
_u.mutation.ClearRecordedByID()
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetRecordedAt sets the "recorded_at" field.
|
||||
func (_u *InventoryUpdate) SetRecordedAt(v int64) *InventoryUpdate {
|
||||
_u.mutation.ResetRecordedAt()
|
||||
@@ -876,6 +903,15 @@ func (_u *InventoryUpdate) sqlSave(ctx context.Context) (_node int, err error) {
|
||||
if _u.mutation.RecordedByCleared() {
|
||||
_spec.ClearField(inventory.FieldRecordedBy, field.TypeString)
|
||||
}
|
||||
if value, ok := _u.mutation.RecordedByID(); ok {
|
||||
_spec.SetField(inventory.FieldRecordedByID, field.TypeInt64, value)
|
||||
}
|
||||
if value, ok := _u.mutation.AddedRecordedByID(); ok {
|
||||
_spec.AddField(inventory.FieldRecordedByID, field.TypeInt64, value)
|
||||
}
|
||||
if _u.mutation.RecordedByIDCleared() {
|
||||
_spec.ClearField(inventory.FieldRecordedByID, field.TypeInt64)
|
||||
}
|
||||
if value, ok := _u.mutation.RecordedAt(); ok {
|
||||
_spec.SetField(inventory.FieldRecordedAt, field.TypeInt64, value)
|
||||
}
|
||||
@@ -1447,6 +1483,33 @@ func (_u *InventoryUpdateOne) ClearRecordedBy() *InventoryUpdateOne {
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetRecordedByID sets the "recorded_by_id" field.
|
||||
func (_u *InventoryUpdateOne) SetRecordedByID(v int64) *InventoryUpdateOne {
|
||||
_u.mutation.ResetRecordedByID()
|
||||
_u.mutation.SetRecordedByID(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetNillableRecordedByID sets the "recorded_by_id" field if the given value is not nil.
|
||||
func (_u *InventoryUpdateOne) SetNillableRecordedByID(v *int64) *InventoryUpdateOne {
|
||||
if v != nil {
|
||||
_u.SetRecordedByID(*v)
|
||||
}
|
||||
return _u
|
||||
}
|
||||
|
||||
// AddRecordedByID adds value to the "recorded_by_id" field.
|
||||
func (_u *InventoryUpdateOne) AddRecordedByID(v int64) *InventoryUpdateOne {
|
||||
_u.mutation.AddRecordedByID(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// ClearRecordedByID clears the value of the "recorded_by_id" field.
|
||||
func (_u *InventoryUpdateOne) ClearRecordedByID() *InventoryUpdateOne {
|
||||
_u.mutation.ClearRecordedByID()
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetRecordedAt sets the "recorded_at" field.
|
||||
func (_u *InventoryUpdateOne) SetRecordedAt(v int64) *InventoryUpdateOne {
|
||||
_u.mutation.ResetRecordedAt()
|
||||
@@ -1811,6 +1874,15 @@ func (_u *InventoryUpdateOne) sqlSave(ctx context.Context) (_node *Inventory, er
|
||||
if _u.mutation.RecordedByCleared() {
|
||||
_spec.ClearField(inventory.FieldRecordedBy, field.TypeString)
|
||||
}
|
||||
if value, ok := _u.mutation.RecordedByID(); ok {
|
||||
_spec.SetField(inventory.FieldRecordedByID, field.TypeInt64, value)
|
||||
}
|
||||
if value, ok := _u.mutation.AddedRecordedByID(); ok {
|
||||
_spec.AddField(inventory.FieldRecordedByID, field.TypeInt64, value)
|
||||
}
|
||||
if _u.mutation.RecordedByIDCleared() {
|
||||
_spec.ClearField(inventory.FieldRecordedByID, field.TypeInt64)
|
||||
}
|
||||
if value, ok := _u.mutation.RecordedAt(); ok {
|
||||
_spec.SetField(inventory.FieldRecordedAt, field.TypeInt64, value)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user