ZHJA_HJGL/HJGL_ZH/WebAPI/Controllers/UnitInfoController.cs

37 lines
1.2 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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
}
}