feat: 核心业务实体扩充(混产模板/产品BOM/试制记录)、WMS 库存检验增强与前端通用能力

- MES 新增实体:混产模板、产品BOM、产品工艺物料、试制记录(schema + ent 生成码 + logic/handler/前端页)
- WMS 实体增强:检验记录、库存、半成品重构;新增序列号库存与短缺代报
- AGV 与产能:AGV 手动点位与链路、物料守卫、短缺预测、原因字典
- 前端通用能力:新增下一步引导组件 NextStepBar,统一帮助文档/布局/请求拦截与操作列
- 工位终端:界面与各 handler 调整(api/store/绑定/PLC/拧紧/上报等)
- 配置与文档:更新 mes-api.yaml、WMS README 及案例/产线API/问题记录/项目说明/流程说明
This commit is contained in:
SunYF
2026-11-15 12:17:39 +08:00
parent 7e8066ab66
commit 1e92b2a596
221 changed files with 26421 additions and 2230 deletions
@@ -0,0 +1,100 @@
// Code generated by ent, DO NOT EDIT.
package mixproductiontemplate
import (
"time"
"entgo.io/ent/dialect/sql"
)
const (
// Label holds the string label denoting the mixproductiontemplate type in the database.
Label = "mix_production_template"
// FieldID holds the string denoting the id field in the database.
FieldID = "id"
// FieldName holds the string denoting the name field in the database.
FieldName = "name"
// FieldProductCodes holds the string denoting the productcodes field in the database.
FieldProductCodes = "product_codes"
// FieldRemark holds the string denoting the remark field in the database.
FieldRemark = "remark"
// FieldStatus holds the string denoting the status field in the database.
FieldStatus = "status"
// FieldCreatedAt holds the string denoting the createdat field in the database.
FieldCreatedAt = "created_at"
// Table holds the table name of the mixproductiontemplate in the database.
Table = "mix_production_template"
)
// Columns holds all SQL columns for mixproductiontemplate fields.
var Columns = []string{
FieldID,
FieldName,
FieldProductCodes,
FieldRemark,
FieldStatus,
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 (
// NameValidator is a validator for the "name" field. It is called by the builders before save.
NameValidator func(string) error
// DefaultProductCodes holds the default value on creation for the "productCodes" field.
DefaultProductCodes string
// DefaultRemark holds the default value on creation for the "remark" field.
DefaultRemark string
// RemarkValidator is a validator for the "remark" field. It is called by the builders before save.
RemarkValidator func(string) error
// DefaultStatus holds the default value on creation for the "status" field.
DefaultStatus string
// StatusValidator is a validator for the "status" field. It is called by the builders before save.
StatusValidator func(string) error
// 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 MixProductionTemplate 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()
}
// ByName orders the results by the name field.
func ByName(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldName, opts...).ToFunc()
}
// ByProductCodes orders the results by the productCodes field.
func ByProductCodes(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldProductCodes, opts...).ToFunc()
}
// ByRemark orders the results by the remark field.
func ByRemark(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldRemark, opts...).ToFunc()
}
// ByStatus orders the results by the status field.
func ByStatus(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldStatus, opts...).ToFunc()
}
// ByCreatedAt orders the results by the createdAt field.
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
}
@@ -0,0 +1,395 @@
// Code generated by ent, DO NOT EDIT.
package mixproductiontemplate
import (
"bj_power_mes/ent/predicate"
"time"
"entgo.io/ent/dialect/sql"
)
// ID filters vertices based on their ID field.
func ID(id int) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldEQ(FieldID, id))
}
// IDEQ applies the EQ predicate on the ID field.
func IDEQ(id int) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldEQ(FieldID, id))
}
// IDNEQ applies the NEQ predicate on the ID field.
func IDNEQ(id int) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldNEQ(FieldID, id))
}
// IDIn applies the In predicate on the ID field.
func IDIn(ids ...int) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldIn(FieldID, ids...))
}
// IDNotIn applies the NotIn predicate on the ID field.
func IDNotIn(ids ...int) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldNotIn(FieldID, ids...))
}
// IDGT applies the GT predicate on the ID field.
func IDGT(id int) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldGT(FieldID, id))
}
// IDGTE applies the GTE predicate on the ID field.
func IDGTE(id int) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldGTE(FieldID, id))
}
// IDLT applies the LT predicate on the ID field.
func IDLT(id int) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldLT(FieldID, id))
}
// IDLTE applies the LTE predicate on the ID field.
func IDLTE(id int) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldLTE(FieldID, id))
}
// Name applies equality check predicate on the "name" field. It's identical to NameEQ.
func Name(v string) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldEQ(FieldName, v))
}
// ProductCodes applies equality check predicate on the "productCodes" field. It's identical to ProductCodesEQ.
func ProductCodes(v string) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldEQ(FieldProductCodes, v))
}
// Remark applies equality check predicate on the "remark" field. It's identical to RemarkEQ.
func Remark(v string) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldEQ(FieldRemark, v))
}
// Status applies equality check predicate on the "status" field. It's identical to StatusEQ.
func Status(v string) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldEQ(FieldStatus, v))
}
// CreatedAt applies equality check predicate on the "createdAt" field. It's identical to CreatedAtEQ.
func CreatedAt(v time.Time) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldEQ(FieldCreatedAt, v))
}
// NameEQ applies the EQ predicate on the "name" field.
func NameEQ(v string) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldEQ(FieldName, v))
}
// NameNEQ applies the NEQ predicate on the "name" field.
func NameNEQ(v string) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldNEQ(FieldName, v))
}
// NameIn applies the In predicate on the "name" field.
func NameIn(vs ...string) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldIn(FieldName, vs...))
}
// NameNotIn applies the NotIn predicate on the "name" field.
func NameNotIn(vs ...string) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldNotIn(FieldName, vs...))
}
// NameGT applies the GT predicate on the "name" field.
func NameGT(v string) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldGT(FieldName, v))
}
// NameGTE applies the GTE predicate on the "name" field.
func NameGTE(v string) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldGTE(FieldName, v))
}
// NameLT applies the LT predicate on the "name" field.
func NameLT(v string) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldLT(FieldName, v))
}
// NameLTE applies the LTE predicate on the "name" field.
func NameLTE(v string) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldLTE(FieldName, v))
}
// NameContains applies the Contains predicate on the "name" field.
func NameContains(v string) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldContains(FieldName, v))
}
// NameHasPrefix applies the HasPrefix predicate on the "name" field.
func NameHasPrefix(v string) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldHasPrefix(FieldName, v))
}
// NameHasSuffix applies the HasSuffix predicate on the "name" field.
func NameHasSuffix(v string) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldHasSuffix(FieldName, v))
}
// NameEqualFold applies the EqualFold predicate on the "name" field.
func NameEqualFold(v string) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldEqualFold(FieldName, v))
}
// NameContainsFold applies the ContainsFold predicate on the "name" field.
func NameContainsFold(v string) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldContainsFold(FieldName, v))
}
// ProductCodesEQ applies the EQ predicate on the "productCodes" field.
func ProductCodesEQ(v string) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldEQ(FieldProductCodes, v))
}
// ProductCodesNEQ applies the NEQ predicate on the "productCodes" field.
func ProductCodesNEQ(v string) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldNEQ(FieldProductCodes, v))
}
// ProductCodesIn applies the In predicate on the "productCodes" field.
func ProductCodesIn(vs ...string) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldIn(FieldProductCodes, vs...))
}
// ProductCodesNotIn applies the NotIn predicate on the "productCodes" field.
func ProductCodesNotIn(vs ...string) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldNotIn(FieldProductCodes, vs...))
}
// ProductCodesGT applies the GT predicate on the "productCodes" field.
func ProductCodesGT(v string) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldGT(FieldProductCodes, v))
}
// ProductCodesGTE applies the GTE predicate on the "productCodes" field.
func ProductCodesGTE(v string) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldGTE(FieldProductCodes, v))
}
// ProductCodesLT applies the LT predicate on the "productCodes" field.
func ProductCodesLT(v string) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldLT(FieldProductCodes, v))
}
// ProductCodesLTE applies the LTE predicate on the "productCodes" field.
func ProductCodesLTE(v string) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldLTE(FieldProductCodes, v))
}
// ProductCodesContains applies the Contains predicate on the "productCodes" field.
func ProductCodesContains(v string) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldContains(FieldProductCodes, v))
}
// ProductCodesHasPrefix applies the HasPrefix predicate on the "productCodes" field.
func ProductCodesHasPrefix(v string) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldHasPrefix(FieldProductCodes, v))
}
// ProductCodesHasSuffix applies the HasSuffix predicate on the "productCodes" field.
func ProductCodesHasSuffix(v string) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldHasSuffix(FieldProductCodes, v))
}
// ProductCodesEqualFold applies the EqualFold predicate on the "productCodes" field.
func ProductCodesEqualFold(v string) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldEqualFold(FieldProductCodes, v))
}
// ProductCodesContainsFold applies the ContainsFold predicate on the "productCodes" field.
func ProductCodesContainsFold(v string) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldContainsFold(FieldProductCodes, v))
}
// RemarkEQ applies the EQ predicate on the "remark" field.
func RemarkEQ(v string) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldEQ(FieldRemark, v))
}
// RemarkNEQ applies the NEQ predicate on the "remark" field.
func RemarkNEQ(v string) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldNEQ(FieldRemark, v))
}
// RemarkIn applies the In predicate on the "remark" field.
func RemarkIn(vs ...string) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldIn(FieldRemark, vs...))
}
// RemarkNotIn applies the NotIn predicate on the "remark" field.
func RemarkNotIn(vs ...string) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldNotIn(FieldRemark, vs...))
}
// RemarkGT applies the GT predicate on the "remark" field.
func RemarkGT(v string) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldGT(FieldRemark, v))
}
// RemarkGTE applies the GTE predicate on the "remark" field.
func RemarkGTE(v string) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldGTE(FieldRemark, v))
}
// RemarkLT applies the LT predicate on the "remark" field.
func RemarkLT(v string) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldLT(FieldRemark, v))
}
// RemarkLTE applies the LTE predicate on the "remark" field.
func RemarkLTE(v string) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldLTE(FieldRemark, v))
}
// RemarkContains applies the Contains predicate on the "remark" field.
func RemarkContains(v string) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldContains(FieldRemark, v))
}
// RemarkHasPrefix applies the HasPrefix predicate on the "remark" field.
func RemarkHasPrefix(v string) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldHasPrefix(FieldRemark, v))
}
// RemarkHasSuffix applies the HasSuffix predicate on the "remark" field.
func RemarkHasSuffix(v string) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldHasSuffix(FieldRemark, v))
}
// RemarkEqualFold applies the EqualFold predicate on the "remark" field.
func RemarkEqualFold(v string) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldEqualFold(FieldRemark, v))
}
// RemarkContainsFold applies the ContainsFold predicate on the "remark" field.
func RemarkContainsFold(v string) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldContainsFold(FieldRemark, v))
}
// StatusEQ applies the EQ predicate on the "status" field.
func StatusEQ(v string) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldEQ(FieldStatus, v))
}
// StatusNEQ applies the NEQ predicate on the "status" field.
func StatusNEQ(v string) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldNEQ(FieldStatus, v))
}
// StatusIn applies the In predicate on the "status" field.
func StatusIn(vs ...string) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldIn(FieldStatus, vs...))
}
// StatusNotIn applies the NotIn predicate on the "status" field.
func StatusNotIn(vs ...string) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldNotIn(FieldStatus, vs...))
}
// StatusGT applies the GT predicate on the "status" field.
func StatusGT(v string) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldGT(FieldStatus, v))
}
// StatusGTE applies the GTE predicate on the "status" field.
func StatusGTE(v string) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldGTE(FieldStatus, v))
}
// StatusLT applies the LT predicate on the "status" field.
func StatusLT(v string) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldLT(FieldStatus, v))
}
// StatusLTE applies the LTE predicate on the "status" field.
func StatusLTE(v string) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldLTE(FieldStatus, v))
}
// StatusContains applies the Contains predicate on the "status" field.
func StatusContains(v string) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldContains(FieldStatus, v))
}
// StatusHasPrefix applies the HasPrefix predicate on the "status" field.
func StatusHasPrefix(v string) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldHasPrefix(FieldStatus, v))
}
// StatusHasSuffix applies the HasSuffix predicate on the "status" field.
func StatusHasSuffix(v string) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldHasSuffix(FieldStatus, v))
}
// StatusEqualFold applies the EqualFold predicate on the "status" field.
func StatusEqualFold(v string) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldEqualFold(FieldStatus, v))
}
// StatusContainsFold applies the ContainsFold predicate on the "status" field.
func StatusContainsFold(v string) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldContainsFold(FieldStatus, v))
}
// CreatedAtEQ applies the EQ predicate on the "createdAt" field.
func CreatedAtEQ(v time.Time) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldEQ(FieldCreatedAt, v))
}
// CreatedAtNEQ applies the NEQ predicate on the "createdAt" field.
func CreatedAtNEQ(v time.Time) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldNEQ(FieldCreatedAt, v))
}
// CreatedAtIn applies the In predicate on the "createdAt" field.
func CreatedAtIn(vs ...time.Time) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldIn(FieldCreatedAt, vs...))
}
// CreatedAtNotIn applies the NotIn predicate on the "createdAt" field.
func CreatedAtNotIn(vs ...time.Time) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldNotIn(FieldCreatedAt, vs...))
}
// CreatedAtGT applies the GT predicate on the "createdAt" field.
func CreatedAtGT(v time.Time) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldGT(FieldCreatedAt, v))
}
// CreatedAtGTE applies the GTE predicate on the "createdAt" field.
func CreatedAtGTE(v time.Time) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldGTE(FieldCreatedAt, v))
}
// CreatedAtLT applies the LT predicate on the "createdAt" field.
func CreatedAtLT(v time.Time) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldLT(FieldCreatedAt, v))
}
// CreatedAtLTE applies the LTE predicate on the "createdAt" field.
func CreatedAtLTE(v time.Time) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.FieldLTE(FieldCreatedAt, v))
}
// And groups predicates with the AND operator between them.
func And(predicates ...predicate.MixProductionTemplate) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.AndPredicates(predicates...))
}
// Or groups predicates with the OR operator between them.
func Or(predicates ...predicate.MixProductionTemplate) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.OrPredicates(predicates...))
}
// Not applies the not operator on the given predicate.
func Not(p predicate.MixProductionTemplate) predicate.MixProductionTemplate {
return predicate.MixProductionTemplate(sql.NotPredicates(p))
}