feat: 完成MES工位终端系统全量功能迭代

本次提交包含以下核心变更:
1. 新增按钮级权限控制框架与前端权限校验
2. 新增工位管理、工艺流程、巡检终端等核心业务模块
3. 完善用户体系,支持工位终端专属登录权限
4. 新增文件上传下载、报表查询等配套功能
5. 修复多系统兼容性与交互体验问题
6. 完成所有文档与配置项的规范化更新
This commit is contained in:
SunYF
2026-08-31 08:06:55 +08:00
parent dab03ac0cf
commit 4ec6784629
99 changed files with 17436 additions and 479 deletions
+20
View File
@@ -21,6 +21,10 @@ const (
FieldName = "name"
// FieldRoleId holds the string denoting the roleid field in the database.
FieldRoleId = "role_id"
// FieldCanLoginWorkstation holds the string denoting the canloginworkstation field in the database.
FieldCanLoginWorkstation = "can_login_workstation"
// FieldWorkstationPassword holds the string denoting the workstationpassword field in the database.
FieldWorkstationPassword = "workstation_password"
// FieldStatus holds the string denoting the status field in the database.
FieldStatus = "status"
// FieldCreatedAt holds the string denoting the createdat field in the database.
@@ -38,6 +42,8 @@ var Columns = []string{
FieldPassword,
FieldName,
FieldRoleId,
FieldCanLoginWorkstation,
FieldWorkstationPassword,
FieldStatus,
FieldCreatedAt,
FieldUpdatedAt,
@@ -62,6 +68,10 @@ var (
DefaultName string
// NameValidator is a validator for the "name" field. It is called by the builders before save.
NameValidator func(string) error
// DefaultCanLoginWorkstation holds the default value on creation for the "canLoginWorkstation" field.
DefaultCanLoginWorkstation bool
// WorkstationPasswordValidator is a validator for the "workstationPassword" field. It is called by the builders before save.
WorkstationPasswordValidator 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.
@@ -104,6 +114,16 @@ func ByRoleId(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldRoleId, opts...).ToFunc()
}
// ByCanLoginWorkstation orders the results by the canLoginWorkstation field.
func ByCanLoginWorkstation(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldCanLoginWorkstation, opts...).ToFunc()
}
// ByWorkstationPassword orders the results by the workstationPassword field.
func ByWorkstationPassword(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldWorkstationPassword, opts...).ToFunc()
}
// ByStatus orders the results by the status field.
func ByStatus(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldStatus, opts...).ToFunc()
+95
View File
@@ -74,6 +74,16 @@ func RoleId(v int) predicate.User {
return predicate.User(sql.FieldEQ(FieldRoleId, v))
}
// CanLoginWorkstation applies equality check predicate on the "canLoginWorkstation" field. It's identical to CanLoginWorkstationEQ.
func CanLoginWorkstation(v bool) predicate.User {
return predicate.User(sql.FieldEQ(FieldCanLoginWorkstation, v))
}
// WorkstationPassword applies equality check predicate on the "workstationPassword" field. It's identical to WorkstationPasswordEQ.
func WorkstationPassword(v string) predicate.User {
return predicate.User(sql.FieldEQ(FieldWorkstationPassword, v))
}
// Status applies equality check predicate on the "status" field. It's identical to StatusEQ.
func Status(v string) predicate.User {
return predicate.User(sql.FieldEQ(FieldStatus, v))
@@ -334,6 +344,91 @@ func RoleIdNotNil() predicate.User {
return predicate.User(sql.FieldNotNull(FieldRoleId))
}
// CanLoginWorkstationEQ applies the EQ predicate on the "canLoginWorkstation" field.
func CanLoginWorkstationEQ(v bool) predicate.User {
return predicate.User(sql.FieldEQ(FieldCanLoginWorkstation, v))
}
// CanLoginWorkstationNEQ applies the NEQ predicate on the "canLoginWorkstation" field.
func CanLoginWorkstationNEQ(v bool) predicate.User {
return predicate.User(sql.FieldNEQ(FieldCanLoginWorkstation, v))
}
// WorkstationPasswordEQ applies the EQ predicate on the "workstationPassword" field.
func WorkstationPasswordEQ(v string) predicate.User {
return predicate.User(sql.FieldEQ(FieldWorkstationPassword, v))
}
// WorkstationPasswordNEQ applies the NEQ predicate on the "workstationPassword" field.
func WorkstationPasswordNEQ(v string) predicate.User {
return predicate.User(sql.FieldNEQ(FieldWorkstationPassword, v))
}
// WorkstationPasswordIn applies the In predicate on the "workstationPassword" field.
func WorkstationPasswordIn(vs ...string) predicate.User {
return predicate.User(sql.FieldIn(FieldWorkstationPassword, vs...))
}
// WorkstationPasswordNotIn applies the NotIn predicate on the "workstationPassword" field.
func WorkstationPasswordNotIn(vs ...string) predicate.User {
return predicate.User(sql.FieldNotIn(FieldWorkstationPassword, vs...))
}
// WorkstationPasswordGT applies the GT predicate on the "workstationPassword" field.
func WorkstationPasswordGT(v string) predicate.User {
return predicate.User(sql.FieldGT(FieldWorkstationPassword, v))
}
// WorkstationPasswordGTE applies the GTE predicate on the "workstationPassword" field.
func WorkstationPasswordGTE(v string) predicate.User {
return predicate.User(sql.FieldGTE(FieldWorkstationPassword, v))
}
// WorkstationPasswordLT applies the LT predicate on the "workstationPassword" field.
func WorkstationPasswordLT(v string) predicate.User {
return predicate.User(sql.FieldLT(FieldWorkstationPassword, v))
}
// WorkstationPasswordLTE applies the LTE predicate on the "workstationPassword" field.
func WorkstationPasswordLTE(v string) predicate.User {
return predicate.User(sql.FieldLTE(FieldWorkstationPassword, v))
}
// WorkstationPasswordContains applies the Contains predicate on the "workstationPassword" field.
func WorkstationPasswordContains(v string) predicate.User {
return predicate.User(sql.FieldContains(FieldWorkstationPassword, v))
}
// WorkstationPasswordHasPrefix applies the HasPrefix predicate on the "workstationPassword" field.
func WorkstationPasswordHasPrefix(v string) predicate.User {
return predicate.User(sql.FieldHasPrefix(FieldWorkstationPassword, v))
}
// WorkstationPasswordHasSuffix applies the HasSuffix predicate on the "workstationPassword" field.
func WorkstationPasswordHasSuffix(v string) predicate.User {
return predicate.User(sql.FieldHasSuffix(FieldWorkstationPassword, v))
}
// WorkstationPasswordIsNil applies the IsNil predicate on the "workstationPassword" field.
func WorkstationPasswordIsNil() predicate.User {
return predicate.User(sql.FieldIsNull(FieldWorkstationPassword))
}
// WorkstationPasswordNotNil applies the NotNil predicate on the "workstationPassword" field.
func WorkstationPasswordNotNil() predicate.User {
return predicate.User(sql.FieldNotNull(FieldWorkstationPassword))
}
// WorkstationPasswordEqualFold applies the EqualFold predicate on the "workstationPassword" field.
func WorkstationPasswordEqualFold(v string) predicate.User {
return predicate.User(sql.FieldEqualFold(FieldWorkstationPassword, v))
}
// WorkstationPasswordContainsFold applies the ContainsFold predicate on the "workstationPassword" field.
func WorkstationPasswordContainsFold(v string) predicate.User {
return predicate.User(sql.FieldContainsFold(FieldWorkstationPassword, v))
}
// StatusEQ applies the EQ predicate on the "status" field.
func StatusEQ(v string) predicate.User {
return predicate.User(sql.FieldEQ(FieldStatus, v))