feat: 完成多模块迭代更新
- 新增过程巡检按步骤上报、数量不符上报、工位退料功能 - 增加工单工程编号三级归属字段 - 新增物料安全库存与缺货预警 - 新增附件管理、退库单管理模块 - 优化生产看板展示逻辑与前端页面文案 - 清理冗余的工艺路线相关代码与备份文件
This commit is contained in:
@@ -18,8 +18,9 @@ import (
|
||||
// MaterialRequestUpdate is the builder for updating MaterialRequest entities.
|
||||
type MaterialRequestUpdate struct {
|
||||
config
|
||||
hooks []Hook
|
||||
mutation *MaterialRequestMutation
|
||||
hooks []Hook
|
||||
mutation *MaterialRequestMutation
|
||||
modifiers []func(*sql.UpdateBuilder)
|
||||
}
|
||||
|
||||
// Where appends a list predicates to the MaterialRequestUpdate builder.
|
||||
@@ -297,6 +298,12 @@ func (_u *MaterialRequestUpdate) check() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
|
||||
func (_u *MaterialRequestUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *MaterialRequestUpdate {
|
||||
_u.modifiers = append(_u.modifiers, modifiers...)
|
||||
return _u
|
||||
}
|
||||
|
||||
func (_u *MaterialRequestUpdate) sqlSave(ctx context.Context) (_node int, err error) {
|
||||
if err := _u.check(); err != nil {
|
||||
return _node, err
|
||||
@@ -351,6 +358,7 @@ func (_u *MaterialRequestUpdate) sqlSave(ctx context.Context) (_node int, err er
|
||||
if _u.mutation.UpdatedAtCleared() {
|
||||
_spec.ClearField(materialrequest.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{materialrequest.Label}
|
||||
@@ -366,9 +374,10 @@ func (_u *MaterialRequestUpdate) sqlSave(ctx context.Context) (_node int, err er
|
||||
// MaterialRequestUpdateOne is the builder for updating a single MaterialRequest entity.
|
||||
type MaterialRequestUpdateOne struct {
|
||||
config
|
||||
fields []string
|
||||
hooks []Hook
|
||||
mutation *MaterialRequestMutation
|
||||
fields []string
|
||||
hooks []Hook
|
||||
mutation *MaterialRequestMutation
|
||||
modifiers []func(*sql.UpdateBuilder)
|
||||
}
|
||||
|
||||
// SetRequestNo sets the "requestNo" field.
|
||||
@@ -653,6 +662,12 @@ func (_u *MaterialRequestUpdateOne) check() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
|
||||
func (_u *MaterialRequestUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *MaterialRequestUpdateOne {
|
||||
_u.modifiers = append(_u.modifiers, modifiers...)
|
||||
return _u
|
||||
}
|
||||
|
||||
func (_u *MaterialRequestUpdateOne) sqlSave(ctx context.Context) (_node *MaterialRequest, err error) {
|
||||
if err := _u.check(); err != nil {
|
||||
return _node, err
|
||||
@@ -724,6 +739,7 @@ func (_u *MaterialRequestUpdateOne) sqlSave(ctx context.Context) (_node *Materia
|
||||
if _u.mutation.UpdatedAtCleared() {
|
||||
_spec.ClearField(materialrequest.FieldUpdatedAt, field.TypeTime)
|
||||
}
|
||||
_spec.AddModifiers(_u.modifiers...)
|
||||
_node = &MaterialRequest{config: _u.config}
|
||||
_spec.Assign = _node.assignValues
|
||||
_spec.ScanValues = _node.scanValues
|
||||
|
||||
Reference in New Issue
Block a user