#ifndef STOCKSDECODER_H
#define STOCKSDECODER_H
#include "exceldecoder.h"
#include <QMap>
#include <QVariant>
#include "db/structs.h"

class StocksDecoder : public ExcelDecoder
{
public:
    QList<_stocksInfo> data;
public:
    StocksDecoder();
    virtual DecoderType decoderType(){ return DecoderType::stocks;}
    virtual ~StocksDecoder(){}
    virtual void decode(QList<QList<QVariant> > edatas,QString date = "");

private:
    QString parseStockHead(QList<QVariant> headDatas);//解析头  返回交易日
    void toValueStockInfo(_stocksInfo &param ,int index,QString value);

private:
    QMap<int,QString> m_wholeStocksKeyIndexs;
};

#endif // STOCKSDECODER_H
