feat: 新增检测单关联、基础数据优化与入库单升级
1. 新增出库单检测单号字段并添加索引支持溯源 2. 优化基础数据页面物料类型展示与选择逻辑 3. 升级入库单导入功能,支持自动生成单号并返回导入结果 4. 优化接驳台查询排序方式 5. 修复字符串拼接空格问题
This commit is contained in:
@@ -0,0 +1,172 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package stocktakeitem
|
||||
|
||||
import (
|
||||
"entgo.io/ent/dialect/sql"
|
||||
)
|
||||
|
||||
const (
|
||||
// Label holds the string label denoting the stocktakeitem type in the database.
|
||||
Label = "stocktake_item"
|
||||
// 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"
|
||||
// FieldTargetType holds the string denoting the target_type field in the database.
|
||||
FieldTargetType = "target_type"
|
||||
// FieldTargetID holds the string denoting the target_id field in the database.
|
||||
FieldTargetID = "target_id"
|
||||
// FieldMaterialCode holds the string denoting the material_code field in the database.
|
||||
FieldMaterialCode = "material_code"
|
||||
// FieldZoneCode holds the string denoting the zone_code field in the database.
|
||||
FieldZoneCode = "zone_code"
|
||||
// FieldShelfNo holds the string denoting the shelf_no field in the database.
|
||||
FieldShelfNo = "shelf_no"
|
||||
// FieldLayerNo holds the string denoting the layer_no field in the database.
|
||||
FieldLayerNo = "layer_no"
|
||||
// FieldPositionNo holds the string denoting the position_no field in the database.
|
||||
FieldPositionNo = "position_no"
|
||||
// FieldBookQty holds the string denoting the book_qty field in the database.
|
||||
FieldBookQty = "book_qty"
|
||||
// FieldScannedQty holds the string denoting the scanned_qty field in the database.
|
||||
FieldScannedQty = "scanned_qty"
|
||||
// FieldDiffQty holds the string denoting the diff_qty field in the database.
|
||||
FieldDiffQty = "diff_qty"
|
||||
// FieldCounted holds the string denoting the counted field in the database.
|
||||
FieldCounted = "counted"
|
||||
// FieldCountedBy holds the string denoting the counted_by field in the database.
|
||||
FieldCountedBy = "counted_by"
|
||||
// FieldCountedAt holds the string denoting the counted_at field in the database.
|
||||
FieldCountedAt = "counted_at"
|
||||
// FieldUpdatedAt holds the string denoting the updated_at field in the database.
|
||||
FieldUpdatedAt = "updated_at"
|
||||
// Table holds the table name of the stocktakeitem in the database.
|
||||
Table = "stocktake_items"
|
||||
)
|
||||
|
||||
// Columns holds all SQL columns for stocktakeitem fields.
|
||||
var Columns = []string{
|
||||
FieldID,
|
||||
FieldStocktakeNo,
|
||||
FieldTargetType,
|
||||
FieldTargetID,
|
||||
FieldMaterialCode,
|
||||
FieldZoneCode,
|
||||
FieldShelfNo,
|
||||
FieldLayerNo,
|
||||
FieldPositionNo,
|
||||
FieldBookQty,
|
||||
FieldScannedQty,
|
||||
FieldDiffQty,
|
||||
FieldCounted,
|
||||
FieldCountedBy,
|
||||
FieldCountedAt,
|
||||
FieldUpdatedAt,
|
||||
}
|
||||
|
||||
// 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 (
|
||||
// DefaultBookQty holds the default value on creation for the "book_qty" field.
|
||||
DefaultBookQty int
|
||||
// DefaultScannedQty holds the default value on creation for the "scanned_qty" field.
|
||||
DefaultScannedQty int
|
||||
// DefaultDiffQty holds the default value on creation for the "diff_qty" field.
|
||||
DefaultDiffQty int
|
||||
// DefaultCounted holds the default value on creation for the "counted" field.
|
||||
DefaultCounted bool
|
||||
// DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
|
||||
DefaultUpdatedAt func() int64
|
||||
)
|
||||
|
||||
// OrderOption defines the ordering options for the StocktakeItem 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()
|
||||
}
|
||||
|
||||
// ByTargetType orders the results by the target_type field.
|
||||
func ByTargetType(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldTargetType, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByTargetID orders the results by the target_id field.
|
||||
func ByTargetID(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldTargetID, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByMaterialCode orders the results by the material_code field.
|
||||
func ByMaterialCode(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldMaterialCode, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByZoneCode orders the results by the zone_code field.
|
||||
func ByZoneCode(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldZoneCode, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByShelfNo orders the results by the shelf_no field.
|
||||
func ByShelfNo(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldShelfNo, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByLayerNo orders the results by the layer_no field.
|
||||
func ByLayerNo(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldLayerNo, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByPositionNo orders the results by the position_no field.
|
||||
func ByPositionNo(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldPositionNo, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByBookQty orders the results by the book_qty field.
|
||||
func ByBookQty(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldBookQty, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByScannedQty orders the results by the scanned_qty field.
|
||||
func ByScannedQty(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldScannedQty, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByDiffQty orders the results by the diff_qty field.
|
||||
func ByDiffQty(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldDiffQty, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCounted orders the results by the counted field.
|
||||
func ByCounted(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCounted, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCountedBy orders the results by the counted_by field.
|
||||
func ByCountedBy(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCountedBy, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCountedAt orders the results by the counted_at field.
|
||||
func ByCountedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCountedAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByUpdatedAt orders the results by the updated_at field.
|
||||
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldUpdatedAt, opts...).ToFunc()
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user