shish 3 năm trước cách đây
mục cha
commit
dc56e94faf
1 tập tin đã thay đổi với 4 bổ sung4 xóa
  1. 4 4
      app-hd/controllers/StatKindController.php

+ 4 - 4
app-hd/controllers/StatKindController.php

@@ -54,11 +54,11 @@ class StatKindController extends BaseController
                 $num = $work->num ?? 0;
                 $flowerNum = $work->flowerNum ?? 0;
                 $staffName = $staffList[$staffId]['name'] ?? '';
-                if (isset($makeStat[$staffId]['list'][$flowerNum]['num'])) {
-                    $makeStat[$staffId]['list'][$flowerNum]['num'] = bcadd($makeStat[$staffId]['list'][$flowerNum]['num'], $num);
+                if (isset($makeStat[$flowerNum][$staffId]['num'])) {
+                    $makeStat[$flowerNum][$staffId]['num'] = bcadd($makeStat[$flowerNum][$staffId]['num'], $num);
                 } else {
-                    $makeStat[$staffId]['list'][$flowerNum]['num'] = $num;
-                    $makeStat[$staffId]['name'] = $staffName;
+                    $makeStat[$flowerNum][$staffId]['num'] = $num;
+                    $makeStat[$flowerNum][$staffId]['name'] = $staffName;
                 }
             }
         }