增加了云证书吊销接口,修改了测试文件
This commit is contained in:
parent
e12cd67f84
commit
25ce316ce9
@ -77,7 +77,7 @@ class TestController extends AbstractController
|
||||
// $this->test_12();
|
||||
// $this->test_13();
|
||||
// $this->test_14();
|
||||
$this->test_15();
|
||||
$this->test_14();
|
||||
}
|
||||
|
||||
// 获取未接诊的医生
|
||||
@ -300,29 +300,29 @@ class TestController extends AbstractController
|
||||
public function test_14(){
|
||||
$CaOnline = new CaOnline();
|
||||
|
||||
// // 测试医生
|
||||
// $data = array();
|
||||
// $data['user_id'] = "491925054435950592";
|
||||
// $data['mobile'] = "13028643897";
|
||||
// $data['card_name'] = "郝明明";
|
||||
// $data['card_num'] = "130582199202032038";
|
||||
// $data['orgDept'] = "科室名称";
|
||||
// $data['org_name'] = "成都金牛欣欣相照互联网医院有限公司";
|
||||
// $data['org_number'] = "91510106MABTJY4K9R";
|
||||
// $result = $CaOnline->getCloudCert($data);
|
||||
//
|
||||
// $data = array();
|
||||
// $data['user_id'] = "491925054435950592";
|
||||
// $data['type'] = 2;
|
||||
// $data['cert_base64'] = $result['certBase64'];
|
||||
// $data['cert_chain_p7'] = $result['certP7'];
|
||||
// $data['cert_serial_number'] = $result['certSerialnumber'];
|
||||
// $data['ca_pin'] = "491925054435950592";
|
||||
// $doctor_pharmacist_cert = UserCaCert::addDoctorPharmacistCert($data);
|
||||
// if (empty($doctor_pharmacist_cert)){
|
||||
// return fail();
|
||||
// }
|
||||
// dump(111);
|
||||
// 测试医生
|
||||
$data = array();
|
||||
$data['user_id'] = "491925054435950592";
|
||||
$data['mobile'] = "13028643897";
|
||||
$data['card_name'] = "郝明明";
|
||||
$data['card_num'] = "130582199202032038";
|
||||
$data['orgDept'] = "科室名称";
|
||||
$data['org_name'] = "成都金牛欣欣相照互联网医院有限公司";
|
||||
$data['org_number'] = "91510106MABTJY4K9R";
|
||||
$result = $CaOnline->getCloudCert($data);
|
||||
|
||||
$data = array();
|
||||
$data['user_id'] = "491925054435950592";
|
||||
$data['type'] = 2;
|
||||
$data['cert_base64'] = $result['certBase64'];
|
||||
$data['cert_chain_p7'] = $result['certP7'];
|
||||
$data['cert_serial_number'] = $result['certSerialnumber'];
|
||||
$data['ca_pin'] = "491925054435950592";
|
||||
$doctor_pharmacist_cert = UserCaCert::addUserCaCert($data);
|
||||
if (empty($doctor_pharmacist_cert)){
|
||||
return fail();
|
||||
}
|
||||
dump(111);
|
||||
|
||||
// // 测试药师
|
||||
// $data = array();
|
||||
@ -370,22 +370,14 @@ class TestController extends AbstractController
|
||||
}
|
||||
|
||||
public function test_15(){
|
||||
$params = array();
|
||||
$params[] = ['inquiry_type','=',2];
|
||||
$params[] = ['inquiry_mode','=',1];
|
||||
$params[] = ['start_time','<',date('H',time()) . date('i',time())];
|
||||
$params[] = ['end_time','>',date('H',time()) . date('i',time())];
|
||||
$CaOnline = new CaOnline();
|
||||
|
||||
$user_doctor_params = array();
|
||||
$user_doctor_params['is_platform_deep_cooperation'] = 1;
|
||||
$a = array(
|
||||
"user_id" => 491925054435950592
|
||||
);
|
||||
$data = $CaOnline->removeCloudCert($a);
|
||||
|
||||
$doctor_inquiry_config_params = array();
|
||||
$doctor_inquiry_config_params['inquiry_type'] = 2;
|
||||
$doctor_inquiry_config_params['inquiry_mode'] = 1;
|
||||
$doctor_inquiry_config_params['is_enable'] = 1;
|
||||
|
||||
$doctor_inquiry_times = DoctorInquiryTime::getMinPlatDeepCooperationDoctor($params,$user_doctor_params,[],$doctor_inquiry_config_params);
|
||||
dump($doctor_inquiry_times);
|
||||
dump($data);
|
||||
}
|
||||
|
||||
// 设置坐班医生
|
||||
|
||||
@ -62,4 +62,35 @@ class CaOnline extends Ca
|
||||
throw new BusinessException($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 吊销云证书
|
||||
* @param array $data
|
||||
* @param string $type
|
||||
* @return mixed
|
||||
*/
|
||||
public function removeCloudCert(array $data, string $type = "Personal"): mixed
|
||||
{
|
||||
$option = [
|
||||
'form_params' => [
|
||||
'entityId' => $data['user_id'], // 用户唯一标识,由业务系统定义
|
||||
'pin' => $data['user_id'], // 证书PIN码
|
||||
'authType' => "实人认证", // 委托鉴证方式[实人认证、线下认证、其它方式认证]
|
||||
'authTime' => time(), // 委托鉴证时间(鉴证完成的时间戳)单位:秒
|
||||
'authResult' => "认证通过", // 委托鉴证结果[认证通过]
|
||||
'authNoticeType' => "数字证书吊销告知", // 委托鉴证告知类型[数字证书申请告知]
|
||||
]
|
||||
];
|
||||
|
||||
try {
|
||||
$response = $this->httpRequest($this->api_url . '/cloud-certificate-service' . '/api/cloudCert/open/v2/cert/certRevoke', $option);
|
||||
if (empty($response)) {
|
||||
// 返回值为空
|
||||
throw new BusinessException(HttpEnumCode::getMessage(HttpEnumCode::SERVER_ERROR));
|
||||
}
|
||||
return $response;
|
||||
} catch (GuzzleException $e) {
|
||||
throw new BusinessException($e->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user