Files
pgserver3.0/pgserver/application/admin/controller/PropertyCertInfo.php
annnj-company 130c1026c4 first commit
2026-04-17 18:29:53 +08:00

54 lines
1.5 KiB
PHP

<?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('发起查勘成功');
}
}