changed logic for log info in laser #1180
@@ -98,8 +98,10 @@ class SendLaserIdleHourReport extends Command
|
||||
// return (float) ($record->motor_marked_physical_count ?? 0);
|
||||
// });
|
||||
|
||||
$pumpCount = $machineRecords
|
||||
->where('pump_machine_name', $machineName)
|
||||
$pumpRecords = $machineRecords
|
||||
->where('pump_machine_name', $machineName);
|
||||
$pumpCount = $pumpRecords
|
||||
// ->where('pump_machine_name', $machineName)
|
||||
// ->where('pump_marked_status', 'Marked')
|
||||
->sum(fn ($record) => (float) ($record->pump_marked_physical_count ?? 0));
|
||||
// ->filter(function ($record) {
|
||||
@@ -114,9 +116,9 @@ class SendLaserIdleHourReport extends Command
|
||||
'plant_id' => $plant->id,
|
||||
'plant' => $plant->name,
|
||||
'machine' => $machineName,
|
||||
'pump_rows' => $machineRecords->count(),
|
||||
'pump_rows' => $pumpRecords->count(),
|
||||
'pump_sum' => $pumpCount,
|
||||
'pump_values' => $machineRecords
|
||||
'pump_values' => $pumpRecords
|
||||
->pluck('pump_marked_physical_count')
|
||||
->countBy()
|
||||
->toArray(),
|
||||
|
||||
Reference in New Issue
Block a user