using BLL; using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Http; namespace WebAPI.Controllers.HSSE { public class MaterialController : ApiController { #region 根据projectId获取危险源辨识评价列表 /// /// 根据projectId、unitid获取施工方案信息 /// /// /// /// public Model.ResponeData getMaterialList(string projectId, int pageIndex,string strParam = "") { var responeData = new Model.ResponeData(); try { if (string.IsNullOrEmpty(strParam)) { strParam = ""; } var getDataList = APIMaterialService.getMaterialList(projectId, strParam); int pageCount = getDataList.Count(); if (pageCount > 0 && pageIndex > 0) { getDataList = getDataList.Skip(Funs.PageSize * (pageIndex - 1)).Take(Funs.PageSize).ToList(); } responeData.data = new { pageCount, getDataList }; } catch (Exception ex) { responeData.code = 0; responeData.message = ex.Message; } return responeData; } #endregion } }