正在显示
1 个修改的文件
包含
29 行增加
和
0 行删除
@@ -297,16 +297,37 @@ class Car extends Base | @@ -297,16 +297,37 @@ class Car extends Base | ||
297 | ->where("driver_id",$res['id']) | 297 | ->where("driver_id",$res['id']) |
298 | ->sum("price")); | 298 | ->sum("price")); |
299 | 299 | ||
300 | + //累计订单 | ||
301 | + $all_orderquantity=sprintf('%.2f',Db::name("order") | ||
302 | + ->where("is_pay",1) | ||
303 | + ->where("driver_id",$res['id']) | ||
304 | + ->count()); | ||
305 | + | ||
300 | //本月订单 | 306 | //本月订单 |
301 | $order_mon=Db::name("order") | 307 | $order_mon=Db::name("order") |
302 | ->where("is_pay",1) | 308 | ->where("is_pay",1) |
309 | + ->whereTime('create_time', 'month') | ||
303 | ->where("driver_id",$res['id']) | 310 | ->where("driver_id",$res['id']) |
304 | ->count(); | 311 | ->count(); |
312 | + //累计接送 | ||
313 | + $all_passenger=sprintf('%.2f',Db::name("order") | ||
314 | + ->where("is_pay",1) | ||
315 | + ->where("driver_id",$res['id']) | ||
316 | + ->sum("number")); | ||
317 | + //本月接送 | ||
318 | + $month_passenger=sprintf('%.2f',Db::name("order") | ||
319 | + ->where("is_pay",1) | ||
320 | + ->whereTime('create_time', 'month') | ||
321 | + ->where("driver_id",$res['id']) | ||
322 | + ->sum("number")); | ||
323 | + | ||
305 | $res['license_plate']=$car['license_plate']; | 324 | $res['license_plate']=$car['license_plate']; |
306 | $res['car_model']=$car['car_model']; | 325 | $res['car_model']=$car['car_model']; |
307 | $res['revenue_mon']=$revenue_mon; | 326 | $res['revenue_mon']=$revenue_mon; |
308 | $res['all_order']=$all_order; | 327 | $res['all_order']=$all_order; |
309 | $res['order_mon']=$order_mon; | 328 | $res['order_mon']=$order_mon; |
329 | + $res['all_orderquantity']=$all_orderquantity; | ||
330 | + $res['month_passenger']=$month_passenger; | ||
310 | }else{ | 331 | }else{ |
311 | return $this->error("请求失败"); | 332 | return $this->error("请求失败"); |
312 | } | 333 | } |
@@ -943,6 +964,14 @@ class Car extends Base | @@ -943,6 +964,14 @@ class Car extends Base | ||
943 | $this->success("请求成功",$carmodel); | 964 | $this->success("请求成功",$carmodel); |
944 | } | 965 | } |
945 | 966 | ||
967 | + /** | ||
968 | + * 查询用二维码下单的订单 | ||
969 | + * @return void | ||
970 | + * @throws \think\Exception | ||
971 | + * @throws \think\db\exception\DataNotFoundException | ||
972 | + * @throws \think\db\exception\ModelNotFoundException | ||
973 | + * @throws \think\exception\DbException | ||
974 | + */ | ||
946 | public function selectintercityorder(){ | 975 | public function selectintercityorder(){ |
947 | $page=$this->request->param("page"); | 976 | $page=$this->request->param("page"); |
948 | $total=$this->request->param("total"); | 977 | $total=$this->request->param("total"); |
-
请 注册 或 登录 后发表评论