Merge branch 'dev'
This commit is contained in:
commit
8cf5b29953
@ -156,7 +156,34 @@ class OrderInquiry extends Model
|
|||||||
* @param int|null $per_page
|
* @param int|null $per_page
|
||||||
* @return int|mixed|string
|
* @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)
|
$raw = self::where($params)
|
||||||
->whereBetween('finish_time', $reception_time)
|
->whereBetween('finish_time', $reception_time)
|
||||||
|
|||||||
@ -118,6 +118,7 @@ class DoctorAccountService extends BaseService
|
|||||||
'patient_name',
|
'patient_name',
|
||||||
'patient_sex',
|
'patient_sex',
|
||||||
'patient_age',
|
'patient_age',
|
||||||
|
'created_at',
|
||||||
];
|
];
|
||||||
|
|
||||||
$params = array();
|
$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_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:退款关闭)
|
$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'])) {
|
if (!empty($order_inquiry['data'])) {
|
||||||
foreach ($order_inquiry['data'] as &$item) {
|
foreach ($order_inquiry['data'] as &$item) {
|
||||||
$item['estimate_income'] = floor($item['amount_total'] * 0.75 * 100) / 100;
|
$item['estimate_income'] = floor($item['amount_total'] * 0.75 * 100) / 100;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user