diff --git a/APT.MicroApi/APT.SK.WebApi/Controllers/Api/HiddenDangerRectifyRecordController.cs b/APT.MicroApi/APT.SK.WebApi/Controllers/Api/HiddenDangerRectifyRecordController.cs index 467f949..a01ce4b 100644 --- a/APT.MicroApi/APT.SK.WebApi/Controllers/Api/HiddenDangerRectifyRecordController.cs +++ b/APT.MicroApi/APT.SK.WebApi/Controllers/Api/HiddenDangerRectifyRecordController.cs @@ -589,7 +589,7 @@ namespace APT.SK.WebApi.Controllers var result = new PagedActionResult(); //var areaList = this.GetEntities(t => t.IS_DELETED == false, new BaseFilter(pageFilter.OrgId)).ToList(); //var contentList = this.GetEntities(t => t.IS_DELETED == false, new BaseFilter(pageFilter.OrgId)).ToList(); - var records = this.GetEntities(t => t.IS_DELETED == false, pageFilter, "Nav_ProductionUnit", "Nav_RiskArea", "Nav_Contents", "Nav_Question", "Nav_CheckType"); + var records = this.GetEntities(t => t.IS_DELETED == false && t.CHECK_CONTENTS_ID !=null && t.CHECK_QUESTION_ID !=null, pageFilter, "Nav_ProductionUnit", "Nav_RiskArea", "Nav_Contents", "Nav_Question", "Nav_CheckType"); var groupRecords = records.GroupBy(m => new { m.PRODUCTION_UNIT_ID,m.RISK_AREA_ID, m.CHECK_CONTENTS_ID, m.CHECK_QUESTION_ID, m.HIDDEN_LEVEL }) .Select(m => m.FirstOrDefault()).ToList(); //.Select(m => new T_SK_HIDDEN_DANGER_RECTIFY_RECORD