cqp 2 месяцев назад
Родитель
Сommit
8ee0b5c39b
1 измененных файлов с 5 добавлено и 0 удалено
  1. 5 0
      app/Service/AuxiliaryAccountService.php

+ 5 - 0
app/Service/AuxiliaryAccountService.php

@@ -171,9 +171,14 @@ class AuxiliaryAccountService extends Service
 //            }
         }
 
+        $map = Fee::whereIn('id', array_unique(array_column($list,'fee_id')))
+            ->pluck('title','id')
+            ->all();
+
         // 3. 遍历明细数据进行分组
         foreach ($list as $item) {
             $feeId = $item['fee_id'];
+            $item['fee_title'] = $map[$item['fee_id']] ?? "";
             // 获取该费用对应的一级分类信息
             $rootInfo = $childToRoot[$feeId] ?? ['id' => 0, 'title' => '其他费用'];
             $rootId   = $rootInfo['id'];