同步物料 物料清单
This commit is contained in:
@@ -7,6 +7,7 @@ using JNPF.DynamicApiController;
|
||||
using JNPF.FriendlyException;
|
||||
using JNPF.Logging;
|
||||
using JNPF.Message.Service;
|
||||
using JNPF.Systems.Entitys.System;
|
||||
using JNPF.Systems.Interfaces.System;
|
||||
using JNPF.TaskScheduler;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
@@ -92,8 +93,10 @@ namespace Tnb.ProductionMgr
|
||||
throw Oops.Bah($"系统中无法找到物料清单{item.ebom_version}版本");
|
||||
}
|
||||
|
||||
|
||||
DictionaryDataEntity unitDic = await _db.Queryable<DictionaryDataEntity>().Where(x=>x.DictionaryTypeId==WmsWareHouseConst.UNITTYPEID && x.EnCode==item.unit_id).FirstAsync();
|
||||
|
||||
item.id = SnowflakeIdHelper.NextId();
|
||||
item.material_id = basMaterial.id;
|
||||
item.mo_source = "1";
|
||||
item.mo_type = moTypeDic[item.mo_type];
|
||||
item.mo_code = item.mo_code;
|
||||
@@ -103,6 +106,7 @@ namespace Tnb.ProductionMgr
|
||||
item.erp_mo_pk = item.erp_mo_pk;
|
||||
item.erp_line_pk = item.erp_line_pk;
|
||||
item.erp_lineno = item.erp_lineno;
|
||||
item.unit_id = unitDic?.Id ?? item.unit_id;
|
||||
|
||||
moList.Add(item);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user