feat(mes): 添加定时同步可生产数量到WMS及BOM项相关标准字段

- 在main.go中添加定时任务每10分钟同步可生产数量到WMS系统
- 为BomItem实体添加relatedStandard字段及相关CRUD方法
- 为InspectionRecord实体添加reportNo、materialCode、materialName等字段
- 更新ent schema确保新字段的验证和默认值设置
- 添加必要的数据库迁移和字段映射逻辑
This commit is contained in:
SunYF
2026-09-17 12:49:07 +08:00
parent b4b274301d
commit 1cc93795ce
191 changed files with 24504 additions and 1250 deletions
+4
View File
@@ -40,6 +40,10 @@ func (StocktakeItem) Fields() []ent.Field {
field.String("target_id").Comment("批次号或SN码"),
field.String("material_code").Optional().Comment("物料编码(冗余,便于盘点差异按物料归类)"),
field.String("zone_code").Optional().Comment("所在区域"),
// 库位四级贯通(U18):盘点快照除区域外,冻结货架/层/位置,盘点差异可精确定位到货位。
field.String("shelf_no").Optional().Comment("货架号(快照)"),
field.String("layer_no").Optional().Comment("第几层(快照)"),
field.String("position_no").Optional().Comment("位置号(快照)"),
field.Int("book_qty").Default(0).Comment("账面数量"),
field.Int("scanned_qty").Default(-1).Comment("实盘数量,-1=未盘"),
field.Int("diff_qty").Default(0).Comment("差异 = 实盘 - 账面"),