修改ca
This commit is contained in:
parent
d9acddea46
commit
d58f35d293
@ -1270,7 +1270,7 @@ class MessagePush extends BaseService
|
|||||||
$sub_data['params']['data'] = [
|
$sub_data['params']['data'] = [
|
||||||
"phrase1" => "药师审方不通过",// 审核结果
|
"phrase1" => "药师审方不通过",// 审核结果
|
||||||
"thing2" => $order_prescription['pharmacist_fail_reason'],// 原因
|
"thing2" => $order_prescription['pharmacist_fail_reason'],// 原因
|
||||||
"date3" => date('Y-m-d',time(strtotime($order_prescription['pharmacist_verify_time']))),// 审核时间
|
"date3" => date('Y-m-d',time()),// 审核时间
|
||||||
"thing4" => "建议您修改处方并重新为患者开具",// 提示说明
|
"thing4" => "建议您修改处方并重新为患者开具",// 提示说明
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@ -24,6 +24,7 @@ use App\Utils\Log;
|
|||||||
use Extend\Alibaba\Oss;
|
use Extend\Alibaba\Oss;
|
||||||
use Extend\Ca\Ca;
|
use Extend\Ca\Ca;
|
||||||
use Extend\Ca\CaOffline;
|
use Extend\Ca\CaOffline;
|
||||||
|
use Extend\Ca\CaOnline;
|
||||||
use Extend\Prescription\Prescription;
|
use Extend\Prescription\Prescription;
|
||||||
use Hyperf\Contract\LengthAwarePaginatorInterface;
|
use Hyperf\Contract\LengthAwarePaginatorInterface;
|
||||||
use Hyperf\Utils\WaitGroup;
|
use Hyperf\Utils\WaitGroup;
|
||||||
@ -243,7 +244,7 @@ class OrderPrescriptionService extends BaseService
|
|||||||
$icd_name = "";
|
$icd_name = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
$CaOffline = new CaOffline();
|
$CaOnline = new CaOnline();
|
||||||
|
|
||||||
// 获取云证书签名
|
// 获取云证书签名
|
||||||
$data = array();
|
$data = array();
|
||||||
@ -269,23 +270,23 @@ class OrderPrescriptionService extends BaseService
|
|||||||
}
|
}
|
||||||
|
|
||||||
dump("获取用户云证书签名");
|
dump("获取用户云证书签名");
|
||||||
$cert_sign_result = $CaOffline->getCertSign($user_entity_id, $user_entity_id, $data);
|
$cert_sign_result = $CaOnline->getCertSign($user_entity_id, $user_entity_id, $data);
|
||||||
dump("获取用户云证书签名成功");
|
dump("获取用户云证书签名成功");
|
||||||
|
|
||||||
// 验证云证书签名-验证无需处理,只要不返回错误即可
|
// 验证云证书签名-验证无需处理,只要不返回错误即可
|
||||||
dump("验证用户云证书签名");
|
dump("验证用户云证书签名");
|
||||||
$CaOffline->verifyPkcs7($cert_sign_result['signP7'], $data);
|
$CaOnline->verifyPkcs7($cert_sign_result['signP7'], $data);
|
||||||
dump("验证用户云证书签名成功");
|
dump("验证用户云证书签名成功");
|
||||||
|
|
||||||
if ($user['user_type'] == 3) {
|
if ($user['user_type'] == 3) {
|
||||||
dump("获取医院云证书签名");
|
dump("获取医院云证书签名");
|
||||||
unset($cert_sign_result);
|
unset($cert_sign_result);
|
||||||
$cert_sign_result = $CaOffline->getCertSign($hospital_entity_id, $hospital_entity_id, $data);
|
$cert_sign_result = $CaOnline->getCertSign($hospital_entity_id, $hospital_entity_id, $data);
|
||||||
dump("获取医院云证书签名成功");
|
dump("获取医院云证书签名成功");
|
||||||
|
|
||||||
// 验证云证书签名-验证无需处理,只要不返回错误即可
|
// 验证云证书签名-验证无需处理,只要不返回错误即可
|
||||||
dump("验证医院云证书签名");
|
dump("验证医院云证书签名");
|
||||||
$CaOffline->verifyPkcs7($cert_sign_result['signP7'], $data);
|
$CaOnline->verifyPkcs7($cert_sign_result['signP7'], $data);
|
||||||
dump("验证医院云证书签名成功");
|
dump("验证医院云证书签名成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -482,7 +483,7 @@ class OrderPrescriptionService extends BaseService
|
|||||||
$data = array();
|
$data = array();
|
||||||
$data['sign_param'] = json_encode($sign_param);
|
$data['sign_param'] = json_encode($sign_param);
|
||||||
$data['pdf_file'] = $pdf_file;
|
$data['pdf_file'] = $pdf_file;
|
||||||
$sign_pdf_result = $CaOffline->addSignPdf($user_entity_id, $data);
|
$sign_pdf_result = $CaOnline->addSignPdf($user_entity_id, $data);
|
||||||
if (empty($sign_pdf_result[0]['fileId'])) {
|
if (empty($sign_pdf_result[0]['fileId'])) {
|
||||||
throw new BusinessException("处方签章失败");
|
throw new BusinessException("处方签章失败");
|
||||||
}
|
}
|
||||||
@ -491,7 +492,7 @@ class OrderPrescriptionService extends BaseService
|
|||||||
|
|
||||||
// 下载处方签章文件
|
// 下载处方签章文件
|
||||||
$file_id = $sign_pdf_result[0]['fileId'];
|
$file_id = $sign_pdf_result[0]['fileId'];
|
||||||
$prescription_pdf_result = $CaOffline->getSignedFile($user_entity_id, $file_id);
|
$prescription_pdf_result = $CaOnline->getSignedFile($user_entity_id, $file_id);
|
||||||
|
|
||||||
if (empty($prescription_pdf_result)) {
|
if (empty($prescription_pdf_result)) {
|
||||||
throw new BusinessException("下载处方签章文件失败");
|
throw new BusinessException("下载处方签章文件失败");
|
||||||
@ -538,7 +539,7 @@ class OrderPrescriptionService extends BaseService
|
|||||||
$data = array();
|
$data = array();
|
||||||
$data['sign_param'] = json_encode($sign_param);
|
$data['sign_param'] = json_encode($sign_param);
|
||||||
$data['pdf_file'] = $pdf_file;
|
$data['pdf_file'] = $pdf_file;
|
||||||
$hospital_sign_pdf_result = $CaOffline->addSignPdf($hospital_entity_id, $data);
|
$hospital_sign_pdf_result = $CaOnline->addSignPdf($hospital_entity_id, $data);
|
||||||
if (empty($hospital_sign_pdf_result[0]['fileId'])) {
|
if (empty($hospital_sign_pdf_result[0]['fileId'])) {
|
||||||
throw new BusinessException("处方签章失败");
|
throw new BusinessException("处方签章失败");
|
||||||
}
|
}
|
||||||
@ -548,7 +549,7 @@ class OrderPrescriptionService extends BaseService
|
|||||||
// 下载处方签章文件
|
// 下载处方签章文件
|
||||||
unset($prescription_pdf_result);
|
unset($prescription_pdf_result);
|
||||||
$file_id = $hospital_sign_pdf_result[0]['fileId'];
|
$file_id = $hospital_sign_pdf_result[0]['fileId'];
|
||||||
$prescription_pdf_result = $CaOffline->getSignedFile($hospital_entity_id, $file_id);
|
$prescription_pdf_result = $CaOnline->getSignedFile($hospital_entity_id, $file_id);
|
||||||
|
|
||||||
if (empty($prescription_pdf_result)) {
|
if (empty($prescription_pdf_result)) {
|
||||||
throw new BusinessException("下载处方签章文件失败");
|
throw new BusinessException("下载处方签章文件失败");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user