feat: 新增产品工艺管理与工序审核功能
- 新增产品工艺(product_process)及明细(product_process_item)数据模型 - 新增工序审核开关(need_audit)与审核角色(audit_role)字段 - 新增待审核签字页面与路由 - 优化 WMS/MES 接口交互,增加业务错误处理与友好提示 - 补充库存过滤逻辑,避免返回已出库 SN 数据 - 调整默认查询时间范围为近一个月,优化用户体验
This commit is contained in:
@@ -20,6 +20,8 @@ import (
|
||||
"bj_power_mes/ent/plcsendlog"
|
||||
"bj_power_mes/ent/processflow"
|
||||
"bj_power_mes/ent/processstep"
|
||||
"bj_power_mes/ent/productprocess"
|
||||
"bj_power_mes/ent/productprocessitem"
|
||||
"bj_power_mes/ent/role"
|
||||
"bj_power_mes/ent/semiflow"
|
||||
"bj_power_mes/ent/station"
|
||||
@@ -1081,20 +1083,80 @@ func init() {
|
||||
processstepDescNeedInspectorSign := processstepFields[8].Descriptor()
|
||||
// processstep.DefaultNeedInspectorSign holds the default value on creation for the needInspectorSign field.
|
||||
processstep.DefaultNeedInspectorSign = processstepDescNeedInspectorSign.Default.(bool)
|
||||
// processstepDescNeedAudit is the schema descriptor for needAudit field.
|
||||
processstepDescNeedAudit := processstepFields[9].Descriptor()
|
||||
// processstep.DefaultNeedAudit holds the default value on creation for the needAudit field.
|
||||
processstep.DefaultNeedAudit = processstepDescNeedAudit.Default.(bool)
|
||||
// processstepDescAuditRole is the schema descriptor for auditRole field.
|
||||
processstepDescAuditRole := processstepFields[10].Descriptor()
|
||||
// processstep.DefaultAuditRole holds the default value on creation for the auditRole field.
|
||||
processstep.DefaultAuditRole = processstepDescAuditRole.Default.(string)
|
||||
// processstep.AuditRoleValidator is a validator for the "auditRole" field. It is called by the builders before save.
|
||||
processstep.AuditRoleValidator = processstepDescAuditRole.Validators[0].(func(string) error)
|
||||
// processstepDescRemark is the schema descriptor for remark field.
|
||||
processstepDescRemark := processstepFields[10].Descriptor()
|
||||
processstepDescRemark := processstepFields[12].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[11].Descriptor()
|
||||
processstepDescCreatedAt := processstepFields[13].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.
|
||||
processstepDescID := processstepFields[0].Descriptor()
|
||||
// processstep.IDValidator is a validator for the "id" field. It is called by the builders before save.
|
||||
processstep.IDValidator = processstepDescID.Validators[0].(func(int) error)
|
||||
productprocessFields := schema.ProductProcess{}.Fields()
|
||||
_ = productprocessFields
|
||||
// productprocessDescProductCode is the schema descriptor for productCode field.
|
||||
productprocessDescProductCode := productprocessFields[1].Descriptor()
|
||||
// productprocess.ProductCodeValidator is a validator for the "productCode" field. It is called by the builders before save.
|
||||
productprocess.ProductCodeValidator = productprocessDescProductCode.Validators[0].(func(string) error)
|
||||
// productprocessDescProductName is the schema descriptor for productName field.
|
||||
productprocessDescProductName := productprocessFields[2].Descriptor()
|
||||
// productprocess.DefaultProductName holds the default value on creation for the productName field.
|
||||
productprocess.DefaultProductName = productprocessDescProductName.Default.(string)
|
||||
// productprocess.ProductNameValidator is a validator for the "productName" field. It is called by the builders before save.
|
||||
productprocess.ProductNameValidator = productprocessDescProductName.Validators[0].(func(string) error)
|
||||
// productprocessDescName is the schema descriptor for name field.
|
||||
productprocessDescName := productprocessFields[3].Descriptor()
|
||||
// productprocess.NameValidator is a validator for the "name" field. It is called by the builders before save.
|
||||
productprocess.NameValidator = productprocessDescName.Validators[0].(func(string) error)
|
||||
// productprocessDescIsDefault is the schema descriptor for isDefault field.
|
||||
productprocessDescIsDefault := productprocessFields[4].Descriptor()
|
||||
// productprocess.DefaultIsDefault holds the default value on creation for the isDefault field.
|
||||
productprocess.DefaultIsDefault = productprocessDescIsDefault.Default.(bool)
|
||||
// productprocessDescStatus is the schema descriptor for status field.
|
||||
productprocessDescStatus := productprocessFields[5].Descriptor()
|
||||
// productprocess.DefaultStatus holds the default value on creation for the status field.
|
||||
productprocess.DefaultStatus = productprocessDescStatus.Default.(string)
|
||||
// productprocess.StatusValidator is a validator for the "status" field. It is called by the builders before save.
|
||||
productprocess.StatusValidator = productprocessDescStatus.Validators[0].(func(string) error)
|
||||
// productprocessDescRemark is the schema descriptor for remark field.
|
||||
productprocessDescRemark := productprocessFields[6].Descriptor()
|
||||
// productprocess.DefaultRemark holds the default value on creation for the remark field.
|
||||
productprocess.DefaultRemark = productprocessDescRemark.Default.(string)
|
||||
// productprocess.RemarkValidator is a validator for the "remark" field. It is called by the builders before save.
|
||||
productprocess.RemarkValidator = productprocessDescRemark.Validators[0].(func(string) error)
|
||||
// productprocessDescCreatedAt is the schema descriptor for createdAt field.
|
||||
productprocessDescCreatedAt := productprocessFields[7].Descriptor()
|
||||
// productprocess.DefaultCreatedAt holds the default value on creation for the createdAt field.
|
||||
productprocess.DefaultCreatedAt = productprocessDescCreatedAt.Default.(func() time.Time)
|
||||
// productprocessDescID is the schema descriptor for id field.
|
||||
productprocessDescID := productprocessFields[0].Descriptor()
|
||||
// productprocess.IDValidator is a validator for the "id" field. It is called by the builders before save.
|
||||
productprocess.IDValidator = productprocessDescID.Validators[0].(func(int) error)
|
||||
productprocessitemFields := schema.ProductProcessItem{}.Fields()
|
||||
_ = productprocessitemFields
|
||||
// productprocessitemDescCreatedAt is the schema descriptor for createdAt field.
|
||||
productprocessitemDescCreatedAt := productprocessitemFields[4].Descriptor()
|
||||
// productprocessitem.DefaultCreatedAt holds the default value on creation for the createdAt field.
|
||||
productprocessitem.DefaultCreatedAt = productprocessitemDescCreatedAt.Default.(func() time.Time)
|
||||
// productprocessitemDescID is the schema descriptor for id field.
|
||||
productprocessitemDescID := productprocessitemFields[0].Descriptor()
|
||||
// productprocessitem.IDValidator is a validator for the "id" field. It is called by the builders before save.
|
||||
productprocessitem.IDValidator = productprocessitemDescID.Validators[0].(func(int) error)
|
||||
roleFields := schema.Role{}.Fields()
|
||||
_ = roleFields
|
||||
// roleDescName is the schema descriptor for name field.
|
||||
@@ -1601,18 +1663,22 @@ func init() {
|
||||
workorder.DefaultCreatedBy = workorderDescCreatedBy.Default.(string)
|
||||
// workorder.CreatedByValidator is a validator for the "createdBy" field. It is called by the builders before save.
|
||||
workorder.CreatedByValidator = workorderDescCreatedBy.Validators[0].(func(string) error)
|
||||
// workorderDescProductProcessId is the schema descriptor for productProcessId field.
|
||||
workorderDescProductProcessId := workorderFields[15].Descriptor()
|
||||
// workorder.DefaultProductProcessId holds the default value on creation for the productProcessId field.
|
||||
workorder.DefaultProductProcessId = workorderDescProductProcessId.Default.(int)
|
||||
// workorderDescStatus is the schema descriptor for status field.
|
||||
workorderDescStatus := workorderFields[15].Descriptor()
|
||||
workorderDescStatus := workorderFields[16].Descriptor()
|
||||
// workorder.DefaultStatus holds the default value on creation for the status field.
|
||||
workorder.DefaultStatus = workorderDescStatus.Default.(string)
|
||||
// workorder.StatusValidator is a validator for the "status" field. It is called by the builders before save.
|
||||
workorder.StatusValidator = workorderDescStatus.Validators[0].(func(string) error)
|
||||
// workorderDescCreatedAt is the schema descriptor for createdAt field.
|
||||
workorderDescCreatedAt := workorderFields[20].Descriptor()
|
||||
workorderDescCreatedAt := workorderFields[21].Descriptor()
|
||||
// workorder.DefaultCreatedAt holds the default value on creation for the createdAt field.
|
||||
workorder.DefaultCreatedAt = workorderDescCreatedAt.Default.(func() time.Time)
|
||||
// workorderDescUpdatedAt is the schema descriptor for updatedAt field.
|
||||
workorderDescUpdatedAt := workorderFields[21].Descriptor()
|
||||
workorderDescUpdatedAt := workorderFields[22].Descriptor()
|
||||
// workorder.DefaultUpdatedAt holds the default value on creation for the updatedAt field.
|
||||
workorder.DefaultUpdatedAt = workorderDescUpdatedAt.Default.(func() time.Time)
|
||||
// workorder.UpdateDefaultUpdatedAt holds the default value on update for the updatedAt field.
|
||||
|
||||
Reference in New Issue
Block a user