Added logic to send report for only few line types
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 14s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 16s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 14s
Laravel Larastan / larastan (pull_request) Failing after 4m23s
Laravel Pint / pint (pull_request) Successful in 4m57s
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 14s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 16s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 14s
Laravel Larastan / larastan (pull_request) Failing after 4m23s
Laravel Pint / pint (pull_request) Successful in 4m57s
This commit is contained in:
@@ -143,9 +143,27 @@ class SendProductionReport extends Command
|
||||
foreach ($plants as $plant) {
|
||||
|
||||
// $lines = Line::where('plant_id', $plant->id)->get();
|
||||
// $lines = Line::where('plant_id', $plant->id)
|
||||
// ->orderByRaw("CASE WHEN LOWER(type) = 'fg line' THEN 0 ELSE 1 END")
|
||||
// ->get();
|
||||
|
||||
$lines = Line::where('plant_id', $plant->id)
|
||||
->orderByRaw("CASE WHEN LOWER(type) = 'fg line' THEN 0 ELSE 1 END")
|
||||
->get();
|
||||
->whereIn('type', [
|
||||
'Base FG Line',
|
||||
'FG Line',
|
||||
'Process FG Line',
|
||||
'SFG Line',
|
||||
])
|
||||
->orderByRaw("
|
||||
CASE
|
||||
WHEN LOWER(type) = 'fg line' THEN 0
|
||||
WHEN LOWER(type) = 'base fg line' THEN 1
|
||||
WHEN LOWER(type) = 'process fg line' THEN 2
|
||||
WHEN LOWER(type) = 'sfg line' THEN 3
|
||||
ELSE 4
|
||||
END
|
||||
")
|
||||
->get();
|
||||
|
||||
foreach ($lines as $line) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user