37 lines
1.2 KiB
C#
37 lines
1.2 KiB
C#
|
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 根据项目和单位类型获取分包单位
|
|||
|
/// <summary>
|
|||
|
/// 根据项目和单位类型获取分包单位
|
|||
|
/// </summary>
|
|||
|
/// <param name="projectCode">施工号</param>
|
|||
|
/// <param name="unitType">单位类型(1-业主,2-监理,3-总包,4-施工,5-质检,6-理化,7-热处理,8-检测)</param>
|
|||
|
/// <returns></returns>
|
|||
|
[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
|
|||
|
}
|
|||
|
}
|