feat: 新增检测单关联、基础数据优化与入库单升级
1. 新增出库单检测单号字段并添加索引支持溯源 2. 优化基础数据页面物料类型展示与选择逻辑 3. 升级入库单导入功能,支持自动生成单号并返回导入结果 4. 优化接驳台查询排序方式 5. 修复字符串拼接空格问题
This commit is contained in:
@@ -0,0 +1,156 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package stocktakeorder
|
||||
|
||||
import (
|
||||
"entgo.io/ent/dialect/sql"
|
||||
)
|
||||
|
||||
const (
|
||||
// Label holds the string label denoting the stocktakeorder type in the database.
|
||||
Label = "stocktake_order"
|
||||
// FieldID holds the string denoting the id field in the database.
|
||||
FieldID = "id"
|
||||
// FieldStocktakeNo holds the string denoting the stocktake_no field in the database.
|
||||
FieldStocktakeNo = "stocktake_no"
|
||||
// FieldStatus holds the string denoting the status field in the database.
|
||||
FieldStatus = "status"
|
||||
// FieldOperator holds the string denoting the operator field in the database.
|
||||
FieldOperator = "operator"
|
||||
// FieldTotalTargets holds the string denoting the total_targets field in the database.
|
||||
FieldTotalTargets = "total_targets"
|
||||
// FieldDiffCount holds the string denoting the diff_count field in the database.
|
||||
FieldDiffCount = "diff_count"
|
||||
// FieldAdjusted holds the string denoting the adjusted field in the database.
|
||||
FieldAdjusted = "adjusted"
|
||||
// FieldAdjustNo holds the string denoting the adjust_no field in the database.
|
||||
FieldAdjustNo = "adjust_no"
|
||||
// FieldWrittenAt holds the string denoting the written_at field in the database.
|
||||
FieldWrittenAt = "written_at"
|
||||
// FieldWrittenBy holds the string denoting the written_by field in the database.
|
||||
FieldWrittenBy = "written_by"
|
||||
// FieldUncountedMode holds the string denoting the uncounted_mode field in the database.
|
||||
FieldUncountedMode = "uncounted_mode"
|
||||
// FieldCancelReason holds the string denoting the cancel_reason field in the database.
|
||||
FieldCancelReason = "cancel_reason"
|
||||
// FieldCreatedAt holds the string denoting the created_at field in the database.
|
||||
FieldCreatedAt = "created_at"
|
||||
// FieldFinishedAt holds the string denoting the finished_at field in the database.
|
||||
FieldFinishedAt = "finished_at"
|
||||
// Table holds the table name of the stocktakeorder in the database.
|
||||
Table = "stocktake_orders"
|
||||
)
|
||||
|
||||
// Columns holds all SQL columns for stocktakeorder fields.
|
||||
var Columns = []string{
|
||||
FieldID,
|
||||
FieldStocktakeNo,
|
||||
FieldStatus,
|
||||
FieldOperator,
|
||||
FieldTotalTargets,
|
||||
FieldDiffCount,
|
||||
FieldAdjusted,
|
||||
FieldAdjustNo,
|
||||
FieldWrittenAt,
|
||||
FieldWrittenBy,
|
||||
FieldUncountedMode,
|
||||
FieldCancelReason,
|
||||
FieldCreatedAt,
|
||||
FieldFinishedAt,
|
||||
}
|
||||
|
||||
// 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 (
|
||||
// DefaultStatus holds the default value on creation for the "status" field.
|
||||
DefaultStatus string
|
||||
// DefaultTotalTargets holds the default value on creation for the "total_targets" field.
|
||||
DefaultTotalTargets int
|
||||
// DefaultDiffCount holds the default value on creation for the "diff_count" field.
|
||||
DefaultDiffCount int
|
||||
// DefaultAdjusted holds the default value on creation for the "adjusted" field.
|
||||
DefaultAdjusted bool
|
||||
// DefaultCreatedAt holds the default value on creation for the "created_at" field.
|
||||
DefaultCreatedAt func() int64
|
||||
)
|
||||
|
||||
// OrderOption defines the ordering options for the StocktakeOrder 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()
|
||||
}
|
||||
|
||||
// ByStocktakeNo orders the results by the stocktake_no field.
|
||||
func ByStocktakeNo(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldStocktakeNo, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByStatus orders the results by the status field.
|
||||
func ByStatus(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldStatus, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByOperator orders the results by the operator field.
|
||||
func ByOperator(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldOperator, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByTotalTargets orders the results by the total_targets field.
|
||||
func ByTotalTargets(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldTotalTargets, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByDiffCount orders the results by the diff_count field.
|
||||
func ByDiffCount(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldDiffCount, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByAdjusted orders the results by the adjusted field.
|
||||
func ByAdjusted(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldAdjusted, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByAdjustNo orders the results by the adjust_no field.
|
||||
func ByAdjustNo(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldAdjustNo, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByWrittenAt orders the results by the written_at field.
|
||||
func ByWrittenAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldWrittenAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByWrittenBy orders the results by the written_by field.
|
||||
func ByWrittenBy(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldWrittenBy, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByUncountedMode orders the results by the uncounted_mode field.
|
||||
func ByUncountedMode(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldUncountedMode, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCancelReason orders the results by the cancel_reason field.
|
||||
func ByCancelReason(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCancelReason, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCreatedAt orders the results by the created_at field.
|
||||
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByFinishedAt orders the results by the finished_at field.
|
||||
func ByFinishedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldFinishedAt, opts...).ToFunc()
|
||||
}
|
||||
Reference in New Issue
Block a user