using BLL;
using System;
using System.Linq;
using System.Web.Http;
namespace WebAPI.Controllers
{
    /// 
    /// 图型分信息
    /// 
    public class ChartAnalysisController : ApiController
    {
        #region 根据类型获取图型数据
        /// 
        /// 根据类型获取图型数据
        /// 
        /// 项目ID
        /// 1:按单位;2:按类型
        /// 开始时间
        /// 结束时间
        /// 
        public Model.ResponeData getChartAnalysisByType(string projectId, string type,string startDate,string endDate)
        {
            var responeData = new Model.ResponeData();
            try
            {
                responeData.data = BLL.APIChartAnalysisService.getChartAnalysisByType(projectId, type, startDate, endDate);
            }
            catch (Exception ex)
            {
                responeData.code = 0;
                responeData.message = ex.Message;
            }
            return responeData;
        }
        #endregion
    }
}