| 123456789101112131415161718192021222324252627282930313233343536373839404142 |
- #ifndef PACKINFOMANGER_H
- #define PACKINFOMANGER_H
- #include <QObject>
- #include <QDir>
- #include <QList>
- #include <QDate>
- #include "struct_/packinfo.h"
- // 管理本地码单(箱单) 的类
- // 管理本地批号的类
- struct PackSaveInfo
- {
- QSharedPointer<PackInfo> packInfo;
- QString absPath;
- };
- class PackInfoManger : public QObject
- {
- Q_OBJECT
- public:
- explicit PackInfoManger(QObject *parent = nullptr);
- QList<PackSaveInfo> getPackInfo(const QDate & tm,bool noSync = false);
- QDate lastSyncDate();
- QList<QSharedPointer<ProjectInfo>> getLocalProjectInfo();
- signals:
- public slots:
- QString savePackInfo(const QSharedPointer<PackInfo> & info);
- QString setPackInfoSync(const QString & code, qint64 time = -1,bool autoSync = false);
- bool syncLocalProjectInfo(QList<QSharedPointer<ProjectInfo>> & projects);
- private:
- QDir getDir(const QDate & tm,bool create = false);
- private:
- QDir _dataDir;
- };
- #endif // PACKINFOMANGER_H
|