Files
bj_power/bj_power_mes/ent/bomitem/bomitem.go
T
SunYF ebf901ad16 chore: 完成多系统功能迭代与优化
1. 通用优化:
   - 统一系统标题为"库房客户端"/"MES产线控制",移除北自所前缀
   - 调整内置账号密码为统一123456,优化密码校验逻辑
   - 新增数据库自动创建逻辑,简化部署流程
   - 修复日志时间格式配置,优化日志输出
   - 新增纯数字密码安全提示

2. MES系统优化:
   - 新增日排产管理功能,支持增删改查与自动算料生成备料单
   - 重构BOM模块,改为按产品编码维护而非工单维度
   - 新增工艺参数模板配置与手动报工页面
   - 新增产品类型自动编码功能
   - 优化菜单结构,调整工单管理、扫码报工等页面名称与路由
   - 新增删除日排产接口与权限保护
   - 修复物料清单查询逻辑,适配新BOM结构
   - 新增refreshToken支持,优化登录会话管理

3. WMS系统优化:
   - 新增基础数据维护页面,支持区域与物料档案管理
   - 新增工单列表下拉接口,对接MES获取未完成工单优先展示
   - 优化入库管理提示文案,替换英文提示为中文
   - 修复精密件入库校验逻辑,优化错误提示
   - 优化Excel导入功能,新增备注字段支持
   - 优化登录页面与菜单文案,统一备料台账名称
   - 新增自动打开浏览器功能,优化客户端启动体验
   - 修复备料出库页面查询提示文案
   - 新增WMS与MES对接配置,完善内部API调用逻辑

4. 其他优化:
   - 删除冗余的旧版静态资源文件,更新资源引用路径
   - 新增帮助文档,完善基础数据模块说明
   - 修复多处文案不统一、英文残留问题
2026-08-29 15:30:25 +08:00

160 lines
6.0 KiB
Go

// Code generated by ent, DO NOT EDIT.
package bomitem
import (
"time"
"entgo.io/ent/dialect/sql"
)
const (
// Label holds the string label denoting the bomitem type in the database.
Label = "bom_item"
// FieldID holds the string denoting the id field in the database.
FieldID = "id"
// FieldProductCode holds the string denoting the productcode field in the database.
FieldProductCode = "product_code"
// FieldMaterialCode holds the string denoting the materialcode field in the database.
FieldMaterialCode = "material_code"
// FieldMaterialName holds the string denoting the materialname field in the database.
FieldMaterialName = "material_name"
// FieldSpec holds the string denoting the spec field in the database.
FieldSpec = "spec"
// FieldUnit holds the string denoting the unit field in the database.
FieldUnit = "unit"
// FieldManageMode holds the string denoting the managemode field in the database.
FieldManageMode = "manage_mode"
// FieldUnitQty holds the string denoting the unitqty field in the database.
FieldUnitQty = "unit_qty"
// FieldLossRate holds the string denoting the lossrate field in the database.
FieldLossRate = "loss_rate"
// FieldRequiredQty holds the string denoting the requiredqty field in the database.
FieldRequiredQty = "required_qty"
// FieldSerialSns holds the string denoting the serialsns field in the database.
FieldSerialSns = "serial_sns"
// FieldCreatedAt holds the string denoting the createdat field in the database.
FieldCreatedAt = "created_at"
// Table holds the table name of the bomitem in the database.
Table = "work_order_bom"
)
// Columns holds all SQL columns for bomitem fields.
var Columns = []string{
FieldID,
FieldProductCode,
FieldMaterialCode,
FieldMaterialName,
FieldSpec,
FieldUnit,
FieldManageMode,
FieldUnitQty,
FieldLossRate,
FieldRequiredQty,
FieldSerialSns,
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 (
// DefaultProductCode holds the default value on creation for the "productCode" field.
DefaultProductCode string
// ProductCodeValidator is a validator for the "productCode" field. It is called by the builders before save.
ProductCodeValidator func(string) error
// MaterialCodeValidator is a validator for the "materialCode" field. It is called by the builders before save.
MaterialCodeValidator func(string) error
// DefaultMaterialName holds the default value on creation for the "materialName" field.
DefaultMaterialName string
// MaterialNameValidator is a validator for the "materialName" field. It is called by the builders before save.
MaterialNameValidator func(string) error
// DefaultSpec holds the default value on creation for the "spec" field.
DefaultSpec string
// SpecValidator is a validator for the "spec" field. It is called by the builders before save.
SpecValidator func(string) error
// DefaultUnit holds the default value on creation for the "unit" field.
DefaultUnit string
// UnitValidator is a validator for the "unit" field. It is called by the builders before save.
UnitValidator func(string) error
// DefaultManageMode holds the default value on creation for the "manageMode" field.
DefaultManageMode string
// ManageModeValidator is a validator for the "manageMode" field. It is called by the builders before save.
ManageModeValidator func(string) error
// DefaultUnitQty holds the default value on creation for the "unitQty" field.
DefaultUnitQty float64
// DefaultLossRate holds the default value on creation for the "lossRate" field.
DefaultLossRate float64
// DefaultRequiredQty holds the default value on creation for the "requiredQty" field.
DefaultRequiredQty float64
// DefaultCreatedAt holds the default value on creation for the "createdAt" field.
DefaultCreatedAt func() time.Time
// IDValidator is a validator for the "id" field. It is called by the builders before save.
IDValidator func(int) error
)
// OrderOption defines the ordering options for the BomItem 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()
}
// ByProductCode orders the results by the productCode field.
func ByProductCode(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldProductCode, opts...).ToFunc()
}
// ByMaterialCode orders the results by the materialCode field.
func ByMaterialCode(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldMaterialCode, opts...).ToFunc()
}
// ByMaterialName orders the results by the materialName field.
func ByMaterialName(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldMaterialName, opts...).ToFunc()
}
// BySpec orders the results by the spec field.
func BySpec(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldSpec, opts...).ToFunc()
}
// ByUnit orders the results by the unit field.
func ByUnit(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldUnit, opts...).ToFunc()
}
// ByManageMode orders the results by the manageMode field.
func ByManageMode(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldManageMode, opts...).ToFunc()
}
// ByUnitQty orders the results by the unitQty field.
func ByUnitQty(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldUnitQty, opts...).ToFunc()
}
// ByLossRate orders the results by the lossRate field.
func ByLossRate(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldLossRate, opts...).ToFunc()
}
// ByRequiredQty orders the results by the requiredQty field.
func ByRequiredQty(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldRequiredQty, opts...).ToFunc()
}
// ByCreatedAt orders the results by the createdAt field.
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
}