Kaynağa Gözat

胡庆余堂

cqp 6 ay önce
ebeveyn
işleme
d204d23ba5
1 değiştirilmiş dosya ile 3 ekleme ve 1 silme
  1. 3 1
      app/Service/ExportFileService.php

+ 3 - 1
app/Service/ExportFileService.php

@@ -6,6 +6,7 @@ use App\Exports\ExportOrder;
 use App\Exports\MultiSheetExport;
 use App\Exports\MultiSheetExport;
 use App\Model\CalendarDetails;
 use App\Model\CalendarDetails;
 use App\Model\Device;
 use App\Model\Device;
+use App\Model\DeviceDetails;
 use App\Model\Employee;
 use App\Model\Employee;
 use App\Model\EmployeeRole;
 use App\Model\EmployeeRole;
 use App\Model\Item;
 use App\Model\Item;
@@ -267,7 +268,8 @@ class ExportFileService extends Service
 
 
         $item_total = Item::where('del_time', 0)->where('is_use', 1)->select('code', 'id','start_time','end_time')->get()->toArray();
         $item_total = Item::where('del_time', 0)->where('is_use', 1)->select('code', 'id','start_time','end_time')->get()->toArray();
 
 
-        $time_array = ItemDetails::where('del_time',0)
+        $time_array = DeviceDetails::where('del_time',0)
+            ->where('time', strtotime($ergs['month'] . '-01'))
             ->pluck('total_hours', 'device_id')
             ->pluck('total_hours', 'device_id')
             ->all();
             ->all();
         // 生成起止时间行
         // 生成起止时间行