|
|
@@ -175,8 +175,14 @@ class AccountLogService extends BaseService
|
|
|
$query = $this->getQuery($params);
|
|
|
$count = $query->count('a.id');
|
|
|
$total = $query->sum('a.actual_money');
|
|
|
+ $query1 = clone $query;
|
|
|
+ $query2 = clone $query;
|
|
|
+ $total1 = $query1->where('a.actual_money','>',0)->sum('a.actual_money');
|
|
|
+ $total2 = $query1->where('a.actual_money','<=',0)->sum('a.actual_money');
|
|
|
return [
|
|
|
'count' => $count,
|
|
|
+ 'total1' => round($total1,2), // 进
|
|
|
+ 'total2' => round($total2,2), // 出
|
|
|
'total' => round($total,2)
|
|
|
];
|
|
|
}
|