public IActionResult List(WomanRequestpayload payload) { var query = from t in _dbContext.Organization where t.IsDeleted != 1 select new { t.Id, t.OrganizationUuid, t.OrganizationName, OrganizationPeople = organpeople(t.OrganizationUuid) }; if (!string.IsNullOrEmpty(payload.Kw)) { query = query.Where(x => x.OrganizationName.Contains(payload.Kw)); } if (payload.FirstSort != null) { query = query.OrderByDescending(x => x.Id); } var list = query.Paged(payload.CurrentPage, payload.PageSize).ToList(); var totalCount = query.Count(); var response = ResponseModelFactory.CreateResultInstance; response.SetData(list, totalCount); ToLog.AddLog("查询", "成功:查询:工会信息信息数据", _dbContext); return(Ok(response)); }
public IActionResult List(WomanRequestpayload payload) { var query = from t in _dbContext.OrganPeoInfo join s in _dbContext.Organization on t.OrganizationUuid equals s.OrganizationUuid where t.IsDeleted != 1 && s.OrganizationName == "妇联" && t.ManType == "适龄妇女" select new { t.Id, t.OrganName, t.Sex, t.Birth, t.Phone, t.Education, t.ZjWork, t.Duty, t.OrganPeoInfoUuid }; if (!string.IsNullOrEmpty(payload.Kw)) { query = query.Where(x => x.OrganName.Contains(payload.Kw)); } if (payload.FirstSort != null) { query = query.OrderByDescending(x => x.Id); } var list = query.Paged(payload.CurrentPage, payload.PageSize).ToList(); var totalCount = query.Count(); var response = ResponseModelFactory.CreateResultInstance; response.SetData(list, totalCount); return(Ok(response)); }