first commit
This commit is contained in:
54
pgserver/application/admin/controller/PropertyCertInfo.php
Normal file
54
pgserver/application/admin/controller/PropertyCertInfo.php
Normal file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace app\admin\controller;
|
||||
|
||||
|
||||
use app\admin\service\SurveyService;
|
||||
use app\common\validate\InquiryDetailValidate;
|
||||
use app\common\validate\SurveyValidate;
|
||||
use app\model\Inquiry;
|
||||
use think\Db;
|
||||
|
||||
class PropertyCertInfo extends Base
|
||||
{
|
||||
|
||||
/**
|
||||
* 发起查勘
|
||||
*
|
||||
* @return \think\Response
|
||||
* @throws \app\admin\exception\LogicException
|
||||
*/
|
||||
public function reqApplySurvey()
|
||||
{
|
||||
$order_no = $this->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('发起查勘成功');
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user