feat(mes/wms/终端): 签字循环业务重构 + 叫料池实物账两列 + 工位流水按包真分页 + 下线单据提示条(2026-11-30 现场整改)

【MES · 签字循环重构(业务重构,非修 bug)】
- 旧模型作废(签字随报工落库、检验员分支永不生效的死代码);新口径:
  工人干完点「呼叫签字」→ 检验员巡检端签 OK/NG → OK 后工人再点一次「报工」;NG 整改后重新呼叫(新一轮)
- 内容指纹(SHA256):呼叫时算一次落库,报工时重算比对,变了即「签字后改数据作废本轮」要求重呼;
  只覆盖步骤录入(值/文本/勾选/拧紧结果),装机绑定不进指纹(独立台账)、改备注不触发
- 轮次统一:一次呼叫=一轮,操作工/检验员共用 round;NG/撤回/重呼=新一轮,旧轮作废历史保留
- 三档状态(作业中/签字中/待整改/可报工)从签字记录推导,不建表不存终端
- 报工闸门:本轮需签步骤齐全(操作工+检验员OK)+ 指纹未变才放行
- 撤回呼叫整轮作废;超时巡检每分钟扫描(阈值 30 分钟可在基础设置调),超时落预警中心+异常角标不进铃铛,60 分钟窗口去重
- 工位终端新增签字交互接口与呼叫/撤回/状态查询;巡检端保留 NG 回看

【MES · 叫料池实物账(十五节 Q1/Q16 + 17.6 裁决)】
- call_pool 新增 receivedQty(已收累计,拒收按退库单冲减)/ returnedQty(已退累计,按退库单号防重)两列实物账,与 sentQty 额度账并存
- 台面在手(可用)= 已收 − 已装 − 已退;在途 = 已发 − 已收

【工位终端 · 物料/叫料页重构(十五节 Q1~Q17 拍板落地)】
- 「本工位物料明细」改名「物料明细」,四数列改为:可用/需求/已发/已收/已装,量为 0 也显示不分左右托盘
- 去除「刷新池子」「刷新」按钮(有长连接);「我的叫料单」扩为类银行流水(叫料/退料/等等)
- 叫料/退料数量列直排,提交时弹窗确认数量并选接驳台;管理端叫料与退料 AGV 派车流程统一收归库管
- 工位流水按包真分页(2026-11-29 拍板):后端按包号分组 Count+Limit/Offset,每页 20 包,前端不再内存聚合

【下线 · 单据流转提示条】
- MES/WMS 前端整体删除 NextStepBar / nextStep / nextStepRules(35 条规则表整套下线),页面不再出现常驻「下一步」提示条

