|
- <?php
-
- namespace backend\modules\zzcs\controllers;
-
- use backend\modules\zzcs\models\BaseAreaAudit;
- use backend\modules\zzcs\models\BaseResource;
- //use backend\modules\zzcs\models\BaseResourceProperty;
- use Yii;
- use backend\modules\zzcs\models\BaseArea;
- use backend\modules\zzcs\models\DictType;
- use yii\web\Controller;
-
- class StationController extends Controller
- {
- public $layout = '@backend/modules/zzcs/views/layouts/zzcs';
- public $enableCsrfValidation = false;
-
- /**
- * Function Description:测试
- * Function Name: actionIndex
- *
- * @return string
- *
- * @author 张帅
- */
- public function actionIndex()
- {
- $view = Yii::$app->view;
- $view->title = '站点管理';
-
-
- return $this->render('index');
- }
-
- /**
- * Function Description:站点区域管理
- * Function Name: actionList
- *
- *
- * @author 张帅
- */
- public function actionList()
- {
- $view = Yii::$app->view;
- $view->title = '站点区域管理';
- $base_area = new BaseArea();
- //创建一个数组
- $data = [];
-
- //1.获取POI类别
- $station_type = DictType::find()->select('id as station_type_id,type_name as station_type_name')->where(['parent_id' => 400])->asArray()->all();
-
- //2.获取poi类型
- $poi_type = DictType::find()->select('id as station_type_id,type_name as station_type_name')->where(['parent_id' => 403])->asArray()->all();
-
- //3.获取一级区域
- $range = BaseArea::find()->select('id as area_id,area_name')->where(['parent_id' => 0, 'cancel_flag' => 0, 'poi_type1' => 401])->asArray()->all();
-
- //4.获取数据
- $station_result = $base_area->getStationList();
- $station_list = $station_result['rows'];
- $page_arr = $station_result['page_arr'];
- $page = $station_result['page'];
-
- //获取cookies
- $cookies = Yii::$app->request->cookies;
- //账号权限
- $user_id = $cookies->getValue('user_id');
- $user_rule = $cookies->getValue('ht_user_role');
-
- //把需要传递的值传送给视图
- $data['station_type'] = $station_type;
- $data['poi_type'] = $poi_type;
- $data['range'] = $range;
- $data['station_list'] = $station_list;
- $data['page_arr'] = $page_arr;
- $data['page'] = $page;
- $data['user_id'] = $user_id;
- $data['user_rule'] = $user_rule;
-
- return $this->render('list', $data);
- }
-
- /**
- * Function Description:审核列表页面
- * Function Name: actionAuditList
- *
- *
- * @author 张帅
- */
- public function actionAuditList(){
- $base_area_audit = new BaseAreaAudit();
- $view = Yii::$app->view;
- $view->title = '站点区域审核';
-
- //创建一个数组
- $data = [];
-
- //获取cookies
- $cookies = Yii::$app->request->cookies;
- //账号权限
- $user_id = $cookies->getValue('user_id');
- $user_rule = $cookies->getValue('ht_user_role');
-
- //1.获取POI类别
- $station_type = DictType::find()->select('id as station_type_id,type_name as station_type_name')->where(['parent_id' => 400])->asArray()->all();
-
- //2.获取poi类型
- $poi_type = DictType::find()->select('id as station_type_id,type_name as station_type_name')->where(['parent_id' => 403])->asArray()->all();
-
- //3.获取一级区域
- $range = BaseArea::find()->select('id as area_id,area_name')->where(['parent_id' => 0, 'cancel_flag' => 0, 'poi_type1' => 401])->asArray()->all();
-
- //4.获取数据
- $station_result = $base_area_audit->getStationList($user_id);
- $station_list = $station_result['rows'];
- $page_arr = $station_result['page_arr'];
- $page = $station_result['page'];
-
-
- //把需要传递的值传送给视图
- $data['station_type'] = $station_type;
- $data['poi_type'] = $poi_type;
- $data['range'] = $range;
- $data['station_list'] = $station_list;
- $data['page_arr'] = $page_arr;
- $data['page'] = $page;
- $data['user_id'] = $user_id;
- $data['user_rule'] = $user_rule;
- return $this->render('audit-list',$data);
- }
-
- /**
- * Function Description:站点添加
- * Function Name: actionAddStation
- *
- * @return string
- *
- * @author 张帅
- */
- public function actionAddStation()
- {
- $view = Yii::$app->view;
- $view->title = '站点添加';
- //1.获取一级区域
- $range = BaseArea::find()->select('id as area_id,area_name')->where(['parent_id' => 0, 'cancel_flag' => 0, 'poi_type1' => 401])->asArray()->all();
-
- //2.获取poi类型
- $poi_type = DictType::find()->select('id as station_type_id,type_name as station_type_name')->where(['parent_id' => 403])->asArray()->all();
-
- $data['opera'] = 'add';
- $data['station_type'] = 'station';
- $data['storage_type'] = 'formal';
- $data['range'] = $range;
- $data['poi_type'] = $poi_type;
-
- return $this->render('poi-info', $data);
- }
-
- /**
- * Function Description:区域添加
- * Function Name: actionAddRange
- *
- * @return string
- *
- * @author 张帅
- */
- public function actionAddRange()
- {
- $view = Yii::$app->view;
- $view->title = '区域添加';
- //1.获取一级区域
- $range = BaseArea::find()->select('id as area_id,area_name')->where(['parent_id' => 0, 'cancel_flag' => 0, 'poi_type1' => 401])->asArray()->all();
-
- //2.获取poi类型
- $poi_type = DictType::find()->select('id as station_type_id,type_name as station_type_name')->where(['parent_id' => 403])->asArray()->all();
-
- $data['opera'] = 'add';//操作
- $data['station_type'] = 'range';//poi类型
- $data['storage_type'] = 'formal';//存储类型
- $data['range'] = $range;
- $data['poi_type'] = $poi_type;
-
- return $this->render('poi-info', $data);
- }
-
- /**
- * Function Description:站点查看
- * Function Name: actionStationInfo
- *
- *
- * @author 张帅
- */
- public function actionStationInfo()
- {
- $base_resource = new BaseResource();
-
- $view = Yii::$app->view;
- //1.获取区域id
- $station_id = Yii::$app->request->get('station_id');
-
- //2.获取区域详情
- $station_info = $base_resource->getShowStationInfo($station_id);
- if(false === $station_info){
- $view->title = '站点有误';
- return $this->render('station-error');
- }
-
-
- $view->title = '查看站点';
- $data['opera'] = 'show';
- $data['station_type'] = 'station';
- $data['storage_type'] = 'formal';//存储类型
- $data['station_info'] = $station_info;
- return $this->render('poi-info', $data);
- }
-
- /**
- * Function Description:区域查看
- * Function Name: actionRangeInfo
- *
- * @return string
- *
- * @author 张帅
- */
- public function actionRangeInfo()
- {
- $base_area = new BaseArea();
-
- //1.获取区域id
- $station_id = Yii::$app->request->get('station_id');
-
- //2.获取区域详情
- $station_info = $base_area->getShowStationInfo($station_id);
-
- $view = Yii::$app->view;
- $view->title = '查看区域';
- $data['opera'] = 'show';
- $data['station_type'] = 'range';
- $data['storage_type'] = 'formal';//存储类型
- $data['station_info'] = $station_info;
-
- return $this->render('poi-info', $data);
- }
-
- /**
- * Function Description:修改站点
- * Function Name: actionUpdateStation
- *
- * @return string
- *
- * @author 张帅
- */
- public function actionUpdateStation()
- {
- $base_resource = new BaseResource();
- $view = Yii::$app->view;
-
-
- //1.获取站点id
- $station_id = Yii::$app->request->get('station_id');
-
- //2.获取站点详情
- $station_info = $base_resource->getStationInfo($station_id);
- if(false === $station_info){
- $view->title = '站点有误';
- return $this->render('station-error');
- }
- //3.获取一级区域
- $range = BaseArea::find()->select('id as area_id,area_name')->where(['parent_id' => 0, 'cancel_flag' => 0, 'poi_type1' => 401])->asArray()->all();
-
- //4.获取poi类型
- $poi_type = DictType::find()->select('id as station_type_id,type_name as station_type_name')->where(['parent_id' => 403])->asArray()->all();
-
- $view->title = '修改站点';
-
- $data['opera'] = 'update';//操作
- $data['station_type'] = 'station';//poi类别
- $data['storage_type'] = 'formal';//存储类型
- $data['range'] = $range;
- $data['poi_type'] = $poi_type;
- $data['station_info'] = $station_info;
-
- return $this->render('poi-info', $data);
- }
-
- /**
- * Function Description:修改区域
- * Function Name: actionUpdateRange
- *
- * @return string
- *
- * @author 张帅
- */
- public function actionUpdateRange()
- {
- $base_area = new BaseArea();
-
- $view = Yii::$app->view;
- $view->title = '修改区域';
-
- //1.获取区域id
- $station_id = Yii::$app->request->get('station_id');
-
- //2.获取区域详情
- $station_info = $base_area->getStationInfo($station_id);
-
- //3.获取一级区域
- $range = BaseArea::find()->select('id as area_id,area_name')->where(['parent_id' => 0, 'cancel_flag' => 0, 'poi_type1' => 401])->asArray()->all();
-
- //4.获取poi类型
- $poi_type = DictType::find()->select('id as station_type_id,type_name as station_type_name')->where(['parent_id' => 403])->asArray()->all();
-
- $data['opera'] = 'update';
- $data['station_type'] = 'range';
- $data['storage_type'] = 'formal';//存储类型
- $data['range'] = $range;
- $data['poi_type'] = $poi_type;
- $data['station_info'] = $station_info;
- return $this->render('poi-info', $data);
- }
-
- /**
- * Function Description:查看审核表的站点信息
- * Function Name: actionStationInfoAudit
- *
- * @return string
- *
- * @author 张帅
- */
- public function actionAuditStationInfo(){
- $base_area_audit = new BaseAreaAudit();
-
- //1.获取区域id
- $station_id = Yii::$app->request->get('station_id');
-
- //2.获取区域详情
- $station_info = $base_area_audit->getShowStationInfo($station_id);
-
- $view = Yii::$app->view;
- $view->title = '查看站点';
- $data['opera'] = 'show';
- $data['station_type'] = 'station';
- $data['storage_type'] = 'audit';//存储类型
- $data['station_info'] = $station_info;
-
- return $this->render('poi-info', $data);
- }
-
- /**
- * Function Description:查看审核表的区域信息
- * Function Name: actionRangeInfoAudit
- *
- * @return string
- *
- * @author 张帅
- */
- public function actionAuditRangeInfo(){
- $base_area_audit = new BaseAreaAudit();
-
- //1.获取区域id
- $station_id = Yii::$app->request->get('station_id');
-
- //2.获取区域详情
- $station_info = $base_area_audit->getShowStationInfo($station_id);
-
- $view = Yii::$app->view;
- $view->title = '查看区域';
- $data['opera'] = 'show';
- $data['station_type'] = 'range';
- $data['storage_type'] = 'audit';//存储类型
- $data['station_info'] = $station_info;
-
- return $this->render('poi-info', $data);
- }
-
- /**
- * Function Description:修改审核站点
- * Function Name: actionUpdateStationAudit
- *
- * @return string
- *
- * @author 张帅
- */
- public function actionAuditUpdateStation()
- {
- $base_area_audit = new BaseAreaAudit();
-
- //1.获取区域id
- $station_id = Yii::$app->request->get('station_id');
-
- //2.获取区域详情
- $station_info = $base_area_audit->getStationInfo($station_id);
-
- //3.获取一级区域
- $range = BaseArea::find()->select('id as area_id,area_name')->where(['parent_id' => 0, 'cancel_flag' => 0, 'poi_type1' => 401])->asArray()->all();
-
- //4.获取poi类型
- $poi_type = DictType::find()->select('id as station_type_id,type_name as station_type_name')->where(['parent_id' => 403])->asArray()->all();
-
- $view = Yii::$app->view;
- $view->title = '修改站点';
- $data['opera'] = 'update';
- $data['station_type'] = 'station';
- $data['storage_type'] = 'audit';//存储类型
- $data['station_info'] = $station_info;
- $data['range'] = $range;
- $data['poi_type'] = $poi_type;
-
- return $this->render('poi-info', $data);
- }
-
- /**
- * Function Description:修改审核区域
- * Function Name: actionUpdateRangeAudit
- *
- * @return string
- *
- * @author 张帅
- */
- public function actionAuditUpdateRange()
- {
- $base_area_audit = new BaseAreaAudit();
-
- //1.获取区域id
- $station_id = Yii::$app->request->get('station_id');
-
- //2.获取区域详情
- $station_info = $base_area_audit->getStationInfo($station_id);
-
- //3.获取一级区域
- $range = BaseArea::find()->select('id as area_id,area_name')->where(['parent_id' => 0, 'cancel_flag' => 0, 'poi_type1' => 401])->asArray()->all();
-
- //4.获取poi类型
- $poi_type = DictType::find()->select('id as station_type_id,type_name as station_type_name')->where(['parent_id' => 403])->asArray()->all();
-
- $view = Yii::$app->view;
- $view->title = '修改区域';
- $data['opera'] = 'update';
- $data['station_type'] = 'range';
- $data['storage_type'] = 'audit';//存储类型
- $data['station_info'] = $station_info;
- $data['range'] = $range;
- $data['poi_type'] = $poi_type;
-
- return $this->render('poi-info', $data);
- }
-
- /**
- * Function Description:提交审核站点
- * Function Name: actionAuditAddStation
- *
- * @return string
- *
- * @author 张帅
- */
- public function actionAuditAddStation(){
- $view = Yii::$app->view;
- $view->title = '站点添加申请';
- //1.获取一级区域
- $range = BaseArea::find()->select('id as area_id,area_name')->where(['parent_id' => 0, 'cancel_flag' => 0, 'poi_type1' => 401])->asArray()->all();
-
- //2.获取poi类型
- $poi_type = DictType::find()->select('id as station_type_id,type_name as station_type_name')->where(['parent_id' => 403])->asArray()->all();
-
- $data['opera'] = 'add';
- $data['station_type'] = 'station';
- $data['storage_type'] = 'audit';
- $data['range'] = $range;
- $data['poi_type'] = $poi_type;
-
- return $this->render('poi-info', $data);
- }
-
- /**
- * Function Description:提交审核区域
- * Function Name: actionAuditAddRange
- *
- * @return string
- *
- * @author 张帅
- */
- public function actionAuditAddRange()
- {
- $view = Yii::$app->view;
- $view->title = '区域添加申请';
- //1.获取一级区域
- $range = BaseArea::find()->select('id as area_id,area_name')->where(['parent_id' => 0, 'cancel_flag' => 0, 'poi_type1' => 401])->asArray()->all();
-
- //2.获取poi类型
- $poi_type = DictType::find()->select('id as station_type_id,type_name as station_type_name')->where(['parent_id' => 403])->asArray()->all();
-
- $data['opera'] = 'add';//操作
- $data['station_type'] = 'range';//poi类型
- $data['storage_type'] = 'audit';//存储类型
- $data['range'] = $range;
- $data['poi_type'] = $poi_type;
-
- return $this->render('poi-info', $data);
- }
-
- /**
- * Function Description:审核区域
- * Function Name: actionAuditRangeCheck
- *
- *
- * @author 张帅
- */
- public function actionAuditRangeCheck(){
- $base_area_audit = new BaseAreaAudit();
-
- //1.获取区域id
- $station_id = Yii::$app->request->get('station_id');
-
- //2.获取区域详情
- $station_info = $base_area_audit->getShowStationInfo($station_id);
-
- $view = Yii::$app->view;
- $view->title = '审核区域';
- $data['opera'] = 'show';
- $data['station_type'] = 'range';
- $data['storage_type'] = 'check';//存储类型
- $data['station_info'] = $station_info;
-
- return $this->render('poi-info', $data);
- }
-
- /**
- * Function Description:审核站点
- * Function Name: actionAuditStationCheck
- *
- * @return string
- *
- * @author 张帅
- */
- public function actionAuditStationCheck(){
- $base_area_audit = new BaseAreaAudit();
-
- //1.获取区域id
- $station_id = Yii::$app->request->get('station_id');
-
- //2.获取区域详情
- $station_info = $base_area_audit->getShowStationInfo($station_id);
-
- $view = Yii::$app->view;
- $view->title = '审核站点';
- $data['opera'] = 'show';
- $data['station_type'] = 'station';
- $data['storage_type'] = 'check';//存储类型
- $data['station_info'] = $station_info;
-
- return $this->render('poi-info', $data);
- }
-
-
- /**
- * Function Description:重新申请站点
- * Function Name: actionAuditStationReapply
- *
- * @return string
- *
- * @author 张帅
- */
- public function actionAuditStationReapply(){
- $base_area_audit = new BaseAreaAudit();
-
- //1.获取区域id
- $station_id = Yii::$app->request->get('station_id');
-
- //2.获取区域详情
- $station_info = $base_area_audit->getStationInfo($station_id);
-
- //3.获取一级区域
- $range = BaseArea::find()->select('id as area_id,area_name')->where(['parent_id' => 0, 'cancel_flag' => 0, 'poi_type1' => 401])->asArray()->all();
-
- //4.获取poi类型
- $poi_type = DictType::find()->select('id as station_type_id,type_name as station_type_name')->where(['parent_id' => 403])->asArray()->all();
-
- $view = Yii::$app->view;
- $view->title = '重新申请站点';
- $data['opera'] = 'update';
- $data['station_type'] = 'station';
- $data['storage_type'] = 'reapply';//存储类型
- $data['station_info'] = $station_info;
- $data['range'] = $range;
- $data['poi_type'] = $poi_type;
-
- return $this->render('poi-info', $data);
- }
-
- /**
- * Function Description:重新申请区域
- * Function Name: actionAuditRangeReapply
- *
- * @return string
- *
- * @author 张帅
- */
- public function actionAuditRangeReapply(){
- $base_area_audit = new BaseAreaAudit();
-
- //1.获取区域id
- $station_id = Yii::$app->request->get('station_id');
-
- //2.获取区域详情
- $station_info = $base_area_audit->getStationInfo($station_id);
-
- //3.获取一级区域
- $range = BaseArea::find()->select('id as area_id,area_name')->where(['parent_id' => 0, 'cancel_flag' => 0, 'poi_type1' => 401])->asArray()->all();
-
- //4.获取poi类型
- $poi_type = DictType::find()->select('id as station_type_id,type_name as station_type_name')->where(['parent_id' => 403])->asArray()->all();
-
- $view = Yii::$app->view;
- $view->title = '重新申请区域';
- $data['opera'] = 'update';
- $data['station_type'] = 'range';
- $data['storage_type'] = 'reapply';//存储类型
- $data['station_info'] = $station_info;
- $data['range'] = $range;
- $data['poi_type'] = $poi_type;
-
- return $this->render('poi-info', $data);
- }
-
-
- /*============================ajax================================ajax=================================ajax======================================*/
-
-
- /**
- * Function Description:获取区域可选项
- * Function Name: actionGetRange
- *
- * @return string
- *
- * @author 张帅
- */
- public function actionGetRange()
- {
- $area_id = Yii::$app->request->post('area_id');
- $range = BaseArea::find()->select('id as area_id,area_name')->where(['parent_id' => $area_id, 'cancel_flag' => 0, 'poi_type1' => 401])->asArray()->all();
- $json['code'] = '0';
- $json['info'] = '返回数据成功';
- $json['list'] = $range;
- return json_encode($json);
- }
-
- /**
- * Function Description:获取区域检索列表
- * Function Name: actionSearchList
- *
- * @return string
- *
- * @author 张帅
- */
- public function actionSearchList()
- {
- #region 获取参数
- $station_type = Yii::$app->request->post('station_type');//POI类别
- $station_type_name = Yii::$app->request->post('station_type_name');//站点/区域名称
- $poi_type = Yii::$app->request->post('poi_type');//站点/区域类型
- $range = Yii::$app->request->post('range');//区域
- $use_status = Yii::$app->request->post('use_status');
- $page_size = Yii::$app->request->post('page_size');//每页展示数据
- $current_page = Yii::$app->request->post('current_page');//当前页
- #endregion
-
- $base_area = new BaseArea();
- $result = $base_area->getStationList($station_type, $station_type_name, $poi_type, $range,$use_status, $page_size, $current_page);
- $json['code'] = '0';
- $json['info'] = '返回数据成功';
- $json['list'] = $result;
- return json_encode($json);
- }
-
- /**
- * Function Description:正式添加站点
- * Function Name: actionAddStationFormal
- *
- * @return string
- *
- * @author 张帅
- */
- public function actionAddStationFormal()
- {
- $base_resource = new BaseResource();
-
- #region 获取参数
- $station_name = Yii::$app->request->post('station_name');//站点名称
- $longitude = Yii::$app->request->post('longitude');//经度
- $latitude = Yii::$app->request->post('latitude');//纬度
- $range = Yii::$app->request->post('range');//区域
- $address = Yii::$app->request->post('address');//地址
- $poi_type = Yii::$app->request->post('poi_type');//poi类型
- #endregion
-
- $res = $base_resource->addStation($station_name,$longitude,$latitude,$range,$address,$poi_type);
- return json_encode($res);
- }
-
- /**
- * Function Description:正式添加区域
- * Function Name: actionAddRangeFormal
- *
- * @return string
- *
- * @author 张帅
- */
- public function actionAddRangeFormal(){
- $base_area = new BaseArea();
-
- #region 获取参数
- $station_name = Yii::$app->request->post('station_name');//站点名称
- $range = Yii::$app->request->post('range');//区域
- $poi_type = Yii::$app->request->post('poi_type');//poi类型
- #endregion
-
- $res = $base_area->addRange($station_name,$range,$poi_type);
- return json_encode($res);
- }
-
- /**
- * Function Description:修改站点
- * Function Name: actionUpdateStationFormal
- *
- * @return string
- *
- * @author 张帅
- */
- public function actionUpdateStationFormal(){
- $base_resource = new BaseResource();
-
- #region 获取参数
- $station_id = Yii::$app->request->post('station_id');//站点id
- $station_name = Yii::$app->request->post('station_name');//站点名称
- $longitude = Yii::$app->request->post('longitude');//经度
- $latitude = Yii::$app->request->post('latitude');//纬度
- $range = Yii::$app->request->post('range');//区域
- $address = Yii::$app->request->post('address');//地址
- $poi_type = Yii::$app->request->post('poi_type');//poi类型
- #endregion
-
- $res = $base_resource->updateStation($station_id,$station_name,$longitude,$latitude,$range,$address,$poi_type);
- return json_encode($res);
- }
-
- /**
- * Function Description:修改正式区域
- * Function Name: actionUpdateRangeFormal
- *
- * @return string
- *
- * @author 张帅
- */
- public function actionUpdateRangeFormal(){
- $base_area = new BaseArea();
-
- #region 获取参数
- $station_id = Yii::$app->request->post('station_id');//站点id
- $station_name = Yii::$app->request->post('station_name');//站点名称
- $range = Yii::$app->request->post('range');//区域
- $poi_type = Yii::$app->request->post('poi_type');//poi类型
- #endregion
-
- $res = $base_area->updateRange($station_id,$station_name,$range,$poi_type);
- return json_encode($res);
- }
-
- /**
- * Function Description:删除区域/站点
- * Function Name: actionDeleteStation
- *
- * @return string
- *
- * @author 张帅
- */
- public function actionDeleteStation(){
- $base_area = new BaseArea();
-
- #region 获取参数
- $station_id = Yii::$app->request->post('station_id');//站点id
- #endregion
-
- $res = $base_area->deleteStation($station_id);
- return json_encode($res);
- }
-
- /**
- * Function Description:获取审核列表
- * Function Name: actionSearchListAudit
- *
- * @return string
- *
- * @author 张帅
- */
- public function actionSearchListAudit(){
- #region 获取参数
- $user_id = Yii::$app->request->post('user_id');//用户id
- $audit_status = Yii::$app->request->post('audit_status');//审核状态
- $station_type = Yii::$app->request->post('station_type');//POI类别
- $station_type_name = Yii::$app->request->post('station_type_name');//站点/区域名称
- $poi_type = Yii::$app->request->post('poi_type');//站点/区域类型
- $range = Yii::$app->request->post('range');//区域
- $page_size = Yii::$app->request->post('page_size');//每页展示数据
- $current_page = Yii::$app->request->post('current_page');//当前页
- $apply_name = Yii::$app->request->post('apply_name');//申请账号
- $apply_man = Yii::$app->request->post('apply_man');//申请人
- $apply_no = Yii::$app->request->post('apply_no');//申请编号
- #endregion
-
- $base_area_audit = new BaseAreaAudit();
- $result = $base_area_audit->getStationList($user_id, $audit_status, $station_type, $station_type_name, $poi_type, $range, $page_size , $current_page , $apply_name, $apply_man ,$apply_no);
- $json['code'] = '0';
- $json['info'] = '返回数据成功';
- $json['list'] = $result;
- return json_encode($json);
- }
-
- /**
- * Function Description:站点提交审核按钮
- * Function Name: actionAddStationAudit
- *
- * @return string
- *
- * @author 张帅
- */
- public function actionAddStationAudit(){
- $base_area_audit = new BaseAreaAudit();
-
- #region 获取参数
- $station_name = Yii::$app->request->post('station_name');//站点名称
- $longitude = Yii::$app->request->post('longitude');//经度
- $latitude = Yii::$app->request->post('latitude');//纬度
- $range = Yii::$app->request->post('range');//区域
- $address = Yii::$app->request->post('address');//地址
- $poi_type = Yii::$app->request->post('poi_type');//poi类型
- $audit_text = Yii::$app->request->post('audit_text');//申请原因
- #endregion
-
- $res = $base_area_audit->addStation($station_name,$longitude,$latitude,$range,$address,$poi_type,$audit_text);
- return json_encode($res);
- }
-
- /**
- * Function Description:区域提交审核按钮
- * Function Name: actionAddRangeAudit
- *
- * @return string
- *
- * @author 张帅
- */
- public function actionAddRangeAudit(){
- $base_area_audit = new BaseAreaAudit();
-
- #region 获取参数
- $station_name = Yii::$app->request->post('station_name');//站点名称
- $range = Yii::$app->request->post('range');//区域
- $poi_type = Yii::$app->request->post('poi_type');//poi类型
- $audit_text = Yii::$app->request->post('audit_text');//申请原因
- #endregion
-
- $res = $base_area_audit->addRange($station_name,$range,$poi_type,$audit_text);
- return json_encode($res);
- }
-
-
- /**
- * Function Description:修改审核站点
- * Function Name: actionUpdateStationAudit
- *
- * @return string
- *
- * @author 张帅
- */
- public function actionUpdateStationAudit(){
- $base_area_audit = new BaseAreaAudit();
-
- #region 获取参数
- $station_id = Yii::$app->request->post('station_id');//站点id
- $station_name = Yii::$app->request->post('station_name');//站点名称
- $longitude = Yii::$app->request->post('longitude');//经度
- $latitude = Yii::$app->request->post('latitude');//纬度
- $range = Yii::$app->request->post('range');//区域
- $address = Yii::$app->request->post('address');//地址
- $poi_type = Yii::$app->request->post('poi_type');//poi类型
- #endregion
-
- $res = $base_area_audit->updateStation($station_id,$station_name,$longitude,$latitude,$range,$address,$poi_type);
- return json_encode($res);
- }
-
- /**
- * Function Description:修改审核区域
- * Function Name: actionUpdateRangeAudit
- *
- * @return string
- *
- * @author 张帅
- */
- public function actionUpdateRangeAudit(){
- $base_area_audit = new BaseAreaAudit();
-
- #region 获取参数
- $station_id = Yii::$app->request->post('station_id');//站点id
- $station_name = Yii::$app->request->post('station_name');//站点名称
- $range = Yii::$app->request->post('range');//区域
- $poi_type = Yii::$app->request->post('poi_type');//poi类型
- #endregion
-
- $res = $base_area_audit->updateRange($station_id,$station_name,$range,$poi_type);
- return json_encode($res);
- }
-
- /**
- * Function Description:审核区域
- * Function Name: actionCheckRange
- *
- * @return string
- *
- * @author 张帅
- */
- public function actionCheckRange(){
- $base_area_audit = new BaseAreaAudit();
-
- #region 获取参数
- $station_id = Yii::$app->request->post('station_id');//站点id
- $check_status = Yii::$app->request->post('check_status');//状态
- $audit_text = Yii::$app->request->post('audit_text');//说明
- #endregion
-
- $res = $base_area_audit->checkRange($station_id,$check_status,$audit_text);
- return json_encode($res);
- }
-
- /**
- * Function Description:审核站点
- * Function Name: actionCheckStation
- *
- * @return string
- *
- * @author 张帅
- */
- public function actionCheckStation(){
- $base_area_audit = new BaseAreaAudit();
-
- #region 获取参数
- $station_id = Yii::$app->request->post('station_id');//站点id
- $check_status = Yii::$app->request->post('check_status');//状态
- $audit_text = Yii::$app->request->post('audit_text');//说明
- #endregion
-
- $res = $base_area_audit->checkStation($station_id,$check_status,$audit_text);
- return json_encode($res);
- }
-
- /**
- * Function Description:删除审核站点
- * Function Name: actionAuditDeleteStation
- *
- * @return string
- *
- * @author 张帅
- */
- public function actionAuditDeleteStation(){
- $base_area_audit = new BaseAreaAudit();
-
- #region 获取参数
- $station_id = Yii::$app->request->post('station_id');//站点id
- #endregion
-
- $res = $base_area_audit->deleteStation($station_id);
- return json_encode($res);
- }
-
- /**
- * Function Description:重新申请站点
- * Function Name: actionReapplyStation
- *
- * @return string
- *
- * @author 张帅
- */
- public function actionReapplyStation(){
- $base_area_audit = new BaseAreaAudit();
-
- #region 获取参数
- $station_id = Yii::$app->request->post('station_id');//站点id
- $station_name = Yii::$app->request->post('station_name');//站点名称
- $longitude = Yii::$app->request->post('longitude');//经度
- $latitude = Yii::$app->request->post('latitude');//纬度
- $range = Yii::$app->request->post('range');//区域
- $address = Yii::$app->request->post('address');//地址
- $poi_type = Yii::$app->request->post('poi_type');//poi类型
- $audit_text = Yii::$app->request->post('audit_text');//poi类型
- #endregion
-
- $res = $base_area_audit->reapplyStation($station_id,$station_name,$longitude,$latitude,$range,$address,$poi_type,$audit_text);
- return json_encode($res);
- }
-
- /**
- * Function Description:重新申请区域
- * Function Name: actionReapplyRange
- *
- * @return string
- *
- * @author 张帅
- */
- public function actionReapplyRange(){
- $base_area_audit = new BaseAreaAudit();
-
- #region 获取参数
- $station_id = Yii::$app->request->post('station_id');//站点id
- $station_name = Yii::$app->request->post('station_name');//站点名称
- $range = Yii::$app->request->post('range');//区域
- $poi_type = Yii::$app->request->post('poi_type');//poi类型
- $audit_text = Yii::$app->request->post('audit_text');//poi类型
- #endregion
-
- $res = $base_area_audit->reapplyRange($station_id,$station_name,$range,$poi_type,$audit_text);
- return json_encode($res);
- }
-
- }
|