feat: 核心业务实体扩充(混产模板/产品BOM/试制记录)、WMS 库存检验增强与前端通用能力
- MES 新增实体:混产模板、产品BOM、产品工艺物料、试制记录(schema + ent 生成码 + logic/handler/前端页) - WMS 实体增强:检验记录、库存、半成品重构;新增序列号库存与短缺代报 - AGV 与产能:AGV 手动点位与链路、物料守卫、短缺预测、原因字典 - 前端通用能力:新增下一步引导组件 NextStepBar,统一帮助文档/布局/请求拦截与操作列 - 工位终端:界面与各 handler 调整(api/store/绑定/PLC/拧紧/上报等) - 配置与文档:更新 mes-api.yaml、WMS README 及案例/产线API/问题记录/项目说明/流程说明
This commit is contained in:
@@ -9,7 +9,6 @@ import (
|
||||
"bj_power_mes/ent"
|
||||
"bj_power_mes/ent/agvtask"
|
||||
"bj_power_mes/ent/dailyplan"
|
||||
"bj_power_mes/ent/flowmaterial"
|
||||
"bj_power_mes/ent/workorder"
|
||||
)
|
||||
|
||||
@@ -75,18 +74,10 @@ func (s *Service) ComputePreparationList(ctx context.Context) (*PreparationList,
|
||||
if pn := wo.ProductName; pn != "" {
|
||||
productNameByOrder[p.OrderNo] = pn
|
||||
}
|
||||
// 工艺→物料清单(同工单内同 flowId 只查一次)
|
||||
fmByFlow := map[int][]*ent.FlowMaterial{}
|
||||
for _, it := range items {
|
||||
if _, done := fmByFlow[it.FlowId]; done {
|
||||
continue
|
||||
}
|
||||
fms, ferr := s.ctx.EntClient.FlowMaterial.Query().
|
||||
Where(flowmaterial.FlowId(it.FlowId)).All(ctx)
|
||||
if ferr != nil {
|
||||
continue
|
||||
}
|
||||
fmByFlow[it.FlowId] = fms
|
||||
// 工艺→物料清单(2026-11-13 总分制:分账优先,无分账回退 flow_material;同工单内同 flowId 只算一次)
|
||||
fmByFlow, merr := s.MaterialsByFlowForWO(ctx, s.ctx.EntClient, wo, flowIdsOf(items))
|
||||
if merr != nil {
|
||||
continue
|
||||
}
|
||||
// 工艺→工位序列(与池子重算同结构)
|
||||
stationsByFlow := map[int][]int{}
|
||||
|
||||
Reference in New Issue
Block a user