feat: 解耦管理类型与SN管理方式,新增sn_mode字段实现全链路SN管理标准化
本次重构将原manage_mode字段拆分为独立的分类维度(manage_mode)和SN管理维度(sn_mode),实现全链路(MES/WMS/工位终端)的SN管理行为统一依据: 1. 新增sn_mode字段,定义1=序列号件、2=批次件、0=未选择,替代原manage_mode的SN判断逻辑 2. 移除冗余的manage_mode字段在多个实体中的使用,统一使用sn_mode决定业务行为 3. 新增工位接驳台配置,服务端固定接驳台,前端不可修改,确保AGV送达准确性 4. 优化检验记录导出,新增装配物料绑定明细,满足客户追溯需求 5. 修正前端提示文本,统一使用序列号件/批次件表述,与后端逻辑对齐
This commit is contained in:
@@ -238,6 +238,27 @@ func (_u *OutboundOrderUpdate) AddManageMode(v int) *OutboundOrderUpdate {
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetSnMode sets the "sn_mode" field.
|
||||
func (_u *OutboundOrderUpdate) SetSnMode(v int) *OutboundOrderUpdate {
|
||||
_u.mutation.ResetSnMode()
|
||||
_u.mutation.SetSnMode(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetNillableSnMode sets the "sn_mode" field if the given value is not nil.
|
||||
func (_u *OutboundOrderUpdate) SetNillableSnMode(v *int) *OutboundOrderUpdate {
|
||||
if v != nil {
|
||||
_u.SetSnMode(*v)
|
||||
}
|
||||
return _u
|
||||
}
|
||||
|
||||
// AddSnMode adds value to the "sn_mode" field.
|
||||
func (_u *OutboundOrderUpdate) AddSnMode(v int) *OutboundOrderUpdate {
|
||||
_u.mutation.AddSnMode(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetBatchNo sets the "batch_no" field.
|
||||
func (_u *OutboundOrderUpdate) SetBatchNo(v string) *OutboundOrderUpdate {
|
||||
_u.mutation.SetBatchNo(v)
|
||||
@@ -658,6 +679,12 @@ func (_u *OutboundOrderUpdate) sqlSave(ctx context.Context) (_node int, err erro
|
||||
if value, ok := _u.mutation.AddedManageMode(); ok {
|
||||
_spec.AddField(outboundorder.FieldManageMode, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := _u.mutation.SnMode(); ok {
|
||||
_spec.SetField(outboundorder.FieldSnMode, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := _u.mutation.AddedSnMode(); ok {
|
||||
_spec.AddField(outboundorder.FieldSnMode, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := _u.mutation.BatchNo(); ok {
|
||||
_spec.SetField(outboundorder.FieldBatchNo, field.TypeString, value)
|
||||
}
|
||||
@@ -985,6 +1012,27 @@ func (_u *OutboundOrderUpdateOne) AddManageMode(v int) *OutboundOrderUpdateOne {
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetSnMode sets the "sn_mode" field.
|
||||
func (_u *OutboundOrderUpdateOne) SetSnMode(v int) *OutboundOrderUpdateOne {
|
||||
_u.mutation.ResetSnMode()
|
||||
_u.mutation.SetSnMode(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetNillableSnMode sets the "sn_mode" field if the given value is not nil.
|
||||
func (_u *OutboundOrderUpdateOne) SetNillableSnMode(v *int) *OutboundOrderUpdateOne {
|
||||
if v != nil {
|
||||
_u.SetSnMode(*v)
|
||||
}
|
||||
return _u
|
||||
}
|
||||
|
||||
// AddSnMode adds value to the "sn_mode" field.
|
||||
func (_u *OutboundOrderUpdateOne) AddSnMode(v int) *OutboundOrderUpdateOne {
|
||||
_u.mutation.AddSnMode(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetBatchNo sets the "batch_no" field.
|
||||
func (_u *OutboundOrderUpdateOne) SetBatchNo(v string) *OutboundOrderUpdateOne {
|
||||
_u.mutation.SetBatchNo(v)
|
||||
@@ -1435,6 +1483,12 @@ func (_u *OutboundOrderUpdateOne) sqlSave(ctx context.Context) (_node *OutboundO
|
||||
if value, ok := _u.mutation.AddedManageMode(); ok {
|
||||
_spec.AddField(outboundorder.FieldManageMode, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := _u.mutation.SnMode(); ok {
|
||||
_spec.SetField(outboundorder.FieldSnMode, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := _u.mutation.AddedSnMode(); ok {
|
||||
_spec.AddField(outboundorder.FieldSnMode, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := _u.mutation.BatchNo(); ok {
|
||||
_spec.SetField(outboundorder.FieldBatchNo, field.TypeString, value)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user