feat(v1.5): complete phases 40-43 workflow cleanup

This commit is contained in:
2026-03-25 22:46:51 +01:00
parent b8dda81e7b
commit 3610571949
37 changed files with 1557 additions and 259 deletions

View File

@@ -86,6 +86,14 @@ final class PrintJobRepository
$statement->execute(['id' => $id]);
}
public function deleteById(int $id): bool
{
$statement = $this->pdo->prepare('DELETE FROM print_jobs WHERE id = :id');
$statement->execute(['id' => $id]);
return $statement->rowCount() > 0;
}
/**
* @return list<int>
*/
@@ -141,25 +149,4 @@ final class PrintJobRepository
return is_array($rows) ? $rows : [];
}
/**
* @param list<int> $orderIds
* @return list<array<string, mixed>>
*/
public function findPackagesWithLabelsByOrderIds(array $orderIds): array
{
if ($orderIds === []) {
return [];
}
$placeholders = implode(',', array_fill(0, count($orderIds), '?'));
$statement = $this->pdo->prepare(
"SELECT id, order_id, label_path FROM shipment_packages
WHERE order_id IN ($placeholders) AND label_path IS NOT NULL AND label_path != ''
AND status != 'error'"
);
$statement->execute(array_values($orderIds));
$rows = $statement->fetchAll(PDO::FETCH_ASSOC);
return is_array($rows) ? $rows : [];
}
}