141 lines
2.4 KiB
C#
141 lines
2.4 KiB
C#
using BLL.API;
|
|
using Model;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.Http;
|
|
|
|
namespace WebAPI.Controllers
|
|
{
|
|
public class BaseController : ApiController
|
|
{
|
|
|
|
[HttpGet]
|
|
public Model.ResponeData baseProjectList(string userId, string trustType)
|
|
{
|
|
Model.ResponeData respone = new ResponeData();
|
|
try
|
|
{
|
|
if (string.IsNullOrEmpty(trustType) || trustType == "null")
|
|
{
|
|
trustType = "";
|
|
}
|
|
return APIBaseServices.baseProjectList(userId, trustType);
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
respone.code = 0;
|
|
respone.message = e.Message;
|
|
}
|
|
return respone;
|
|
}
|
|
[HttpGet]
|
|
public Model.ResponeData weldInfoList()
|
|
{
|
|
Model.ResponeData respone = new ResponeData();
|
|
try
|
|
{
|
|
|
|
return APIBaseServices.weldInfoList();
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
respone.code = 0;
|
|
respone.message = e.Message;
|
|
}
|
|
return respone;
|
|
}
|
|
[HttpGet]
|
|
public Model.ResponeData baseUnitList(string projectId)
|
|
{
|
|
Model.ResponeData respone = new ResponeData();
|
|
try
|
|
{
|
|
|
|
return APIBaseServices.baseUnitList(projectId);
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
respone.code = 0;
|
|
respone.message = e.Message;
|
|
}
|
|
return respone;
|
|
|
|
}
|
|
|
|
[HttpGet]
|
|
public Model.ResponeData usePositionList(string projectId)
|
|
{
|
|
Model.ResponeData respone = new ResponeData();
|
|
try
|
|
{
|
|
|
|
return APIBaseServices.usePositionList(projectId);
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
respone.code = 0;
|
|
respone.message = e.Message;
|
|
}
|
|
return respone;
|
|
|
|
}
|
|
|
|
[HttpGet]
|
|
public Model.ResponeData baseTeamGroupList(string projectId,string unitId)
|
|
{
|
|
Model.ResponeData respone = new ResponeData();
|
|
try
|
|
{
|
|
|
|
return APIBaseServices.baseTeamGroupList(projectId, unitId);
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
respone.code = 0;
|
|
respone.message = e.Message;
|
|
}
|
|
return respone;
|
|
|
|
}
|
|
|
|
[HttpGet]
|
|
public Model.ResponeData bsWelderList(string projectId)
|
|
{
|
|
Model.ResponeData respone = new ResponeData();
|
|
try
|
|
{
|
|
|
|
return APIBaseServices.bsWelderList(projectId);
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
respone.code = 0;
|
|
respone.message = e.Message;
|
|
}
|
|
return respone;
|
|
|
|
}
|
|
|
|
[HttpGet]
|
|
public Model.ResponeData bsSteelList()
|
|
{
|
|
Model.ResponeData respone = new ResponeData();
|
|
try
|
|
{
|
|
|
|
return APIBaseServices.bsSteelList();
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
respone.code = 0;
|
|
respone.message = e.Message;
|
|
}
|
|
return respone;
|
|
}
|
|
|
|
|
|
|
|
}
|
|
} |