refactor: 重构产线工位与备料流程,移除冗余字段
1. 移除工单、工件、日排产中的冗余工位组合/接驳台字段 2. 新增工位接驳台编码字段与唯一约束,关联WMS接驳台主数据 3. 重构日排产为工位产量分配模式,替代原接驳台列表 4. 新增备料单工位级字段与分批出库支持 5. 移除定时同步可生产数量,改为WMS实时拉取接口 6. 过滤操作日志,排除登录/退出相关日志 7. 调整仪表盘工序展示逻辑为今日派工路线 8. 新增接驳台维护菜单与基础数据
This commit is contained in:
@@ -146,6 +146,20 @@ func (_u *StationUpdate) SetNillableHasDock(v *bool) *StationUpdate {
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetDockCode sets the "dockCode" field.
|
||||
func (_u *StationUpdate) SetDockCode(v string) *StationUpdate {
|
||||
_u.mutation.SetDockCode(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetNillableDockCode sets the "dockCode" field if the given value is not nil.
|
||||
func (_u *StationUpdate) SetNillableDockCode(v *string) *StationUpdate {
|
||||
if v != nil {
|
||||
_u.SetDockCode(*v)
|
||||
}
|
||||
return _u
|
||||
}
|
||||
|
||||
// Mutation returns the StationMutation object of the builder.
|
||||
func (_u *StationUpdate) Mutation() *StationMutation {
|
||||
return _u.mutation
|
||||
@@ -195,6 +209,11 @@ func (_u *StationUpdate) check() error {
|
||||
return &ValidationError{Name: "status", err: fmt.Errorf(`ent: validator failed for field "Station.status": %w`, err)}
|
||||
}
|
||||
}
|
||||
if v, ok := _u.mutation.DockCode(); ok {
|
||||
if err := station.DockCodeValidator(v); err != nil {
|
||||
return &ValidationError{Name: "dockCode", err: fmt.Errorf(`ent: validator failed for field "Station.dockCode": %w`, err)}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -246,6 +265,9 @@ func (_u *StationUpdate) sqlSave(ctx context.Context) (_node int, err error) {
|
||||
if value, ok := _u.mutation.HasDock(); ok {
|
||||
_spec.SetField(station.FieldHasDock, field.TypeBool, value)
|
||||
}
|
||||
if value, ok := _u.mutation.DockCode(); ok {
|
||||
_spec.SetField(station.FieldDockCode, field.TypeString, value)
|
||||
}
|
||||
_spec.AddModifiers(_u.modifiers...)
|
||||
if _node, err = sqlgraph.UpdateNodes(ctx, _u.driver, _spec); err != nil {
|
||||
if _, ok := err.(*sqlgraph.NotFoundError); ok {
|
||||
@@ -386,6 +408,20 @@ func (_u *StationUpdateOne) SetNillableHasDock(v *bool) *StationUpdateOne {
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetDockCode sets the "dockCode" field.
|
||||
func (_u *StationUpdateOne) SetDockCode(v string) *StationUpdateOne {
|
||||
_u.mutation.SetDockCode(v)
|
||||
return _u
|
||||
}
|
||||
|
||||
// SetNillableDockCode sets the "dockCode" field if the given value is not nil.
|
||||
func (_u *StationUpdateOne) SetNillableDockCode(v *string) *StationUpdateOne {
|
||||
if v != nil {
|
||||
_u.SetDockCode(*v)
|
||||
}
|
||||
return _u
|
||||
}
|
||||
|
||||
// Mutation returns the StationMutation object of the builder.
|
||||
func (_u *StationUpdateOne) Mutation() *StationMutation {
|
||||
return _u.mutation
|
||||
@@ -448,6 +484,11 @@ func (_u *StationUpdateOne) check() error {
|
||||
return &ValidationError{Name: "status", err: fmt.Errorf(`ent: validator failed for field "Station.status": %w`, err)}
|
||||
}
|
||||
}
|
||||
if v, ok := _u.mutation.DockCode(); ok {
|
||||
if err := station.DockCodeValidator(v); err != nil {
|
||||
return &ValidationError{Name: "dockCode", err: fmt.Errorf(`ent: validator failed for field "Station.dockCode": %w`, err)}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -516,6 +557,9 @@ func (_u *StationUpdateOne) sqlSave(ctx context.Context) (_node *Station, err er
|
||||
if value, ok := _u.mutation.HasDock(); ok {
|
||||
_spec.SetField(station.FieldHasDock, field.TypeBool, value)
|
||||
}
|
||||
if value, ok := _u.mutation.DockCode(); ok {
|
||||
_spec.SetField(station.FieldDockCode, field.TypeString, value)
|
||||
}
|
||||
_spec.AddModifiers(_u.modifiers...)
|
||||
_node = &Station{config: _u.config}
|
||||
_spec.Assign = _node.assignValues
|
||||
|
||||
Reference in New Issue
Block a user