diff --git a/ProductionMgr/Tnb.ProductionMgr/MesForErpService.cs b/ProductionMgr/Tnb.ProductionMgr/MesForErpService.cs index cf5e9f8b..155e2e90 100644 --- a/ProductionMgr/Tnb.ProductionMgr/MesForErpService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/MesForErpService.cs @@ -144,7 +144,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; + item.unit_id = unitDic?.EnCode ?? item.unit_id; moList.Add(item); } diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdMoService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdMoService.cs index 146506aa..45417d4d 100644 --- a/ProductionMgr/Tnb.ProductionMgr/PrdMoService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/PrdMoService.cs @@ -138,7 +138,7 @@ namespace Tnb.ProductionMgr SqlSugarPagedList result = await db.Queryable() .LeftJoin((a, b) => a.material_id == b.id) .LeftJoin((a, b, c) => c.EnCode == DictConst.MeasurementUnit) - .LeftJoin((a, b, c, d) => c.Id == d.DictionaryTypeId && a.unit_id == d.Id) + .LeftJoin((a, b, c, d) => c.Id == d.DictionaryTypeId && a.unit_id == d.EnCode) .LeftJoin((a, b, c, d, e) => a.mo_status == e.Id) .LeftJoin((a, b, c, d, e, f) => a.mo_type == f.Id) .WhereIF(!string.IsNullOrEmpty(moCode), (a, b, c, d, e) => a.mo_code.Contains(moCode))