Added machine description in laser idle report mail
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 17s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 16s
Laravel Pint / pint (pull_request) Successful in 2m57s
Laravel Larastan / larastan (pull_request) Failing after 4m59s

This commit is contained in:
dhanabalan
2026-10-14 12:23:12 +05:30
parent 55f3dbd4ff
commit f757c05787
2 changed files with 6 additions and 0 deletions

View File

@@ -5,6 +5,7 @@ namespace App\Console\Commands;
use App\Mail\LaserIdleMail;
use App\Models\ClassCharacteristic;
use App\Models\Plant;
use App\Models\Configuration;
use Illuminate\Console\Command;
class SendLaserIdleHourReport extends Command
@@ -121,6 +122,8 @@ class SendLaserIdleHourReport extends Command
return (float) ($record->man_marked_status ?? 0);
});
$machineDes = Configuration::where('plant_id', $plantId)->where('c_type', 'MACHINE NAME')->where('c_name', $machineName)->first();
$totalExpectedMilliseconds =
$machineRecords
->where('motor_machine_name', $machineName)
@@ -222,6 +225,7 @@ class SendLaserIdleHourReport extends Command
'no' => $no++,
'plant' => $plant->name,
'machine' => $machineName,
'machine_description' => $machineDes->c_value,
'motorCount' => $motorCount,
'pumpCount' => $pumpCount,

View File

@@ -32,6 +32,7 @@
<th rowspan="2" style="border:1px solid #444; padding:8px; background:#f2f2f2; text-align:center;">No</th>
<th rowspan="2" style="border:1px solid #444; padding:8px; background:#f2f2f2; text-align:center;">Plant</th>
<th rowspan="2" style="border:1px solid #444; padding:8px; background:#f2f2f2; text-align:center;">Machine Name</th>
<th rowspan="2" style="border:1px solid #444; padding:8px; background:#f2f2f2; text-align:center;">Description</th>
<th colspan="3" style="border:1px solid #444; padding:8px; background:#f2f2f2; text-align:center;">
Auto Laser Mark Count
@@ -56,6 +57,7 @@
<td style="border: 1px solid #444; padding: 8px; text-align: center;">{{ $row['no'] }}</td>
<td style="border: 1px solid #444; padding: 8px; text-align: center; white-space: nowrap;">{{ $row['plant'] }}</td>
<td style="border: 1px solid #444; padding: 8px; text-align: center; white-space: nowrap;">{{ $row['machine'] }}</td>
<td style="border: 1px solid #444; padding: 8px; text-align: center; white-space: nowrap;">{{ $row['machine_description'] }}</td>
<td style="text-align:center; border:1px solid #444; padding:8px;">
{{ $row['motorCount'] }}
</td>