曾超新 5 years ago
parent 5246e2c356
commit 71a4fc3f82
  1. 6
      frontend/controllers/AppointmentController.php

@ -301,7 +301,7 @@ class AppointmentController extends BaseController
$query = AppointmentT::find() $query = AppointmentT::find()
->leftJoin('car_t','`car_t`.`id`=`appointment_t`.`car_id`') ->leftJoin('car_t','`car_t`.`id`=`appointment_t`.`car_id`')
->where('appointment_t.is_first=1 and (car_t.location=2 or cat_t.location=4)'); ->where('appointment_t.is_first=1 and car_t.location=2');
if($username == '') { if($username == '') {
$user_ids = $this->getChildrenUserIDs(); $user_ids = $this->getChildrenUserIDs();
@ -383,7 +383,7 @@ class AppointmentController extends BaseController
$query = AppointmentT::find() $query = AppointmentT::find()
->leftJoin('car_t','`car_t`.`id`=`appointment_t`.`car_id`') ->leftJoin('car_t','`car_t`.`id`=`appointment_t`.`car_id`')
->where('appointment_t.is_first=0 and (car_t.location=2 or cat_t.location=4)') ->where('appointment_t.is_first=0 and car_t.location=2')
->andWhere('appointment_t.pdate<="'.date('Y-m-d').'"'); ->andWhere('appointment_t.pdate<="'.date('Y-m-d').'"');
$user_ids = $this->getChildrenUserIDs(); $user_ids = $this->getChildrenUserIDs();
@ -459,7 +459,7 @@ class AppointmentController extends BaseController
$query = AppointmentT::find() $query = AppointmentT::find()
->leftJoin('car_t','`car_t`.`id`=`appointment_t`.`car_id`') ->leftJoin('car_t','`car_t`.`id`=`appointment_t`.`car_id`')
->where('appointment_t.is_first=0 and (car_t.location=2 or cat_t.location=4)'); ->where('appointment_t.is_first=0 and car_t.location=2');
if($username == '') { if($username == '') {
$user_ids = $this->getChildrenUserIDs(); $user_ids = $this->getChildrenUserIDs();

Loading…
Cancel
Save