#include "RunMaterialExceptionReport.h"
#include "InteractiveData.h"

RunMaterialExceptionReport::RunMaterialExceptionReport(InteractiveTask *task, QMutex *mutex)
    : RunAbstract(task, mutex)
{

}

void RunMaterialExceptionReport::run()
{
    // InteractiveData *pSingletonData = SINGLETON_CREATE(InteractiveData)();

    // // 清理缓存
    // QMetaObject::invokeMethod(&pSingletonData->m_modelMaterialException, "clear", Qt::QueuedConnection);

    // QReadLocker locker(&pSingletonData->m_dataCacheLock);

    // for (int i = 0; i < pSingletonData->m_dataCacheMaterialInfoId.size(); ++i)
    // {
    //     QString infoId = pSingletonData->m_dataCacheMaterialInfoId.at(i);
    //     if (pSingletonData->m_dataCacheMaterialInfoStat[infoId] == "3")
    //     {
    //         QVariantMap info;
    //         info["materialsId"] = infoId;
    //         info["materialsName"] = pSingletonData->m_dataCacheExMaterialInfoName[infoId];
    //         info["materialsRfid"] = pSingletonData->m_dataCacheExMaterialInfoRfid[infoId];
    //         info["expirationDate"] = pSingletonData->m_dataCacheExMaterialInfoDate[infoId];
    //         info["status"] = pSingletonData->m_dataCacheExMaterialInfoStat[infoId];

    //         info["materialsTypePicture"] = pSingletonData->m_dataCacheMaterialTypePicture
    //                                            [pSingletonData->m_dataCacheExMaterialInfoTypeId[infoId]];

    //         QMetaObject::invokeMethod(&pSingletonData->m_modelMaterialException, "append", Qt::QueuedConnection,
    //                                   Q_ARG(QVariantMap, info));

    //     }
    // }

}
