修改开具处方:增加回滚。删除无用log记录,修改处方图片位置

This commit is contained in:
wucongxing 2023-08-10 17:00:08 +08:00
parent 73eb50a478
commit 98c9e0a00b
5 changed files with 6 additions and 9 deletions

View File

@ -98,7 +98,7 @@ class AssignPharmacistConsumer extends ConsumerMessage
OrderPrescription::edit($params, $save_data);
Db::commit();
} catch (\Exception $e) {
} catch (\Throwable $e) {
Db::rollBack();
Log::getInstance()->error("分配药师队列执行失败原因:" . $e->getMessage());

View File

@ -397,7 +397,7 @@ class CaService extends BaseService
$pdf->Image('@' . $img_result, 10, 10, 0, 0, '', '', '', false, 300, '', false, false, 0, false, false, false);
$prescription_pdf_local_filename = $order_prescription['order_prescription_id'] . '.' . 'pdf';
$prescription_pdf_local_path = dirname(__DIR__, 2) . "/file/prescription/";
$prescription_pdf_local_path = BASE_PATH . "/runtime/file/prescription/";
$res = mkdirs($prescription_pdf_local_path);
if (!$res){
@ -406,7 +406,6 @@ class CaService extends BaseService
// 图片生成的处方pdf存储为本地文件 runtime目录下
$pdf->Output($prescription_pdf_local_path . $prescription_pdf_local_filename, "F");
return $prescription_img_oss_path;
}

View File

@ -198,7 +198,7 @@ class OrderPrescriptionService extends BaseService
$result['file_id'] = $file_id;
return $result;
} catch (\Exception $e) {
} catch (\Throwable $e) {
throw new BusinessException($e->getMessage());
}
}

View File

@ -1379,6 +1379,7 @@ class UserDoctorService extends BaseService
$params['product_id'] = $item['product_id'];
$product = Product::getOne($params);
if (empty($product)){
Db::rollBack();
return fail(HttpEnumCode::SERVER_ERROR,"商品错误");
}
@ -1498,7 +1499,7 @@ class UserDoctorService extends BaseService
}
Db::commit();
} catch (\Exception $e) {
} catch (\Throwable $e) {
Db::rollBack();
return fail(HttpEnumCode::SERVER_ERROR, $e->getMessage());
}
@ -1507,7 +1508,7 @@ class UserDoctorService extends BaseService
// 发送消息-药师审核中
$ImService = new ImService();
$ImService->pharmacistVerify($order_inquiry,(string)$order_prescription->order_prescription_id,$product_name,$user_doctor['user_id'],$order_inquiry['user_id']);
}catch (\Exception $e){
}catch (\Throwable $e){
return success([],HttpEnumCode::HTTP_SUCCESS,"消息发送失败");
}

View File

@ -54,7 +54,6 @@ abstract class Ca
]
];
Log::getInstance()->info("获取云证书签名请求",$option);
try {
$response = $this->httpRequest(
$this->api_url . '/cloud-certificate-service' . '/api/cloudCert/open/cert/sign',
@ -89,8 +88,6 @@ abstract class Ca
]
];
dump($option);
try {
$response = $this->httpRequest(
$this->api_url . '/signgw-service/api/signature/verifyPkcs7',