Merge branch 'dev'

This commit is contained in:
wucongxing 2023-05-16 14:49:24 +08:00
commit 8cf5b29953
2 changed files with 30 additions and 2 deletions

View File

@ -156,7 +156,34 @@ class OrderInquiry extends Model
* @param int|null $per_page
* @return int|mixed|string
*/
public static function getDoctorDateOrderInquiryPage(array $params, array $reception_time, array $fields = ["*"], int $page = null, ?int $per_page = 10): mixed
public static function getDoctorFinishDateOrderInquiryPage(array $params, array $reception_time, array $fields = ["*"], int $page = null, ?int $per_page = 10): mixed
{
$raw = self::where($params)
->whereBetween('finish_time', $reception_time)
->orderBy('finish_time')
->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;
}
/**
* 获取医生某一时间段接诊订单分页数据
* 已结束
* @param array $params
* @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 getDoctorCreatedDateOrderInquiryPage(array $params, array $reception_time, array $fields = ["*"], int $page = null, ?int $per_page = 10): mixed
{
$raw = self::where($params)
->whereBetween('finish_time', $reception_time)

View File

@ -118,6 +118,7 @@ class DoctorAccountService extends BaseService
'patient_name',
'patient_sex',
'patient_age',
'created_at',
];
$params = array();
@ -125,7 +126,7 @@ class DoctorAccountService extends BaseService
$params['inquiry_status'] = 6; // inquiry_status问诊订单状态1:待支付 2:待分配 3:待接诊 4:已接诊 5:已完成 6:已结束 7:已取消)
$params['inquiry_refund_status'] = 0; // inquiry_refund_status问诊订单退款状态0:无退款 1:申请退款 2:退款中 3:退款成功 4:拒绝退款 5:退款关闭)
$order_inquiry = OrderInquiry:: getDoctorDateOrderInquiryPage($params, $reception_time, $fields,$page,$per_page);
$order_inquiry = OrderInquiry:: getDoctorCreatedDateOrderInquiryPage($params, $reception_time, $fields,$page,$per_page);
if (!empty($order_inquiry['data'])) {
foreach ($order_inquiry['data'] as &$item) {
$item['estimate_income'] = floor($item['amount_total'] * 0.75 * 100) / 100;