本次提交覆盖多个业务模块的功能完善与体验优化:
1. **鉴权与配置调整**:
- 统一JWT滑动续签逻辑,简化Token存储,移除RefreshToken相关冗余代码
- 调整多项目配置文件中JWT过期时间为3600秒,统一会话闲置窗口
- 工位配置放开1~12限制,改为仅校验大于0
2. **术语统一替换**:全链路将"精密件"替换为"电气件",修正物料管理描述
3. **功能新增**:
- 新增工位类型、工艺路线与产线点位台账模块
- 添加工艺PDF预览面板、工位终端代理转发接口
- 新增操作日志按操作人列表筛选、工位登出日志记录
- 新增PLC移料指令与产线点位状态管理
4. **业务流程优化**:
- 调整BOM物料删除校验逻辑,优化工单备料计算
- 补充物料图号、检测单号等追溯字段
- 完善工艺流程图与工位绑定关系说明
- 优化前端页面文案与交互细节
5. **代码规范与维护**:
- 新增通用工具函数与前端静态资源
- 整理路由权限与中间件逻辑
- 修复部分接口与配置的不兼容问题
157 lines
5.7 KiB
Go
157 lines
5.7 KiB
Go
// Code generated by ent, DO NOT EDIT.
|
|
|
|
package plcmovecmd
|
|
|
|
import (
|
|
"time"
|
|
|
|
"entgo.io/ent/dialect/sql"
|
|
)
|
|
|
|
const (
|
|
// Label holds the string label denoting the plcmovecmd type in the database.
|
|
Label = "plc_move_cmd"
|
|
// FieldID holds the string denoting the id field in the database.
|
|
FieldID = "id"
|
|
// FieldCmdNo holds the string denoting the cmdno field in the database.
|
|
FieldCmdNo = "cmd_no"
|
|
// FieldSn holds the string denoting the sn field in the database.
|
|
FieldSn = "sn"
|
|
// FieldOrderNo holds the string denoting the orderno field in the database.
|
|
FieldOrderNo = "order_no"
|
|
// FieldFromPoint holds the string denoting the frompoint field in the database.
|
|
FieldFromPoint = "from_point"
|
|
// FieldToPoint holds the string denoting the topoint field in the database.
|
|
FieldToPoint = "to_point"
|
|
// FieldStatus holds the string denoting the status field in the database.
|
|
FieldStatus = "status"
|
|
// FieldOperator holds the string denoting the operator field in the database.
|
|
FieldOperator = "operator"
|
|
// FieldMessage holds the string denoting the message field in the database.
|
|
FieldMessage = "message"
|
|
// FieldCreatedAt holds the string denoting the createdat field in the database.
|
|
FieldCreatedAt = "created_at"
|
|
// FieldUpdatedAt holds the string denoting the updatedat field in the database.
|
|
FieldUpdatedAt = "updated_at"
|
|
// Table holds the table name of the plcmovecmd in the database.
|
|
Table = "plc_move_cmd"
|
|
)
|
|
|
|
// Columns holds all SQL columns for plcmovecmd fields.
|
|
var Columns = []string{
|
|
FieldID,
|
|
FieldCmdNo,
|
|
FieldSn,
|
|
FieldOrderNo,
|
|
FieldFromPoint,
|
|
FieldToPoint,
|
|
FieldStatus,
|
|
FieldOperator,
|
|
FieldMessage,
|
|
FieldCreatedAt,
|
|
FieldUpdatedAt,
|
|
}
|
|
|
|
// 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 (
|
|
// CmdNoValidator is a validator for the "cmdNo" field. It is called by the builders before save.
|
|
CmdNoValidator func(string) error
|
|
// SnValidator is a validator for the "sn" field. It is called by the builders before save.
|
|
SnValidator func(string) error
|
|
// DefaultOrderNo holds the default value on creation for the "orderNo" field.
|
|
DefaultOrderNo string
|
|
// OrderNoValidator is a validator for the "orderNo" field. It is called by the builders before save.
|
|
OrderNoValidator func(string) error
|
|
// FromPointValidator is a validator for the "fromPoint" field. It is called by the builders before save.
|
|
FromPointValidator func(string) error
|
|
// ToPointValidator is a validator for the "toPoint" field. It is called by the builders before save.
|
|
ToPointValidator 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
|
|
// 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
|
|
// DefaultMessage holds the default value on creation for the "message" field.
|
|
DefaultMessage string
|
|
// MessageValidator is a validator for the "message" field. It is called by the builders before save.
|
|
MessageValidator func(string) error
|
|
// DefaultCreatedAt holds the default value on creation for the "createdAt" field.
|
|
DefaultCreatedAt func() time.Time
|
|
// DefaultUpdatedAt holds the default value on creation for the "updatedAt" field.
|
|
DefaultUpdatedAt func() time.Time
|
|
// UpdateDefaultUpdatedAt holds the default value on update for the "updatedAt" field.
|
|
UpdateDefaultUpdatedAt 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 PlcMoveCmd 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()
|
|
}
|
|
|
|
// ByCmdNo orders the results by the cmdNo field.
|
|
func ByCmdNo(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldCmdNo, opts...).ToFunc()
|
|
}
|
|
|
|
// BySn orders the results by the sn field.
|
|
func BySn(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldSn, opts...).ToFunc()
|
|
}
|
|
|
|
// ByOrderNo orders the results by the orderNo field.
|
|
func ByOrderNo(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldOrderNo, opts...).ToFunc()
|
|
}
|
|
|
|
// ByFromPoint orders the results by the fromPoint field.
|
|
func ByFromPoint(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldFromPoint, opts...).ToFunc()
|
|
}
|
|
|
|
// ByToPoint orders the results by the toPoint field.
|
|
func ByToPoint(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldToPoint, opts...).ToFunc()
|
|
}
|
|
|
|
// ByStatus orders the results by the status field.
|
|
func ByStatus(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldStatus, opts...).ToFunc()
|
|
}
|
|
|
|
// ByOperator orders the results by the operator field.
|
|
func ByOperator(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldOperator, opts...).ToFunc()
|
|
}
|
|
|
|
// ByMessage orders the results by the message field.
|
|
func ByMessage(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldMessage, opts...).ToFunc()
|
|
}
|
|
|
|
// ByCreatedAt orders the results by the createdAt field.
|
|
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
|
|
}
|
|
|
|
// ByUpdatedAt orders the results by the updatedAt field.
|
|
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldUpdatedAt, opts...).ToFunc()
|
|
}
|