docs(business): 生成业务契约文档并重构MES客户端代码

- 创建案例.md文档,包含业务场景清单、业务流程、案例和回归测试三份完整文档
- WMS库房管理系统涵盖入库、出库、库存、检验、盘点等24个业务场景
- MES产线控制系统包含工单、排产、BOM、备料、质检、追溯等23个业务场景
- 工位终端系统支持上线、报工、下线、领料、巡检等15个现场作业场景
- 主链路从合同到成品入库,异常链路处理不合格、数量不符、退料等情况
- 删除MES客户端中的ScanRecord相关代码,精简客户端结构
- 更新客户端初始化逻辑,移除扫描记录相关的依赖注入配置
This commit is contained in:
SunYF
2026-09-20 18:25:44 +08:00
parent 5f68e77d5f
commit 8e6e8e1d20
46 changed files with 1052 additions and 3954 deletions
-43
View File
@@ -21,7 +21,6 @@ import (
"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"
@@ -1121,48 +1120,6 @@ func init() {
roleDescID := roleFields[0].Descriptor()
// role.IDValidator is a validator for the "id" field. It is called by the builders before save.
role.IDValidator = roleDescID.Validators[0].(func(int) error)
scanrecordFields := schema.ScanRecord{}.Fields()
_ = scanrecordFields
// scanrecordDescStation is the schema descriptor for station field.
scanrecordDescStation := scanrecordFields[1].Descriptor()
// scanrecord.DefaultStation holds the default value on creation for the station field.
scanrecord.DefaultStation = scanrecordDescStation.Default.(string)
// scanrecord.StationValidator is a validator for the "station" field. It is called by the builders before save.
scanrecord.StationValidator = scanrecordDescStation.Validators[0].(func(string) error)
// scanrecordDescSn is the schema descriptor for sn field.
scanrecordDescSn := scanrecordFields[2].Descriptor()
// scanrecord.SnValidator is a validator for the "sn" field. It is called by the builders before save.
scanrecord.SnValidator = scanrecordDescSn.Validators[0].(func(string) error)
// scanrecordDescOrderNo is the schema descriptor for orderNo field.
scanrecordDescOrderNo := scanrecordFields[3].Descriptor()
// scanrecord.DefaultOrderNo holds the default value on creation for the orderNo field.
scanrecord.DefaultOrderNo = scanrecordDescOrderNo.Default.(string)
// scanrecord.OrderNoValidator is a validator for the "orderNo" field. It is called by the builders before save.
scanrecord.OrderNoValidator = scanrecordDescOrderNo.Validators[0].(func(string) error)
// scanrecordDescType is the schema descriptor for type field.
scanrecordDescType := scanrecordFields[4].Descriptor()
// scanrecord.DefaultType holds the default value on creation for the type field.
scanrecord.DefaultType = scanrecordDescType.Default.(string)
// scanrecord.TypeValidator is a validator for the "type" field. It is called by the builders before save.
scanrecord.TypeValidator = scanrecordDescType.Validators[0].(func(string) error)
// scanrecordDescOperator is the schema descriptor for operator field.
scanrecordDescOperator := scanrecordFields[6].Descriptor()
// scanrecord.DefaultOperator holds the default value on creation for the operator field.
scanrecord.DefaultOperator = scanrecordDescOperator.Default.(string)
// scanrecord.OperatorValidator is a validator for the "operator" field. It is called by the builders before save.
scanrecord.OperatorValidator = scanrecordDescOperator.Validators[0].(func(string) error)
// scanrecordDescTime is the schema descriptor for time field.
scanrecordDescTime := scanrecordFields[7].Descriptor()
// scanrecord.DefaultTime holds the default value on creation for the time field.
scanrecord.DefaultTime = scanrecordDescTime.Default.(func() time.Time)
// scanrecordDescCreatedAt is the schema descriptor for createdAt field.
scanrecordDescCreatedAt := scanrecordFields[8].Descriptor()
// scanrecord.DefaultCreatedAt holds the default value on creation for the createdAt field.
scanrecord.DefaultCreatedAt = scanrecordDescCreatedAt.Default.(func() time.Time)
// scanrecordDescID is the schema descriptor for id field.
scanrecordDescID := scanrecordFields[0].Descriptor()
// scanrecord.IDValidator is a validator for the "id" field. It is called by the builders before save.
scanrecord.IDValidator = scanrecordDescID.Validators[0].(func(int) error)
semiflowFields := schema.SemiFlow{}.Fields()
_ = semiflowFields
// semiflowDescSn is the schema descriptor for sn field.