69 lines
2.2 KiB
C++
69 lines
2.2 KiB
C++
#pragma once
|
|
|
|
#include "oatpp/core/macro/component.hpp"
|
|
#include "oatpp/web/server/api/ApiController.hpp"
|
|
|
|
|
|
#include OATPP_CODEGEN_BEGIN( ApiController )
|
|
namespace web_server {
|
|
namespace module_statistics{
|
|
class CSimpleController: public oatpp::web::server::api::ApiController
|
|
{
|
|
public:
|
|
CSimpleController( OATPP_COMPONENT(std::shared_ptr<ObjectMapper>,objectMapper) )
|
|
: oatpp::web::server::api::ApiController( objectMapper )
|
|
{}
|
|
|
|
~CSimpleController()
|
|
{}
|
|
|
|
public:
|
|
/**
|
|
* @brief location统计查询
|
|
*/
|
|
ENDPOINT("GET", "/stats/locationStatistics", queryLocationStatistics,
|
|
QUERY( String, filterStr,"filterStr",""),
|
|
QUERY( Int32, locationId,"locationId",0)
|
|
);
|
|
/**
|
|
* @brief 获取location的测点标签
|
|
*/
|
|
ENDPOINT("GET", "/stats/getCodeByLocation", getCodeByLocation,
|
|
QUERY( String, filterStr,"filterStr",""),
|
|
QUERY( Int32, locationId,"locationId",0),
|
|
QUERY( Int32, page,"page",1),
|
|
QUERY( Int32, pageSize,"pageSize",30)
|
|
);
|
|
|
|
/**
|
|
* @brief 获取location的测点序列数据
|
|
*/
|
|
ENDPOINT("POST", "/stats/locationDataSeries", queryLocationDataSeries, BODY_STRING( String, strReq )) ;
|
|
|
|
/**
|
|
* @brief 设备统计查询
|
|
*/
|
|
ENDPOINT("GET", "/stats/deviceGroupStatistics", queryDeviceGroupStatistics,
|
|
QUERY( String, filterStr,"filterStr",""),
|
|
QUERY( String, deviceGroupTag,"deviceGroupTag","")
|
|
);
|
|
|
|
/**
|
|
* @brief 获取deviceGroup的测点标签
|
|
*/
|
|
ENDPOINT("GET", "/stats/getCodeByDeviceGroup", getCodeByDeviceGroup,
|
|
QUERY( String, deviceGroupTag,"deviceGroupTag",""),
|
|
QUERY( Int32, page,"page",1),
|
|
QUERY( Int32, pageSize,"pageSize",30)
|
|
);
|
|
|
|
/**
|
|
* @brief 获取deviceGroup的测点序列数据
|
|
*/
|
|
ENDPOINT("POST", "/stats/deviceGroupDataSeries", queryDeviceGroupDataSeries, BODY_STRING( String, strReq )) ;
|
|
|
|
};
|
|
}
|
|
}
|
|
#include OATPP_CODEGEN_END( ApiController )
|