İlk temizlik tamamlandı bir önceki projeden
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services\TpCreator\DocumentProcessors;
|
||||
|
||||
use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
|
||||
|
||||
class NdtClearanceTpProcessor extends AbstractTpDocumentProcessor
|
||||
{
|
||||
public function process(
|
||||
array $lineData,
|
||||
array $document,
|
||||
Worksheet $sheet,
|
||||
int $currentRow,
|
||||
int $rowNo,
|
||||
string $fullFolder,
|
||||
string $testPackageNo,
|
||||
bool $override
|
||||
): int {
|
||||
$docPath = $document['path'];
|
||||
$docTitle = $document['title2'] ?? '';
|
||||
|
||||
$search = $this->alternativeGlob("storage/documents/{$docPath}/*{$testPackageNo}*.pdf");
|
||||
|
||||
$document['title2'] = str_replace("004_QA/", "", $docTitle);
|
||||
$date = date('Y-m-d'); // Default to current date or welding date if available
|
||||
|
||||
$this->addRow($search, $document, $fullFolder, $testPackageNo, $date, $rowNo, $sheet, $currentRow, $override);
|
||||
|
||||
return $rowNo + 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user