feat: 新增工件生命周期状态流水表及工单状态流转逻辑
新增工件生命周期状态流水表,记录所有工件状态变更动作,替代原半成品质检计数源 调整工单状态流转,将「下发工单」与「开始执行」合并为「下发并开工」,自动启用关联排产 新增工件物理位置字段,区分业务位置与实际物理工位,解决工位对账滞后问题 统一物料类别处理,避免 WMS 同步时覆盖合法值或错误设置为 0 移除已废弃的返修状态,更新相关显示与逻辑
This commit is contained in:
+36
-34
@@ -36,6 +36,7 @@ import (
|
||||
"bj_power_mes/ent/workorder"
|
||||
"bj_power_mes/ent/workpiece"
|
||||
"bj_power_mes/ent/workpiecebind"
|
||||
"bj_power_mes/ent/workpiecelifecyclelog"
|
||||
"bj_power_mes/ent/workpieceprocess"
|
||||
"context"
|
||||
"errors"
|
||||
@@ -106,40 +107,41 @@ var (
|
||||
func checkColumn(t, c string) error {
|
||||
initCheck.Do(func() {
|
||||
columnCheck = sql.NewColumnCheck(map[string]func(string) bool{
|
||||
alert.Table: alert.ValidColumn,
|
||||
alertrule.Table: alertrule.ValidColumn,
|
||||
associationtrace.Table: associationtrace.ValidColumn,
|
||||
attachment.Table: attachment.ValidColumn,
|
||||
dailyplan.Table: dailyplan.ValidColumn,
|
||||
dock.Table: dock.ValidColumn,
|
||||
eventlog.Table: eventlog.ValidColumn,
|
||||
flowmaterial.Table: flowmaterial.ValidColumn,
|
||||
inspectionrecord.Table: inspectionrecord.ValidColumn,
|
||||
linepoint.Table: linepoint.ValidColumn,
|
||||
material.Table: material.ValidColumn,
|
||||
materialqtyreport.Table: materialqtyreport.ValidColumn,
|
||||
materialrequest.Table: materialrequest.ValidColumn,
|
||||
permission.Table: permission.ValidColumn,
|
||||
plcsendlog.Table: plcsendlog.ValidColumn,
|
||||
processflow.Table: processflow.ValidColumn,
|
||||
processstep.Table: processstep.ValidColumn,
|
||||
productprocess.Table: productprocess.ValidColumn,
|
||||
productprocessitem.Table: productprocessitem.ValidColumn,
|
||||
role.Table: role.ValidColumn,
|
||||
semiflow.Table: semiflow.ValidColumn,
|
||||
station.Table: station.ValidColumn,
|
||||
stationstate.Table: stationstate.ValidColumn,
|
||||
stepcriterion.Table: stepcriterion.ValidColumn,
|
||||
stepdata.Table: stepdata.ValidColumn,
|
||||
stepsignrecord.Table: stepsignrecord.ValidColumn,
|
||||
sysconfig.Table: sysconfig.ValidColumn,
|
||||
torquerecord.Table: torquerecord.ValidColumn,
|
||||
user.Table: user.ValidColumn,
|
||||
userstation.Table: userstation.ValidColumn,
|
||||
workorder.Table: workorder.ValidColumn,
|
||||
workpiece.Table: workpiece.ValidColumn,
|
||||
workpiecebind.Table: workpiecebind.ValidColumn,
|
||||
workpieceprocess.Table: workpieceprocess.ValidColumn,
|
||||
alert.Table: alert.ValidColumn,
|
||||
alertrule.Table: alertrule.ValidColumn,
|
||||
associationtrace.Table: associationtrace.ValidColumn,
|
||||
attachment.Table: attachment.ValidColumn,
|
||||
dailyplan.Table: dailyplan.ValidColumn,
|
||||
dock.Table: dock.ValidColumn,
|
||||
eventlog.Table: eventlog.ValidColumn,
|
||||
flowmaterial.Table: flowmaterial.ValidColumn,
|
||||
inspectionrecord.Table: inspectionrecord.ValidColumn,
|
||||
linepoint.Table: linepoint.ValidColumn,
|
||||
material.Table: material.ValidColumn,
|
||||
materialqtyreport.Table: materialqtyreport.ValidColumn,
|
||||
materialrequest.Table: materialrequest.ValidColumn,
|
||||
permission.Table: permission.ValidColumn,
|
||||
plcsendlog.Table: plcsendlog.ValidColumn,
|
||||
processflow.Table: processflow.ValidColumn,
|
||||
processstep.Table: processstep.ValidColumn,
|
||||
productprocess.Table: productprocess.ValidColumn,
|
||||
productprocessitem.Table: productprocessitem.ValidColumn,
|
||||
role.Table: role.ValidColumn,
|
||||
semiflow.Table: semiflow.ValidColumn,
|
||||
station.Table: station.ValidColumn,
|
||||
stationstate.Table: stationstate.ValidColumn,
|
||||
stepcriterion.Table: stepcriterion.ValidColumn,
|
||||
stepdata.Table: stepdata.ValidColumn,
|
||||
stepsignrecord.Table: stepsignrecord.ValidColumn,
|
||||
sysconfig.Table: sysconfig.ValidColumn,
|
||||
torquerecord.Table: torquerecord.ValidColumn,
|
||||
user.Table: user.ValidColumn,
|
||||
userstation.Table: userstation.ValidColumn,
|
||||
workorder.Table: workorder.ValidColumn,
|
||||
workpiece.Table: workpiece.ValidColumn,
|
||||
workpiecebind.Table: workpiecebind.ValidColumn,
|
||||
workpiecelifecyclelog.Table: workpiecelifecyclelog.ValidColumn,
|
||||
workpieceprocess.Table: workpieceprocess.ValidColumn,
|
||||
})
|
||||
})
|
||||
return columnCheck(t, c)
|
||||
|
||||
Reference in New Issue
Block a user