1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- #ifndef FROMWEBAPI_H
- #define FROMWEBAPI_H
- #include "lhhttpapi.h"
- #include "TransmitterSwitchInfo.h"
- #include <qlist.h>
- struct OnePlanItemInfo;
- class FromWebAPI
- {
- public:
- FromWebAPI();
- ~FromWebAPI();
- /* 初始化WebAPI */
- bool initWebApi(const QString& url,const QString& serverID,const QString& serverKey);
-
- /* 获取设备信息 */
- bool getDeviceInfo(QMap<QString, DeviceInfo>& mapDevice);
- /* 获取频率信息 */
- bool getChannelInfo(QMap<int, ChannelInfo>& mapFreq);
- /* 将数据写入EQM数据库 */
- bool insertData(int chnID, QList<OnePlanItemInfo>& list);
- /* 获取tExecPlan表格数据 */
- bool getExecPlanData(int chnID, QList<OnePlanItemInfo>& list);
- bool getExecPlanData(QMap<int, QList<OnePlanItemInfo>>& mapPlan);
- /* 删除所有行 */
- bool deleteAllRow();
- /* 删除一个发射机计划 */
- bool deleteOneChnPlan(int chnID);
- /* 将页面的配置写入数据库 */
- bool insertConfigData(QMap<int, ConfigData>& list);
- /* 删除配置数据 */
- bool deleteConfigData(QMap<int, ConfigData>& list);
- /* 获取配置数据 */
- bool getConfigData(QMap<int, ConfigData>& list);
- /* 单独获取某个关键字的数据 */
- bool getConfigData(int key, ConfigData& data);
- /* 获取EQM数据库中的模版编号 */
- bool getEQMTemplateID(QList<int>& listId);
-
- /* 保存到模板 */
- bool saveTemplate(const QString& templateName, QList<OnePlanItemInfo>& list);
- /* 批量写入模版数据 */
- bool saveTemplateList(const QMap<OneTemplateInfo, QList<OnePlanItemInfo>>& mapTemplate);
- /* 获取模板内容 */
- bool getOneTemplateData(OneTemplateInfo tmpInfo, QList<OnePlanItemInfo>& list);
- /* 获取多个模板的内容 */
- bool getTemplateData(QList<OneTemplateInfo>& listTemplate, QMap<int, QList<OnePlanItemInfo>>& mapPlan);
- /* 获取模板列表 */
- bool getTemplateList(QMultiMap<int, OneTemplateInfo>& mapTemplate);
- /* 获取某个频率的模版列表 */
- bool getTemplateList(int chnID, QList<OneTemplateInfo>& listTemplate);
- /* 删除一个模板 */
- bool deleteTemplate(const OneTemplateInfo& info);
- /* 一次删除多个模版 */
- bool deleteTemplateList(const QList<OneTemplateInfo>& listTemplate);
- /* 修改模版 */
- bool modifyTemplate(const OneTemplateInfo& info, QList<OnePlanItemInfo>& list);
- /* 批量修改模版 */
- bool modifyTemplateList(const QMap<OneTemplateInfo, QList<OnePlanItemInfo>>& mapTemplate);
- /* 更新模板名称 */
- bool updateTemplateName(const QMap<OneTemplateInfo, QString>& mapTemplateName);
- private:
- lhhttpapi* m_httpApi = nullptr;
- QString m_userToken;
- };
- #endif /* FROMWEBAPI_H */
|