70 lines
1.6 KiB
PHP
70 lines
1.6 KiB
PHP
<?php
|
||
|
||
$query = (db("weld_logs"))->select(
|
||
"id",
|
||
'line_number',
|
||
'iso_number',
|
||
'project',
|
||
'design_area',
|
||
'spool_number',
|
||
'welding_date',
|
||
'quantity_of_iso',
|
||
'test_package_no',
|
||
'no_of_the_joint_as_per_as_built_survey',
|
||
'type_of_joint',
|
||
'pwht',
|
||
'service_category',
|
||
'fluid_group',
|
||
'contractor',
|
||
'ste_subcontractor',
|
||
'type_of_welds',
|
||
'welder_1',
|
||
'welder_2',
|
||
'member_no_1',
|
||
'material_no_1',
|
||
'nps_1',
|
||
'outside_diameter_1',
|
||
'wall_thickness_1',
|
||
'member_no_2',
|
||
'material_no_2',
|
||
'nps_2',
|
||
'outside_diameter_2',
|
||
'wall_thickness_2',
|
||
'vt_request_date',
|
||
'test_laboratory_vt',
|
||
'pwht_request_date',
|
||
'test_laboratory_pwht',
|
||
'ht_request_date',
|
||
'test_laboratory_ht',
|
||
'rt_request_date',
|
||
'test_laboratory_rt',
|
||
'ut_request_date',
|
||
'test_laboratory_ut',
|
||
'ut_type',
|
||
'pt_request_date',
|
||
'test_laboratory_pt',
|
||
'mt_request_date',
|
||
'test_laboratory_mt',
|
||
'pmi_request_date',
|
||
'test_laboratory_pmi',
|
||
);
|
||
|
||
// NDT test tarihlerinden en az biri boş olan kayıtları filtrele (hepsi doluysa gelmesin)
|
||
|
||
$query = $query->where(function($q) {
|
||
$q->whereNull('vt_request_date')
|
||
->orWhereNull('pwht_request_date')
|
||
->orWhereNull('ht_request_date')
|
||
->orWhereNull('rt_request_date')
|
||
->orWhereNull('ut_request_date')
|
||
->orWhereNull('pt_request_date')
|
||
->orWhereNull('mt_request_date')
|
||
->orWhereNull('pmi_request_date');
|
||
});
|
||
|
||
|
||
$query = $query->orderBy("updated_at", "desc")->get();
|
||
echo json_encode_tr($query);
|
||
|
||
?>
|