feat: 完成产线与仓储系统多模块迭代升级
本次迭代覆盖MES与WMS核心业务: 1. 新增接驳台托盘传感器读取与AGV对接能力 2. 完善工单排产、备料流程与权限体系拆分 3. 优化看板接口与前端路由、样式 4. 新增操作日志、库存盘点与角色保护逻辑 5. 修复代理地址、BOM保存等已知问题
This commit is contained in:
@@ -3,6 +3,9 @@
|
||||
package ent
|
||||
|
||||
import (
|
||||
"bj_power_wms/ent/agvtask"
|
||||
"bj_power_wms/ent/dock"
|
||||
"bj_power_wms/ent/eventlog"
|
||||
"bj_power_wms/ent/inbounddetail"
|
||||
"bj_power_wms/ent/inboundorder"
|
||||
"bj_power_wms/ent/inspectionrecord"
|
||||
@@ -26,6 +29,146 @@ import (
|
||||
// (default values, validators, hooks and policies) and stitches it
|
||||
// to their package variables.
|
||||
func init() {
|
||||
agvtaskFields := schema.AgvTask{}.Fields()
|
||||
_ = agvtaskFields
|
||||
// agvtaskDescTaskNo is the schema descriptor for task_no field.
|
||||
agvtaskDescTaskNo := agvtaskFields[0].Descriptor()
|
||||
// agvtask.TaskNoValidator is a validator for the "task_no" field. It is called by the builders before save.
|
||||
agvtask.TaskNoValidator = agvtaskDescTaskNo.Validators[0].(func(string) error)
|
||||
// agvtaskDescHikTaskCode is the schema descriptor for hik_task_code field.
|
||||
agvtaskDescHikTaskCode := agvtaskFields[1].Descriptor()
|
||||
// agvtask.DefaultHikTaskCode holds the default value on creation for the hik_task_code field.
|
||||
agvtask.DefaultHikTaskCode = agvtaskDescHikTaskCode.Default.(string)
|
||||
// agvtask.HikTaskCodeValidator is a validator for the "hik_task_code" field. It is called by the builders before save.
|
||||
agvtask.HikTaskCodeValidator = agvtaskDescHikTaskCode.Validators[0].(func(string) error)
|
||||
// agvtaskDescSourceDock is the schema descriptor for source_dock field.
|
||||
agvtaskDescSourceDock := agvtaskFields[2].Descriptor()
|
||||
// agvtask.DefaultSourceDock holds the default value on creation for the source_dock field.
|
||||
agvtask.DefaultSourceDock = agvtaskDescSourceDock.Default.(string)
|
||||
// agvtask.SourceDockValidator is a validator for the "source_dock" field. It is called by the builders before save.
|
||||
agvtask.SourceDockValidator = agvtaskDescSourceDock.Validators[0].(func(string) error)
|
||||
// agvtaskDescTargetDock is the schema descriptor for target_dock field.
|
||||
agvtaskDescTargetDock := agvtaskFields[3].Descriptor()
|
||||
// agvtask.DefaultTargetDock holds the default value on creation for the target_dock field.
|
||||
agvtask.DefaultTargetDock = agvtaskDescTargetDock.Default.(string)
|
||||
// agvtask.TargetDockValidator is a validator for the "target_dock" field. It is called by the builders before save.
|
||||
agvtask.TargetDockValidator = agvtaskDescTargetDock.Validators[0].(func(string) error)
|
||||
// agvtaskDescMaterialsJSON is the schema descriptor for materials_json field.
|
||||
agvtaskDescMaterialsJSON := agvtaskFields[4].Descriptor()
|
||||
// agvtask.DefaultMaterialsJSON holds the default value on creation for the materials_json field.
|
||||
agvtask.DefaultMaterialsJSON = agvtaskDescMaterialsJSON.Default.(string)
|
||||
// agvtask.MaterialsJSONValidator is a validator for the "materials_json" field. It is called by the builders before save.
|
||||
agvtask.MaterialsJSONValidator = agvtaskDescMaterialsJSON.Validators[0].(func(string) error)
|
||||
// agvtaskDescRelatedOutboundNo is the schema descriptor for related_outbound_no field.
|
||||
agvtaskDescRelatedOutboundNo := agvtaskFields[5].Descriptor()
|
||||
// agvtask.DefaultRelatedOutboundNo holds the default value on creation for the related_outbound_no field.
|
||||
agvtask.DefaultRelatedOutboundNo = agvtaskDescRelatedOutboundNo.Default.(string)
|
||||
// agvtask.RelatedOutboundNoValidator is a validator for the "related_outbound_no" field. It is called by the builders before save.
|
||||
agvtask.RelatedOutboundNoValidator = agvtaskDescRelatedOutboundNo.Validators[0].(func(string) error)
|
||||
// agvtaskDescStatus is the schema descriptor for status field.
|
||||
agvtaskDescStatus := agvtaskFields[6].Descriptor()
|
||||
// agvtask.DefaultStatus holds the default value on creation for the status field.
|
||||
agvtask.DefaultStatus = agvtaskDescStatus.Default.(string)
|
||||
// agvtask.StatusValidator is a validator for the "status" field. It is called by the builders before save.
|
||||
agvtask.StatusValidator = agvtaskDescStatus.Validators[0].(func(string) error)
|
||||
// agvtaskDescOperator is the schema descriptor for operator field.
|
||||
agvtaskDescOperator := agvtaskFields[7].Descriptor()
|
||||
// agvtask.DefaultOperator holds the default value on creation for the operator field.
|
||||
agvtask.DefaultOperator = agvtaskDescOperator.Default.(string)
|
||||
// agvtask.OperatorValidator is a validator for the "operator" field. It is called by the builders before save.
|
||||
agvtask.OperatorValidator = agvtaskDescOperator.Validators[0].(func(string) error)
|
||||
// agvtaskDescDispatchedAt is the schema descriptor for dispatched_at field.
|
||||
agvtaskDescDispatchedAt := agvtaskFields[8].Descriptor()
|
||||
// agvtask.DefaultDispatchedAt holds the default value on creation for the dispatched_at field.
|
||||
agvtask.DefaultDispatchedAt = agvtaskDescDispatchedAt.Default.(int64)
|
||||
// agvtaskDescArrivedAt is the schema descriptor for arrived_at field.
|
||||
agvtaskDescArrivedAt := agvtaskFields[9].Descriptor()
|
||||
// agvtask.DefaultArrivedAt holds the default value on creation for the arrived_at field.
|
||||
agvtask.DefaultArrivedAt = agvtaskDescArrivedAt.Default.(int64)
|
||||
// agvtaskDescRemark is the schema descriptor for remark field.
|
||||
agvtaskDescRemark := agvtaskFields[10].Descriptor()
|
||||
// agvtask.DefaultRemark holds the default value on creation for the remark field.
|
||||
agvtask.DefaultRemark = agvtaskDescRemark.Default.(string)
|
||||
// agvtask.RemarkValidator is a validator for the "remark" field. It is called by the builders before save.
|
||||
agvtask.RemarkValidator = agvtaskDescRemark.Validators[0].(func(string) error)
|
||||
// agvtaskDescCreatedAt is the schema descriptor for created_at field.
|
||||
agvtaskDescCreatedAt := agvtaskFields[11].Descriptor()
|
||||
// agvtask.DefaultCreatedAt holds the default value on creation for the created_at field.
|
||||
agvtask.DefaultCreatedAt = agvtaskDescCreatedAt.Default.(func() int64)
|
||||
dockFields := schema.Dock{}.Fields()
|
||||
_ = dockFields
|
||||
// dockDescDockCode is the schema descriptor for dock_code field.
|
||||
dockDescDockCode := dockFields[0].Descriptor()
|
||||
// dock.DockCodeValidator is a validator for the "dock_code" field. It is called by the builders before save.
|
||||
dock.DockCodeValidator = dockDescDockCode.Validators[0].(func(string) error)
|
||||
// dockDescName is the schema descriptor for name field.
|
||||
dockDescName := dockFields[1].Descriptor()
|
||||
// dock.DefaultName holds the default value on creation for the name field.
|
||||
dock.DefaultName = dockDescName.Default.(string)
|
||||
// dock.NameValidator is a validator for the "name" field. It is called by the builders before save.
|
||||
dock.NameValidator = dockDescName.Validators[0].(func(string) error)
|
||||
// dockDescDockType is the schema descriptor for dock_type field.
|
||||
dockDescDockType := dockFields[2].Descriptor()
|
||||
// dock.DefaultDockType holds the default value on creation for the dock_type field.
|
||||
dock.DefaultDockType = dockDescDockType.Default.(string)
|
||||
// dock.DockTypeValidator is a validator for the "dock_type" field. It is called by the builders before save.
|
||||
dock.DockTypeValidator = dockDescDockType.Validators[0].(func(string) error)
|
||||
// dockDescStationNo is the schema descriptor for station_no field.
|
||||
dockDescStationNo := dockFields[3].Descriptor()
|
||||
// dock.DefaultStationNo holds the default value on creation for the station_no field.
|
||||
dock.DefaultStationNo = dockDescStationNo.Default.(int)
|
||||
// dockDescHasPallet is the schema descriptor for has_pallet field.
|
||||
dockDescHasPallet := dockFields[4].Descriptor()
|
||||
// dock.DefaultHasPallet holds the default value on creation for the has_pallet field.
|
||||
dock.DefaultHasPallet = dockDescHasPallet.Default.(bool)
|
||||
// dockDescPalletRef is the schema descriptor for pallet_ref field.
|
||||
dockDescPalletRef := dockFields[5].Descriptor()
|
||||
// dock.DefaultPalletRef holds the default value on creation for the pallet_ref field.
|
||||
dock.DefaultPalletRef = dockDescPalletRef.Default.(string)
|
||||
// dock.PalletRefValidator is a validator for the "pallet_ref" field. It is called by the builders before save.
|
||||
dock.PalletRefValidator = dockDescPalletRef.Validators[0].(func(string) error)
|
||||
// dockDescStatus is the schema descriptor for status field.
|
||||
dockDescStatus := dockFields[6].Descriptor()
|
||||
// dock.DefaultStatus holds the default value on creation for the status field.
|
||||
dock.DefaultStatus = dockDescStatus.Default.(string)
|
||||
// dock.StatusValidator is a validator for the "status" field. It is called by the builders before save.
|
||||
dock.StatusValidator = dockDescStatus.Validators[0].(func(string) error)
|
||||
// dockDescCreatedAt is the schema descriptor for created_at field.
|
||||
dockDescCreatedAt := dockFields[7].Descriptor()
|
||||
// dock.DefaultCreatedAt holds the default value on creation for the created_at field.
|
||||
dock.DefaultCreatedAt = dockDescCreatedAt.Default.(func() int64)
|
||||
eventlogFields := schema.EventLog{}.Fields()
|
||||
_ = eventlogFields
|
||||
// eventlogDescEventType is the schema descriptor for event_type field.
|
||||
eventlogDescEventType := eventlogFields[0].Descriptor()
|
||||
// eventlog.EventTypeValidator is a validator for the "event_type" field. It is called by the builders before save.
|
||||
eventlog.EventTypeValidator = eventlogDescEventType.Validators[0].(func(string) error)
|
||||
// eventlogDescOperator is the schema descriptor for operator field.
|
||||
eventlogDescOperator := eventlogFields[1].Descriptor()
|
||||
// eventlog.DefaultOperator holds the default value on creation for the operator field.
|
||||
eventlog.DefaultOperator = eventlogDescOperator.Default.(string)
|
||||
// eventlog.OperatorValidator is a validator for the "operator" field. It is called by the builders before save.
|
||||
eventlog.OperatorValidator = eventlogDescOperator.Validators[0].(func(string) error)
|
||||
// eventlogDescEntityType is the schema descriptor for entity_type field.
|
||||
eventlogDescEntityType := eventlogFields[2].Descriptor()
|
||||
// eventlog.DefaultEntityType holds the default value on creation for the entity_type field.
|
||||
eventlog.DefaultEntityType = eventlogDescEntityType.Default.(string)
|
||||
// eventlog.EntityTypeValidator is a validator for the "entity_type" field. It is called by the builders before save.
|
||||
eventlog.EntityTypeValidator = eventlogDescEntityType.Validators[0].(func(string) error)
|
||||
// eventlogDescEntityID is the schema descriptor for entity_id field.
|
||||
eventlogDescEntityID := eventlogFields[3].Descriptor()
|
||||
// eventlog.DefaultEntityID holds the default value on creation for the entity_id field.
|
||||
eventlog.DefaultEntityID = eventlogDescEntityID.Default.(string)
|
||||
// eventlog.EntityIDValidator is a validator for the "entity_id" field. It is called by the builders before save.
|
||||
eventlog.EntityIDValidator = eventlogDescEntityID.Validators[0].(func(string) error)
|
||||
// eventlogDescDescription is the schema descriptor for description field.
|
||||
eventlogDescDescription := eventlogFields[4].Descriptor()
|
||||
// eventlog.DefaultDescription holds the default value on creation for the description field.
|
||||
eventlog.DefaultDescription = eventlogDescDescription.Default.(string)
|
||||
// eventlogDescCreatedAt is the schema descriptor for created_at field.
|
||||
eventlogDescCreatedAt := eventlogFields[6].Descriptor()
|
||||
// eventlog.DefaultCreatedAt holds the default value on creation for the created_at field.
|
||||
eventlog.DefaultCreatedAt = eventlogDescCreatedAt.Default.(func() int64)
|
||||
inbounddetailFields := schema.InboundDetail{}.Fields()
|
||||
_ = inbounddetailFields
|
||||
// inbounddetailDescQuantity is the schema descriptor for quantity field.
|
||||
|
||||
Reference in New Issue
Block a user