#ifndef ENGINEERSERVICE_H
#define ENGINEERSERVICE_H
#include "ClassSet.h"

class EngineerService
{
public:
    EngineerService(QObject *parent = nullptr);
    //////////////////////工程信息表-start////////////////////
    //添加信息
    bool AddEngineerInfo(const EngineerInfo &engineerInfo);
    int AddEngineerInfoReturnId(const EngineerInfo &engineerInfo);
    /*修改节点值*/
    bool UpdateEngineerInfo(const EngineerInfo &engineerInfo);
    bool UpdateEngineerIndex(int enjId, int indexId);
    bool UpdateEngineerMessaure(int enjId, int messaureId);
    bool UpdateEngineerSchema(int enjId, int schemaId);
    bool UpdateNameById(QString name, int id);
    /*根据指标体系id查询工程信息*/
    bool QueryEngineerByEngineerId(EngineerInfo *engineerInfo, int engineerId);
    /*根据指标体系名查询工程信息*/
    bool QueryEngineerByEngineerName(EngineerInfo *engineerInfo, QString engineerName);
    /*根据指标体系id查询工程信息*/
    bool QueryEngineerList(QList<EngineerInfo *> *engineerInfoList);

    bool QueryEngineerListByName(QList<EngineerInfo *> *engineerInfoList, QString engineerName);
    /*根据指标体系id查询工程信息*/
    bool QueryEngineerListByIndexSetId(QList<EngineerInfo *> *engineerInfoList, int indexSetId);
    /*根据测量方法ig查询对应的工程信息*/
    bool QueryEngineerListByMeasureFunctionId(QList<EngineerInfo *> *engineerInfoList, int measureFunctionId);
    /*根据工程编号删除工程信息*/
    bool DeleteEngineerByEngineerId(int engineerId);
    /*根据指标体系编号删除工程信息*/
    bool DeleteEngineerByIndexSetId(int indexSetId);
    /*根据测量方法编号删除工程信息*/
    bool DeleteEngineerByMeasureFunctionId(int measureFunctionId);
    /*删除所有工程*/
    bool DeleteEngineers();

    //删除其他工程id
    bool DeleteEngineerNotInId(int id, QString dbPath);

    bool QueryChlidNodeByPId(int pid, QString dbName, QString mindPath);

    //////////////////////工程信息表-end////////////////////
};

#endif  // ENGINEERSERVICE_H