using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using BLL;
namespace WebAPI.Controllers
{
///
/// 报表查询统计
///
public class ReportQueryController: ApiController
{
#region 根据人员二维码获取焊工业绩
///
/// 根据人员二维码获取焊工业绩
///
///
///
public Model.ResponeData GetWelderPerformanceByQRC(string personId)
{
var responeData = new Model.ResponeData();
try
{
responeData.data = APIReportQueryService.GetWelderPerformanceByQRC(personId);
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
#endregion
#region 根据焊工号获取焊工业绩
///
/// 根据焊工号获取焊工业绩
///
///
///
///
public Model.ResponeData GetWelderPerformanceByWelderCode(string projectId, string welderCode)
{
var responeData = new Model.ResponeData();
try
{
responeData.data = APIReportQueryService.GetWelderPerformanceByWelderCode(projectId, welderCode);
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
#endregion
#region 根据人员ID获取焊工合格项目
///
/// 根据人员ID获取焊工合格项目
///
///
///
public Model.ResponeData GetWelderQualify(string personId)
{
var responeData = new Model.ResponeData();
try
{
responeData.data = APIReportQueryService.getWelderQualify(personId);
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
#endregion
#region 焊工资质预警
///
/// 焊工资质预警
///
///
///
public Model.ResponeData GetWelderQualifyWarning(string projectId)
{
var responeData = new Model.ResponeData();
try
{
responeData.data = APIReportQueryService.GetWelderQualifyWarning(projectId);
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
#endregion
#region 焊工一次合格率低于96%预警
///
/// 焊工一次合格率低于96%预警
///
///
///
public Model.ResponeData GetWelderOnePassRateWarning(string projectId)
{
var responeData = new Model.ResponeData();
try
{
responeData.data = APIReportQueryService.GetWelderOnePassRateWarning(projectId);
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
#endregion
#region 根据焊口ID获取焊口信息和焊接信息
///
/// 根据焊口ID获取焊口信息和焊接信息
///
///
///
public Model.ResponeData GetJointCompreInfo(string weldJointId)
{
var responeData = new Model.ResponeData();
try
{
responeData.data = APIReportQueryService.GetJointCompreInfo(weldJointId);
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
#endregion
#region 多维度查询报表
///
/// 多维度查询报表
///
///
///
///
///
///
///
///
///
public Model.ResponeData GetReportQueryByRequir(string projectId, string unitId, string unitWorkId, string pipeLineId, string material, string startTime, string endTime)
{
var responeData = new Model.ResponeData();
try
{
responeData.data = APIReportQueryService.GetReportQueryByRequir(projectId, unitId, unitWorkId, pipeLineId, material, startTime, endTime);
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
#endregion
}
}