This commit is contained in:
wucongxing 2023-04-03 13:41:58 +08:00
parent 148843a1c7
commit 7466651d7d
4 changed files with 14 additions and 4 deletions

View File

@ -498,7 +498,7 @@ class TestController extends AbstractController
// 下载签章的pdf文件
public function test_9(){
$ca = new Ca();
$result = $ca->getSignedFile("491925054435950592","1638734851418783746");
$result = $ca->getSignedFile("5345345461","1642762886467977217");
if (empty($result)){
return fail();
}
@ -507,7 +507,7 @@ class TestController extends AbstractController
$oss = new Oss();
$filename = "applet/doctor/prescription/491925054435950592.pdf";
$filename = "applet/doctor/prescription/111.pdf";
$result = $oss->putObject($filename, $result);
dump($result);

View File

@ -477,6 +477,7 @@ class OrderPrescriptionService extends BaseService
// 上传oss
$filename = "applet/prescription/" . $order_prescription['order_prescription_id'] . '.' . 'pdf';
$prescription_pdf_url = $oss->putObject($filename, $prescription_pdf_result);
dump("处方pdf上传pss成功");
if ($user['user_type'] == 3){
// 药师端时,需要进行系统签章
@ -517,7 +518,7 @@ class OrderPrescriptionService extends BaseService
throw new BusinessException("处方签章失败");
}
dump("处方pdf进行签章成功");
dump("处方pdf进行医院签章成功");
// 下载处方签章文件
unset($prescription_pdf_result);

View File

@ -1136,7 +1136,6 @@ class PatientOrderService extends BaseService
'order_prescription_id',
'prescription_status',
'prescription_img',
'prescription_pdf',
'pharmacist_id',
'doctor_id',
];

View File

@ -8,6 +8,7 @@ use App\Model\OrderPrescription;
use App\Model\OrderPrescriptionProduct;
use App\Model\User;
use App\Model\UserDoctor;
use App\Model\UserDoctorInfo;
use App\Model\UserPharmacist;
use App\Model\UserPharmacistInfo;
use Hyperf\DbConnection\Db;
@ -106,6 +107,15 @@ class UserPharmacistService extends BaseService
$order_prescription['prescription_img'] = addAliyunOssWebsite($order_prescription['prescription_img']);
// 获取处方中医生签名
$params = array();
$params['doctor_id'] = $order_prescription['doctor_id'];
$user_doctor_info = UserDoctorInfo::getOne($params);
if (empty($user_doctor_info)){
return fail(HttpEnumCode::SERVER_ERROR);
}
$order_prescription['doctor_sign_image'] = addAliyunOssWebsite($user_doctor_info['sign_image']);
return success($order_prescription->toArray());
}