【MES】 - AGV点位/线路点位/AGV任务/工单 ent schema 重构(全量重生成 ent 代码) - 新增派车锁 agv_point_lock.go:目标点位占用即拒车,JBT21 库房接驳台卸货后保持锁定待库管手动解锁 - 新增进程内 TTL 缓存 cache.go,由 Redis 看板缓存迁移至内存(singleflight 防击穿,去除外部依赖) - AGV 三段链安全机制、车辆状态/接驳台左右互换、补料损耗闭环完善 - 来料检/工序卡/工单/质检/日排产/AGV 前端与帮助文档更新 - 新增 migrations/、sql/ 目录 【WMS】 - 出库、Excel 导出、物料、路由处理增强 - 配置与 DB 初始化调整;基础数据/成品入库/入库前端调整 【工位终端】 - 移除离线同步队列(syncer 包、sync.go、SyncQueueDialog.vue),改为实时直连上报 MES(断网即失败报错),以本人身份操作 - 本地 SQLite 仅保留操作日志 + 内置账号 + 登录态;保留空闲自动登出 【文档】 - 删除 AGV海康litev1.5.md;案例.md 更新
261 lines
11 KiB
Go
261 lines
11 KiB
Go
// Code generated by ent, DO NOT EDIT.
|
|
|
|
package agvtask
|
|
|
|
import (
|
|
"entgo.io/ent/dialect/sql"
|
|
)
|
|
|
|
const (
|
|
// Label holds the string label denoting the agvtask type in the database.
|
|
Label = "agv_task"
|
|
// FieldID holds the string denoting the id field in the database.
|
|
FieldID = "id"
|
|
// FieldTaskNo holds the string denoting the task_no field in the database.
|
|
FieldTaskNo = "task_no"
|
|
// FieldSourceDock holds the string denoting the source_dock field in the database.
|
|
FieldSourceDock = "source_dock"
|
|
// FieldTargetDock holds the string denoting the target_dock field in the database.
|
|
FieldTargetDock = "target_dock"
|
|
// FieldMaterialsJSON holds the string denoting the materials_json field in the database.
|
|
FieldMaterialsJSON = "materials_json"
|
|
// FieldRelatedRequestNo holds the string denoting the related_request_no field in the database.
|
|
FieldRelatedRequestNo = "related_request_no"
|
|
// FieldRelatedOutboundNo holds the string denoting the related_outbound_no field in the database.
|
|
FieldRelatedOutboundNo = "related_outbound_no"
|
|
// FieldStatus holds the string denoting the status field in the database.
|
|
FieldStatus = "status"
|
|
// FieldKind holds the string denoting the kind field in the database.
|
|
FieldKind = "kind"
|
|
// FieldBizType holds the string denoting the biz_type field in the database.
|
|
FieldBizType = "biz_type"
|
|
// FieldBizNo holds the string denoting the biz_no field in the database.
|
|
FieldBizNo = "biz_no"
|
|
// FieldTemplateType holds the string denoting the template_type field in the database.
|
|
FieldTemplateType = "template_type"
|
|
// FieldChainNo holds the string denoting the chain_no field in the database.
|
|
FieldChainNo = "chain_no"
|
|
// FieldAutoEnd holds the string denoting the auto_end field in the database.
|
|
FieldAutoEnd = "auto_end"
|
|
// FieldAgvCode holds the string denoting the agv_code field in the database.
|
|
FieldAgvCode = "agv_code"
|
|
// FieldOperator holds the string denoting the operator field in the database.
|
|
FieldOperator = "operator"
|
|
// FieldDispatchedAt holds the string denoting the dispatched_at field in the database.
|
|
FieldDispatchedAt = "dispatched_at"
|
|
// FieldArrivedAt holds the string denoting the arrived_at field in the database.
|
|
FieldArrivedAt = "arrived_at"
|
|
// 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.
|
|
FieldCreatedAt = "created_at"
|
|
// Table holds the table name of the agvtask in the database.
|
|
Table = "agv_tasks"
|
|
)
|
|
|
|
// Columns holds all SQL columns for agvtask fields.
|
|
var Columns = []string{
|
|
FieldID,
|
|
FieldTaskNo,
|
|
FieldSourceDock,
|
|
FieldTargetDock,
|
|
FieldMaterialsJSON,
|
|
FieldRelatedRequestNo,
|
|
FieldRelatedOutboundNo,
|
|
FieldStatus,
|
|
FieldKind,
|
|
FieldBizType,
|
|
FieldBizNo,
|
|
FieldTemplateType,
|
|
FieldChainNo,
|
|
FieldAutoEnd,
|
|
FieldAgvCode,
|
|
FieldOperator,
|
|
FieldDispatchedAt,
|
|
FieldArrivedAt,
|
|
FieldRemark,
|
|
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 (
|
|
// TaskNoValidator is a validator for the "task_no" field. It is called by the builders before save.
|
|
TaskNoValidator func(string) error
|
|
// DefaultSourceDock holds the default value on creation for the "source_dock" field.
|
|
DefaultSourceDock string
|
|
// SourceDockValidator is a validator for the "source_dock" field. It is called by the builders before save.
|
|
SourceDockValidator func(string) error
|
|
// DefaultTargetDock holds the default value on creation for the "target_dock" field.
|
|
DefaultTargetDock string
|
|
// TargetDockValidator is a validator for the "target_dock" field. It is called by the builders before save.
|
|
TargetDockValidator func(string) error
|
|
// DefaultMaterialsJSON holds the default value on creation for the "materials_json" field.
|
|
DefaultMaterialsJSON string
|
|
// MaterialsJSONValidator is a validator for the "materials_json" field. It is called by the builders before save.
|
|
MaterialsJSONValidator func(string) error
|
|
// DefaultRelatedRequestNo holds the default value on creation for the "related_request_no" field.
|
|
DefaultRelatedRequestNo string
|
|
// RelatedRequestNoValidator is a validator for the "related_request_no" field. It is called by the builders before save.
|
|
RelatedRequestNoValidator func(string) error
|
|
// DefaultRelatedOutboundNo holds the default value on creation for the "related_outbound_no" field.
|
|
DefaultRelatedOutboundNo string
|
|
// RelatedOutboundNoValidator is a validator for the "related_outbound_no" field. It is called by the builders before save.
|
|
RelatedOutboundNoValidator 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
|
|
// DefaultKind holds the default value on creation for the "kind" field.
|
|
DefaultKind string
|
|
// KindValidator is a validator for the "kind" field. It is called by the builders before save.
|
|
KindValidator func(string) error
|
|
// DefaultBizType holds the default value on creation for the "biz_type" field.
|
|
DefaultBizType string
|
|
// BizTypeValidator is a validator for the "biz_type" field. It is called by the builders before save.
|
|
BizTypeValidator func(string) error
|
|
// DefaultBizNo holds the default value on creation for the "biz_no" field.
|
|
DefaultBizNo string
|
|
// BizNoValidator is a validator for the "biz_no" field. It is called by the builders before save.
|
|
BizNoValidator func(string) error
|
|
// DefaultTemplateType holds the default value on creation for the "template_type" field.
|
|
DefaultTemplateType string
|
|
// TemplateTypeValidator is a validator for the "template_type" field. It is called by the builders before save.
|
|
TemplateTypeValidator func(string) error
|
|
// DefaultChainNo holds the default value on creation for the "chain_no" field.
|
|
DefaultChainNo string
|
|
// ChainNoValidator is a validator for the "chain_no" field. It is called by the builders before save.
|
|
ChainNoValidator func(string) error
|
|
// DefaultAutoEnd holds the default value on creation for the "auto_end" field.
|
|
DefaultAutoEnd bool
|
|
// DefaultAgvCode holds the default value on creation for the "agv_code" field.
|
|
DefaultAgvCode string
|
|
// AgvCodeValidator is a validator for the "agv_code" field. It is called by the builders before save.
|
|
AgvCodeValidator func(string) error
|
|
// DefaultOperator holds the default value on creation for the "operator" field.
|
|
DefaultOperator string
|
|
// OperatorValidator is a validator for the "operator" field. It is called by the builders before save.
|
|
OperatorValidator func(string) error
|
|
// DefaultDispatchedAt holds the default value on creation for the "dispatched_at" field.
|
|
DefaultDispatchedAt int64
|
|
// DefaultArrivedAt holds the default value on creation for the "arrived_at" field.
|
|
DefaultArrivedAt int64
|
|
// 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
|
|
// DefaultCreatedAt holds the default value on creation for the "created_at" field.
|
|
DefaultCreatedAt func() int64
|
|
)
|
|
|
|
// OrderOption defines the ordering options for the AgvTask 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()
|
|
}
|
|
|
|
// ByTaskNo orders the results by the task_no field.
|
|
func ByTaskNo(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldTaskNo, opts...).ToFunc()
|
|
}
|
|
|
|
// BySourceDock orders the results by the source_dock field.
|
|
func BySourceDock(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldSourceDock, opts...).ToFunc()
|
|
}
|
|
|
|
// ByTargetDock orders the results by the target_dock field.
|
|
func ByTargetDock(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldTargetDock, opts...).ToFunc()
|
|
}
|
|
|
|
// ByMaterialsJSON orders the results by the materials_json field.
|
|
func ByMaterialsJSON(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldMaterialsJSON, opts...).ToFunc()
|
|
}
|
|
|
|
// ByRelatedRequestNo orders the results by the related_request_no field.
|
|
func ByRelatedRequestNo(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldRelatedRequestNo, opts...).ToFunc()
|
|
}
|
|
|
|
// ByRelatedOutboundNo orders the results by the related_outbound_no field.
|
|
func ByRelatedOutboundNo(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldRelatedOutboundNo, opts...).ToFunc()
|
|
}
|
|
|
|
// ByStatus orders the results by the status field.
|
|
func ByStatus(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldStatus, opts...).ToFunc()
|
|
}
|
|
|
|
// ByKind orders the results by the kind field.
|
|
func ByKind(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldKind, opts...).ToFunc()
|
|
}
|
|
|
|
// ByBizType orders the results by the biz_type field.
|
|
func ByBizType(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldBizType, opts...).ToFunc()
|
|
}
|
|
|
|
// ByBizNo orders the results by the biz_no field.
|
|
func ByBizNo(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldBizNo, opts...).ToFunc()
|
|
}
|
|
|
|
// ByTemplateType orders the results by the template_type field.
|
|
func ByTemplateType(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldTemplateType, opts...).ToFunc()
|
|
}
|
|
|
|
// ByChainNo orders the results by the chain_no field.
|
|
func ByChainNo(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldChainNo, opts...).ToFunc()
|
|
}
|
|
|
|
// ByAutoEnd orders the results by the auto_end field.
|
|
func ByAutoEnd(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldAutoEnd, opts...).ToFunc()
|
|
}
|
|
|
|
// ByAgvCode orders the results by the agv_code field.
|
|
func ByAgvCode(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldAgvCode, opts...).ToFunc()
|
|
}
|
|
|
|
// ByOperator orders the results by the operator field.
|
|
func ByOperator(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldOperator, opts...).ToFunc()
|
|
}
|
|
|
|
// ByDispatchedAt orders the results by the dispatched_at field.
|
|
func ByDispatchedAt(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldDispatchedAt, opts...).ToFunc()
|
|
}
|
|
|
|
// ByArrivedAt orders the results by the arrived_at field.
|
|
func ByArrivedAt(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldArrivedAt, opts...).ToFunc()
|
|
}
|
|
|
|
// ByRemark orders the results by the remark field.
|
|
func ByRemark(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldRemark, opts...).ToFunc()
|
|
}
|
|
|
|
// ByCreatedAt orders the results by the created_at field.
|
|
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
|
|
}
|