refactor: 清理MES端本地product_type冗余代码,对齐WMS主数据架构
1. 移除MES端本地product_type实体、schema及相关CRUD代码,改为通过WMS内部API代理获取物料主数据 2. 更新物料管理粒度逻辑,新增"其他"类型(3)支持,同步更新入库校验规则 3. 修复前端物料选择、库存筛选等页面的类型判断逻辑,统一使用manage_mode区分管理类型 4. 清理静态资源文件冗余的样式代码,调整前端页面展示逻辑 5. 更新帮助文档,修正物料类型的说明描述
This commit is contained in:
@@ -16,12 +16,12 @@ import (
|
||||
"bj_power_mes/ent/bomitem"
|
||||
"bj_power_mes/ent/processflow"
|
||||
"bj_power_mes/ent/processstep"
|
||||
"bj_power_mes/ent/producttype"
|
||||
"bj_power_mes/ent/station"
|
||||
"bj_power_mes/ent/stepcriterion"
|
||||
"bj_power_mes/ent/workorder"
|
||||
"bj_power_mes/ent/workpieceprocess"
|
||||
"bj_power_mes/internal/logic"
|
||||
"bj_power_mes/internal/wmsclient"
|
||||
"bj_power_mes/internal/svc"
|
||||
)
|
||||
|
||||
@@ -135,13 +135,13 @@ func buildModelCard(ctx context.Context, svcCtx *svc.ServiceContext, productType
|
||||
client := svcCtx.EntClient
|
||||
card := &modelCard{GeneratedAt: nowText()}
|
||||
|
||||
// 1) 定位产品型号
|
||||
var pt *ent.ProductType
|
||||
// 1) 定位产品型号(实时代理 WMS,成品档案 item_type=3;WMS 不可达时降级用 code 兜底)
|
||||
var pt *wmsclient.ProductTypeRow
|
||||
if productTypeId > 0 {
|
||||
pt, _ = client.ProductType.Get(ctx, productTypeId)
|
||||
pt, _ = logic.New(svcCtx).ProductTypeByID(ctx, productTypeId)
|
||||
}
|
||||
if pt == nil && productCode != "" {
|
||||
pt, _ = client.ProductType.Query().Where(producttype.Code(productCode)).First(ctx)
|
||||
pt, _ = logic.New(svcCtx).ProductTypeByCode(ctx, productCode)
|
||||
}
|
||||
switch {
|
||||
case pt != nil:
|
||||
|
||||
Reference in New Issue
Block a user