feat: 两库对等物料管理及产品工号贯通全流程
- 新增 MES 本地物料表及双向同步接口,WMS 物料变更自动同步 - 全流程新增产品工号字段,贯通入库/库存/出库/检验环节 - 工单管理支持多工单混产,移除单工单互斥限制 - 新增批次号/SN 字段支持质量检验联动 WMS 库存处置 - 修复权限规则,仅内置管理员账号不允许修改删除 - 工位终端新增 SN 扫码自动切换所属工单功能
This commit is contained in:
@@ -367,6 +367,26 @@ func (_u *InventoryUpdate) SetNillableOrderNo(v *string) *InventoryUpdate {
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetProductWorkNo sets the "product_work_no" field.
|
||||
func (_u *InventoryUpdate) SetProductWorkNo(v string) *InventoryUpdate {
|
||||
_u.mutation.SetProductWorkNo(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetNillableProductWorkNo sets the "product_work_no" field if the given value is not nil.
|
||||
func (_u *InventoryUpdate) SetNillableProductWorkNo(v *string) *InventoryUpdate {
|
||||
if v != nil {
|
||||
_u.SetProductWorkNo(*v)
|
||||
}
|
||||
return _u
|
||||
}
|
||||
|
||||
// ClearProductWorkNo clears the value of the "product_work_no" field.
|
||||
func (_u *InventoryUpdate) ClearProductWorkNo() *InventoryUpdate {
|
||||
_u.mutation.ClearProductWorkNo()
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetCompletedProcess sets the "completed_process" field.
|
||||
func (_u *InventoryUpdate) SetCompletedProcess(v string) *InventoryUpdate {
|
||||
_u.mutation.SetCompletedProcess(v)
|
||||
@@ -784,6 +804,12 @@ func (_u *InventoryUpdate) sqlSave(ctx context.Context) (_node int, err error) {
|
||||
if value, ok := _u.mutation.OrderNo(); ok {
|
||||
_spec.SetField(inventory.FieldOrderNo, field.TypeString, value)
|
||||
}
|
||||
if value, ok := _u.mutation.ProductWorkNo(); ok {
|
||||
_spec.SetField(inventory.FieldProductWorkNo, field.TypeString, value)
|
||||
}
|
||||
if _u.mutation.ProductWorkNoCleared() {
|
||||
_spec.ClearField(inventory.FieldProductWorkNo, field.TypeString)
|
||||
}
|
||||
if value, ok := _u.mutation.CompletedProcess(); ok {
|
||||
_spec.SetField(inventory.FieldCompletedProcess, field.TypeString, value)
|
||||
}
|
||||
@@ -1219,6 +1245,26 @@ func (_u *InventoryUpdateOne) SetNillableOrderNo(v *string) *InventoryUpdateOne
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetProductWorkNo sets the "product_work_no" field.
|
||||
func (_u *InventoryUpdateOne) SetProductWorkNo(v string) *InventoryUpdateOne {
|
||||
_u.mutation.SetProductWorkNo(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetNillableProductWorkNo sets the "product_work_no" field if the given value is not nil.
|
||||
func (_u *InventoryUpdateOne) SetNillableProductWorkNo(v *string) *InventoryUpdateOne {
|
||||
if v != nil {
|
||||
_u.SetProductWorkNo(*v)
|
||||
}
|
||||
return _u
|
||||
}
|
||||
|
||||
// ClearProductWorkNo clears the value of the "product_work_no" field.
|
||||
func (_u *InventoryUpdateOne) ClearProductWorkNo() *InventoryUpdateOne {
|
||||
_u.mutation.ClearProductWorkNo()
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetCompletedProcess sets the "completed_process" field.
|
||||
func (_u *InventoryUpdateOne) SetCompletedProcess(v string) *InventoryUpdateOne {
|
||||
_u.mutation.SetCompletedProcess(v)
|
||||
@@ -1666,6 +1712,12 @@ func (_u *InventoryUpdateOne) sqlSave(ctx context.Context) (_node *Inventory, er
|
||||
if value, ok := _u.mutation.OrderNo(); ok {
|
||||
_spec.SetField(inventory.FieldOrderNo, field.TypeString, value)
|
||||
}
|
||||
if value, ok := _u.mutation.ProductWorkNo(); ok {
|
||||
_spec.SetField(inventory.FieldProductWorkNo, field.TypeString, value)
|
||||
}
|
||||
if _u.mutation.ProductWorkNoCleared() {
|
||||
_spec.ClearField(inventory.FieldProductWorkNo, field.TypeString)
|
||||
}
|
||||
if value, ok := _u.mutation.CompletedProcess(); ok {
|
||||
_spec.SetField(inventory.FieldCompletedProcess, field.TypeString, value)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user