You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

89 lines
2.7 KiB

  1. <?php
  2. namespace backend\modules\zzcs\controllers;
  3. use backend\modules\zzcs\logic\TicketManage;
  4. use yii\web\Controller;
  5. use Yii;
  6. class TicketController extends Controller
  7. {
  8. public $layout = '@backend/modules/zzcs/views/layouts/zzcs';
  9. public $enableCsrfValidation = false;
  10. private $service = null;
  11. /**
  12. * Function Description:获取检票列表
  13. * Function Name: actionIndex
  14. *
  15. * @return string
  16. *
  17. * @author 李健
  18. */
  19. public function actionIndex()
  20. {
  21. $start_date = date('Y-m-d');
  22. $end_date = date('Y-m-d');
  23. $date_type=Yii::$app->request->get('date_type',2);//时间范围类型
  24. $start_date=Yii::$app->request->get('start_date',$start_date);//起始日期
  25. $end_date=Yii::$app->request->get('end_date',$end_date);//截止日期
  26. $order_source=Yii::$app->request->get('order_source',-1);//订单渠道
  27. $type_limit=Yii::$app->request->get('type_limit',1);//票种类别
  28. $order_status=Yii::$app->request->get('order_status','');//订单状态
  29. $more_search=Yii::$app->request->get('more_search','');//更多查询
  30. $page_size=Yii::$app->request->get('page_size',10);//每页显示数
  31. $current_page=Yii::$app->request->get('current_page',1);//当前页数
  32. $line = Yii::$app->request->get('line','');
  33. $start_area = Yii::$app->request->get('start_area','');
  34. $end_area = Yii::$app->request->get('end_area','');
  35. $search_bus_no = Yii::$app->request->get('search_bus_no','');
  36. $json = $this->logic()->getCheckTicketList($date_type,$start_date,$end_date,$order_source,$type_limit,$order_status,$more_search,$page_size,$current_page,$line,$start_area,$end_area,$search_bus_no);
  37. return $this->render('check_ticket_list',$json);
  38. }
  39. /**
  40. * Des:逻辑处理类型
  41. * Name: logic
  42. * @return TicketManage
  43. * @author 倪宗锋
  44. */
  45. private function logic()
  46. {
  47. if ($this->service == null) {
  48. $this->service = new TicketManage();
  49. }
  50. return $this->service;
  51. }
  52. /**
  53. * Function Description:检票
  54. * Function Name: actionChangeTicketStatus
  55. *
  56. * @return string
  57. *
  58. * @author 李健
  59. */
  60. public function actionChangeTicketStatus()
  61. {
  62. $info = Yii::$app->request->post('info');
  63. $json = $this->logic()->changeTicketStatus($info);
  64. return json_encode($json);
  65. }
  66. /**
  67. * Function Description:校验
  68. * Function Name: actionCheck
  69. *
  70. * @return string
  71. *
  72. * @author 李健
  73. */
  74. public function actionCheck()
  75. {
  76. $info = Yii::$app->request->post('info');
  77. $json = $this->logic()->check($info);
  78. return json_encode($json);
  79. }
  80. }