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