feat: 退料闭环定稿(损耗台账/备料清单/退料AGV自动派车/剩余量参考)+ 工位托盘守卫

- MES 新增损耗台账 loss_ledger,差异确认损耗接口 ConfirmReceiveLoss(按工单归集)
- 备料清单 preparation:MES 按 日计划×工单×工位×物料 实时计算,WMS 只读展示 PreparationList
- 退料闭环:N5 工位托盘守卫(未完成禁止退料)、退料 AGV 自动派车(JBT21 空位判定 + 托盘回收链路)、退料参考剩余量接口(应剩余=实备-已耗-已退-已损)
- 新增 AGV 车辆状态表 agv_vehicle_state 及查询
- 整合接驳台/叫料池/库存锁既有闭环,清理 sql 目录注释生成脚本与 catalog,更新文档
This commit is contained in:
SunYF
2026-11-04 19:06:03 +08:00
parent 42bcf395d2
commit 46fcb59079
123 changed files with 10666 additions and 3227 deletions
+45 -5
View File
@@ -546,24 +546,64 @@ func init() {
returnorderDescReason := returnorderFields[12].Descriptor()
// returnorder.DefaultReason holds the default value on creation for the reason field.
returnorder.DefaultReason = returnorderDescReason.Default.(string)
// returnorderDescLossReason is the schema descriptor for loss_reason field.
returnorderDescLossReason := returnorderFields[13].Descriptor()
// returnorder.DefaultLossReason holds the default value on creation for the loss_reason field.
returnorder.DefaultLossReason = returnorderDescLossReason.Default.(string)
// returnorder.LossReasonValidator is a validator for the "loss_reason" field. It is called by the builders before save.
returnorder.LossReasonValidator = returnorderDescLossReason.Validators[0].(func(string) error)
// returnorderDescStatus is the schema descriptor for status field.
returnorderDescStatus := returnorderFields[13].Descriptor()
returnorderDescStatus := returnorderFields[14].Descriptor()
// returnorder.DefaultStatus holds the default value on creation for the status field.
returnorder.DefaultStatus = returnorderDescStatus.Default.(string)
// returnorderDescTransportMode is the schema descriptor for transport_mode field.
returnorderDescTransportMode := returnorderFields[15].Descriptor()
// returnorder.DefaultTransportMode holds the default value on creation for the transport_mode field.
returnorder.DefaultTransportMode = returnorderDescTransportMode.Default.(string)
// returnorder.TransportModeValidator is a validator for the "transport_mode" field. It is called by the builders before save.
returnorder.TransportModeValidator = returnorderDescTransportMode.Validators[0].(func(string) error)
// returnorderDescDispatchedAt is the schema descriptor for dispatched_at field.
returnorderDescDispatchedAt := returnorderFields[16].Descriptor()
// returnorder.DefaultDispatchedAt holds the default value on creation for the dispatched_at field.
returnorder.DefaultDispatchedAt = returnorderDescDispatchedAt.Default.(int64)
// returnorderDescCancelledBy is the schema descriptor for cancelled_by field.
returnorderDescCancelledBy := returnorderFields[17].Descriptor()
// returnorder.DefaultCancelledBy holds the default value on creation for the cancelled_by field.
returnorder.DefaultCancelledBy = returnorderDescCancelledBy.Default.(string)
// returnorder.CancelledByValidator is a validator for the "cancelled_by" field. It is called by the builders before save.
returnorder.CancelledByValidator = returnorderDescCancelledBy.Validators[0].(func(string) error)
// returnorderDescCancelReason is the schema descriptor for cancel_reason field.
returnorderDescCancelReason := returnorderFields[18].Descriptor()
// returnorder.DefaultCancelReason holds the default value on creation for the cancel_reason field.
returnorder.DefaultCancelReason = returnorderDescCancelReason.Default.(string)
// returnorder.CancelReasonValidator is a validator for the "cancel_reason" field. It is called by the builders before save.
returnorder.CancelReasonValidator = returnorderDescCancelReason.Validators[0].(func(string) error)
// returnorderDescOperator is the schema descriptor for operator field.
returnorderDescOperator := returnorderFields[14].Descriptor()
returnorderDescOperator := returnorderFields[19].Descriptor()
// returnorder.DefaultOperator holds the default value on creation for the operator field.
returnorder.DefaultOperator = returnorderDescOperator.Default.(string)
// returnorderDescReceiveBy is the schema descriptor for receive_by field.
returnorderDescReceiveBy := returnorderFields[15].Descriptor()
returnorderDescReceiveBy := returnorderFields[20].Descriptor()
// returnorder.DefaultReceiveBy holds the default value on creation for the receive_by field.
returnorder.DefaultReceiveBy = returnorderDescReceiveBy.Default.(string)
// returnorderDescReceiveQty is the schema descriptor for receive_qty field.
returnorderDescReceiveQty := returnorderFields[21].Descriptor()
// returnorder.DefaultReceiveQty holds the default value on creation for the receive_qty field.
returnorder.DefaultReceiveQty = returnorderDescReceiveQty.Default.(int)
// returnorderDescReceiveDiff is the schema descriptor for receive_diff field.
returnorderDescReceiveDiff := returnorderFields[22].Descriptor()
// returnorder.DefaultReceiveDiff holds the default value on creation for the receive_diff field.
returnorder.DefaultReceiveDiff = returnorderDescReceiveDiff.Default.(int)
// returnorderDescReceiveNote is the schema descriptor for receive_note field.
returnorderDescReceiveNote := returnorderFields[23].Descriptor()
// returnorder.DefaultReceiveNote holds the default value on creation for the receive_note field.
returnorder.DefaultReceiveNote = returnorderDescReceiveNote.Default.(string)
// returnorderDescCreatedAt is the schema descriptor for created_at field.
returnorderDescCreatedAt := returnorderFields[16].Descriptor()
returnorderDescCreatedAt := returnorderFields[24].Descriptor()
// returnorder.DefaultCreatedAt holds the default value on creation for the created_at field.
returnorder.DefaultCreatedAt = returnorderDescCreatedAt.Default.(func() int64)
// returnorderDescReceiveAt is the schema descriptor for receive_at field.
returnorderDescReceiveAt := returnorderFields[17].Descriptor()
returnorderDescReceiveAt := returnorderFields[25].Descriptor()
// returnorder.DefaultReceiveAt holds the default value on creation for the receive_at field.
returnorder.DefaultReceiveAt = returnorderDescReceiveAt.Default.(int64)
roleFields := schema.Role{}.Fields()