feat: 完成多模块迭代更新

- 新增过程巡检按步骤上报、数量不符上报、工位退料功能
- 增加工单工程编号三级归属字段
- 新增物料安全库存与缺货预警
- 新增附件管理、退库单管理模块
- 优化生产看板展示逻辑与前端页面文案
- 清理冗余的工艺路线相关代码与备份文件
This commit is contained in:
SunYF
2026-09-15 16:37:39 +08:00
parent 951f3dfecd
commit 4a5e2d7bac
494 changed files with 24702 additions and 139223 deletions
+21 -5
View File
@@ -17,8 +17,9 @@ import (
// StationUpdate is the builder for updating Station entities.
type StationUpdate struct {
config
hooks []Hook
mutation *StationMutation
hooks []Hook
mutation *StationMutation
modifiers []func(*sql.UpdateBuilder)
}
// Where appends a list predicates to the StationUpdate builder.
@@ -169,6 +170,12 @@ func (_u *StationUpdate) check() error {
return nil
}
// Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (_u *StationUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *StationUpdate {
_u.modifiers = append(_u.modifiers, modifiers...)
return _u
}
func (_u *StationUpdate) sqlSave(ctx context.Context) (_node int, err error) {
if err := _u.check(); err != nil {
return _node, err
@@ -205,6 +212,7 @@ func (_u *StationUpdate) sqlSave(ctx context.Context) (_node int, err error) {
if value, ok := _u.mutation.Status(); ok {
_spec.SetField(station.FieldStatus, field.TypeString, value)
}
_spec.AddModifiers(_u.modifiers...)
if _node, err = sqlgraph.UpdateNodes(ctx, _u.driver, _spec); err != nil {
if _, ok := err.(*sqlgraph.NotFoundError); ok {
err = &NotFoundError{station.Label}
@@ -220,9 +228,10 @@ func (_u *StationUpdate) sqlSave(ctx context.Context) (_node int, err error) {
// StationUpdateOne is the builder for updating a single Station entity.
type StationUpdateOne struct {
config
fields []string
hooks []Hook
mutation *StationMutation
fields []string
hooks []Hook
mutation *StationMutation
modifiers []func(*sql.UpdateBuilder)
}
// SetStationNo sets the "stationNo" field.
@@ -380,6 +389,12 @@ func (_u *StationUpdateOne) check() error {
return nil
}
// Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (_u *StationUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *StationUpdateOne {
_u.modifiers = append(_u.modifiers, modifiers...)
return _u
}
func (_u *StationUpdateOne) sqlSave(ctx context.Context) (_node *Station, err error) {
if err := _u.check(); err != nil {
return _node, err
@@ -433,6 +448,7 @@ func (_u *StationUpdateOne) sqlSave(ctx context.Context) (_node *Station, err er
if value, ok := _u.mutation.Status(); ok {
_spec.SetField(station.FieldStatus, field.TypeString, value)
}
_spec.AddModifiers(_u.modifiers...)
_node = &Station{config: _u.config}
_spec.Assign = _node.assignValues
_spec.ScanValues = _node.scanValues