gogs 2 månader sedan
förälder
incheckning
73194b5d55
1 ändrade filer med 2 tillägg och 2 borttagningar
  1. 2 2
      app/Service/StatisticService.php

+ 2 - 2
app/Service/StatisticService.php

@@ -1281,11 +1281,11 @@ class StatisticService extends Service
         })->all();
         })->all();
         $return_item_list = [];
         $return_item_list = [];
         foreach ($month_employee_list as $v){
         foreach ($month_employee_list as $v){
-            $key = $v['item_id'];
+            $key = $v['item_id']. '_' . $v['month'];
             if(!isset($return_item_list[$key])) $return_item_list[$key]['depreciation'] = 0;
             if(!isset($return_item_list[$key])) $return_item_list[$key]['depreciation'] = 0;
             $return_item_list[$key]['depreciation'] += $v['depreciation'];
             $return_item_list[$key]['depreciation'] += $v['depreciation'];
         }
         }
-
+//        dd($return_item_list);
         return $return_item_list;
         return $return_item_list;
     }
     }