27 lines
1.1 KiB
C++
27 lines
1.1 KiB
C++
#ifndef WORKPIECEREPOSITORY_H
|
|
#define WORKPIECEREPOSITORY_H
|
|
|
|
#include "../models/workpiece.h"
|
|
|
|
#include <QList>
|
|
|
|
class WorkpieceRepository
|
|
{
|
|
public:
|
|
QList<Workpiece> listByOrder(int orderId, QString *error = nullptr);
|
|
QList<Workpiece> listByTray(int trayId, QString *error = nullptr);
|
|
bool findWorkpiece(int id, Workpiece *workpiece, QString *error = nullptr);
|
|
bool claimNextPending(int orderId, Workpiece *workpiece, QString *error = nullptr);
|
|
bool insertWorkpiece(Workpiece *workpiece, QString *error = nullptr);
|
|
bool assignToSlot(int id, int trayId, int trayPos, int rowNo, int columnNo,
|
|
QString *error = nullptr);
|
|
bool updateState(int id, const QString &state, const QString &processStep,
|
|
QString *error = nullptr);
|
|
bool orderHasInspectionRecords(int orderId, bool *hasRecords,
|
|
QString *error = nullptr);
|
|
bool removeUninspected(int orderId, QList<int> *affectedTrayIds,
|
|
int *removedCount, QString *error = nullptr);
|
|
};
|
|
|
|
#endif // WORKPIECEREPOSITORY_H
|