first commit

This commit is contained in:
lidg
2026-08-18 09:40:43 +08:00
commit 0c4fd6844c
70 changed files with 8721 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
#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);
};
#endif // WORKPIECEREPOSITORY_H