feat: 完成MES工位终端系统全量功能迭代
本次提交包含以下核心变更: 1. 新增按钮级权限控制框架与前端权限校验 2. 新增工位管理、工艺流程、巡检终端等核心业务模块 3. 完善用户体系,支持工位终端专属登录权限 4. 新增文件上传下载、报表查询等配套功能 5. 修复多系统兼容性与交互体验问题 6. 完成所有文档与配置项的规范化更新
This commit is contained in:
+153
-9
@@ -7,19 +7,23 @@ import (
|
||||
"bj_power_mes/ent/bomitem"
|
||||
"bj_power_mes/ent/dailyplan"
|
||||
"bj_power_mes/ent/eventlog"
|
||||
"bj_power_mes/ent/inspectionrecord"
|
||||
"bj_power_mes/ent/materialrequest"
|
||||
"bj_power_mes/ent/permission"
|
||||
"bj_power_mes/ent/plcsendlog"
|
||||
"bj_power_mes/ent/processflow"
|
||||
"bj_power_mes/ent/processstep"
|
||||
"bj_power_mes/ent/producttype"
|
||||
"bj_power_mes/ent/role"
|
||||
"bj_power_mes/ent/scanrecord"
|
||||
"bj_power_mes/ent/semiflow"
|
||||
"bj_power_mes/ent/station"
|
||||
"bj_power_mes/ent/stationprocess"
|
||||
"bj_power_mes/ent/stepcriterion"
|
||||
"bj_power_mes/ent/stepdata"
|
||||
"bj_power_mes/ent/torquerecord"
|
||||
"bj_power_mes/ent/user"
|
||||
"bj_power_mes/ent/userstation"
|
||||
"bj_power_mes/ent/workorder"
|
||||
"bj_power_mes/ent/workpiece"
|
||||
"bj_power_mes/ent/workpieceprocess"
|
||||
@@ -205,6 +209,68 @@ func init() {
|
||||
eventlogDescID := eventlogFields[0].Descriptor()
|
||||
// eventlog.IDValidator is a validator for the "id" field. It is called by the builders before save.
|
||||
eventlog.IDValidator = eventlogDescID.Validators[0].(func(int) error)
|
||||
inspectionrecordFields := schema.InspectionRecord{}.Fields()
|
||||
_ = inspectionrecordFields
|
||||
// inspectionrecordDescCategory is the schema descriptor for category field.
|
||||
inspectionrecordDescCategory := inspectionrecordFields[1].Descriptor()
|
||||
// inspectionrecord.CategoryValidator is a validator for the "category" field. It is called by the builders before save.
|
||||
inspectionrecord.CategoryValidator = inspectionrecordDescCategory.Validators[0].(func(string) error)
|
||||
// inspectionrecordDescStationNo is the schema descriptor for stationNo field.
|
||||
inspectionrecordDescStationNo := inspectionrecordFields[2].Descriptor()
|
||||
// inspectionrecord.DefaultStationNo holds the default value on creation for the stationNo field.
|
||||
inspectionrecord.DefaultStationNo = inspectionrecordDescStationNo.Default.(string)
|
||||
// inspectionrecord.StationNoValidator is a validator for the "stationNo" field. It is called by the builders before save.
|
||||
inspectionrecord.StationNoValidator = inspectionrecordDescStationNo.Validators[0].(func(string) error)
|
||||
// inspectionrecordDescShift is the schema descriptor for shift field.
|
||||
inspectionrecordDescShift := inspectionrecordFields[3].Descriptor()
|
||||
// inspectionrecord.DefaultShift holds the default value on creation for the shift field.
|
||||
inspectionrecord.DefaultShift = inspectionrecordDescShift.Default.(string)
|
||||
// inspectionrecord.ShiftValidator is a validator for the "shift" field. It is called by the builders before save.
|
||||
inspectionrecord.ShiftValidator = inspectionrecordDescShift.Validators[0].(func(string) error)
|
||||
// inspectionrecordDescOrderNo is the schema descriptor for orderNo field.
|
||||
inspectionrecordDescOrderNo := inspectionrecordFields[4].Descriptor()
|
||||
// inspectionrecord.DefaultOrderNo holds the default value on creation for the orderNo field.
|
||||
inspectionrecord.DefaultOrderNo = inspectionrecordDescOrderNo.Default.(string)
|
||||
// inspectionrecord.OrderNoValidator is a validator for the "orderNo" field. It is called by the builders before save.
|
||||
inspectionrecord.OrderNoValidator = inspectionrecordDescOrderNo.Validators[0].(func(string) error)
|
||||
// inspectionrecordDescSn is the schema descriptor for sn field.
|
||||
inspectionrecordDescSn := inspectionrecordFields[5].Descriptor()
|
||||
// inspectionrecord.DefaultSn holds the default value on creation for the sn field.
|
||||
inspectionrecord.DefaultSn = inspectionrecordDescSn.Default.(string)
|
||||
// inspectionrecord.SnValidator is a validator for the "sn" field. It is called by the builders before save.
|
||||
inspectionrecord.SnValidator = inspectionrecordDescSn.Validators[0].(func(string) error)
|
||||
// inspectionrecordDescResult is the schema descriptor for result field.
|
||||
inspectionrecordDescResult := inspectionrecordFields[6].Descriptor()
|
||||
// inspectionrecord.DefaultResult holds the default value on creation for the result field.
|
||||
inspectionrecord.DefaultResult = inspectionrecordDescResult.Default.(string)
|
||||
// inspectionrecord.ResultValidator is a validator for the "result" field. It is called by the builders before save.
|
||||
inspectionrecord.ResultValidator = inspectionrecordDescResult.Validators[0].(func(string) error)
|
||||
// inspectionrecordDescPhoto is the schema descriptor for photo field.
|
||||
inspectionrecordDescPhoto := inspectionrecordFields[8].Descriptor()
|
||||
// inspectionrecord.DefaultPhoto holds the default value on creation for the photo field.
|
||||
inspectionrecord.DefaultPhoto = inspectionrecordDescPhoto.Default.(string)
|
||||
// inspectionrecord.PhotoValidator is a validator for the "photo" field. It is called by the builders before save.
|
||||
inspectionrecord.PhotoValidator = inspectionrecordDescPhoto.Validators[0].(func(string) error)
|
||||
// inspectionrecordDescRemark is the schema descriptor for remark field.
|
||||
inspectionrecordDescRemark := inspectionrecordFields[9].Descriptor()
|
||||
// inspectionrecord.DefaultRemark holds the default value on creation for the remark field.
|
||||
inspectionrecord.DefaultRemark = inspectionrecordDescRemark.Default.(string)
|
||||
// inspectionrecord.RemarkValidator is a validator for the "remark" field. It is called by the builders before save.
|
||||
inspectionrecord.RemarkValidator = inspectionrecordDescRemark.Validators[0].(func(string) error)
|
||||
// inspectionrecordDescOperator is the schema descriptor for operator field.
|
||||
inspectionrecordDescOperator := inspectionrecordFields[10].Descriptor()
|
||||
// inspectionrecord.DefaultOperator holds the default value on creation for the operator field.
|
||||
inspectionrecord.DefaultOperator = inspectionrecordDescOperator.Default.(string)
|
||||
// inspectionrecord.OperatorValidator is a validator for the "operator" field. It is called by the builders before save.
|
||||
inspectionrecord.OperatorValidator = inspectionrecordDescOperator.Validators[0].(func(string) error)
|
||||
// inspectionrecordDescCreatedAt is the schema descriptor for createdAt field.
|
||||
inspectionrecordDescCreatedAt := inspectionrecordFields[11].Descriptor()
|
||||
// inspectionrecord.DefaultCreatedAt holds the default value on creation for the createdAt field.
|
||||
inspectionrecord.DefaultCreatedAt = inspectionrecordDescCreatedAt.Default.(func() time.Time)
|
||||
// inspectionrecordDescID is the schema descriptor for id field.
|
||||
inspectionrecordDescID := inspectionrecordFields[0].Descriptor()
|
||||
// inspectionrecord.IDValidator is a validator for the "id" field. It is called by the builders before save.
|
||||
inspectionrecord.IDValidator = inspectionrecordDescID.Validators[0].(func(int) error)
|
||||
materialrequestFields := schema.MaterialRequest{}.Fields()
|
||||
_ = materialrequestFields
|
||||
// materialrequestDescRequestNo is the schema descriptor for requestNo field.
|
||||
@@ -373,34 +439,72 @@ func init() {
|
||||
plcsendlogDescID := plcsendlogFields[0].Descriptor()
|
||||
// plcsendlog.IDValidator is a validator for the "id" field. It is called by the builders before save.
|
||||
plcsendlog.IDValidator = plcsendlogDescID.Validators[0].(func(int) error)
|
||||
processflowFields := schema.ProcessFlow{}.Fields()
|
||||
_ = processflowFields
|
||||
// processflowDescName is the schema descriptor for name field.
|
||||
processflowDescName := processflowFields[1].Descriptor()
|
||||
// processflow.NameValidator is a validator for the "name" field. It is called by the builders before save.
|
||||
processflow.NameValidator = processflowDescName.Validators[0].(func(string) error)
|
||||
// processflowDescPdfFile is the schema descriptor for pdfFile field.
|
||||
processflowDescPdfFile := processflowFields[3].Descriptor()
|
||||
// processflow.DefaultPdfFile holds the default value on creation for the pdfFile field.
|
||||
processflow.DefaultPdfFile = processflowDescPdfFile.Default.(string)
|
||||
// processflow.PdfFileValidator is a validator for the "pdfFile" field. It is called by the builders before save.
|
||||
processflow.PdfFileValidator = processflowDescPdfFile.Validators[0].(func(string) error)
|
||||
// processflowDescStatus is the schema descriptor for status field.
|
||||
processflowDescStatus := processflowFields[4].Descriptor()
|
||||
// processflow.DefaultStatus holds the default value on creation for the status field.
|
||||
processflow.DefaultStatus = processflowDescStatus.Default.(string)
|
||||
// processflow.StatusValidator is a validator for the "status" field. It is called by the builders before save.
|
||||
processflow.StatusValidator = processflowDescStatus.Validators[0].(func(string) error)
|
||||
// processflowDescRemark is the schema descriptor for remark field.
|
||||
processflowDescRemark := processflowFields[5].Descriptor()
|
||||
// processflow.DefaultRemark holds the default value on creation for the remark field.
|
||||
processflow.DefaultRemark = processflowDescRemark.Default.(string)
|
||||
// processflow.RemarkValidator is a validator for the "remark" field. It is called by the builders before save.
|
||||
processflow.RemarkValidator = processflowDescRemark.Validators[0].(func(string) error)
|
||||
// processflowDescCreatedAt is the schema descriptor for createdAt field.
|
||||
processflowDescCreatedAt := processflowFields[6].Descriptor()
|
||||
// processflow.DefaultCreatedAt holds the default value on creation for the createdAt field.
|
||||
processflow.DefaultCreatedAt = processflowDescCreatedAt.Default.(func() time.Time)
|
||||
// processflowDescUpdatedAt is the schema descriptor for updatedAt field.
|
||||
processflowDescUpdatedAt := processflowFields[7].Descriptor()
|
||||
// processflow.DefaultUpdatedAt holds the default value on creation for the updatedAt field.
|
||||
processflow.DefaultUpdatedAt = processflowDescUpdatedAt.Default.(func() time.Time)
|
||||
// processflow.UpdateDefaultUpdatedAt holds the default value on update for the updatedAt field.
|
||||
processflow.UpdateDefaultUpdatedAt = processflowDescUpdatedAt.UpdateDefault.(func() time.Time)
|
||||
// processflowDescID is the schema descriptor for id field.
|
||||
processflowDescID := processflowFields[0].Descriptor()
|
||||
// processflow.IDValidator is a validator for the "id" field. It is called by the builders before save.
|
||||
processflow.IDValidator = processflowDescID.Validators[0].(func(int) error)
|
||||
processstepFields := schema.ProcessStep{}.Fields()
|
||||
_ = processstepFields
|
||||
// processstepDescSeq is the schema descriptor for seq field.
|
||||
processstepDescSeq := processstepFields[2].Descriptor()
|
||||
processstepDescSeq := processstepFields[3].Descriptor()
|
||||
// processstep.DefaultSeq holds the default value on creation for the seq field.
|
||||
processstep.DefaultSeq = processstepDescSeq.Default.(int)
|
||||
// processstepDescName is the schema descriptor for name field.
|
||||
processstepDescName := processstepFields[3].Descriptor()
|
||||
processstepDescName := processstepFields[4].Descriptor()
|
||||
// processstep.NameValidator is a validator for the "name" field. It is called by the builders before save.
|
||||
processstep.NameValidator = processstepDescName.Validators[0].(func(string) error)
|
||||
// processstepDescCollectType is the schema descriptor for collectType field.
|
||||
processstepDescCollectType := processstepFields[4].Descriptor()
|
||||
processstepDescCollectType := processstepFields[5].Descriptor()
|
||||
// processstep.DefaultCollectType holds the default value on creation for the collectType field.
|
||||
processstep.DefaultCollectType = processstepDescCollectType.Default.(string)
|
||||
// processstep.CollectTypeValidator is a validator for the "collectType" field. It is called by the builders before save.
|
||||
processstep.CollectTypeValidator = processstepDescCollectType.Validators[0].(func(string) error)
|
||||
// processstepDescIsTorque is the schema descriptor for isTorque field.
|
||||
processstepDescIsTorque := processstepFields[5].Descriptor()
|
||||
processstepDescIsTorque := processstepFields[6].Descriptor()
|
||||
// processstep.DefaultIsTorque holds the default value on creation for the isTorque field.
|
||||
processstep.DefaultIsTorque = processstepDescIsTorque.Default.(bool)
|
||||
// processstepDescRemark is the schema descriptor for remark field.
|
||||
processstepDescRemark := processstepFields[6].Descriptor()
|
||||
processstepDescRemark := processstepFields[7].Descriptor()
|
||||
// processstep.DefaultRemark holds the default value on creation for the remark field.
|
||||
processstep.DefaultRemark = processstepDescRemark.Default.(string)
|
||||
// processstep.RemarkValidator is a validator for the "remark" field. It is called by the builders before save.
|
||||
processstep.RemarkValidator = processstepDescRemark.Validators[0].(func(string) error)
|
||||
// processstepDescCreatedAt is the schema descriptor for createdAt field.
|
||||
processstepDescCreatedAt := processstepFields[7].Descriptor()
|
||||
processstepDescCreatedAt := processstepFields[8].Descriptor()
|
||||
// processstep.DefaultCreatedAt holds the default value on creation for the createdAt field.
|
||||
processstep.DefaultCreatedAt = processstepDescCreatedAt.Default.(func() time.Time)
|
||||
// processstepDescID is the schema descriptor for id field.
|
||||
@@ -551,6 +655,28 @@ func init() {
|
||||
semiflowDescID := semiflowFields[0].Descriptor()
|
||||
// semiflow.IDValidator is a validator for the "id" field. It is called by the builders before save.
|
||||
semiflow.IDValidator = semiflowDescID.Validators[0].(func(int) error)
|
||||
stationFields := schema.Station{}.Fields()
|
||||
_ = stationFields
|
||||
// stationDescName is the schema descriptor for name field.
|
||||
stationDescName := stationFields[2].Descriptor()
|
||||
// station.DefaultName holds the default value on creation for the name field.
|
||||
station.DefaultName = stationDescName.Default.(string)
|
||||
// station.NameValidator is a validator for the "name" field. It is called by the builders before save.
|
||||
station.NameValidator = stationDescName.Validators[0].(func(string) error)
|
||||
// stationDescStatus is the schema descriptor for status field.
|
||||
stationDescStatus := stationFields[4].Descriptor()
|
||||
// station.DefaultStatus holds the default value on creation for the status field.
|
||||
station.DefaultStatus = stationDescStatus.Default.(string)
|
||||
// station.StatusValidator is a validator for the "status" field. It is called by the builders before save.
|
||||
station.StatusValidator = stationDescStatus.Validators[0].(func(string) error)
|
||||
// stationDescCreatedAt is the schema descriptor for createdAt field.
|
||||
stationDescCreatedAt := stationFields[5].Descriptor()
|
||||
// station.DefaultCreatedAt holds the default value on creation for the createdAt field.
|
||||
station.DefaultCreatedAt = stationDescCreatedAt.Default.(func() time.Time)
|
||||
// stationDescID is the schema descriptor for id field.
|
||||
stationDescID := stationFields[0].Descriptor()
|
||||
// station.IDValidator is a validator for the "id" field. It is called by the builders before save.
|
||||
station.IDValidator = stationDescID.Validators[0].(func(int) error)
|
||||
stationprocessFields := schema.StationProcess{}.Fields()
|
||||
_ = stationprocessFields
|
||||
// stationprocessDescEffectDate is the schema descriptor for effectDate field.
|
||||
@@ -737,18 +863,26 @@ func init() {
|
||||
user.DefaultName = userDescName.Default.(string)
|
||||
// user.NameValidator is a validator for the "name" field. It is called by the builders before save.
|
||||
user.NameValidator = userDescName.Validators[0].(func(string) error)
|
||||
// userDescCanLoginWorkstation is the schema descriptor for canLoginWorkstation field.
|
||||
userDescCanLoginWorkstation := userFields[5].Descriptor()
|
||||
// user.DefaultCanLoginWorkstation holds the default value on creation for the canLoginWorkstation field.
|
||||
user.DefaultCanLoginWorkstation = userDescCanLoginWorkstation.Default.(bool)
|
||||
// userDescWorkstationPassword is the schema descriptor for workstationPassword field.
|
||||
userDescWorkstationPassword := userFields[6].Descriptor()
|
||||
// user.WorkstationPasswordValidator is a validator for the "workstationPassword" field. It is called by the builders before save.
|
||||
user.WorkstationPasswordValidator = userDescWorkstationPassword.Validators[0].(func(string) error)
|
||||
// userDescStatus is the schema descriptor for status field.
|
||||
userDescStatus := userFields[5].Descriptor()
|
||||
userDescStatus := userFields[7].Descriptor()
|
||||
// user.DefaultStatus holds the default value on creation for the status field.
|
||||
user.DefaultStatus = userDescStatus.Default.(string)
|
||||
// user.StatusValidator is a validator for the "status" field. It is called by the builders before save.
|
||||
user.StatusValidator = userDescStatus.Validators[0].(func(string) error)
|
||||
// userDescCreatedAt is the schema descriptor for createdAt field.
|
||||
userDescCreatedAt := userFields[6].Descriptor()
|
||||
userDescCreatedAt := userFields[8].Descriptor()
|
||||
// user.DefaultCreatedAt holds the default value on creation for the createdAt field.
|
||||
user.DefaultCreatedAt = userDescCreatedAt.Default.(func() time.Time)
|
||||
// userDescUpdatedAt is the schema descriptor for updatedAt field.
|
||||
userDescUpdatedAt := userFields[7].Descriptor()
|
||||
userDescUpdatedAt := userFields[9].Descriptor()
|
||||
// user.DefaultUpdatedAt holds the default value on creation for the updatedAt field.
|
||||
user.DefaultUpdatedAt = userDescUpdatedAt.Default.(func() time.Time)
|
||||
// user.UpdateDefaultUpdatedAt holds the default value on update for the updatedAt field.
|
||||
@@ -757,6 +891,16 @@ func init() {
|
||||
userDescID := userFields[0].Descriptor()
|
||||
// user.IDValidator is a validator for the "id" field. It is called by the builders before save.
|
||||
user.IDValidator = userDescID.Validators[0].(func(int) error)
|
||||
userstationFields := schema.UserStation{}.Fields()
|
||||
_ = userstationFields
|
||||
// userstationDescCreatedAt is the schema descriptor for createdAt field.
|
||||
userstationDescCreatedAt := userstationFields[3].Descriptor()
|
||||
// userstation.DefaultCreatedAt holds the default value on creation for the createdAt field.
|
||||
userstation.DefaultCreatedAt = userstationDescCreatedAt.Default.(func() time.Time)
|
||||
// userstationDescID is the schema descriptor for id field.
|
||||
userstationDescID := userstationFields[0].Descriptor()
|
||||
// userstation.IDValidator is a validator for the "id" field. It is called by the builders before save.
|
||||
userstation.IDValidator = userstationDescID.Validators[0].(func(int) error)
|
||||
workorderFields := schema.WorkOrder{}.Fields()
|
||||
_ = workorderFields
|
||||
// workorderDescWorkOrderNo is the schema descriptor for workOrderNo field.
|
||||
|
||||
Reference in New Issue
Block a user