add:人脸采集接口,人脸采集回调,company表新增人脸采集状态字段。
This commit is contained in:
parent
e53d20a596
commit
20bcd3c05f
@ -88,7 +88,7 @@ class CompanyLists extends BaseAdminDataLists implements ListsSearchInterface
|
|||||||
}
|
}
|
||||||
return Company::where($this->searchWhere)
|
return Company::where($this->searchWhere)
|
||||||
->where($where)
|
->where($where)
|
||||||
->field(['is_authentication','id', 'id contract', 'company_name', 'organization_code', 'city', 'area', 'street', 'company_type', 'master_name', 'master_position', 'master_phone', 'master_email', 'area_manager', 'is_contract', 'deposit', 'deposit_time', 'status'])
|
->field(['is_authentication','id', 'id contract', 'company_name', 'organization_code', 'city', 'area', 'street', 'company_type', 'master_name', 'master_position', 'master_phone', 'master_email', 'area_manager', 'is_contract', 'deposit', 'deposit_time', 'status', 'face_create_status'])
|
||||||
->limit($this->limitOffset, $this->limitLength)
|
->limit($this->limitOffset, $this->limitLength)
|
||||||
->order(['id' => 'desc'])
|
->order(['id' => 'desc'])
|
||||||
->withAttr('company_type',function($value,$data){
|
->withAttr('company_type',function($value,$data){
|
||||||
|
@ -4,9 +4,11 @@ namespace app\api\controller;
|
|||||||
|
|
||||||
|
|
||||||
use app\api\logic\IndexLogic;
|
use app\api\logic\IndexLogic;
|
||||||
|
use app\common\model\Company;
|
||||||
use app\common\model\contract\VehicleContract;
|
use app\common\model\contract\VehicleContract;
|
||||||
use app\Request;
|
use app\Request;
|
||||||
use think\facade\Db;
|
use think\facade\Db;
|
||||||
|
use think\facade\Log;
|
||||||
use think\response\Json;
|
use think\response\Json;
|
||||||
|
|
||||||
|
|
||||||
@ -71,4 +73,21 @@ class HetongController extends BaseApiController
|
|||||||
}
|
}
|
||||||
return '<style type="text/css"> * { padding: 0; margin: 0; } div { padding: 4px 48px; } a { color: #2E5CD5; cursor: pointer; text-decoration: none } a:hover { text-decoration: underline; } body { background: #fff; font-family: "Century Gothic", "Microsoft yahei"; color: #333; font-size: 18px; } h1 { font-size: 100px; font-weight: normal; margin-bottom: 12px; } p { line-height: 1.6em; font-size: 42px } </style> <div style="padding: 24px 48px;"> <h1>:) </h1> <p>'.$msg.'</p> </div>';
|
return '<style type="text/css"> * { padding: 0; margin: 0; } div { padding: 4px 48px; } a { color: #2E5CD5; cursor: pointer; text-decoration: none } a:hover { text-decoration: underline; } body { background: #fff; font-family: "Century Gothic", "Microsoft yahei"; color: #333; font-size: 18px; } h1 { font-size: 100px; font-weight: normal; margin-bottom: 12px; } p { line-height: 1.6em; font-size: 42px } </style> <div style="padding: 24px 48px;"> <h1>:) </h1> <p>'.$msg.'</p> </div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function notifyOrganizationFaceCreate()
|
||||||
|
{
|
||||||
|
$parmas = Request()->param();
|
||||||
|
Log::info(['人脸识别采集校验回调:',$parmas]);
|
||||||
|
$result = json_decode($parmas['data'], true);
|
||||||
|
$msg = '人脸采集成功';
|
||||||
|
if ($result['code'] == '0') {
|
||||||
|
// 修改人脸采集状态
|
||||||
|
Company::where(['id'=>$result['orderNo']])->update(['face_create_status'=>1]);
|
||||||
|
} else {
|
||||||
|
$msg = $result['msg'];
|
||||||
|
// 记录错误日志
|
||||||
|
Db::name('company_authentication_fail_log')->insert(['company_id'=>$parmas['id'], 'log_type'=>2,'fail_reason'=>$msg]);
|
||||||
|
}
|
||||||
|
return '<style type="text/css"> * { padding: 0; margin: 0; } div { padding: 4px 48px; } a { color: #2E5CD5; cursor: pointer; text-decoration: none } a:hover { text-decoration: underline; } body { background: #fff; font-family: "Century Gothic", "Microsoft yahei"; color: #333; font-size: 18px; } h1 { font-size: 100px; font-weight: normal; margin-bottom: 12px; } p { line-height: 1.6em; font-size: 42px } </style> <div style="padding: 24px 48px;"> <h1>:) </h1> <p>'.$msg.'</p> </div>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -164,7 +164,7 @@ class JunziqianController extends BaseApiController
|
|||||||
{
|
{
|
||||||
$requestUtils = new RequestUtils($this->serviceUrl, $this->appkey, $this->appSecret);
|
$requestUtils = new RequestUtils($this->serviceUrl, $this->appkey, $this->appSecret);
|
||||||
$request=new OrganizationCreateReq();
|
$request=new OrganizationCreateReq();
|
||||||
$request-> orderNo = uniqid();
|
$request-> orderNo = $data['id'];
|
||||||
$request-> email = $data['master_email'];
|
$request-> email = $data['master_email'];
|
||||||
$request-> enterpriseName = $data['company_name'];
|
$request-> enterpriseName = $data['company_name'];
|
||||||
$request-> identityNo = $data['organization_code'];
|
$request-> identityNo = $data['organization_code'];
|
||||||
@ -173,7 +173,7 @@ class JunziqianController extends BaseApiController
|
|||||||
$request-> legalMobile = $data['master_phone'];
|
$request-> legalMobile = $data['master_phone'];
|
||||||
$request-> faceAgantIdenName = $data['master_name'];
|
$request-> faceAgantIdenName = $data['master_name'];
|
||||||
$request-> faceAgantIdenCard = $data['master_id_card'];
|
$request-> faceAgantIdenCard = $data['master_id_card'];
|
||||||
$request-> backUrl = env('url.url_prefix').'/mobile'; // 做完人脸识别后,指定跳转到供销系统mobile首页
|
$request-> backUrl = env('url.url_prefix').'/api/Hetong/notifyOrganizationFaceCreate'; // 做完人脸识别后,指定跳转到供销系统mobile首页
|
||||||
$response = $requestUtils->doPost("/v2/user/organizationFaceCreate",$request);
|
$response = $requestUtils->doPost("/v2/user/organizationFaceCreate",$request);
|
||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
@ -155,17 +155,14 @@ class CompanyLogic extends BaseLogic
|
|||||||
'master_phone' => $data['master_phone'],
|
'master_phone' => $data['master_phone'],
|
||||||
'id' => $data['id'],
|
'id' => $data['id'],
|
||||||
];
|
];
|
||||||
|
|
||||||
// 公司数据合法性校验
|
// 公司数据合法性校验
|
||||||
$checkCompany = self::companyCheck($organizationFaceCreateData);
|
$checkCompany = self::companyCheck($organizationFaceCreateData);
|
||||||
if ($checkCompany !== true){
|
if ($checkCompany !== true){
|
||||||
return $checkCompany;
|
return $checkCompany;
|
||||||
}
|
}
|
||||||
|
|
||||||
$res = app(JunziqianController::class)->organizationFaceCreate($data);
|
$res = app(JunziqianController::class)->organizationFaceCreate($organizationFaceCreateData);
|
||||||
if ($res->success == true && !empty($res->data)) {
|
if ($res->success == true && !empty($res->data)) {
|
||||||
// 保存人脸识别地址 todo 新增字段的DDL
|
|
||||||
Company::where('id',$data['id'])->update(['face_create_url'=>$res->data]);
|
|
||||||
// 发送短信给法人
|
// 发送短信给法人
|
||||||
$sms = [
|
$sms = [
|
||||||
'mobile' => $data['master_phone'],
|
'mobile' => $data['master_phone'],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user