using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Http;
using BLL;
namespace WebAPI.Controllers
{
public class UnitInfoController: ApiController
{
#region 根据项目和单位类型获取分包单位
///
/// 根据项目和单位类型获取分包单位
///
/// 施工号
/// 单位类型(1-业主,2-监理,3-总包,4-施工,5-质检,6-理化,7-热处理,8-检测)
///
[HttpPost]
public Model.ResponeData getUnitByProjectIdUnitType([FromBody] Model.ParmItem parmItem)
{
var responeData = new Model.ResponeData();
try
{
responeData.data = APIUnitInfoService.getUnitByProjectIdUnitType(parmItem.ProjectCode.Trim(), parmItem.UnitType);
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
#endregion
}
}