feat: 五项目业务实现并对接完成

- MES(B): 工单/BOM/备料/工序字典/PLC下发/拧紧/扫码报工/半成品/AGV/追溯逻辑,WMS与海康RCS客户端,看板Redis缓存API(概览/设备/进度/报警/趋势)+SSE
- WMS(C): JWT滑动续签、Excel导入、盘点、内部API、种子数据、独立Postgres配置
- WMS客户端(E): Go网关8891反向代理+内嵌Vue3十页
- 工位终端(D): SQLite本地缓存+模拟拧紧源+内嵌Vue3页面
- Dashboard(A): 看板数据改接MES内部缓存API,SSE实时刷新+vite代理
- 清理各项目球形磨遗留代码,新增部署手册.md
This commit is contained in:
SunYF
2026-08-27 19:50:57 +08:00
parent c85c3bd6f1
commit a2afd2f6dc
335 changed files with 87495 additions and 7357 deletions
+297
View File
@@ -0,0 +1,297 @@
// Code generated by ent, DO NOT EDIT.
package ent
import (
"bj_power_wms/ent/inbounddetail"
"bj_power_wms/ent/inboundorder"
"bj_power_wms/ent/inspectionrecord"
"bj_power_wms/ent/inventorybatch"
"bj_power_wms/ent/inventorylock"
"bj_power_wms/ent/material"
"bj_power_wms/ent/ordermaterialledger"
"bj_power_wms/ent/outbounddetail"
"bj_power_wms/ent/outboundorder"
"bj_power_wms/ent/packagebox"
"bj_power_wms/ent/semifinished"
"bj_power_wms/ent/serialnumber"
"bj_power_wms/ent/stocktakeitem"
"bj_power_wms/ent/stocktakeorder"
"bj_power_wms/ent/user"
"bj_power_wms/ent/zone"
"bj_power_wms/schema"
)
// The init function reads all schema descriptors with runtime code
// (default values, validators, hooks and policies) and stitches it
// to their package variables.
func init() {
inbounddetailFields := schema.InboundDetail{}.Fields()
_ = inbounddetailFields
// inbounddetailDescQuantity is the schema descriptor for quantity field.
inbounddetailDescQuantity := inbounddetailFields[4].Descriptor()
// inbounddetail.DefaultQuantity holds the default value on creation for the quantity field.
inbounddetail.DefaultQuantity = inbounddetailDescQuantity.Default.(int)
// inbounddetailDescCreatedAt is the schema descriptor for created_at field.
inbounddetailDescCreatedAt := inbounddetailFields[5].Descriptor()
// inbounddetail.DefaultCreatedAt holds the default value on creation for the created_at field.
inbounddetail.DefaultCreatedAt = inbounddetailDescCreatedAt.Default.(func() int64)
inboundorderFields := schema.InboundOrder{}.Fields()
_ = inboundorderFields
// inboundorderDescInboundType is the schema descriptor for inbound_type field.
inboundorderDescInboundType := inboundorderFields[1].Descriptor()
// inboundorder.DefaultInboundType holds the default value on creation for the inbound_type field.
inboundorder.DefaultInboundType = inboundorderDescInboundType.Default.(string)
// inboundorderDescManageMode is the schema descriptor for manage_mode field.
inboundorderDescManageMode := inboundorderFields[4].Descriptor()
// inboundorder.DefaultManageMode holds the default value on creation for the manage_mode field.
inboundorder.DefaultManageMode = inboundorderDescManageMode.Default.(int)
// inboundorderDescQuantity is the schema descriptor for quantity field.
inboundorderDescQuantity := inboundorderFields[7].Descriptor()
// inboundorder.DefaultQuantity holds the default value on creation for the quantity field.
inboundorder.DefaultQuantity = inboundorderDescQuantity.Default.(int)
// inboundorderDescCreatedAt is the schema descriptor for created_at field.
inboundorderDescCreatedAt := inboundorderFields[10].Descriptor()
// inboundorder.DefaultCreatedAt holds the default value on creation for the created_at field.
inboundorder.DefaultCreatedAt = inboundorderDescCreatedAt.Default.(func() int64)
inspectionrecordFields := schema.InspectionRecord{}.Fields()
_ = inspectionrecordFields
// inspectionrecordDescInspectionType is the schema descriptor for inspection_type field.
inspectionrecordDescInspectionType := inspectionrecordFields[3].Descriptor()
// inspectionrecord.DefaultInspectionType holds the default value on creation for the inspection_type field.
inspectionrecord.DefaultInspectionType = inspectionrecordDescInspectionType.Default.(string)
// inspectionrecordDescStatus is the schema descriptor for status field.
inspectionrecordDescStatus := inspectionrecordFields[4].Descriptor()
// inspectionrecord.DefaultStatus holds the default value on creation for the status field.
inspectionrecord.DefaultStatus = inspectionrecordDescStatus.Default.(string)
// inspectionrecordDescCreatedAt is the schema descriptor for created_at field.
inspectionrecordDescCreatedAt := inspectionrecordFields[8].Descriptor()
// inspectionrecord.DefaultCreatedAt holds the default value on creation for the created_at field.
inspectionrecord.DefaultCreatedAt = inspectionrecordDescCreatedAt.Default.(func() int64)
// inspectionrecordDescUpdatedAt is the schema descriptor for updated_at field.
inspectionrecordDescUpdatedAt := inspectionrecordFields[9].Descriptor()
// inspectionrecord.DefaultUpdatedAt holds the default value on creation for the updated_at field.
inspectionrecord.DefaultUpdatedAt = inspectionrecordDescUpdatedAt.Default.(func() int64)
inventorybatchFields := schema.InventoryBatch{}.Fields()
_ = inventorybatchFields
// inventorybatchDescQuantity is the schema descriptor for quantity field.
inventorybatchDescQuantity := inventorybatchFields[3].Descriptor()
// inventorybatch.DefaultQuantity holds the default value on creation for the quantity field.
inventorybatch.DefaultQuantity = inventorybatchDescQuantity.Default.(int)
// inventorybatchDescLockedQty is the schema descriptor for locked_qty field.
inventorybatchDescLockedQty := inventorybatchFields[4].Descriptor()
// inventorybatch.DefaultLockedQty holds the default value on creation for the locked_qty field.
inventorybatch.DefaultLockedQty = inventorybatchDescLockedQty.Default.(int)
// inventorybatchDescQualityStatus is the schema descriptor for quality_status field.
inventorybatchDescQualityStatus := inventorybatchFields[7].Descriptor()
// inventorybatch.DefaultQualityStatus holds the default value on creation for the quality_status field.
inventorybatch.DefaultQualityStatus = inventorybatchDescQualityStatus.Default.(string)
// inventorybatchDescCreatedAt is the schema descriptor for created_at field.
inventorybatchDescCreatedAt := inventorybatchFields[10].Descriptor()
// inventorybatch.DefaultCreatedAt holds the default value on creation for the created_at field.
inventorybatch.DefaultCreatedAt = inventorybatchDescCreatedAt.Default.(func() int64)
// inventorybatchDescUpdatedAt is the schema descriptor for updated_at field.
inventorybatchDescUpdatedAt := inventorybatchFields[11].Descriptor()
// inventorybatch.DefaultUpdatedAt holds the default value on creation for the updated_at field.
inventorybatch.DefaultUpdatedAt = inventorybatchDescUpdatedAt.Default.(func() int64)
inventorylockFields := schema.InventoryLock{}.Fields()
_ = inventorylockFields
// inventorylockDescLockedQty is the schema descriptor for locked_qty field.
inventorylockDescLockedQty := inventorylockFields[3].Descriptor()
// inventorylock.DefaultLockedQty holds the default value on creation for the locked_qty field.
inventorylock.DefaultLockedQty = inventorylockDescLockedQty.Default.(int)
// inventorylockDescStatus is the schema descriptor for status field.
inventorylockDescStatus := inventorylockFields[5].Descriptor()
// inventorylock.DefaultStatus holds the default value on creation for the status field.
inventorylock.DefaultStatus = inventorylockDescStatus.Default.(string)
// inventorylockDescCreatedAt is the schema descriptor for created_at field.
inventorylockDescCreatedAt := inventorylockFields[8].Descriptor()
// inventorylock.DefaultCreatedAt holds the default value on creation for the created_at field.
inventorylock.DefaultCreatedAt = inventorylockDescCreatedAt.Default.(func() int64)
// inventorylockDescUpdatedAt is the schema descriptor for updated_at field.
inventorylockDescUpdatedAt := inventorylockFields[9].Descriptor()
// inventorylock.DefaultUpdatedAt holds the default value on creation for the updated_at field.
inventorylock.DefaultUpdatedAt = inventorylockDescUpdatedAt.Default.(func() int64)
materialFields := schema.Material{}.Fields()
_ = materialFields
// materialDescManageMode is the schema descriptor for manage_mode field.
materialDescManageMode := materialFields[6].Descriptor()
// material.DefaultManageMode holds the default value on creation for the manage_mode field.
material.DefaultManageMode = materialDescManageMode.Default.(int)
// materialDescIsBatchManaged is the schema descriptor for is_batch_managed field.
materialDescIsBatchManaged := materialFields[7].Descriptor()
// material.DefaultIsBatchManaged holds the default value on creation for the is_batch_managed field.
material.DefaultIsBatchManaged = materialDescIsBatchManaged.Default.(bool)
// materialDescIsSerialManaged is the schema descriptor for is_serial_managed field.
materialDescIsSerialManaged := materialFields[8].Descriptor()
// material.DefaultIsSerialManaged holds the default value on creation for the is_serial_managed field.
material.DefaultIsSerialManaged = materialDescIsSerialManaged.Default.(bool)
// materialDescMaterialType is the schema descriptor for material_type field.
materialDescMaterialType := materialFields[9].Descriptor()
// material.DefaultMaterialType holds the default value on creation for the material_type field.
material.DefaultMaterialType = materialDescMaterialType.Default.(string)
// materialDescCreatedAt is the schema descriptor for created_at field.
materialDescCreatedAt := materialFields[11].Descriptor()
// material.DefaultCreatedAt holds the default value on creation for the created_at field.
material.DefaultCreatedAt = materialDescCreatedAt.Default.(func() int64)
// materialDescUpdatedAt is the schema descriptor for updated_at field.
materialDescUpdatedAt := materialFields[12].Descriptor()
// material.DefaultUpdatedAt holds the default value on creation for the updated_at field.
material.DefaultUpdatedAt = materialDescUpdatedAt.Default.(func() int64)
ordermaterialledgerFields := schema.OrderMaterialLedger{}.Fields()
_ = ordermaterialledgerFields
// ordermaterialledgerDescTotalQty is the schema descriptor for total_qty field.
ordermaterialledgerDescTotalQty := ordermaterialledgerFields[3].Descriptor()
// ordermaterialledger.DefaultTotalQty holds the default value on creation for the total_qty field.
ordermaterialledger.DefaultTotalQty = ordermaterialledgerDescTotalQty.Default.(int)
// ordermaterialledgerDescOutQty is the schema descriptor for out_qty field.
ordermaterialledgerDescOutQty := ordermaterialledgerFields[4].Descriptor()
// ordermaterialledger.DefaultOutQty holds the default value on creation for the out_qty field.
ordermaterialledger.DefaultOutQty = ordermaterialledgerDescOutQty.Default.(int)
// ordermaterialledgerDescStatus is the schema descriptor for status field.
ordermaterialledgerDescStatus := ordermaterialledgerFields[5].Descriptor()
// ordermaterialledger.DefaultStatus holds the default value on creation for the status field.
ordermaterialledger.DefaultStatus = ordermaterialledgerDescStatus.Default.(string)
// ordermaterialledgerDescCreatedAt is the schema descriptor for created_at field.
ordermaterialledgerDescCreatedAt := ordermaterialledgerFields[7].Descriptor()
// ordermaterialledger.DefaultCreatedAt holds the default value on creation for the created_at field.
ordermaterialledger.DefaultCreatedAt = ordermaterialledgerDescCreatedAt.Default.(func() int64)
// ordermaterialledgerDescUpdatedAt is the schema descriptor for updated_at field.
ordermaterialledgerDescUpdatedAt := ordermaterialledgerFields[8].Descriptor()
// ordermaterialledger.DefaultUpdatedAt holds the default value on creation for the updated_at field.
ordermaterialledger.DefaultUpdatedAt = ordermaterialledgerDescUpdatedAt.Default.(func() int64)
outbounddetailFields := schema.OutboundDetail{}.Fields()
_ = outbounddetailFields
// outbounddetailDescQuantity is the schema descriptor for quantity field.
outbounddetailDescQuantity := outbounddetailFields[4].Descriptor()
// outbounddetail.DefaultQuantity holds the default value on creation for the quantity field.
outbounddetail.DefaultQuantity = outbounddetailDescQuantity.Default.(int)
// outbounddetailDescCreatedAt is the schema descriptor for created_at field.
outbounddetailDescCreatedAt := outbounddetailFields[6].Descriptor()
// outbounddetail.DefaultCreatedAt holds the default value on creation for the created_at field.
outbounddetail.DefaultCreatedAt = outbounddetailDescCreatedAt.Default.(func() int64)
outboundorderFields := schema.OutboundOrder{}.Fields()
_ = outboundorderFields
// outboundorderDescOutboundType is the schema descriptor for outbound_type field.
outboundorderDescOutboundType := outboundorderFields[1].Descriptor()
// outboundorder.DefaultOutboundType holds the default value on creation for the outbound_type field.
outboundorder.DefaultOutboundType = outboundorderDescOutboundType.Default.(string)
// outboundorderDescManageMode is the schema descriptor for manage_mode field.
outboundorderDescManageMode := outboundorderFields[5].Descriptor()
// outboundorder.DefaultManageMode holds the default value on creation for the manage_mode field.
outboundorder.DefaultManageMode = outboundorderDescManageMode.Default.(int)
// outboundorderDescQuantity is the schema descriptor for quantity field.
outboundorderDescQuantity := outboundorderFields[8].Descriptor()
// outboundorder.DefaultQuantity holds the default value on creation for the quantity field.
outboundorder.DefaultQuantity = outboundorderDescQuantity.Default.(int)
// outboundorderDescCreatedAt is the schema descriptor for created_at field.
outboundorderDescCreatedAt := outboundorderFields[13].Descriptor()
// outboundorder.DefaultCreatedAt holds the default value on creation for the created_at field.
outboundorder.DefaultCreatedAt = outboundorderDescCreatedAt.Default.(func() int64)
packageboxFields := schema.PackageBox{}.Fields()
_ = packageboxFields
// packageboxDescQuantity is the schema descriptor for quantity field.
packageboxDescQuantity := packageboxFields[3].Descriptor()
// packagebox.DefaultQuantity holds the default value on creation for the quantity field.
packagebox.DefaultQuantity = packageboxDescQuantity.Default.(int)
// packageboxDescCreatedAt is the schema descriptor for created_at field.
packageboxDescCreatedAt := packageboxFields[6].Descriptor()
// packagebox.DefaultCreatedAt holds the default value on creation for the created_at field.
packagebox.DefaultCreatedAt = packageboxDescCreatedAt.Default.(func() int64)
semifinishedFields := schema.SemiFinished{}.Fields()
_ = semifinishedFields
// semifinishedDescQuantity is the schema descriptor for quantity field.
semifinishedDescQuantity := semifinishedFields[3].Descriptor()
// semifinished.DefaultQuantity holds the default value on creation for the quantity field.
semifinished.DefaultQuantity = semifinishedDescQuantity.Default.(int)
// semifinishedDescStatus is the schema descriptor for status field.
semifinishedDescStatus := semifinishedFields[5].Descriptor()
// semifinished.DefaultStatus holds the default value on creation for the status field.
semifinished.DefaultStatus = semifinishedDescStatus.Default.(string)
// semifinishedDescCreatedAt is the schema descriptor for created_at field.
semifinishedDescCreatedAt := semifinishedFields[7].Descriptor()
// semifinished.DefaultCreatedAt holds the default value on creation for the created_at field.
semifinished.DefaultCreatedAt = semifinishedDescCreatedAt.Default.(func() int64)
// semifinishedDescUpdatedAt is the schema descriptor for updated_at field.
semifinishedDescUpdatedAt := semifinishedFields[8].Descriptor()
// semifinished.DefaultUpdatedAt holds the default value on creation for the updated_at field.
semifinished.DefaultUpdatedAt = semifinishedDescUpdatedAt.Default.(func() int64)
serialnumberFields := schema.SerialNumber{}.Fields()
_ = serialnumberFields
// serialnumberDescStatus is the schema descriptor for status field.
serialnumberDescStatus := serialnumberFields[3].Descriptor()
// serialnumber.DefaultStatus holds the default value on creation for the status field.
serialnumber.DefaultStatus = serialnumberDescStatus.Default.(string)
// serialnumberDescQualityStatus is the schema descriptor for quality_status field.
serialnumberDescQualityStatus := serialnumberFields[5].Descriptor()
// serialnumber.DefaultQualityStatus holds the default value on creation for the quality_status field.
serialnumber.DefaultQualityStatus = serialnumberDescQualityStatus.Default.(string)
// serialnumberDescCreatedAt is the schema descriptor for created_at field.
serialnumberDescCreatedAt := serialnumberFields[9].Descriptor()
// serialnumber.DefaultCreatedAt holds the default value on creation for the created_at field.
serialnumber.DefaultCreatedAt = serialnumberDescCreatedAt.Default.(func() int64)
// serialnumberDescUpdatedAt is the schema descriptor for updated_at field.
serialnumberDescUpdatedAt := serialnumberFields[10].Descriptor()
// serialnumber.DefaultUpdatedAt holds the default value on creation for the updated_at field.
serialnumber.DefaultUpdatedAt = serialnumberDescUpdatedAt.Default.(func() int64)
stocktakeitemFields := schema.StocktakeItem{}.Fields()
_ = stocktakeitemFields
// stocktakeitemDescBookQty is the schema descriptor for book_qty field.
stocktakeitemDescBookQty := stocktakeitemFields[5].Descriptor()
// stocktakeitem.DefaultBookQty holds the default value on creation for the book_qty field.
stocktakeitem.DefaultBookQty = stocktakeitemDescBookQty.Default.(int)
// stocktakeitemDescScannedQty is the schema descriptor for scanned_qty field.
stocktakeitemDescScannedQty := stocktakeitemFields[6].Descriptor()
// stocktakeitem.DefaultScannedQty holds the default value on creation for the scanned_qty field.
stocktakeitem.DefaultScannedQty = stocktakeitemDescScannedQty.Default.(int)
// stocktakeitemDescDiffQty is the schema descriptor for diff_qty field.
stocktakeitemDescDiffQty := stocktakeitemFields[7].Descriptor()
// stocktakeitem.DefaultDiffQty holds the default value on creation for the diff_qty field.
stocktakeitem.DefaultDiffQty = stocktakeitemDescDiffQty.Default.(int)
// stocktakeitemDescCounted is the schema descriptor for counted field.
stocktakeitemDescCounted := stocktakeitemFields[8].Descriptor()
// stocktakeitem.DefaultCounted holds the default value on creation for the counted field.
stocktakeitem.DefaultCounted = stocktakeitemDescCounted.Default.(bool)
// stocktakeitemDescUpdatedAt is the schema descriptor for updated_at field.
stocktakeitemDescUpdatedAt := stocktakeitemFields[9].Descriptor()
// stocktakeitem.DefaultUpdatedAt holds the default value on creation for the updated_at field.
stocktakeitem.DefaultUpdatedAt = stocktakeitemDescUpdatedAt.Default.(func() int64)
stocktakeorderFields := schema.StocktakeOrder{}.Fields()
_ = stocktakeorderFields
// stocktakeorderDescStatus is the schema descriptor for status field.
stocktakeorderDescStatus := stocktakeorderFields[1].Descriptor()
// stocktakeorder.DefaultStatus holds the default value on creation for the status field.
stocktakeorder.DefaultStatus = stocktakeorderDescStatus.Default.(string)
// stocktakeorderDescTotalTargets is the schema descriptor for total_targets field.
stocktakeorderDescTotalTargets := stocktakeorderFields[3].Descriptor()
// stocktakeorder.DefaultTotalTargets holds the default value on creation for the total_targets field.
stocktakeorder.DefaultTotalTargets = stocktakeorderDescTotalTargets.Default.(int)
// stocktakeorderDescCreatedAt is the schema descriptor for created_at field.
stocktakeorderDescCreatedAt := stocktakeorderFields[4].Descriptor()
// stocktakeorder.DefaultCreatedAt holds the default value on creation for the created_at field.
stocktakeorder.DefaultCreatedAt = stocktakeorderDescCreatedAt.Default.(func() int64)
userFields := schema.User{}.Fields()
_ = userFields
// userDescRole is the schema descriptor for role field.
userDescRole := userFields[3].Descriptor()
// user.DefaultRole holds the default value on creation for the role field.
user.DefaultRole = userDescRole.Default.(string)
// userDescIsActive is the schema descriptor for is_active field.
userDescIsActive := userFields[6].Descriptor()
// user.DefaultIsActive holds the default value on creation for the is_active field.
user.DefaultIsActive = userDescIsActive.Default.(bool)
// userDescCreatedAt is the schema descriptor for created_at field.
userDescCreatedAt := userFields[8].Descriptor()
// user.DefaultCreatedAt holds the default value on creation for the created_at field.
user.DefaultCreatedAt = userDescCreatedAt.Default.(func() int64)
// userDescUpdatedAt is the schema descriptor for updated_at field.
userDescUpdatedAt := userFields[9].Descriptor()
// user.DefaultUpdatedAt holds the default value on creation for the updated_at field.
user.DefaultUpdatedAt = userDescUpdatedAt.Default.(func() int64)
zoneFields := schema.Zone{}.Fields()
_ = zoneFields
// zoneDescCreatedAt is the schema descriptor for created_at field.
zoneDescCreatedAt := zoneFields[3].Descriptor()
// zone.DefaultCreatedAt holds the default value on creation for the created_at field.
zone.DefaultCreatedAt = zoneDescCreatedAt.Default.(func() int64)
}