156 lines
4.8 KiB
C#
156 lines
4.8 KiB
C#
using System;
|
||
using System.Collections.Generic;
|
||
using System.Linq;
|
||
using BLL;
|
||
using System.Web.Http;
|
||
|
||
namespace WebApi.Controllers
|
||
{
|
||
public class BaseInfoController : ApiController
|
||
{
|
||
#region 根据登陆的用户ID获取项目列表(对施工单位)
|
||
/// <summary>
|
||
/// 根据登陆的用户ID获取项目列表
|
||
/// </summary>
|
||
/// <param name="userId">登陆的用户ID</param>
|
||
/// <param name="projectArea">项目区域</param>
|
||
/// <returns></returns>
|
||
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 根据项目区域获取项目列表(对查询)
|
||
/// <summary>
|
||
/// 根据项目区域获取项目列表
|
||
/// </summary>
|
||
/// <param name="userId">登陆的用户ID</param>
|
||
/// <param name="projectArea">项目区域</param>
|
||
/// <returns></returns>
|
||
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和施工单位获取区域列表
|
||
/// <summary>
|
||
/// 根据项目ID和施工单位获取区域列表
|
||
/// </summary>
|
||
/// <param name="projectId">项目ID</param>
|
||
/// <param name="unitId">施工单位ID</param>
|
||
/// <returns></returns>
|
||
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和施工区域获取管线列表信息
|
||
/// <summary>
|
||
/// 根据项目ID和施工区域获取管线列表信息
|
||
/// </summary>
|
||
/// <param name="projectId">项目ID</param>
|
||
/// <param name="wordAreaId">施工区域ID</param>
|
||
/// <returns></returns>
|
||
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获取焊口列表信息
|
||
/// <summary>
|
||
/// 根据管线ID获取焊口列表信息
|
||
/// </summary>
|
||
/// <param name="pipelineId">管线ID</param>
|
||
/// <returns></returns>
|
||
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获取装置列表信息
|
||
/// <summary>
|
||
/// 根据管线ID获取焊口列表信息
|
||
/// </summary>
|
||
/// <param name="pipelineId">管线ID</param>
|
||
/// <returns></returns>
|
||
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
|
||
|
||
|
||
}
|
||
} |