新增我的账户日账单明细数据

This commit is contained in:
2023-02-23 09:54:49 +08:00
parent c1320cb71e
commit ebf34e28e7
7 changed files with 117 additions and 56 deletions
+17 -5
View File
@@ -104,17 +104,29 @@ class OrderInquiry extends Model
}
/**
* 获取医生某天预计收益
* 获取医生接诊列表
* 已完成-已结束
* @param array $params
* @param array $reception_time 接诊时间区间
* @param array $reception_time 接诊时间区间 ['2023-01-02','2023-01-03']
* @param array $fields
* @param int|null $page
* @param int|null $per_page
* @return int|mixed|string
*/
public static function getDoctorOneDayAmountTotal(array $params, array $reception_time): mixed
public static function getDoctorAccountInfoPage(array $params, array $reception_time,array $fields = ["*"], int $page = null, ?int $per_page = 10): mixed
{
return self::where($params)
$raw = self::where($params)
->whereIn('inquiry_status',[5,6])
->whereBetween('reception_time',$reception_time)
->sum("amount_total");
->paginate($per_page, $fields, "page", $page);
$data = array();
$data['current_page'] = $raw->currentPage();// 当前页码
$data['total'] = $raw->total();//数据总数
$data['data'] = $raw->items();//数据
$data['per_page'] = $raw->perPage();//每页个数
$data['last_page'] = $raw->lastPage();//最后一页
return $data;
}
}