1
This commit is contained in:
parent
a8e0dbf891
commit
bb7ea260f3
@ -10,6 +10,7 @@ use App\Model\DoctorInquiryTime;
|
|||||||
use App\Model\DoctorPharmacistCert;
|
use App\Model\DoctorPharmacistCert;
|
||||||
use App\Model\OrderInquiry;
|
use App\Model\OrderInquiry;
|
||||||
use App\Model\OrderPrescription;
|
use App\Model\OrderPrescription;
|
||||||
|
use App\Model\OrderPrescriptionIcd;
|
||||||
use App\Model\UserDoctor;
|
use App\Model\UserDoctor;
|
||||||
use App\Services\ImService;
|
use App\Services\ImService;
|
||||||
use App\Services\MessagePush;
|
use App\Services\MessagePush;
|
||||||
@ -507,27 +508,24 @@ class TestController extends AbstractController
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function test_11(){
|
public function test_11(){
|
||||||
$ca = new Ca();
|
// 获取处方关联疾病数据
|
||||||
$prescription_pdf_result = $ca->getSignedFile("491925054435950592","1641368425758359554");
|
$params = array();
|
||||||
if (empty($prescription_pdf_result)){
|
$params['order_prescription_id'] = "500341310934036481";
|
||||||
throw new BusinessException("下载处方签章文件失败");
|
$order_prescription_icd = OrderPrescriptionIcd::getOne($params);
|
||||||
|
if (empty($order_prescription_icd)){
|
||||||
|
throw new BusinessException("处方疾病数据错误");
|
||||||
}
|
}
|
||||||
|
|
||||||
$file = fopen("./runtime/test.pdf", "w") or die("Unable to open file!");
|
dump($order_prescription_icd->toArray());
|
||||||
fwrite($file, $prescription_pdf_result);
|
// 处理疾病数据
|
||||||
fclose($file);
|
$icd_name = array_column($order_prescription_icd->toArray(),'icd_name');
|
||||||
|
if (!empty($icd_name)){
|
||||||
|
$icd_name = implode(';',$icd_name);
|
||||||
|
}else{
|
||||||
|
$icd_name = "";
|
||||||
|
}
|
||||||
|
|
||||||
// 将临时文件转换为图片
|
dump($icd_name);
|
||||||
$pdf = new Pdf("./runtime/test.pdf");
|
|
||||||
$pdf->saveImage("./runtime/test.jpg");
|
|
||||||
|
|
||||||
// dump($prescription_pdf_result);
|
|
||||||
//
|
|
||||||
// $manager = new ImageManager();
|
|
||||||
// $image = $manager->make($prescription_pdf_result)->convert('jpg');
|
|
||||||
//
|
|
||||||
// // 保存图片
|
|
||||||
// $image->save('./runtime/image.jpg');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -166,7 +166,7 @@ class OrderPrescriptionService extends BaseService
|
|||||||
// 获取处方关联疾病数据
|
// 获取处方关联疾病数据
|
||||||
$params = array();
|
$params = array();
|
||||||
$params['order_prescription_id'] = $order_prescription_id;
|
$params['order_prescription_id'] = $order_prescription_id;
|
||||||
$order_prescription_icd = OrderPrescriptionIcd::getOne($params);
|
$order_prescription_icd = OrderPrescriptionIcd::getList($params);
|
||||||
if (empty($order_prescription_icd)){
|
if (empty($order_prescription_icd)){
|
||||||
throw new BusinessException("处方疾病数据错误");
|
throw new BusinessException("处方疾病数据错误");
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user