feat: 完成MES工位终端系统全量功能迭代
本次提交包含以下核心变更: 1. 新增按钮级权限控制框架与前端权限校验 2. 新增工位管理、工艺流程、巡检终端等核心业务模块 3. 完善用户体系,支持工位终端专属登录权限 4. 新增文件上传下载、报表查询等配套功能 5. 修复多系统兼容性与交互体验问题 6. 完成所有文档与配置项的规范化更新
This commit is contained in:
@@ -0,0 +1,96 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package station
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"entgo.io/ent/dialect/sql"
|
||||
)
|
||||
|
||||
const (
|
||||
// Label holds the string label denoting the station type in the database.
|
||||
Label = "station"
|
||||
// FieldID holds the string denoting the id field in the database.
|
||||
FieldID = "id"
|
||||
// FieldStationNo holds the string denoting the stationno field in the database.
|
||||
FieldStationNo = "station_no"
|
||||
// FieldName holds the string denoting the name field in the database.
|
||||
FieldName = "name"
|
||||
// FieldFlowId holds the string denoting the flowid field in the database.
|
||||
FieldFlowId = "flow_id"
|
||||
// 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 station in the database.
|
||||
Table = "station"
|
||||
)
|
||||
|
||||
// Columns holds all SQL columns for station fields.
|
||||
var Columns = []string{
|
||||
FieldID,
|
||||
FieldStationNo,
|
||||
FieldName,
|
||||
FieldFlowId,
|
||||
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 (
|
||||
// DefaultName holds the default value on creation for the "name" field.
|
||||
DefaultName string
|
||||
// NameValidator is a validator for the "name" field. It is called by the builders before save.
|
||||
NameValidator 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 Station 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()
|
||||
}
|
||||
|
||||
// ByStationNo orders the results by the stationNo field.
|
||||
func ByStationNo(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldStationNo, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByName orders the results by the name field.
|
||||
func ByName(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldName, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByFlowId orders the results by the flowId field.
|
||||
func ByFlowId(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldFlowId, 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,355 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package station
|
||||
|
||||
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.Station {
|
||||
return predicate.Station(sql.FieldEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDEQ applies the EQ predicate on the ID field.
|
||||
func IDEQ(id int) predicate.Station {
|
||||
return predicate.Station(sql.FieldEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDNEQ applies the NEQ predicate on the ID field.
|
||||
func IDNEQ(id int) predicate.Station {
|
||||
return predicate.Station(sql.FieldNEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDIn applies the In predicate on the ID field.
|
||||
func IDIn(ids ...int) predicate.Station {
|
||||
return predicate.Station(sql.FieldIn(FieldID, ids...))
|
||||
}
|
||||
|
||||
// IDNotIn applies the NotIn predicate on the ID field.
|
||||
func IDNotIn(ids ...int) predicate.Station {
|
||||
return predicate.Station(sql.FieldNotIn(FieldID, ids...))
|
||||
}
|
||||
|
||||
// IDGT applies the GT predicate on the ID field.
|
||||
func IDGT(id int) predicate.Station {
|
||||
return predicate.Station(sql.FieldGT(FieldID, id))
|
||||
}
|
||||
|
||||
// IDGTE applies the GTE predicate on the ID field.
|
||||
func IDGTE(id int) predicate.Station {
|
||||
return predicate.Station(sql.FieldGTE(FieldID, id))
|
||||
}
|
||||
|
||||
// IDLT applies the LT predicate on the ID field.
|
||||
func IDLT(id int) predicate.Station {
|
||||
return predicate.Station(sql.FieldLT(FieldID, id))
|
||||
}
|
||||
|
||||
// IDLTE applies the LTE predicate on the ID field.
|
||||
func IDLTE(id int) predicate.Station {
|
||||
return predicate.Station(sql.FieldLTE(FieldID, id))
|
||||
}
|
||||
|
||||
// StationNo applies equality check predicate on the "stationNo" field. It's identical to StationNoEQ.
|
||||
func StationNo(v int) predicate.Station {
|
||||
return predicate.Station(sql.FieldEQ(FieldStationNo, v))
|
||||
}
|
||||
|
||||
// Name applies equality check predicate on the "name" field. It's identical to NameEQ.
|
||||
func Name(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldEQ(FieldName, v))
|
||||
}
|
||||
|
||||
// FlowId applies equality check predicate on the "flowId" field. It's identical to FlowIdEQ.
|
||||
func FlowId(v int) predicate.Station {
|
||||
return predicate.Station(sql.FieldEQ(FieldFlowId, v))
|
||||
}
|
||||
|
||||
// Status applies equality check predicate on the "status" field. It's identical to StatusEQ.
|
||||
func Status(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldEQ(FieldStatus, v))
|
||||
}
|
||||
|
||||
// CreatedAt applies equality check predicate on the "createdAt" field. It's identical to CreatedAtEQ.
|
||||
func CreatedAt(v time.Time) predicate.Station {
|
||||
return predicate.Station(sql.FieldEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// StationNoEQ applies the EQ predicate on the "stationNo" field.
|
||||
func StationNoEQ(v int) predicate.Station {
|
||||
return predicate.Station(sql.FieldEQ(FieldStationNo, v))
|
||||
}
|
||||
|
||||
// StationNoNEQ applies the NEQ predicate on the "stationNo" field.
|
||||
func StationNoNEQ(v int) predicate.Station {
|
||||
return predicate.Station(sql.FieldNEQ(FieldStationNo, v))
|
||||
}
|
||||
|
||||
// StationNoIn applies the In predicate on the "stationNo" field.
|
||||
func StationNoIn(vs ...int) predicate.Station {
|
||||
return predicate.Station(sql.FieldIn(FieldStationNo, vs...))
|
||||
}
|
||||
|
||||
// StationNoNotIn applies the NotIn predicate on the "stationNo" field.
|
||||
func StationNoNotIn(vs ...int) predicate.Station {
|
||||
return predicate.Station(sql.FieldNotIn(FieldStationNo, vs...))
|
||||
}
|
||||
|
||||
// StationNoGT applies the GT predicate on the "stationNo" field.
|
||||
func StationNoGT(v int) predicate.Station {
|
||||
return predicate.Station(sql.FieldGT(FieldStationNo, v))
|
||||
}
|
||||
|
||||
// StationNoGTE applies the GTE predicate on the "stationNo" field.
|
||||
func StationNoGTE(v int) predicate.Station {
|
||||
return predicate.Station(sql.FieldGTE(FieldStationNo, v))
|
||||
}
|
||||
|
||||
// StationNoLT applies the LT predicate on the "stationNo" field.
|
||||
func StationNoLT(v int) predicate.Station {
|
||||
return predicate.Station(sql.FieldLT(FieldStationNo, v))
|
||||
}
|
||||
|
||||
// StationNoLTE applies the LTE predicate on the "stationNo" field.
|
||||
func StationNoLTE(v int) predicate.Station {
|
||||
return predicate.Station(sql.FieldLTE(FieldStationNo, v))
|
||||
}
|
||||
|
||||
// NameEQ applies the EQ predicate on the "name" field.
|
||||
func NameEQ(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldEQ(FieldName, v))
|
||||
}
|
||||
|
||||
// NameNEQ applies the NEQ predicate on the "name" field.
|
||||
func NameNEQ(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldNEQ(FieldName, v))
|
||||
}
|
||||
|
||||
// NameIn applies the In predicate on the "name" field.
|
||||
func NameIn(vs ...string) predicate.Station {
|
||||
return predicate.Station(sql.FieldIn(FieldName, vs...))
|
||||
}
|
||||
|
||||
// NameNotIn applies the NotIn predicate on the "name" field.
|
||||
func NameNotIn(vs ...string) predicate.Station {
|
||||
return predicate.Station(sql.FieldNotIn(FieldName, vs...))
|
||||
}
|
||||
|
||||
// NameGT applies the GT predicate on the "name" field.
|
||||
func NameGT(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldGT(FieldName, v))
|
||||
}
|
||||
|
||||
// NameGTE applies the GTE predicate on the "name" field.
|
||||
func NameGTE(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldGTE(FieldName, v))
|
||||
}
|
||||
|
||||
// NameLT applies the LT predicate on the "name" field.
|
||||
func NameLT(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldLT(FieldName, v))
|
||||
}
|
||||
|
||||
// NameLTE applies the LTE predicate on the "name" field.
|
||||
func NameLTE(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldLTE(FieldName, v))
|
||||
}
|
||||
|
||||
// NameContains applies the Contains predicate on the "name" field.
|
||||
func NameContains(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldContains(FieldName, v))
|
||||
}
|
||||
|
||||
// NameHasPrefix applies the HasPrefix predicate on the "name" field.
|
||||
func NameHasPrefix(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldHasPrefix(FieldName, v))
|
||||
}
|
||||
|
||||
// NameHasSuffix applies the HasSuffix predicate on the "name" field.
|
||||
func NameHasSuffix(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldHasSuffix(FieldName, v))
|
||||
}
|
||||
|
||||
// NameEqualFold applies the EqualFold predicate on the "name" field.
|
||||
func NameEqualFold(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldEqualFold(FieldName, v))
|
||||
}
|
||||
|
||||
// NameContainsFold applies the ContainsFold predicate on the "name" field.
|
||||
func NameContainsFold(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldContainsFold(FieldName, v))
|
||||
}
|
||||
|
||||
// FlowIdEQ applies the EQ predicate on the "flowId" field.
|
||||
func FlowIdEQ(v int) predicate.Station {
|
||||
return predicate.Station(sql.FieldEQ(FieldFlowId, v))
|
||||
}
|
||||
|
||||
// FlowIdNEQ applies the NEQ predicate on the "flowId" field.
|
||||
func FlowIdNEQ(v int) predicate.Station {
|
||||
return predicate.Station(sql.FieldNEQ(FieldFlowId, v))
|
||||
}
|
||||
|
||||
// FlowIdIn applies the In predicate on the "flowId" field.
|
||||
func FlowIdIn(vs ...int) predicate.Station {
|
||||
return predicate.Station(sql.FieldIn(FieldFlowId, vs...))
|
||||
}
|
||||
|
||||
// FlowIdNotIn applies the NotIn predicate on the "flowId" field.
|
||||
func FlowIdNotIn(vs ...int) predicate.Station {
|
||||
return predicate.Station(sql.FieldNotIn(FieldFlowId, vs...))
|
||||
}
|
||||
|
||||
// FlowIdGT applies the GT predicate on the "flowId" field.
|
||||
func FlowIdGT(v int) predicate.Station {
|
||||
return predicate.Station(sql.FieldGT(FieldFlowId, v))
|
||||
}
|
||||
|
||||
// FlowIdGTE applies the GTE predicate on the "flowId" field.
|
||||
func FlowIdGTE(v int) predicate.Station {
|
||||
return predicate.Station(sql.FieldGTE(FieldFlowId, v))
|
||||
}
|
||||
|
||||
// FlowIdLT applies the LT predicate on the "flowId" field.
|
||||
func FlowIdLT(v int) predicate.Station {
|
||||
return predicate.Station(sql.FieldLT(FieldFlowId, v))
|
||||
}
|
||||
|
||||
// FlowIdLTE applies the LTE predicate on the "flowId" field.
|
||||
func FlowIdLTE(v int) predicate.Station {
|
||||
return predicate.Station(sql.FieldLTE(FieldFlowId, v))
|
||||
}
|
||||
|
||||
// FlowIdIsNil applies the IsNil predicate on the "flowId" field.
|
||||
func FlowIdIsNil() predicate.Station {
|
||||
return predicate.Station(sql.FieldIsNull(FieldFlowId))
|
||||
}
|
||||
|
||||
// FlowIdNotNil applies the NotNil predicate on the "flowId" field.
|
||||
func FlowIdNotNil() predicate.Station {
|
||||
return predicate.Station(sql.FieldNotNull(FieldFlowId))
|
||||
}
|
||||
|
||||
// StatusEQ applies the EQ predicate on the "status" field.
|
||||
func StatusEQ(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldEQ(FieldStatus, v))
|
||||
}
|
||||
|
||||
// StatusNEQ applies the NEQ predicate on the "status" field.
|
||||
func StatusNEQ(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldNEQ(FieldStatus, v))
|
||||
}
|
||||
|
||||
// StatusIn applies the In predicate on the "status" field.
|
||||
func StatusIn(vs ...string) predicate.Station {
|
||||
return predicate.Station(sql.FieldIn(FieldStatus, vs...))
|
||||
}
|
||||
|
||||
// StatusNotIn applies the NotIn predicate on the "status" field.
|
||||
func StatusNotIn(vs ...string) predicate.Station {
|
||||
return predicate.Station(sql.FieldNotIn(FieldStatus, vs...))
|
||||
}
|
||||
|
||||
// StatusGT applies the GT predicate on the "status" field.
|
||||
func StatusGT(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldGT(FieldStatus, v))
|
||||
}
|
||||
|
||||
// StatusGTE applies the GTE predicate on the "status" field.
|
||||
func StatusGTE(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldGTE(FieldStatus, v))
|
||||
}
|
||||
|
||||
// StatusLT applies the LT predicate on the "status" field.
|
||||
func StatusLT(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldLT(FieldStatus, v))
|
||||
}
|
||||
|
||||
// StatusLTE applies the LTE predicate on the "status" field.
|
||||
func StatusLTE(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldLTE(FieldStatus, v))
|
||||
}
|
||||
|
||||
// StatusContains applies the Contains predicate on the "status" field.
|
||||
func StatusContains(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldContains(FieldStatus, v))
|
||||
}
|
||||
|
||||
// StatusHasPrefix applies the HasPrefix predicate on the "status" field.
|
||||
func StatusHasPrefix(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldHasPrefix(FieldStatus, v))
|
||||
}
|
||||
|
||||
// StatusHasSuffix applies the HasSuffix predicate on the "status" field.
|
||||
func StatusHasSuffix(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldHasSuffix(FieldStatus, v))
|
||||
}
|
||||
|
||||
// StatusEqualFold applies the EqualFold predicate on the "status" field.
|
||||
func StatusEqualFold(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldEqualFold(FieldStatus, v))
|
||||
}
|
||||
|
||||
// StatusContainsFold applies the ContainsFold predicate on the "status" field.
|
||||
func StatusContainsFold(v string) predicate.Station {
|
||||
return predicate.Station(sql.FieldContainsFold(FieldStatus, v))
|
||||
}
|
||||
|
||||
// CreatedAtEQ applies the EQ predicate on the "createdAt" field.
|
||||
func CreatedAtEQ(v time.Time) predicate.Station {
|
||||
return predicate.Station(sql.FieldEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtNEQ applies the NEQ predicate on the "createdAt" field.
|
||||
func CreatedAtNEQ(v time.Time) predicate.Station {
|
||||
return predicate.Station(sql.FieldNEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtIn applies the In predicate on the "createdAt" field.
|
||||
func CreatedAtIn(vs ...time.Time) predicate.Station {
|
||||
return predicate.Station(sql.FieldIn(FieldCreatedAt, vs...))
|
||||
}
|
||||
|
||||
// CreatedAtNotIn applies the NotIn predicate on the "createdAt" field.
|
||||
func CreatedAtNotIn(vs ...time.Time) predicate.Station {
|
||||
return predicate.Station(sql.FieldNotIn(FieldCreatedAt, vs...))
|
||||
}
|
||||
|
||||
// CreatedAtGT applies the GT predicate on the "createdAt" field.
|
||||
func CreatedAtGT(v time.Time) predicate.Station {
|
||||
return predicate.Station(sql.FieldGT(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtGTE applies the GTE predicate on the "createdAt" field.
|
||||
func CreatedAtGTE(v time.Time) predicate.Station {
|
||||
return predicate.Station(sql.FieldGTE(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtLT applies the LT predicate on the "createdAt" field.
|
||||
func CreatedAtLT(v time.Time) predicate.Station {
|
||||
return predicate.Station(sql.FieldLT(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtLTE applies the LTE predicate on the "createdAt" field.
|
||||
func CreatedAtLTE(v time.Time) predicate.Station {
|
||||
return predicate.Station(sql.FieldLTE(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// And groups predicates with the AND operator between them.
|
||||
func And(predicates ...predicate.Station) predicate.Station {
|
||||
return predicate.Station(sql.AndPredicates(predicates...))
|
||||
}
|
||||
|
||||
// Or groups predicates with the OR operator between them.
|
||||
func Or(predicates ...predicate.Station) predicate.Station {
|
||||
return predicate.Station(sql.OrPredicates(predicates...))
|
||||
}
|
||||
|
||||
// Not applies the not operator on the given predicate.
|
||||
func Not(p predicate.Station) predicate.Station {
|
||||
return predicate.Station(sql.NotPredicates(p))
|
||||
}
|
||||
Reference in New Issue
Block a user