chore: 批量完成项目多模块迭代优化
1. 废弃半成品库存表并统一库存主表 2. 修复列表排序与搜索大小写不敏感问题 3. 新增用户最近登录时间、工单BOM名称字段 4. 完善角色管理、工位选择器功能 5. 增加拧紧数据补录、成品自动回流WMS能力 6. 统一导出时间范围校验规则 7. 丰富物料/备料单筛选条件 8. 调整菜单与权限命名适配产品型号业务
This commit is contained in:
@@ -13,6 +13,8 @@ const (
|
||||
FieldID = "id"
|
||||
// FieldManageMode holds the string denoting the manage_mode field in the database.
|
||||
FieldManageMode = "manage_mode"
|
||||
// FieldCategory holds the string denoting the category field in the database.
|
||||
FieldCategory = "category"
|
||||
// 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.
|
||||
@@ -37,6 +39,10 @@ const (
|
||||
FieldSupplier = "supplier"
|
||||
// FieldInboundNo holds the string denoting the inbound_no field in the database.
|
||||
FieldInboundNo = "inbound_no"
|
||||
// FieldOrderNo holds the string denoting the order_no field in the database.
|
||||
FieldOrderNo = "order_no"
|
||||
// FieldCompletedProcess holds the string denoting the completed_process field in the database.
|
||||
FieldCompletedProcess = "completed_process"
|
||||
// FieldRemark holds the string denoting the remark field in the database.
|
||||
FieldRemark = "remark"
|
||||
// FieldCreatedAt holds the string denoting the created_at field in the database.
|
||||
@@ -51,6 +57,7 @@ const (
|
||||
var Columns = []string{
|
||||
FieldID,
|
||||
FieldManageMode,
|
||||
FieldCategory,
|
||||
FieldMaterialCode,
|
||||
FieldMaterialName,
|
||||
FieldBatchNo,
|
||||
@@ -63,6 +70,8 @@ var Columns = []string{
|
||||
FieldProductionDate,
|
||||
FieldSupplier,
|
||||
FieldInboundNo,
|
||||
FieldOrderNo,
|
||||
FieldCompletedProcess,
|
||||
FieldRemark,
|
||||
FieldCreatedAt,
|
||||
FieldUpdatedAt,
|
||||
@@ -79,6 +88,8 @@ func ValidColumn(column string) bool {
|
||||
}
|
||||
|
||||
var (
|
||||
// DefaultCategory holds the default value on creation for the "category" field.
|
||||
DefaultCategory int
|
||||
// DefaultQuantity holds the default value on creation for the "quantity" field.
|
||||
DefaultQuantity int
|
||||
// DefaultLockedQty holds the default value on creation for the "locked_qty" field.
|
||||
@@ -87,6 +98,14 @@ var (
|
||||
DefaultQualityStatus string
|
||||
// DefaultStatus holds the default value on creation for the "status" field.
|
||||
DefaultStatus string
|
||||
// DefaultOrderNo holds the default value on creation for the "order_no" field.
|
||||
DefaultOrderNo string
|
||||
// OrderNoValidator is a validator for the "order_no" field. It is called by the builders before save.
|
||||
OrderNoValidator func(string) error
|
||||
// DefaultCompletedProcess holds the default value on creation for the "completed_process" field.
|
||||
DefaultCompletedProcess string
|
||||
// CompletedProcessValidator is a validator for the "completed_process" field. It is called by the builders before save.
|
||||
CompletedProcessValidator func(string) error
|
||||
// DefaultCreatedAt holds the default value on creation for the "created_at" field.
|
||||
DefaultCreatedAt func() int64
|
||||
// DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
|
||||
@@ -106,6 +125,11 @@ func ByManageMode(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldManageMode, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCategory orders the results by the category field.
|
||||
func ByCategory(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCategory, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByMaterialCode orders the results by the material_code field.
|
||||
func ByMaterialCode(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldMaterialCode, opts...).ToFunc()
|
||||
@@ -166,6 +190,16 @@ func ByInboundNo(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldInboundNo, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByOrderNo orders the results by the order_no field.
|
||||
func ByOrderNo(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldOrderNo, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCompletedProcess orders the results by the completed_process field.
|
||||
func ByCompletedProcess(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCompletedProcess, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByRemark orders the results by the remark field.
|
||||
func ByRemark(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldRemark, opts...).ToFunc()
|
||||
|
||||
Reference in New Issue
Block a user