物料同步
This commit is contained in:
@@ -56,5 +56,10 @@ namespace Tnb.ProductionMgr.Entities.Entity.ErpEntity
|
|||||||
/// 修改时间
|
/// 修改时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string MODIFIEDTIME { get; set; }
|
public string MODIFIEDTIME { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// mes物料类型
|
||||||
|
/// </summary>
|
||||||
|
public string DEFNAME { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -42,6 +42,7 @@ using Tnb.ProductionMgr.Entities.Dto.PrdManage;
|
|||||||
using Tnb.ProductionMgr.Entities.Entity;
|
using Tnb.ProductionMgr.Entities.Entity;
|
||||||
using Tnb.ProductionMgr.Entities.Entity.ErpEntity;
|
using Tnb.ProductionMgr.Entities.Entity.ErpEntity;
|
||||||
using Tnb.BasicData.Entities.Dto;
|
using Tnb.BasicData.Entities.Dto;
|
||||||
|
using Tnb.BasicData;
|
||||||
|
|
||||||
namespace Tnb.ProductionMgr
|
namespace Tnb.ProductionMgr
|
||||||
{
|
{
|
||||||
@@ -994,6 +995,9 @@ namespace Tnb.ProductionMgr
|
|||||||
Dictionary<string, object> unitDic2 = await _db.Queryable<DictionaryDataEntity>()
|
Dictionary<string, object> unitDic2 = await _db.Queryable<DictionaryDataEntity>()
|
||||||
.Where(x => x.DictionaryTypeId == WmsWareHouseConst.UNITTYPEID)
|
.Where(x => x.DictionaryTypeId == WmsWareHouseConst.UNITTYPEID)
|
||||||
.ToDictionaryAsync(x => x.FullName, y => y.EnCode);
|
.ToDictionaryAsync(x => x.FullName, y => y.EnCode);
|
||||||
|
Dictionary<string, object> materialcategoryDic = await _db.Queryable<DictionaryDataEntity>()
|
||||||
|
.Where(x => x.DictionaryTypeId == DictConst.MaterialCatagoryID)
|
||||||
|
.ToDictionaryAsync(x => x.FullName, y => y.EnCode);
|
||||||
List<BasMaterial> materials = await _db.Queryable<BasMaterial>().ToListAsync();
|
List<BasMaterial> materials = await _db.Queryable<BasMaterial>().ToListAsync();
|
||||||
List<BasEbomH> basEbomHs = await _db.Queryable<BasEbomH>().ToListAsync();
|
List<BasEbomH> basEbomHs = await _db.Queryable<BasEbomH>().ToListAsync();
|
||||||
List<BasMaterial> insertMaterial = new List<BasMaterial>();
|
List<BasMaterial> insertMaterial = new List<BasMaterial>();
|
||||||
@@ -1038,7 +1042,7 @@ namespace Tnb.ProductionMgr
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
categoryId = materialcategoryDic.ContainsKey(erpBdMaterial.DEFNAME) ? $"[\"{materialcategoryDic["erpBdMaterial.DEFNAME"]}\"]" : "[\"CGJCJ\"]";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (erpExtendFields.All(x => x.cmaterialoid != erpBdMaterial.ID))
|
if (erpExtendFields.All(x => x.cmaterialoid != erpBdMaterial.ID))
|
||||||
|
|||||||
Reference in New Issue
Block a user