feat: 退料闭环定稿(损耗台账/备料清单/退料AGV自动派车/剩余量参考)+ 工位托盘守卫
- MES 新增损耗台账 loss_ledger,差异确认损耗接口 ConfirmReceiveLoss(按工单归集) - 备料清单 preparation:MES 按 日计划×工单×工位×物料 实时计算,WMS 只读展示 PreparationList - 退料闭环:N5 工位托盘守卫(未完成禁止退料)、退料 AGV 自动派车(JBT21 空位判定 + 托盘回收链路)、退料参考剩余量接口(应剩余=实备-已耗-已退-已损) - 新增 AGV 车辆状态表 agv_vehicle_state 及查询 - 整合接驳台/叫料池/库存锁既有闭环,清理 sql 目录注释生成脚本与 catalog,更新文档
This commit is contained in:
@@ -63,6 +63,12 @@ const (
|
||||
FieldLossQty = "loss_qty"
|
||||
// FieldLossReason holds the string denoting the lossreason field in the database.
|
||||
FieldLossReason = "loss_reason"
|
||||
// FieldReceiveQty holds the string denoting the receiveqty field in the database.
|
||||
FieldReceiveQty = "receive_qty"
|
||||
// FieldReceiveDiff holds the string denoting the receivediff field in the database.
|
||||
FieldReceiveDiff = "receive_diff"
|
||||
// FieldReceiveNote holds the string denoting the receivenote field in the database.
|
||||
FieldReceiveNote = "receive_note"
|
||||
// FieldCreatedAt holds the string denoting the createdat field in the database.
|
||||
FieldCreatedAt = "created_at"
|
||||
// FieldUpdatedAt holds the string denoting the updatedat field in the database.
|
||||
@@ -99,6 +105,9 @@ var Columns = []string{
|
||||
FieldTheoryQty,
|
||||
FieldLossQty,
|
||||
FieldLossReason,
|
||||
FieldReceiveQty,
|
||||
FieldReceiveDiff,
|
||||
FieldReceiveNote,
|
||||
FieldCreatedAt,
|
||||
FieldUpdatedAt,
|
||||
}
|
||||
@@ -184,6 +193,10 @@ var (
|
||||
DefaultLossReason string
|
||||
// LossReasonValidator is a validator for the "lossReason" field. It is called by the builders before save.
|
||||
LossReasonValidator func(string) error
|
||||
// DefaultReceiveNote holds the default value on creation for the "receiveNote" field.
|
||||
DefaultReceiveNote string
|
||||
// ReceiveNoteValidator is a validator for the "receiveNote" field. It is called by the builders before save.
|
||||
ReceiveNoteValidator func(string) error
|
||||
// DefaultCreatedAt holds the default value on creation for the "createdAt" field.
|
||||
DefaultCreatedAt func() time.Time
|
||||
// DefaultUpdatedAt holds the default value on creation for the "updatedAt" field.
|
||||
@@ -322,6 +335,21 @@ func ByLossReason(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldLossReason, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByReceiveQty orders the results by the receiveQty field.
|
||||
func ByReceiveQty(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldReceiveQty, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByReceiveDiff orders the results by the receiveDiff field.
|
||||
func ByReceiveDiff(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldReceiveDiff, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByReceiveNote orders the results by the receiveNote field.
|
||||
func ByReceiveNote(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldReceiveNote, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCreatedAt orders the results by the createdAt field.
|
||||
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
|
||||
|
||||
Reference in New Issue
Block a user