feat: 完成客户第12条需求+多系统改造
1. 新增预警表添加工单号字段,支持按工单号检索预警 2. 添加工单过滤在制品/绩效报表/预警中心查询 3. 补全WMS台账字段口径与权限配置 4. 修复备料单与数量不符处理流程 5. 新增配送进度/库位联动/自动出库功能 6. 修复AGV配送状态更新逻辑 7. 优化退料与库存管理细节
This commit is contained in:
@@ -119,6 +119,20 @@ func (_u *AlertUpdate) SetNillableRefId(v *string) *AlertUpdate {
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetOrderNo sets the "orderNo" field.
|
||||
func (_u *AlertUpdate) SetOrderNo(v string) *AlertUpdate {
|
||||
_u.mutation.SetOrderNo(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetNillableOrderNo sets the "orderNo" field if the given value is not nil.
|
||||
func (_u *AlertUpdate) SetNillableOrderNo(v *string) *AlertUpdate {
|
||||
if v != nil {
|
||||
_u.SetOrderNo(*v)
|
||||
}
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetStatus sets the "status" field.
|
||||
func (_u *AlertUpdate) SetStatus(v string) *AlertUpdate {
|
||||
_u.mutation.SetStatus(v)
|
||||
@@ -206,6 +220,11 @@ func (_u *AlertUpdate) check() error {
|
||||
return &ValidationError{Name: "refId", err: fmt.Errorf(`ent: validator failed for field "Alert.refId": %w`, err)}
|
||||
}
|
||||
}
|
||||
if v, ok := _u.mutation.OrderNo(); ok {
|
||||
if err := alert.OrderNoValidator(v); err != nil {
|
||||
return &ValidationError{Name: "orderNo", err: fmt.Errorf(`ent: validator failed for field "Alert.orderNo": %w`, err)}
|
||||
}
|
||||
}
|
||||
if v, ok := _u.mutation.Status(); ok {
|
||||
if err := alert.StatusValidator(v); err != nil {
|
||||
return &ValidationError{Name: "status", err: fmt.Errorf(`ent: validator failed for field "Alert.status": %w`, err)}
|
||||
@@ -258,6 +277,9 @@ func (_u *AlertUpdate) sqlSave(ctx context.Context) (_node int, err error) {
|
||||
if value, ok := _u.mutation.RefId(); ok {
|
||||
_spec.SetField(alert.FieldRefId, field.TypeString, value)
|
||||
}
|
||||
if value, ok := _u.mutation.OrderNo(); ok {
|
||||
_spec.SetField(alert.FieldOrderNo, field.TypeString, value)
|
||||
}
|
||||
if value, ok := _u.mutation.Status(); ok {
|
||||
_spec.SetField(alert.FieldStatus, field.TypeString, value)
|
||||
}
|
||||
@@ -377,6 +399,20 @@ func (_u *AlertUpdateOne) SetNillableRefId(v *string) *AlertUpdateOne {
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetOrderNo sets the "orderNo" field.
|
||||
func (_u *AlertUpdateOne) SetOrderNo(v string) *AlertUpdateOne {
|
||||
_u.mutation.SetOrderNo(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetNillableOrderNo sets the "orderNo" field if the given value is not nil.
|
||||
func (_u *AlertUpdateOne) SetNillableOrderNo(v *string) *AlertUpdateOne {
|
||||
if v != nil {
|
||||
_u.SetOrderNo(*v)
|
||||
}
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetStatus sets the "status" field.
|
||||
func (_u *AlertUpdateOne) SetStatus(v string) *AlertUpdateOne {
|
||||
_u.mutation.SetStatus(v)
|
||||
@@ -477,6 +513,11 @@ func (_u *AlertUpdateOne) check() error {
|
||||
return &ValidationError{Name: "refId", err: fmt.Errorf(`ent: validator failed for field "Alert.refId": %w`, err)}
|
||||
}
|
||||
}
|
||||
if v, ok := _u.mutation.OrderNo(); ok {
|
||||
if err := alert.OrderNoValidator(v); err != nil {
|
||||
return &ValidationError{Name: "orderNo", err: fmt.Errorf(`ent: validator failed for field "Alert.orderNo": %w`, err)}
|
||||
}
|
||||
}
|
||||
if v, ok := _u.mutation.Status(); ok {
|
||||
if err := alert.StatusValidator(v); err != nil {
|
||||
return &ValidationError{Name: "status", err: fmt.Errorf(`ent: validator failed for field "Alert.status": %w`, err)}
|
||||
@@ -546,6 +587,9 @@ func (_u *AlertUpdateOne) sqlSave(ctx context.Context) (_node *Alert, err error)
|
||||
if value, ok := _u.mutation.RefId(); ok {
|
||||
_spec.SetField(alert.FieldRefId, field.TypeString, value)
|
||||
}
|
||||
if value, ok := _u.mutation.OrderNo(); ok {
|
||||
_spec.SetField(alert.FieldOrderNo, field.TypeString, value)
|
||||
}
|
||||
if value, ok := _u.mutation.Status(); ok {
|
||||
_spec.SetField(alert.FieldStatus, field.TypeString, value)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user