chore: 批量完成项目多模块迭代优化
1. 废弃半成品库存表并统一库存主表 2. 修复列表排序与搜索大小写不敏感问题 3. 新增用户最近登录时间、工单BOM名称字段 4. 完善角色管理、工位选择器功能 5. 增加拧紧数据补录、成品自动回流WMS能力 6. 统一导出时间范围校验规则 7. 丰富物料/备料单筛选条件 8. 调整菜单与权限命名适配产品型号业务
This commit is contained in:
@@ -135,6 +135,27 @@ func (_u *MaterialUpdate) ClearDescription() *MaterialUpdate {
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetItemType sets the "item_type" field.
|
||||
func (_u *MaterialUpdate) SetItemType(v int) *MaterialUpdate {
|
||||
_u.mutation.ResetItemType()
|
||||
_u.mutation.SetItemType(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetNillableItemType sets the "item_type" field if the given value is not nil.
|
||||
func (_u *MaterialUpdate) SetNillableItemType(v *int) *MaterialUpdate {
|
||||
if v != nil {
|
||||
_u.SetItemType(*v)
|
||||
}
|
||||
return _u
|
||||
}
|
||||
|
||||
// AddItemType adds value to the "item_type" field.
|
||||
func (_u *MaterialUpdate) AddItemType(v int) *MaterialUpdate {
|
||||
_u.mutation.AddItemType(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetManageMode sets the "manage_mode" field.
|
||||
func (_u *MaterialUpdate) SetManageMode(v int) *MaterialUpdate {
|
||||
_u.mutation.ResetManageMode()
|
||||
@@ -204,6 +225,20 @@ func (_u *MaterialUpdate) ClearTemplateCode() *MaterialUpdate {
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetIsActive sets the "is_active" field.
|
||||
func (_u *MaterialUpdate) SetIsActive(v bool) *MaterialUpdate {
|
||||
_u.mutation.SetIsActive(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetNillableIsActive sets the "is_active" field if the given value is not nil.
|
||||
func (_u *MaterialUpdate) SetNillableIsActive(v *bool) *MaterialUpdate {
|
||||
if v != nil {
|
||||
_u.SetIsActive(*v)
|
||||
}
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetCreatedAt sets the "created_at" field.
|
||||
func (_u *MaterialUpdate) SetCreatedAt(v int64) *MaterialUpdate {
|
||||
_u.mutation.ResetCreatedAt()
|
||||
@@ -317,6 +352,12 @@ func (_u *MaterialUpdate) sqlSave(ctx context.Context) (_node int, err error) {
|
||||
if _u.mutation.DescriptionCleared() {
|
||||
_spec.ClearField(material.FieldDescription, field.TypeString)
|
||||
}
|
||||
if value, ok := _u.mutation.ItemType(); ok {
|
||||
_spec.SetField(material.FieldItemType, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := _u.mutation.AddedItemType(); ok {
|
||||
_spec.AddField(material.FieldItemType, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := _u.mutation.ManageMode(); ok {
|
||||
_spec.SetField(material.FieldManageMode, field.TypeInt, value)
|
||||
}
|
||||
@@ -335,6 +376,9 @@ func (_u *MaterialUpdate) sqlSave(ctx context.Context) (_node int, err error) {
|
||||
if _u.mutation.TemplateCodeCleared() {
|
||||
_spec.ClearField(material.FieldTemplateCode, field.TypeString)
|
||||
}
|
||||
if value, ok := _u.mutation.IsActive(); ok {
|
||||
_spec.SetField(material.FieldIsActive, field.TypeBool, value)
|
||||
}
|
||||
if value, ok := _u.mutation.CreatedAt(); ok {
|
||||
_spec.SetField(material.FieldCreatedAt, field.TypeInt64, value)
|
||||
}
|
||||
@@ -475,6 +519,27 @@ func (_u *MaterialUpdateOne) ClearDescription() *MaterialUpdateOne {
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetItemType sets the "item_type" field.
|
||||
func (_u *MaterialUpdateOne) SetItemType(v int) *MaterialUpdateOne {
|
||||
_u.mutation.ResetItemType()
|
||||
_u.mutation.SetItemType(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetNillableItemType sets the "item_type" field if the given value is not nil.
|
||||
func (_u *MaterialUpdateOne) SetNillableItemType(v *int) *MaterialUpdateOne {
|
||||
if v != nil {
|
||||
_u.SetItemType(*v)
|
||||
}
|
||||
return _u
|
||||
}
|
||||
|
||||
// AddItemType adds value to the "item_type" field.
|
||||
func (_u *MaterialUpdateOne) AddItemType(v int) *MaterialUpdateOne {
|
||||
_u.mutation.AddItemType(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetManageMode sets the "manage_mode" field.
|
||||
func (_u *MaterialUpdateOne) SetManageMode(v int) *MaterialUpdateOne {
|
||||
_u.mutation.ResetManageMode()
|
||||
@@ -544,6 +609,20 @@ func (_u *MaterialUpdateOne) ClearTemplateCode() *MaterialUpdateOne {
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetIsActive sets the "is_active" field.
|
||||
func (_u *MaterialUpdateOne) SetIsActive(v bool) *MaterialUpdateOne {
|
||||
_u.mutation.SetIsActive(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetNillableIsActive sets the "is_active" field if the given value is not nil.
|
||||
func (_u *MaterialUpdateOne) SetNillableIsActive(v *bool) *MaterialUpdateOne {
|
||||
if v != nil {
|
||||
_u.SetIsActive(*v)
|
||||
}
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetCreatedAt sets the "created_at" field.
|
||||
func (_u *MaterialUpdateOne) SetCreatedAt(v int64) *MaterialUpdateOne {
|
||||
_u.mutation.ResetCreatedAt()
|
||||
@@ -687,6 +766,12 @@ func (_u *MaterialUpdateOne) sqlSave(ctx context.Context) (_node *Material, err
|
||||
if _u.mutation.DescriptionCleared() {
|
||||
_spec.ClearField(material.FieldDescription, field.TypeString)
|
||||
}
|
||||
if value, ok := _u.mutation.ItemType(); ok {
|
||||
_spec.SetField(material.FieldItemType, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := _u.mutation.AddedItemType(); ok {
|
||||
_spec.AddField(material.FieldItemType, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := _u.mutation.ManageMode(); ok {
|
||||
_spec.SetField(material.FieldManageMode, field.TypeInt, value)
|
||||
}
|
||||
@@ -705,6 +790,9 @@ func (_u *MaterialUpdateOne) sqlSave(ctx context.Context) (_node *Material, err
|
||||
if _u.mutation.TemplateCodeCleared() {
|
||||
_spec.ClearField(material.FieldTemplateCode, field.TypeString)
|
||||
}
|
||||
if value, ok := _u.mutation.IsActive(); ok {
|
||||
_spec.SetField(material.FieldIsActive, field.TypeBool, value)
|
||||
}
|
||||
if value, ok := _u.mutation.CreatedAt(); ok {
|
||||
_spec.SetField(material.FieldCreatedAt, field.TypeInt64, value)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user