using System;
using System.Collections.Generic;
using System.Linq;
using BLL;
using System.Web.Http;
namespace WebApi.Controllers
{
public class MessagePushController : ApiController
{
#region 推送的热处理委托单
///
/// 推送的热处理委托单
///
/// 登陆的用户ID
///
public Model.ResponeData GetPushHotTrust(string userId)
{
var responeData = new Model.ResponeData();
try
{
responeData.data =APIMessagePushService.GetPushHotTrust(userId);
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
#endregion
#region 推送的NDE检测委托单
///
/// 推送的NDE检测委托单
///
/// 登陆的用户ID
///
public Model.ResponeData GetPushNDTTrust(string userId)
{
var responeData = new Model.ResponeData();
try
{
responeData.data = APIMessagePushService.GetPushNDTTrust(userId);
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
#endregion
#region 焊工一次合格率低于96%预警
///
/// 焊工一次合格率低于96%预警
///
/// 项目区域
///
public Model.ResponeData GetWelderOnePassRateWarning(string projectArea)
{
var responeData = new Model.ResponeData();
try
{
responeData.data = APIMessagePushService.GetWelderOnePassRateWarning(projectArea);
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
#endregion
#region 施工单位一次合格率低于96%预警
///
/// 施工单位一次合格率低于96%预警
///
/// 项目区域
///
public Model.ResponeData GetUnitOnePassRateWarning(string projectArea)
{
var responeData = new Model.ResponeData();
try
{
responeData.data = APIMessagePushService.GetUnitOnePassRateWarning(projectArea);
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
#endregion
}
}