feat: 完成多模块迭代更新
- 新增过程巡检按步骤上报、数量不符上报、工位退料功能 - 增加工单工程编号三级归属字段 - 新增物料安全库存与缺货预警 - 新增附件管理、退库单管理模块 - 优化生产看板展示逻辑与前端页面文案 - 清理冗余的工艺路线相关代码与备份文件
This commit is contained in:
@@ -18,8 +18,9 @@ import (
|
||||
// WorkpieceUpdate is the builder for updating Workpiece entities.
|
||||
type WorkpieceUpdate struct {
|
||||
config
|
||||
hooks []Hook
|
||||
mutation *WorkpieceMutation
|
||||
hooks []Hook
|
||||
mutation *WorkpieceMutation
|
||||
modifiers []func(*sql.UpdateBuilder)
|
||||
}
|
||||
|
||||
// Where appends a list predicates to the WorkpieceUpdate builder.
|
||||
@@ -256,6 +257,12 @@ func (_u *WorkpieceUpdate) check() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
|
||||
func (_u *WorkpieceUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *WorkpieceUpdate {
|
||||
_u.modifiers = append(_u.modifiers, modifiers...)
|
||||
return _u
|
||||
}
|
||||
|
||||
func (_u *WorkpieceUpdate) sqlSave(ctx context.Context) (_node int, err error) {
|
||||
if err := _u.check(); err != nil {
|
||||
return _node, err
|
||||
@@ -316,6 +323,7 @@ func (_u *WorkpieceUpdate) sqlSave(ctx context.Context) (_node int, err error) {
|
||||
if _u.mutation.UpdatedAtCleared() {
|
||||
_spec.ClearField(workpiece.FieldUpdatedAt, field.TypeTime)
|
||||
}
|
||||
_spec.AddModifiers(_u.modifiers...)
|
||||
if _node, err = sqlgraph.UpdateNodes(ctx, _u.driver, _spec); err != nil {
|
||||
if _, ok := err.(*sqlgraph.NotFoundError); ok {
|
||||
err = &NotFoundError{workpiece.Label}
|
||||
@@ -331,9 +339,10 @@ func (_u *WorkpieceUpdate) sqlSave(ctx context.Context) (_node int, err error) {
|
||||
// WorkpieceUpdateOne is the builder for updating a single Workpiece entity.
|
||||
type WorkpieceUpdateOne struct {
|
||||
config
|
||||
fields []string
|
||||
hooks []Hook
|
||||
mutation *WorkpieceMutation
|
||||
fields []string
|
||||
hooks []Hook
|
||||
mutation *WorkpieceMutation
|
||||
modifiers []func(*sql.UpdateBuilder)
|
||||
}
|
||||
|
||||
// SetSn sets the "sn" field.
|
||||
@@ -577,6 +586,12 @@ func (_u *WorkpieceUpdateOne) check() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
|
||||
func (_u *WorkpieceUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *WorkpieceUpdateOne {
|
||||
_u.modifiers = append(_u.modifiers, modifiers...)
|
||||
return _u
|
||||
}
|
||||
|
||||
func (_u *WorkpieceUpdateOne) sqlSave(ctx context.Context) (_node *Workpiece, err error) {
|
||||
if err := _u.check(); err != nil {
|
||||
return _node, err
|
||||
@@ -654,6 +669,7 @@ func (_u *WorkpieceUpdateOne) sqlSave(ctx context.Context) (_node *Workpiece, er
|
||||
if _u.mutation.UpdatedAtCleared() {
|
||||
_spec.ClearField(workpiece.FieldUpdatedAt, field.TypeTime)
|
||||
}
|
||||
_spec.AddModifiers(_u.modifiers...)
|
||||
_node = &Workpiece{config: _u.config}
|
||||
_spec.Assign = _node.assignValues
|
||||
_spec.ScanValues = _node.scanValues
|
||||
|
||||
Reference in New Issue
Block a user