Browse Source

小高薪

cqp 2 months ago
parent
commit
8ee0b5c39b
1 changed files with 5 additions and 0 deletions
  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. 遍历明细数据进行分组
         // 3. 遍历明细数据进行分组
         foreach ($list as $item) {
         foreach ($list as $item) {
             $feeId = $item['fee_id'];
             $feeId = $item['fee_id'];
+            $item['fee_title'] = $map[$item['fee_id']] ?? "";
             // 获取该费用对应的一级分类信息
             // 获取该费用对应的一级分类信息
             $rootInfo = $childToRoot[$feeId] ?? ['id' => 0, 'title' => '其他费用'];
             $rootInfo = $childToRoot[$feeId] ?? ['id' => 0, 'title' => '其他费用'];
             $rootId   = $rootInfo['id'];
             $rootId   = $rootInfo['id'];