3.4 KiB
3.4 KiB
NDT Request Calculation Guide / NDT Talebi Hesaplama Kılavuzu
English / İngilizce
This document describes the logic for identifying and displaying pending NDT (Non-Destructive Testing) requests as implemented in request-ndt-no-cache.blade.php.
1. Data Source
The primary data source is the weld_logs table.
2. Open Request Criteria
A weld is considered to have an Open NDT Request if it meets the following criteria for a specific test type (RT, UT, MT, PT, VT, etc.):
- Request Date Exists: The
[test_type]_request_datecolumn must contain a valid date.- Invalid values: null, empty string,
0000-00-00,1970-01-01.
- Invalid values: null, empty string,
- No Test Date: The
[test_type]_test_datecolumn must be empty. - No Result: The
[test_type]_resultcolumn must be empty.
3. Data Flow and Enrichment
- Initial Fetch: Records are fetched from
weld_logs, optionally filtered by date ranges (d1/d2for test date,rd1/rd2for request date). - Test Metadata: Standard controls and error types are loaded from specific test tables (RT, UT, etc.) using
iso_numberandjoint_numberas keys. - Filtration: The criteria mentioned in section 2 are applied to each test type for every record.
- Enrichment: Meeting records are mapped with additional fields like
test_laboratory,control_standart, andscope.
4. Logic Flowchart
graph TD
A[Start: Fetch Weld Logs] --> B{Filter by Date Params?}
B -- Yes --> C[Apply test_date or request_date filters]
B -- No --> D[Fetch all active records]
C --> E[Load Test Type Metadata (RT, UT, MT...)]
D --> E
E --> F[Iterate each Weld Log & Test Type]
F --> G{Valid Request Date?}
G -- No --> H[Skip]
G -- Yes --> I{Is Test Date Empty?}
I -- No --> H
I -- Yes --> J{Is Result Empty?}
J -- No --> H
J -- Yes --> K[ADD TO PENDING REQUESTS]
K --> L[Map: Laboratory, Standart, Scope, etc.]
L --> M[Output JSON]
Türkçe / Turkish
Bu belge, request-ndt-no-cache.blade.php dosyasında uygulanan bekleyen NDT (Tahribatsız Muayene) taleplerinin belirlenmesi ve görüntülenmesi mantığını açıklar.
1. Veri Kaynağı
Temel veri kaynağı weld_logs tablosudur.
2. Açık Talep Kriterleri
Bir kaynak dikişi, belirli bir test türü (RT, UT, MT, PT, VT vb.) için aşağıdaki kriterleri karşılıyorsa Bekleyen NDT Talebi olarak kabul edilir:
- Talep Tarihi Mevcut:
[test_type]_request_datesütunu geçerli bir tarih içermelidir.- Geçersiz değerler: null, boş metin,
0000-00-00,1970-01-01.
- Geçersiz değerler: null, boş metin,
- Test Tarihi Boş:
[test_type]_test_datesütunu boş olmalıdır. - Sonuç Boş:
[test_type]_resultsütunu boş olmalıdır.
3. Veri Akışı ve Zenginleştirme
- İlk Çekim: Kayıtlar
weld_logstablosundan çekilir, isteğe bağlı olarak tarih aralıklarına göre filtrelenir. - Test Meta Verileri: Standart kontroller ve hata türleri,
iso_numbervejoint_numberanahtarları kullanılarak özel test tablolarından (RT, UT vb.) yüklenir. - Filtreleme: Bölüm 2'de belirtilen kriterler, her kayıt için her test türüne uygulanır.
- Zenginleştirme: Kriterlere uyan kayıtlar;
test_laboratory,control_standartvescopegibi ek alanlarla eşleştirilir.
4. Mantıksal Akış Şeması
(Yukarıdaki Mermaid şeması her iki dil için de geçerlidir.)