feat: 完成客户第12条需求+多系统改造

1. 新增预警表添加工单号字段,支持按工单号检索预警
2. 添加工单过滤在制品/绩效报表/预警中心查询
3. 补全WMS台账字段口径与权限配置
4. 修复备料单与数量不符处理流程
5. 新增配送进度/库位联动/自动出库功能
6. 修复AGV配送状态更新逻辑
7. 优化退料与库存管理细节
This commit is contained in:
SunYF
2026-09-19 17:04:58 +08:00
parent 62e45b7379
commit 05b0b8a909
89 changed files with 7912 additions and 429 deletions
@@ -39,6 +39,22 @@ const (
FieldProcessCode = "process_code"
// FieldSentQty holds the string denoting the sentqty field in the database.
FieldSentQty = "sent_qty"
// FieldReceivedQty holds the string denoting the receivedqty field in the database.
FieldReceivedQty = "received_qty"
// FieldReceivedAt holds the string denoting the receivedat field in the database.
FieldReceivedAt = "received_at"
// FieldReceiveBy holds the string denoting the receiveby field in the database.
FieldReceiveBy = "receive_by"
// FieldSource holds the string denoting the source field in the database.
FieldSource = "source"
// FieldOverQty holds the string denoting the overqty field in the database.
FieldOverQty = "over_qty"
// FieldOverReason holds the string denoting the overreason field in the database.
FieldOverReason = "over_reason"
// FieldRefReportNo holds the string denoting the refreportno field in the database.
FieldRefReportNo = "ref_report_no"
// FieldNeedAgv holds the string denoting the needagv field in the database.
FieldNeedAgv = "need_agv"
// FieldBatchNo holds the string denoting the batchno field in the database.
FieldBatchNo = "batch_no"
// FieldOperator holds the string denoting the operator field in the database.
@@ -67,6 +83,14 @@ var Columns = []string{
FieldStationNo,
FieldProcessCode,
FieldSentQty,
FieldReceivedQty,
FieldReceivedAt,
FieldReceiveBy,
FieldSource,
FieldOverQty,
FieldOverReason,
FieldRefReportNo,
FieldNeedAgv,
FieldBatchNo,
FieldOperator,
FieldCreatedAt,
@@ -120,6 +144,30 @@ var (
DefaultProcessCode int
// DefaultSentQty holds the default value on creation for the "sentQty" field.
DefaultSentQty float64
// DefaultReceivedQty holds the default value on creation for the "receivedQty" field.
DefaultReceivedQty float64
// DefaultReceivedAt holds the default value on creation for the "receivedAt" field.
DefaultReceivedAt int64
// DefaultReceiveBy holds the default value on creation for the "receiveBy" field.
DefaultReceiveBy string
// ReceiveByValidator is a validator for the "receiveBy" field. It is called by the builders before save.
ReceiveByValidator func(string) error
// DefaultSource holds the default value on creation for the "source" field.
DefaultSource string
// SourceValidator is a validator for the "source" field. It is called by the builders before save.
SourceValidator func(string) error
// DefaultOverQty holds the default value on creation for the "overQty" field.
DefaultOverQty float64
// DefaultOverReason holds the default value on creation for the "overReason" field.
DefaultOverReason string
// OverReasonValidator is a validator for the "overReason" field. It is called by the builders before save.
OverReasonValidator func(string) error
// DefaultRefReportNo holds the default value on creation for the "refReportNo" field.
DefaultRefReportNo string
// RefReportNoValidator is a validator for the "refReportNo" field. It is called by the builders before save.
RefReportNoValidator func(string) error
// DefaultNeedAgv holds the default value on creation for the "needAgv" field.
DefaultNeedAgv bool
// DefaultBatchNo holds the default value on creation for the "batchNo" field.
DefaultBatchNo string
// BatchNoValidator is a validator for the "batchNo" field. It is called by the builders before save.
@@ -211,6 +259,46 @@ func BySentQty(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldSentQty, opts...).ToFunc()
}
// ByReceivedQty orders the results by the receivedQty field.
func ByReceivedQty(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldReceivedQty, opts...).ToFunc()
}
// ByReceivedAt orders the results by the receivedAt field.
func ByReceivedAt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldReceivedAt, opts...).ToFunc()
}
// ByReceiveBy orders the results by the receiveBy field.
func ByReceiveBy(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldReceiveBy, opts...).ToFunc()
}
// BySource orders the results by the source field.
func BySource(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldSource, opts...).ToFunc()
}
// ByOverQty orders the results by the overQty field.
func ByOverQty(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldOverQty, opts...).ToFunc()
}
// ByOverReason orders the results by the overReason field.
func ByOverReason(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldOverReason, opts...).ToFunc()
}
// ByRefReportNo orders the results by the refReportNo field.
func ByRefReportNo(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldRefReportNo, opts...).ToFunc()
}
// ByNeedAgv orders the results by the needAgv field.
func ByNeedAgv(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldNeedAgv, opts...).ToFunc()
}
// ByBatchNo orders the results by the batchNo field.
func ByBatchNo(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldBatchNo, opts...).ToFunc()