refactor: 清理MES端本地product_type冗余代码,对齐WMS主数据架构
1. 移除MES端本地product_type实体、schema及相关CRUD代码,改为通过WMS内部API代理获取物料主数据 2. 更新物料管理粒度逻辑,新增"其他"类型(3)支持,同步更新入库校验规则 3. 修复前端物料选择、库存筛选等页面的类型判断逻辑,统一使用manage_mode区分管理类型 4. 清理静态资源文件冗余的样式代码,调整前端页面展示逻辑 5. 更新帮助文档,修正物料类型的说明描述
This commit is contained in:
@@ -20,7 +20,6 @@ import (
|
||||
"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/semiflow"
|
||||
"bj_power_mes/ent/station"
|
||||
@@ -1093,52 +1092,6 @@ func init() {
|
||||
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)
|
||||
producttypeFields := schema.ProductType{}.Fields()
|
||||
_ = producttypeFields
|
||||
// producttypeDescName is the schema descriptor for name field.
|
||||
producttypeDescName := producttypeFields[1].Descriptor()
|
||||
// producttype.NameValidator is a validator for the "name" field. It is called by the builders before save.
|
||||
producttype.NameValidator = producttypeDescName.Validators[0].(func(string) error)
|
||||
// producttypeDescCode is the schema descriptor for code field.
|
||||
producttypeDescCode := producttypeFields[2].Descriptor()
|
||||
// producttype.CodeValidator is a validator for the "code" field. It is called by the builders before save.
|
||||
producttype.CodeValidator = producttypeDescCode.Validators[0].(func(string) error)
|
||||
// producttypeDescCategory is the schema descriptor for category field.
|
||||
producttypeDescCategory := producttypeFields[3].Descriptor()
|
||||
// producttype.DefaultCategory holds the default value on creation for the category field.
|
||||
producttype.DefaultCategory = producttypeDescCategory.Default.(string)
|
||||
// producttype.CategoryValidator is a validator for the "category" field. It is called by the builders before save.
|
||||
producttype.CategoryValidator = producttypeDescCategory.Validators[0].(func(string) error)
|
||||
// producttypeDescSpec is the schema descriptor for spec field.
|
||||
producttypeDescSpec := producttypeFields[4].Descriptor()
|
||||
// producttype.DefaultSpec holds the default value on creation for the spec field.
|
||||
producttype.DefaultSpec = producttypeDescSpec.Default.(string)
|
||||
// producttype.SpecValidator is a validator for the "spec" field. It is called by the builders before save.
|
||||
producttype.SpecValidator = producttypeDescSpec.Validators[0].(func(string) error)
|
||||
// producttypeDescUnit is the schema descriptor for unit field.
|
||||
producttypeDescUnit := producttypeFields[5].Descriptor()
|
||||
// producttype.DefaultUnit holds the default value on creation for the unit field.
|
||||
producttype.DefaultUnit = producttypeDescUnit.Default.(string)
|
||||
// producttype.UnitValidator is a validator for the "unit" field. It is called by the builders before save.
|
||||
producttype.UnitValidator = producttypeDescUnit.Validators[0].(func(string) error)
|
||||
// producttypeDescIsActive is the schema descriptor for isActive field.
|
||||
producttypeDescIsActive := producttypeFields[6].Descriptor()
|
||||
// producttype.DefaultIsActive holds the default value on creation for the isActive field.
|
||||
producttype.DefaultIsActive = producttypeDescIsActive.Default.(bool)
|
||||
// producttypeDescCreatedAt is the schema descriptor for createdAt field.
|
||||
producttypeDescCreatedAt := producttypeFields[7].Descriptor()
|
||||
// producttype.DefaultCreatedAt holds the default value on creation for the createdAt field.
|
||||
producttype.DefaultCreatedAt = producttypeDescCreatedAt.Default.(func() time.Time)
|
||||
// producttypeDescUpdatedAt is the schema descriptor for updatedAt field.
|
||||
producttypeDescUpdatedAt := producttypeFields[8].Descriptor()
|
||||
// producttype.DefaultUpdatedAt holds the default value on creation for the updatedAt field.
|
||||
producttype.DefaultUpdatedAt = producttypeDescUpdatedAt.Default.(func() time.Time)
|
||||
// producttype.UpdateDefaultUpdatedAt holds the default value on update for the updatedAt field.
|
||||
producttype.UpdateDefaultUpdatedAt = producttypeDescUpdatedAt.UpdateDefault.(func() time.Time)
|
||||
// producttypeDescID is the schema descriptor for id field.
|
||||
producttypeDescID := producttypeFields[0].Descriptor()
|
||||
// producttype.IDValidator is a validator for the "id" field. It is called by the builders before save.
|
||||
producttype.IDValidator = producttypeDescID.Validators[0].(func(int) error)
|
||||
roleFields := schema.Role{}.Fields()
|
||||
_ = roleFields
|
||||
// roleDescName is the schema descriptor for name field.
|
||||
|
||||
Reference in New Issue
Block a user