feat: 新增预警与附件模块,优化工位派工功能

1. 新增预警规则、预警消息、业务附件数据库表与CRUD逻辑
2. 为拧紧记录添加审核人、审核时间字段及审核留痕功能
3. 优化产线点位类型与编号描述,更新工位组合下发菜单名称为工艺路线派工
4. 新增上传文件获取原文件名与大小的工具方法
5. 在系统管理菜单新增预警中心与附件中心入口
This commit is contained in:
SunYF
2026-09-14 16:31:08 +08:00
parent 0ab21b1234
commit 5c3b747a20
399 changed files with 147674 additions and 2213 deletions
+5 -21
View File
@@ -17,9 +17,8 @@ import (
// StationUpdate is the builder for updating Station entities.
type StationUpdate struct {
config
hooks []Hook
mutation *StationMutation
modifiers []func(*sql.UpdateBuilder)
hooks []Hook
mutation *StationMutation
}
// Where appends a list predicates to the StationUpdate builder.
@@ -170,12 +169,6 @@ 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
@@ -212,7 +205,6 @@ 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}
@@ -228,10 +220,9 @@ 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
modifiers []func(*sql.UpdateBuilder)
fields []string
hooks []Hook
mutation *StationMutation
}
// SetStationNo sets the "stationNo" field.
@@ -389,12 +380,6 @@ 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
@@ -448,7 +433,6 @@ 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