1. 新增预警表添加工单号字段,支持按工单号检索预警 2. 添加工单过滤在制品/绩效报表/预警中心查询 3. 补全WMS台账字段口径与权限配置 4. 修复备料单与数量不符处理流程 5. 新增配送进度/库位联动/自动出库功能 6. 修复AGV配送状态更新逻辑 7. 优化退料与库存管理细节
247 lines
9.8 KiB
Go
247 lines
9.8 KiB
Go
// Code generated by ent, DO NOT EDIT.
|
|
|
|
package materialqtyreport
|
|
|
|
import (
|
|
"time"
|
|
|
|
"entgo.io/ent/dialect/sql"
|
|
)
|
|
|
|
const (
|
|
// Label holds the string label denoting the materialqtyreport type in the database.
|
|
Label = "material_qty_report"
|
|
// FieldID holds the string denoting the id field in the database.
|
|
FieldID = "id"
|
|
// FieldStationNo holds the string denoting the stationno field in the database.
|
|
FieldStationNo = "station_no"
|
|
// FieldOrderNo holds the string denoting the orderno field in the database.
|
|
FieldOrderNo = "order_no"
|
|
// FieldSn holds the string denoting the sn field in the database.
|
|
FieldSn = "sn"
|
|
// FieldMaterialCode holds the string denoting the materialcode field in the database.
|
|
FieldMaterialCode = "material_code"
|
|
// FieldMaterialName holds the string denoting the materialname field in the database.
|
|
FieldMaterialName = "material_name"
|
|
// FieldPlanQty holds the string denoting the planqty field in the database.
|
|
FieldPlanQty = "plan_qty"
|
|
// FieldActualQty holds the string denoting the actualqty field in the database.
|
|
FieldActualQty = "actual_qty"
|
|
// FieldDiffQty holds the string denoting the diffqty field in the database.
|
|
FieldDiffQty = "diff_qty"
|
|
// FieldCause holds the string denoting the cause field in the database.
|
|
FieldCause = "cause"
|
|
// FieldStatus holds the string denoting the status field in the database.
|
|
FieldStatus = "status"
|
|
// FieldHandleType holds the string denoting the handletype field in the database.
|
|
FieldHandleType = "handle_type"
|
|
// FieldHandleDocNo holds the string denoting the handledocno field in the database.
|
|
FieldHandleDocNo = "handle_doc_no"
|
|
// FieldHandleNote holds the string denoting the handlenote field in the database.
|
|
FieldHandleNote = "handle_note"
|
|
// FieldHandledBy holds the string denoting the handledby field in the database.
|
|
FieldHandledBy = "handled_by"
|
|
// FieldHandledAt holds the string denoting the handledat field in the database.
|
|
FieldHandledAt = "handled_at"
|
|
// FieldOperator holds the string denoting the operator field in the database.
|
|
FieldOperator = "operator"
|
|
// FieldCreatedAt holds the string denoting the createdat field in the database.
|
|
FieldCreatedAt = "created_at"
|
|
// FieldResolvedAt holds the string denoting the resolvedat field in the database.
|
|
FieldResolvedAt = "resolved_at"
|
|
// Table holds the table name of the materialqtyreport in the database.
|
|
Table = "material_qty_report"
|
|
)
|
|
|
|
// Columns holds all SQL columns for materialqtyreport fields.
|
|
var Columns = []string{
|
|
FieldID,
|
|
FieldStationNo,
|
|
FieldOrderNo,
|
|
FieldSn,
|
|
FieldMaterialCode,
|
|
FieldMaterialName,
|
|
FieldPlanQty,
|
|
FieldActualQty,
|
|
FieldDiffQty,
|
|
FieldCause,
|
|
FieldStatus,
|
|
FieldHandleType,
|
|
FieldHandleDocNo,
|
|
FieldHandleNote,
|
|
FieldHandledBy,
|
|
FieldHandledAt,
|
|
FieldOperator,
|
|
FieldCreatedAt,
|
|
FieldResolvedAt,
|
|
}
|
|
|
|
// ValidColumn reports if the column name is valid (part of the table columns).
|
|
func ValidColumn(column string) bool {
|
|
for i := range Columns {
|
|
if column == Columns[i] {
|
|
return true
|
|
}
|
|
}
|
|
return false
|
|
}
|
|
|
|
var (
|
|
// DefaultStationNo holds the default value on creation for the "stationNo" field.
|
|
DefaultStationNo int
|
|
// DefaultOrderNo holds the default value on creation for the "orderNo" field.
|
|
DefaultOrderNo string
|
|
// OrderNoValidator is a validator for the "orderNo" field. It is called by the builders before save.
|
|
OrderNoValidator func(string) error
|
|
// DefaultSn holds the default value on creation for the "sn" field.
|
|
DefaultSn string
|
|
// SnValidator is a validator for the "sn" field. It is called by the builders before save.
|
|
SnValidator func(string) error
|
|
// DefaultMaterialCode holds the default value on creation for the "materialCode" field.
|
|
DefaultMaterialCode string
|
|
// MaterialCodeValidator is a validator for the "materialCode" field. It is called by the builders before save.
|
|
MaterialCodeValidator func(string) error
|
|
// DefaultMaterialName holds the default value on creation for the "materialName" field.
|
|
DefaultMaterialName string
|
|
// MaterialNameValidator is a validator for the "materialName" field. It is called by the builders before save.
|
|
MaterialNameValidator func(string) error
|
|
// DefaultPlanQty holds the default value on creation for the "planQty" field.
|
|
DefaultPlanQty int
|
|
// DefaultActualQty holds the default value on creation for the "actualQty" field.
|
|
DefaultActualQty int
|
|
// DefaultDiffQty holds the default value on creation for the "diffQty" field.
|
|
DefaultDiffQty int
|
|
// DefaultCause holds the default value on creation for the "cause" field.
|
|
DefaultCause string
|
|
// CauseValidator is a validator for the "cause" field. It is called by the builders before save.
|
|
CauseValidator func(string) error
|
|
// DefaultStatus holds the default value on creation for the "status" field.
|
|
DefaultStatus string
|
|
// StatusValidator is a validator for the "status" field. It is called by the builders before save.
|
|
StatusValidator func(string) error
|
|
// DefaultHandleType holds the default value on creation for the "handleType" field.
|
|
DefaultHandleType string
|
|
// HandleTypeValidator is a validator for the "handleType" field. It is called by the builders before save.
|
|
HandleTypeValidator func(string) error
|
|
// DefaultHandleDocNo holds the default value on creation for the "handleDocNo" field.
|
|
DefaultHandleDocNo string
|
|
// HandleDocNoValidator is a validator for the "handleDocNo" field. It is called by the builders before save.
|
|
HandleDocNoValidator func(string) error
|
|
// DefaultHandleNote holds the default value on creation for the "handleNote" field.
|
|
DefaultHandleNote string
|
|
// HandleNoteValidator is a validator for the "handleNote" field. It is called by the builders before save.
|
|
HandleNoteValidator func(string) error
|
|
// DefaultHandledBy holds the default value on creation for the "handledBy" field.
|
|
DefaultHandledBy string
|
|
// HandledByValidator is a validator for the "handledBy" field. It is called by the builders before save.
|
|
HandledByValidator func(string) error
|
|
// DefaultHandledAt holds the default value on creation for the "handledAt" field.
|
|
DefaultHandledAt int64
|
|
// DefaultOperator holds the default value on creation for the "operator" field.
|
|
DefaultOperator string
|
|
// OperatorValidator is a validator for the "operator" field. It is called by the builders before save.
|
|
OperatorValidator func(string) error
|
|
// DefaultCreatedAt holds the default value on creation for the "createdAt" field.
|
|
DefaultCreatedAt func() time.Time
|
|
// IDValidator is a validator for the "id" field. It is called by the builders before save.
|
|
IDValidator func(int) error
|
|
)
|
|
|
|
// OrderOption defines the ordering options for the MaterialQtyReport queries.
|
|
type OrderOption func(*sql.Selector)
|
|
|
|
// ByID orders the results by the id field.
|
|
func ByID(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldID, opts...).ToFunc()
|
|
}
|
|
|
|
// ByStationNo orders the results by the stationNo field.
|
|
func ByStationNo(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldStationNo, opts...).ToFunc()
|
|
}
|
|
|
|
// ByOrderNo orders the results by the orderNo field.
|
|
func ByOrderNo(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldOrderNo, opts...).ToFunc()
|
|
}
|
|
|
|
// BySn orders the results by the sn field.
|
|
func BySn(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldSn, opts...).ToFunc()
|
|
}
|
|
|
|
// ByMaterialCode orders the results by the materialCode field.
|
|
func ByMaterialCode(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldMaterialCode, opts...).ToFunc()
|
|
}
|
|
|
|
// ByMaterialName orders the results by the materialName field.
|
|
func ByMaterialName(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldMaterialName, opts...).ToFunc()
|
|
}
|
|
|
|
// ByPlanQty orders the results by the planQty field.
|
|
func ByPlanQty(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldPlanQty, opts...).ToFunc()
|
|
}
|
|
|
|
// ByActualQty orders the results by the actualQty field.
|
|
func ByActualQty(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldActualQty, opts...).ToFunc()
|
|
}
|
|
|
|
// ByDiffQty orders the results by the diffQty field.
|
|
func ByDiffQty(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldDiffQty, opts...).ToFunc()
|
|
}
|
|
|
|
// ByCause orders the results by the cause field.
|
|
func ByCause(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldCause, opts...).ToFunc()
|
|
}
|
|
|
|
// ByStatus orders the results by the status field.
|
|
func ByStatus(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldStatus, opts...).ToFunc()
|
|
}
|
|
|
|
// ByHandleType orders the results by the handleType field.
|
|
func ByHandleType(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldHandleType, opts...).ToFunc()
|
|
}
|
|
|
|
// ByHandleDocNo orders the results by the handleDocNo field.
|
|
func ByHandleDocNo(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldHandleDocNo, opts...).ToFunc()
|
|
}
|
|
|
|
// ByHandleNote orders the results by the handleNote field.
|
|
func ByHandleNote(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldHandleNote, opts...).ToFunc()
|
|
}
|
|
|
|
// ByHandledBy orders the results by the handledBy field.
|
|
func ByHandledBy(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldHandledBy, opts...).ToFunc()
|
|
}
|
|
|
|
// ByHandledAt orders the results by the handledAt field.
|
|
func ByHandledAt(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldHandledAt, opts...).ToFunc()
|
|
}
|
|
|
|
// ByOperator orders the results by the operator field.
|
|
func ByOperator(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldOperator, opts...).ToFunc()
|
|
}
|
|
|
|
// ByCreatedAt orders the results by the createdAt field.
|
|
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
|
|
}
|
|
|
|
// ByResolvedAt orders the results by the resolvedAt field.
|
|
func ByResolvedAt(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldResolvedAt, opts...).ToFunc()
|
|
}
|