feat: 完成客户第12条需求+多系统改造
1. 新增预警表添加工单号字段,支持按工单号检索预警 2. 添加工单过滤在制品/绩效报表/预警中心查询 3. 补全WMS台账字段口径与权限配置 4. 修复备料单与数量不符处理流程 5. 新增配送进度/库位联动/自动出库功能 6. 修复AGV配送状态更新逻辑 7. 优化退料与库存管理细节
This commit is contained in:
@@ -88,6 +88,20 @@ func (_c *AlertCreate) SetNillableRefId(v *string) *AlertCreate {
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetOrderNo sets the "orderNo" field.
|
||||
func (_c *AlertCreate) SetOrderNo(v string) *AlertCreate {
|
||||
_c.mutation.SetOrderNo(v)
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetNillableOrderNo sets the "orderNo" field if the given value is not nil.
|
||||
func (_c *AlertCreate) SetNillableOrderNo(v *string) *AlertCreate {
|
||||
if v != nil {
|
||||
_c.SetOrderNo(*v)
|
||||
}
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetStatus sets the "status" field.
|
||||
func (_c *AlertCreate) SetStatus(v string) *AlertCreate {
|
||||
_c.mutation.SetStatus(v)
|
||||
@@ -187,6 +201,10 @@ func (_c *AlertCreate) defaults() {
|
||||
v := alert.DefaultRefId
|
||||
_c.mutation.SetRefId(v)
|
||||
}
|
||||
if _, ok := _c.mutation.OrderNo(); !ok {
|
||||
v := alert.DefaultOrderNo
|
||||
_c.mutation.SetOrderNo(v)
|
||||
}
|
||||
if _, ok := _c.mutation.Status(); !ok {
|
||||
v := alert.DefaultStatus
|
||||
_c.mutation.SetStatus(v)
|
||||
@@ -246,6 +264,14 @@ func (_c *AlertCreate) check() error {
|
||||
return &ValidationError{Name: "refId", err: fmt.Errorf(`ent: validator failed for field "Alert.refId": %w`, err)}
|
||||
}
|
||||
}
|
||||
if _, ok := _c.mutation.OrderNo(); !ok {
|
||||
return &ValidationError{Name: "orderNo", err: errors.New(`ent: missing required field "Alert.orderNo"`)}
|
||||
}
|
||||
if v, ok := _c.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 _, ok := _c.mutation.Status(); !ok {
|
||||
return &ValidationError{Name: "status", err: errors.New(`ent: missing required field "Alert.status"`)}
|
||||
}
|
||||
@@ -326,6 +352,10 @@ func (_c *AlertCreate) createSpec() (*Alert, *sqlgraph.CreateSpec) {
|
||||
_spec.SetField(alert.FieldRefId, field.TypeString, value)
|
||||
_node.RefId = value
|
||||
}
|
||||
if value, ok := _c.mutation.OrderNo(); ok {
|
||||
_spec.SetField(alert.FieldOrderNo, field.TypeString, value)
|
||||
_node.OrderNo = value
|
||||
}
|
||||
if value, ok := _c.mutation.Status(); ok {
|
||||
_spec.SetField(alert.FieldStatus, field.TypeString, value)
|
||||
_node.Status = value
|
||||
|
||||
Reference in New Issue
Block a user