This commit is contained in:
2024-09-05 17:24:27 +08:00
parent 2c7fd13e6b
commit d085ed872d
2 changed files with 2 additions and 2 deletions

View File

@@ -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);
}

View File

@@ -138,7 +138,7 @@ namespace Tnb.ProductionMgr
SqlSugarPagedList<PrdMoListOuput> result = await db.Queryable<PrdMo>()
.LeftJoin<BasMaterial>((a, b) => a.material_id == b.id)
.LeftJoin<DictionaryTypeEntity>((a, b, c) => c.EnCode == DictConst.MeasurementUnit)
.LeftJoin<DictionaryDataEntity>((a, b, c, d) => c.Id == d.DictionaryTypeId && a.unit_id == d.Id)
.LeftJoin<DictionaryDataEntity>((a, b, c, d) => c.Id == d.DictionaryTypeId && a.unit_id == d.EnCode)
.LeftJoin<DictionaryDataEntity>((a, b, c, d, e) => a.mo_status == e.Id)
.LeftJoin<DictionaryDataEntity>((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))