feat: 完成MES工位终端系统全量功能迭代
本次提交包含以下核心变更: 1. 新增按钮级权限控制框架与前端权限校验 2. 新增工位管理、工艺流程、巡检终端等核心业务模块 3. 完善用户体系,支持工位终端专属登录权限 4. 新增文件上传下载、报表查询等配套功能 5. 修复多系统兼容性与交互体验问题 6. 完成所有文档与配置项的规范化更新
This commit is contained in:
@@ -60,6 +60,34 @@ func (_c *UserCreate) SetNillableRoleId(v *int) *UserCreate {
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetCanLoginWorkstation sets the "canLoginWorkstation" field.
|
||||
func (_c *UserCreate) SetCanLoginWorkstation(v bool) *UserCreate {
|
||||
_c.mutation.SetCanLoginWorkstation(v)
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetNillableCanLoginWorkstation sets the "canLoginWorkstation" field if the given value is not nil.
|
||||
func (_c *UserCreate) SetNillableCanLoginWorkstation(v *bool) *UserCreate {
|
||||
if v != nil {
|
||||
_c.SetCanLoginWorkstation(*v)
|
||||
}
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetWorkstationPassword sets the "workstationPassword" field.
|
||||
func (_c *UserCreate) SetWorkstationPassword(v string) *UserCreate {
|
||||
_c.mutation.SetWorkstationPassword(v)
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetNillableWorkstationPassword sets the "workstationPassword" field if the given value is not nil.
|
||||
func (_c *UserCreate) SetNillableWorkstationPassword(v *string) *UserCreate {
|
||||
if v != nil {
|
||||
_c.SetWorkstationPassword(*v)
|
||||
}
|
||||
return _c
|
||||
}
|
||||
|
||||
// SetStatus sets the "status" field.
|
||||
func (_c *UserCreate) SetStatus(v string) *UserCreate {
|
||||
_c.mutation.SetStatus(v)
|
||||
@@ -147,6 +175,10 @@ func (_c *UserCreate) defaults() {
|
||||
v := user.DefaultName
|
||||
_c.mutation.SetName(v)
|
||||
}
|
||||
if _, ok := _c.mutation.CanLoginWorkstation(); !ok {
|
||||
v := user.DefaultCanLoginWorkstation
|
||||
_c.mutation.SetCanLoginWorkstation(v)
|
||||
}
|
||||
if _, ok := _c.mutation.Status(); !ok {
|
||||
v := user.DefaultStatus
|
||||
_c.mutation.SetStatus(v)
|
||||
@@ -187,6 +219,14 @@ func (_c *UserCreate) check() error {
|
||||
return &ValidationError{Name: "name", err: fmt.Errorf(`ent: validator failed for field "User.name": %w`, err)}
|
||||
}
|
||||
}
|
||||
if _, ok := _c.mutation.CanLoginWorkstation(); !ok {
|
||||
return &ValidationError{Name: "canLoginWorkstation", err: errors.New(`ent: missing required field "User.canLoginWorkstation"`)}
|
||||
}
|
||||
if v, ok := _c.mutation.WorkstationPassword(); ok {
|
||||
if err := user.WorkstationPasswordValidator(v); err != nil {
|
||||
return &ValidationError{Name: "workstationPassword", err: fmt.Errorf(`ent: validator failed for field "User.workstationPassword": %w`, err)}
|
||||
}
|
||||
}
|
||||
if _, ok := _c.mutation.Status(); !ok {
|
||||
return &ValidationError{Name: "status", err: errors.New(`ent: missing required field "User.status"`)}
|
||||
}
|
||||
@@ -251,6 +291,14 @@ func (_c *UserCreate) createSpec() (*User, *sqlgraph.CreateSpec) {
|
||||
_spec.SetField(user.FieldRoleId, field.TypeInt, value)
|
||||
_node.RoleId = value
|
||||
}
|
||||
if value, ok := _c.mutation.CanLoginWorkstation(); ok {
|
||||
_spec.SetField(user.FieldCanLoginWorkstation, field.TypeBool, value)
|
||||
_node.CanLoginWorkstation = value
|
||||
}
|
||||
if value, ok := _c.mutation.WorkstationPassword(); ok {
|
||||
_spec.SetField(user.FieldWorkstationPassword, field.TypeString, value)
|
||||
_node.WorkstationPassword = value
|
||||
}
|
||||
if value, ok := _c.mutation.Status(); ok {
|
||||
_spec.SetField(user.FieldStatus, field.TypeString, value)
|
||||
_node.Status = value
|
||||
|
||||
Reference in New Issue
Block a user