【文档】
- 问题临时.md 新增十四节(主控独立审计:终端账号删除/心跳/闸门函数 8 处对码全过)+ 十五节(工位物料叫料 8 条原话逐字留档与 Q1~Q17 拍板底稿)
- 新增《工位终端页面.md》;案例.md 同步更新验收口径
This commit is contained in:
SunYF
2026-11-30 15:25:29 +08:00
parent 88875c1f13
commit f9eaebad28
120 changed files with 6210 additions and 2366 deletions
@@ -39,6 +39,8 @@ const (
FieldSource = "source"
// FieldRemark holds the string denoting the remark field in the database.
FieldRemark = "remark"
// FieldFingerprint holds the string denoting the fingerprint field in the database.
FieldFingerprint = "fingerprint"
// FieldRevoked holds the string denoting the revoked field in the database.
FieldRevoked = "revoked"
// FieldRevokedBy holds the string denoting the revokedby field in the database.
@@ -69,6 +71,7 @@ var Columns = []string{
FieldRound,
FieldSource,
FieldRemark,
FieldFingerprint,
FieldRevoked,
FieldRevokedBy,
FieldRevokedAt,
@@ -131,6 +134,10 @@ var (
DefaultRemark string
// RemarkValidator is a validator for the "remark" field. It is called by the builders before save.
RemarkValidator func(string) error
// DefaultFingerprint holds the default value on creation for the "fingerprint" field.
DefaultFingerprint string
// FingerprintValidator is a validator for the "fingerprint" field. It is called by the builders before save.
FingerprintValidator func(string) error
// DefaultRevoked holds the default value on creation for the "revoked" field.
DefaultRevoked bool
// DefaultRevokedBy holds the default value on creation for the "revokedBy" field.
@@ -220,6 +227,11 @@ func ByRemark(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldRemark, opts...).ToFunc()
}
// ByFingerprint orders the results by the fingerprint field.
func ByFingerprint(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldFingerprint, opts...).ToFunc()
}
// ByRevoked orders the results by the revoked field.
func ByRevoked(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldRevoked, opts...).ToFunc()
+70
View File
@@ -119,6 +119,11 @@ func Remark(v string) predicate.StepSignRecord {
return predicate.StepSignRecord(sql.FieldEQ(FieldRemark, v))
}
// Fingerprint applies equality check predicate on the "fingerprint" field. It's identical to FingerprintEQ.
func Fingerprint(v string) predicate.StepSignRecord {
return predicate.StepSignRecord(sql.FieldEQ(FieldFingerprint, v))
}
// Revoked applies equality check predicate on the "revoked" field. It's identical to RevokedEQ.
func Revoked(v bool) predicate.StepSignRecord {
return predicate.StepSignRecord(sql.FieldEQ(FieldRevoked, v))
@@ -889,6 +894,71 @@ func RemarkContainsFold(v string) predicate.StepSignRecord {
return predicate.StepSignRecord(sql.FieldContainsFold(FieldRemark, v))
}
// FingerprintEQ applies the EQ predicate on the "fingerprint" field.
func FingerprintEQ(v string) predicate.StepSignRecord {
return predicate.StepSignRecord(sql.FieldEQ(FieldFingerprint, v))
}
// FingerprintNEQ applies the NEQ predicate on the "fingerprint" field.
func FingerprintNEQ(v string) predicate.StepSignRecord {
return predicate.StepSignRecord(sql.FieldNEQ(FieldFingerprint, v))
}
// FingerprintIn applies the In predicate on the "fingerprint" field.
func FingerprintIn(vs ...string) predicate.StepSignRecord {
return predicate.StepSignRecord(sql.FieldIn(FieldFingerprint, vs...))
}
// FingerprintNotIn applies the NotIn predicate on the "fingerprint" field.
func FingerprintNotIn(vs ...string) predicate.StepSignRecord {
return predicate.StepSignRecord(sql.FieldNotIn(FieldFingerprint, vs...))
}
// FingerprintGT applies the GT predicate on the "fingerprint" field.
func FingerprintGT(v string) predicate.StepSignRecord {
return predicate.StepSignRecord(sql.FieldGT(FieldFingerprint, v))
}
// FingerprintGTE applies the GTE predicate on the "fingerprint" field.
func FingerprintGTE(v string) predicate.StepSignRecord {
return predicate.StepSignRecord(sql.FieldGTE(FieldFingerprint, v))
}
// FingerprintLT applies the LT predicate on the "fingerprint" field.
func FingerprintLT(v string) predicate.StepSignRecord {
return predicate.StepSignRecord(sql.FieldLT(FieldFingerprint, v))
}
// FingerprintLTE applies the LTE predicate on the "fingerprint" field.
func FingerprintLTE(v string) predicate.StepSignRecord {
return predicate.StepSignRecord(sql.FieldLTE(FieldFingerprint, v))
}
// FingerprintContains applies the Contains predicate on the "fingerprint" field.
func FingerprintContains(v string) predicate.StepSignRecord {
return predicate.StepSignRecord(sql.FieldContains(FieldFingerprint, v))
}
// FingerprintHasPrefix applies the HasPrefix predicate on the "fingerprint" field.
func FingerprintHasPrefix(v string) predicate.StepSignRecord {
return predicate.StepSignRecord(sql.FieldHasPrefix(FieldFingerprint, v))
}
// FingerprintHasSuffix applies the HasSuffix predicate on the "fingerprint" field.
func FingerprintHasSuffix(v string) predicate.StepSignRecord {
return predicate.StepSignRecord(sql.FieldHasSuffix(FieldFingerprint, v))
}
// FingerprintEqualFold applies the EqualFold predicate on the "fingerprint" field.
func FingerprintEqualFold(v string) predicate.StepSignRecord {
return predicate.StepSignRecord(sql.FieldEqualFold(FieldFingerprint, v))
}
// FingerprintContainsFold applies the ContainsFold predicate on the "fingerprint" field.
func FingerprintContainsFold(v string) predicate.StepSignRecord {
return predicate.StepSignRecord(sql.FieldContainsFold(FieldFingerprint, v))
}
// RevokedEQ applies the EQ predicate on the "revoked" field.
func RevokedEQ(v bool) predicate.StepSignRecord {
return predicate.StepSignRecord(sql.FieldEQ(FieldRevoked, v))