chore: 批量完成项目多模块迭代优化
1. 废弃半成品库存表并统一库存主表 2. 修复列表排序与搜索大小写不敏感问题 3. 新增用户最近登录时间、工单BOM名称字段 4. 完善角色管理、工位选择器功能 5. 增加拧紧数据补录、成品自动回流WMS能力 6. 统一导出时间范围校验规则 7. 丰富物料/备料单筛选条件 8. 调整菜单与权限命名适配产品型号业务
This commit is contained in:
@@ -43,6 +43,20 @@ func (_u *BomItemUpdate) SetNillableProductCode(v *string) *BomItemUpdate {
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetBomName sets the "bomName" field.
|
||||
func (_u *BomItemUpdate) SetBomName(v string) *BomItemUpdate {
|
||||
_u.mutation.SetBomName(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetNillableBomName sets the "bomName" field if the given value is not nil.
|
||||
func (_u *BomItemUpdate) SetNillableBomName(v *string) *BomItemUpdate {
|
||||
if v != nil {
|
||||
_u.SetBomName(*v)
|
||||
}
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetMaterialCode sets the "materialCode" field.
|
||||
func (_u *BomItemUpdate) SetMaterialCode(v string) *BomItemUpdate {
|
||||
_u.mutation.SetMaterialCode(v)
|
||||
@@ -254,6 +268,11 @@ func (_u *BomItemUpdate) check() error {
|
||||
return &ValidationError{Name: "productCode", err: fmt.Errorf(`ent: validator failed for field "BomItem.productCode": %w`, err)}
|
||||
}
|
||||
}
|
||||
if v, ok := _u.mutation.BomName(); ok {
|
||||
if err := bomitem.BomNameValidator(v); err != nil {
|
||||
return &ValidationError{Name: "bomName", err: fmt.Errorf(`ent: validator failed for field "BomItem.bomName": %w`, err)}
|
||||
}
|
||||
}
|
||||
if v, ok := _u.mutation.MaterialCode(); ok {
|
||||
if err := bomitem.MaterialCodeValidator(v); err != nil {
|
||||
return &ValidationError{Name: "materialCode", err: fmt.Errorf(`ent: validator failed for field "BomItem.materialCode": %w`, err)}
|
||||
@@ -303,6 +322,9 @@ func (_u *BomItemUpdate) sqlSave(ctx context.Context) (_node int, err error) {
|
||||
if value, ok := _u.mutation.ProductCode(); ok {
|
||||
_spec.SetField(bomitem.FieldProductCode, field.TypeString, value)
|
||||
}
|
||||
if value, ok := _u.mutation.BomName(); ok {
|
||||
_spec.SetField(bomitem.FieldBomName, field.TypeString, value)
|
||||
}
|
||||
if value, ok := _u.mutation.MaterialCode(); ok {
|
||||
_spec.SetField(bomitem.FieldMaterialCode, field.TypeString, value)
|
||||
}
|
||||
@@ -389,6 +411,20 @@ func (_u *BomItemUpdateOne) SetNillableProductCode(v *string) *BomItemUpdateOne
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetBomName sets the "bomName" field.
|
||||
func (_u *BomItemUpdateOne) SetBomName(v string) *BomItemUpdateOne {
|
||||
_u.mutation.SetBomName(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetNillableBomName sets the "bomName" field if the given value is not nil.
|
||||
func (_u *BomItemUpdateOne) SetNillableBomName(v *string) *BomItemUpdateOne {
|
||||
if v != nil {
|
||||
_u.SetBomName(*v)
|
||||
}
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetMaterialCode sets the "materialCode" field.
|
||||
func (_u *BomItemUpdateOne) SetMaterialCode(v string) *BomItemUpdateOne {
|
||||
_u.mutation.SetMaterialCode(v)
|
||||
@@ -613,6 +649,11 @@ func (_u *BomItemUpdateOne) check() error {
|
||||
return &ValidationError{Name: "productCode", err: fmt.Errorf(`ent: validator failed for field "BomItem.productCode": %w`, err)}
|
||||
}
|
||||
}
|
||||
if v, ok := _u.mutation.BomName(); ok {
|
||||
if err := bomitem.BomNameValidator(v); err != nil {
|
||||
return &ValidationError{Name: "bomName", err: fmt.Errorf(`ent: validator failed for field "BomItem.bomName": %w`, err)}
|
||||
}
|
||||
}
|
||||
if v, ok := _u.mutation.MaterialCode(); ok {
|
||||
if err := bomitem.MaterialCodeValidator(v); err != nil {
|
||||
return &ValidationError{Name: "materialCode", err: fmt.Errorf(`ent: validator failed for field "BomItem.materialCode": %w`, err)}
|
||||
@@ -679,6 +720,9 @@ func (_u *BomItemUpdateOne) sqlSave(ctx context.Context) (_node *BomItem, err er
|
||||
if value, ok := _u.mutation.ProductCode(); ok {
|
||||
_spec.SetField(bomitem.FieldProductCode, field.TypeString, value)
|
||||
}
|
||||
if value, ok := _u.mutation.BomName(); ok {
|
||||
_spec.SetField(bomitem.FieldBomName, field.TypeString, value)
|
||||
}
|
||||
if value, ok := _u.mutation.MaterialCode(); ok {
|
||||
_spec.SetField(bomitem.FieldMaterialCode, field.TypeString, value)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user