feat: 新增检测单关联、基础数据优化与入库单升级

1. 新增出库单检测单号字段并添加索引支持溯源
2. 优化基础数据页面物料类型展示与选择逻辑
3. 升级入库单导入功能,支持自动生成单号并返回导入结果
4. 优化接驳台查询排序方式
5. 修复字符串拼接空格问题
This commit is contained in:
SunYF
2026-09-21 15:28:14 +08:00
parent 0e769f3813
commit 12ca493c61
70 changed files with 25782 additions and 119 deletions
@@ -0,0 +1,70 @@
// Code generated by ent, DO NOT EDIT.
package materialdemand
import (
"entgo.io/ent/dialect/sql"
)
const (
// Label holds the string label denoting the materialdemand type in the database.
Label = "material_demand"
// FieldID holds the string denoting the id field in the database.
FieldID = "id"
// FieldMaterialCode holds the string denoting the material_code field in the database.
FieldMaterialCode = "material_code"
// FieldFuture5Qty holds the string denoting the future5_qty field in the database.
FieldFuture5Qty = "future5_qty"
// FieldUpdatedAt holds the string denoting the updated_at field in the database.
FieldUpdatedAt = "updated_at"
// Table holds the table name of the materialdemand in the database.
Table = "material_demands"
)
// Columns holds all SQL columns for materialdemand fields.
var Columns = []string{
FieldID,
FieldMaterialCode,
FieldFuture5Qty,
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 (
// DefaultFuture5Qty holds the default value on creation for the "future5_qty" field.
DefaultFuture5Qty int
// DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
DefaultUpdatedAt func() int64
)
// OrderOption defines the ordering options for the MaterialDemand 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()
}
// ByMaterialCode orders the results by the material_code field.
func ByMaterialCode(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldMaterialCode, opts...).ToFunc()
}
// ByFuture5Qty orders the results by the future5_qty field.
func ByFuture5Qty(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldFuture5Qty, opts...).ToFunc()
}
// ByUpdatedAt orders the results by the updated_at field.
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldUpdatedAt, opts...).ToFunc()
}