feat: 新增检测单关联、基础数据优化与入库单升级
1. 新增出库单检测单号字段并添加索引支持溯源 2. 优化基础数据页面物料类型展示与选择逻辑 3. 升级入库单导入功能,支持自动生成单号并返回导入结果 4. 优化接驳台查询排序方式 5. 修复字符串拼接空格问题
This commit is contained in:
@@ -0,0 +1,230 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package inboundorder
|
||||
|
||||
import (
|
||||
"entgo.io/ent/dialect/sql"
|
||||
)
|
||||
|
||||
const (
|
||||
// Label holds the string label denoting the inboundorder type in the database.
|
||||
Label = "inbound_order"
|
||||
// FieldID holds the string denoting the id field in the database.
|
||||
FieldID = "id"
|
||||
// FieldInboundNo holds the string denoting the inbound_no field in the database.
|
||||
FieldInboundNo = "inbound_no"
|
||||
// FieldInboundType holds the string denoting the inbound_type field in the database.
|
||||
FieldInboundType = "inbound_type"
|
||||
// FieldMaterialCode holds the string denoting the material_code field in the database.
|
||||
FieldMaterialCode = "material_code"
|
||||
// FieldMaterialName holds the string denoting the material_name field in the database.
|
||||
FieldMaterialName = "material_name"
|
||||
// FieldManageMode holds the string denoting the manage_mode field in the database.
|
||||
FieldManageMode = "manage_mode"
|
||||
// FieldBatchNo holds the string denoting the batch_no field in the database.
|
||||
FieldBatchNo = "batch_no"
|
||||
// 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"
|
||||
// FieldQuantity holds the string denoting the quantity field in the database.
|
||||
FieldQuantity = "quantity"
|
||||
// FieldOperator holds the string denoting the operator field in the database.
|
||||
FieldOperator = "operator"
|
||||
// FieldRemark holds the string denoting the remark field in the database.
|
||||
FieldRemark = "remark"
|
||||
// FieldInspectionNo holds the string denoting the inspection_no field in the database.
|
||||
FieldInspectionNo = "inspection_no"
|
||||
// FieldOwnershipType holds the string denoting the ownership_type field in the database.
|
||||
FieldOwnershipType = "ownership_type"
|
||||
// FieldOwnershipNo holds the string denoting the ownership_no field in the database.
|
||||
FieldOwnershipNo = "ownership_no"
|
||||
// FieldQualityStatus holds the string denoting the quality_status field in the database.
|
||||
FieldQualityStatus = "quality_status"
|
||||
// FieldVoided holds the string denoting the voided field in the database.
|
||||
FieldVoided = "voided"
|
||||
// FieldVoidReason holds the string denoting the void_reason field in the database.
|
||||
FieldVoidReason = "void_reason"
|
||||
// FieldVoidedBy holds the string denoting the voided_by field in the database.
|
||||
FieldVoidedBy = "voided_by"
|
||||
// FieldVoidedAt holds the string denoting the voided_at field in the database.
|
||||
FieldVoidedAt = "voided_at"
|
||||
// FieldCreatedAt holds the string denoting the created_at field in the database.
|
||||
FieldCreatedAt = "created_at"
|
||||
// Table holds the table name of the inboundorder in the database.
|
||||
Table = "inbound_orders"
|
||||
)
|
||||
|
||||
// Columns holds all SQL columns for inboundorder fields.
|
||||
var Columns = []string{
|
||||
FieldID,
|
||||
FieldInboundNo,
|
||||
FieldInboundType,
|
||||
FieldMaterialCode,
|
||||
FieldMaterialName,
|
||||
FieldManageMode,
|
||||
FieldBatchNo,
|
||||
FieldZoneCode,
|
||||
FieldShelfNo,
|
||||
FieldLayerNo,
|
||||
FieldPositionNo,
|
||||
FieldQuantity,
|
||||
FieldOperator,
|
||||
FieldRemark,
|
||||
FieldInspectionNo,
|
||||
FieldOwnershipType,
|
||||
FieldOwnershipNo,
|
||||
FieldQualityStatus,
|
||||
FieldVoided,
|
||||
FieldVoidReason,
|
||||
FieldVoidedBy,
|
||||
FieldVoidedAt,
|
||||
FieldCreatedAt,
|
||||
}
|
||||
|
||||
// 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 (
|
||||
// DefaultInboundType holds the default value on creation for the "inbound_type" field.
|
||||
DefaultInboundType string
|
||||
// DefaultManageMode holds the default value on creation for the "manage_mode" field.
|
||||
DefaultManageMode int
|
||||
// DefaultQuantity holds the default value on creation for the "quantity" field.
|
||||
DefaultQuantity int
|
||||
// DefaultOwnershipType holds the default value on creation for the "ownership_type" field.
|
||||
DefaultOwnershipType string
|
||||
// DefaultVoided holds the default value on creation for the "voided" field.
|
||||
DefaultVoided bool
|
||||
// DefaultCreatedAt holds the default value on creation for the "created_at" field.
|
||||
DefaultCreatedAt func() int64
|
||||
)
|
||||
|
||||
// OrderOption defines the ordering options for the InboundOrder 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()
|
||||
}
|
||||
|
||||
// ByInboundNo orders the results by the inbound_no field.
|
||||
func ByInboundNo(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldInboundNo, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByInboundType orders the results by the inbound_type field.
|
||||
func ByInboundType(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldInboundType, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByMaterialCode orders the results by the material_code field.
|
||||
func ByMaterialCode(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldMaterialCode, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByMaterialName orders the results by the material_name field.
|
||||
func ByMaterialName(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldMaterialName, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByManageMode orders the results by the manage_mode field.
|
||||
func ByManageMode(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldManageMode, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByBatchNo orders the results by the batch_no field.
|
||||
func ByBatchNo(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldBatchNo, 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()
|
||||
}
|
||||
|
||||
// ByQuantity orders the results by the quantity field.
|
||||
func ByQuantity(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldQuantity, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByOperator orders the results by the operator field.
|
||||
func ByOperator(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldOperator, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByRemark orders the results by the remark field.
|
||||
func ByRemark(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldRemark, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByInspectionNo orders the results by the inspection_no field.
|
||||
func ByInspectionNo(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldInspectionNo, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByOwnershipType orders the results by the ownership_type field.
|
||||
func ByOwnershipType(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldOwnershipType, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByOwnershipNo orders the results by the ownership_no field.
|
||||
func ByOwnershipNo(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldOwnershipNo, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByQualityStatus orders the results by the quality_status field.
|
||||
func ByQualityStatus(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldQualityStatus, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByVoided orders the results by the voided field.
|
||||
func ByVoided(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldVoided, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByVoidReason orders the results by the void_reason field.
|
||||
func ByVoidReason(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldVoidReason, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByVoidedBy orders the results by the voided_by field.
|
||||
func ByVoidedBy(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldVoidedBy, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByVoidedAt orders the results by the voided_at field.
|
||||
func ByVoidedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldVoidedAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCreatedAt orders the results by the created_at field.
|
||||
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user