feat: 两库对等物料管理及产品工号贯通全流程
- 新增 MES 本地物料表及双向同步接口,WMS 物料变更自动同步 - 全流程新增产品工号字段,贯通入库/库存/出库/检验环节 - 工单管理支持多工单混产,移除单工单互斥限制 - 新增批次号/SN 字段支持质量检验联动 WMS 库存处置 - 修复权限规则,仅内置管理员账号不允许修改删除 - 工位终端新增 SN 扫码自动切换所属工单功能
This commit is contained in:
@@ -257,6 +257,20 @@ func (_c *InventoryCreate) SetNillableOrderNo(v *string) *InventoryCreate {
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetProductWorkNo sets the "product_work_no" field.
|
||||
func (_c *InventoryCreate) SetProductWorkNo(v string) *InventoryCreate {
|
||||
_c.mutation.SetProductWorkNo(v)
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetNillableProductWorkNo sets the "product_work_no" field if the given value is not nil.
|
||||
func (_c *InventoryCreate) SetNillableProductWorkNo(v *string) *InventoryCreate {
|
||||
if v != nil {
|
||||
_c.SetProductWorkNo(*v)
|
||||
}
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetCompletedProcess sets the "completed_process" field.
|
||||
func (_c *InventoryCreate) SetCompletedProcess(v string) *InventoryCreate {
|
||||
_c.mutation.SetCompletedProcess(v)
|
||||
@@ -668,6 +682,10 @@ func (_c *InventoryCreate) createSpec() (*Inventory, *sqlgraph.CreateSpec) {
|
||||
_spec.SetField(inventory.FieldOrderNo, field.TypeString, value)
|
||||
_node.OrderNo = value
|
||||
}
|
||||
if value, ok := _c.mutation.ProductWorkNo(); ok {
|
||||
_spec.SetField(inventory.FieldProductWorkNo, field.TypeString, value)
|
||||
_node.ProductWorkNo = value
|
||||
}
|
||||
if value, ok := _c.mutation.CompletedProcess(); ok {
|
||||
_spec.SetField(inventory.FieldCompletedProcess, field.TypeString, value)
|
||||
_node.CompletedProcess = value
|
||||
@@ -1072,6 +1090,24 @@ func (u *InventoryUpsert) UpdateOrderNo() *InventoryUpsert {
|
||||
return u
|
||||
}
|
||||
|
||||
// SetProductWorkNo sets the "product_work_no" field.
|
||||
func (u *InventoryUpsert) SetProductWorkNo(v string) *InventoryUpsert {
|
||||
u.Set(inventory.FieldProductWorkNo, v)
|
||||
return u
|
||||
}
|
||||
|
||||
// UpdateProductWorkNo sets the "product_work_no" field to the value that was provided on create.
|
||||
func (u *InventoryUpsert) UpdateProductWorkNo() *InventoryUpsert {
|
||||
u.SetExcluded(inventory.FieldProductWorkNo)
|
||||
return u
|
||||
}
|
||||
|
||||
// ClearProductWorkNo clears the value of the "product_work_no" field.
|
||||
func (u *InventoryUpsert) ClearProductWorkNo() *InventoryUpsert {
|
||||
u.SetNull(inventory.FieldProductWorkNo)
|
||||
return u
|
||||
}
|
||||
|
||||
// SetCompletedProcess sets the "completed_process" field.
|
||||
func (u *InventoryUpsert) SetCompletedProcess(v string) *InventoryUpsert {
|
||||
u.Set(inventory.FieldCompletedProcess, v)
|
||||
@@ -1690,6 +1726,27 @@ func (u *InventoryUpsertOne) UpdateOrderNo() *InventoryUpsertOne {
|
||||
})
|
||||
}
|
||||
|
||||
// SetProductWorkNo sets the "product_work_no" field.
|
||||
func (u *InventoryUpsertOne) SetProductWorkNo(v string) *InventoryUpsertOne {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.SetProductWorkNo(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateProductWorkNo sets the "product_work_no" field to the value that was provided on create.
|
||||
func (u *InventoryUpsertOne) UpdateProductWorkNo() *InventoryUpsertOne {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.UpdateProductWorkNo()
|
||||
})
|
||||
}
|
||||
|
||||
// ClearProductWorkNo clears the value of the "product_work_no" field.
|
||||
func (u *InventoryUpsertOne) ClearProductWorkNo() *InventoryUpsertOne {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.ClearProductWorkNo()
|
||||
})
|
||||
}
|
||||
|
||||
// SetCompletedProcess sets the "completed_process" field.
|
||||
func (u *InventoryUpsertOne) SetCompletedProcess(v string) *InventoryUpsertOne {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
@@ -2510,6 +2567,27 @@ func (u *InventoryUpsertBulk) UpdateOrderNo() *InventoryUpsertBulk {
|
||||
})
|
||||
}
|
||||
|
||||
// SetProductWorkNo sets the "product_work_no" field.
|
||||
func (u *InventoryUpsertBulk) SetProductWorkNo(v string) *InventoryUpsertBulk {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.SetProductWorkNo(v)
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateProductWorkNo sets the "product_work_no" field to the value that was provided on create.
|
||||
func (u *InventoryUpsertBulk) UpdateProductWorkNo() *InventoryUpsertBulk {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.UpdateProductWorkNo()
|
||||
})
|
||||
}
|
||||
|
||||
// ClearProductWorkNo clears the value of the "product_work_no" field.
|
||||
func (u *InventoryUpsertBulk) ClearProductWorkNo() *InventoryUpsertBulk {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
s.ClearProductWorkNo()
|
||||
})
|
||||
}
|
||||
|
||||
// SetCompletedProcess sets the "completed_process" field.
|
||||
func (u *InventoryUpsertBulk) SetCompletedProcess(v string) *InventoryUpsertBulk {
|
||||
return u.Update(func(s *InventoryUpsert) {
|
||||
|
||||
Reference in New Issue
Block a user