request->post('order_no'); $data = $this->request->post('details/a'); if (!$order_no || !$data) return $this->buildFailed('参数错误'); //验证 $surveyService = new SurveyService(); $verifyResult = $surveyService->checkSurvey($data); if ($verifyResult['is_success'] !== true) { return $this->buildFailed('提交信息有误', $verifyResult['errors']); } $param['user_id'] = $this->userInfo['user_id']; $param['user_name'] = $this->userInfo['user_name']; $param['order_no'] = $order_no; $param['detail'] = $data; // $result = $surveyService->askSurvey($param); if ($this->userInfo['user_id']==1) { // 超级管理员admin不用检查物业6个月内是否出过报告 $result = $surveyService->askSurveyUnck($param); } else { $result = $surveyService->askSurvey($param); } if ($result['code'] == -1) { return $this->buildFailed($result['msg']); } return $this->buildSuccess('发起查勘成功'); } }