using System; using System.Collections.Generic; using System.Linq; using BLL; using System.Web.Http; namespace WebApi.Controllers { public class BaseInfoController : ApiController { #region 根据登陆的用户ID获取项目列表(对施工单位) /// /// 根据登陆的用户ID获取项目列表 /// /// 登陆的用户ID /// 项目区域 /// public Model.ResponeData getProjectList(string userId, string projectArea) { var responeData = new Model.ResponeData(); try { responeData.data = APIBaseInfoService.getProjectList(userId, projectArea); } catch (Exception ex) { responeData.code = 0; responeData.message = ex.Message; } return responeData; } #endregion #region 根据项目区域获取项目列表(对查询) /// /// 根据项目区域获取项目列表 /// /// 登陆的用户ID /// 项目区域 /// public Model.ResponeData getProjectListByArea(string projectArea) { var responeData = new Model.ResponeData(); try { responeData.data = APIBaseInfoService.getProjectListByArea(projectArea); } catch (Exception ex) { responeData.code = 0; responeData.message = ex.Message; } return responeData; } #endregion #region 根据项目ID和施工单位获取区域列表 /// /// 根据项目ID和施工单位获取区域列表 /// /// 项目ID /// 施工单位ID /// public Model.ResponeData getWorkAreaList(string projectId, string unitId) { var responeData = new Model.ResponeData(); try { responeData.data = APIBaseInfoService.getWorkAreaList(projectId, unitId); } catch (Exception ex) { responeData.code = 0; responeData.message = ex.Message; } return responeData; } #endregion #region 根据项目ID和施工区域获取管线列表信息 /// /// 根据项目ID和施工区域获取管线列表信息 /// /// 项目ID /// 施工区域ID /// public Model.ResponeData getPipeLineList(string projectId, string wordAreaId) { var responeData = new Model.ResponeData(); try { responeData.data = APIBaseInfoService.getPipeLineList(projectId, wordAreaId); } catch (Exception ex) { responeData.code = 0; responeData.message = ex.Message; } return responeData; } #endregion #region 根据管线ID获取焊口列表信息 /// /// 根据管线ID获取焊口列表信息 /// /// 管线ID /// public Model.ResponeData getWeldJointList(string pipelineId) { var responeData = new Model.ResponeData(); try { responeData.data = APIBaseInfoService.getWeldJointList(pipelineId); } catch (Exception ex) { responeData.code = 0; responeData.message = ex.Message; } return responeData; } #endregion #region 根据企业ID获取装置列表信息 /// /// 根据管线ID获取焊口列表信息 /// /// 管线ID /// public Model.ResponeData getInstallationList(string projectId) { var responeData = new Model.ResponeData(); try { responeData.data = APIBaseInfoService.getInstallationList(projectId); } catch (Exception ex) { responeData.code = 0; responeData.message = ex.Message; } return responeData; } #endregion } }