修改家庭档案接口
This commit is contained in:
parent
cf12f1f0ab
commit
84d1ebbc12
@ -6,11 +6,13 @@ use App\Constants\HttpEnumCode;
|
|||||||
use App\Model\DoctorPharmacistCert;
|
use App\Model\DoctorPharmacistCert;
|
||||||
use Extend\Alibaba\Oss;
|
use Extend\Alibaba\Oss;
|
||||||
use Extend\Ca\Ca;
|
use Extend\Ca\Ca;
|
||||||
|
use Intervention\Image\ImageManager;
|
||||||
|
use TCPDF;
|
||||||
|
|
||||||
class TestController extends AbstractController
|
class TestController extends AbstractController
|
||||||
{
|
{
|
||||||
public function test(){
|
public function test(){
|
||||||
$this->test_4();
|
$this->test_5();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取云证书-首次
|
// 获取云证书-首次
|
||||||
@ -57,14 +59,14 @@ class TestController extends AbstractController
|
|||||||
$data['doctor_advice'] = "多吃药";
|
$data['doctor_advice'] = "多吃药";
|
||||||
$data['product'] = [
|
$data['product'] = [
|
||||||
[
|
[
|
||||||
"product_name" => "感冒药1",
|
"product_name" => "感冒药1(50ml*10)",
|
||||||
"single_unit" => "一次一包",
|
"single_unit" => "一次一包",
|
||||||
"frequency_use" => "1天3次",
|
"frequency_use" => "1天3次",
|
||||||
"single_use" => "口服",
|
"single_use" => "口服",
|
||||||
"prescription_product_num" => "X1盒",
|
"prescription_product_num" => "X1盒",
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"product_name" => "感冒药2",
|
"product_name" => "感冒药2(50ml*10)",
|
||||||
"single_unit" => "一次一包",
|
"single_unit" => "一次一包",
|
||||||
"frequency_use" => "1天3次",
|
"frequency_use" => "1天3次",
|
||||||
"single_use" => "口服",
|
"single_use" => "口服",
|
||||||
@ -122,8 +124,119 @@ class TestController extends AbstractController
|
|||||||
dump($data);
|
dump($data);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 处理处方pdf图片
|
// 生成处方pdf图片
|
||||||
public function test_5(){
|
public function test_5(){
|
||||||
|
// 下载阿里云图片
|
||||||
|
$oss = new Oss();
|
||||||
|
|
||||||
|
$filename = "Basic/images/prescription_img.jpg";
|
||||||
|
$sign_image = $oss->getObjectToRAM($filename);
|
||||||
|
|
||||||
|
$manager = new ImageManager();
|
||||||
|
|
||||||
|
$image = $manager->make($sign_image);
|
||||||
|
|
||||||
|
$fontPath = './runtime/ZiYuYongSongTi-2.ttf';
|
||||||
|
|
||||||
|
// 处方号
|
||||||
|
$image->text('1234567890', 1480, 540, function ($font) use($fontPath) {
|
||||||
|
$font->file($fontPath);
|
||||||
|
$font->size(60);
|
||||||
|
$font->align('left');
|
||||||
|
});
|
||||||
|
|
||||||
|
// 日期
|
||||||
|
$image->text('2023-03-21', 354, 675, function ($font) use($fontPath) {
|
||||||
|
$font->file($fontPath);
|
||||||
|
$font->size(60);
|
||||||
|
$font->align('left');
|
||||||
|
});
|
||||||
|
|
||||||
|
// 科室
|
||||||
|
$image->text('测试科室1', 1385, 675, function ($font) use($fontPath) {
|
||||||
|
$font->file($fontPath);
|
||||||
|
$font->size(60);
|
||||||
|
$font->align('left');
|
||||||
|
});
|
||||||
|
|
||||||
|
// 姓名
|
||||||
|
$image->text('测试姓名', 354, 795, function ($font) use($fontPath) {
|
||||||
|
$font->file($fontPath);
|
||||||
|
$font->size(60);
|
||||||
|
$font->align('left');
|
||||||
|
});
|
||||||
|
|
||||||
|
// 性别
|
||||||
|
$image->text('男', 1385, 790, function ($font) use($fontPath) {
|
||||||
|
$font->file($fontPath);
|
||||||
|
$font->size(60);
|
||||||
|
$font->align('left');
|
||||||
|
});
|
||||||
|
|
||||||
|
// 年龄
|
||||||
|
$image->text('19', 354, 900, function ($font) use($fontPath) {
|
||||||
|
$font->file($fontPath);
|
||||||
|
$font->size(60);
|
||||||
|
$font->align('left');
|
||||||
|
});
|
||||||
|
|
||||||
|
// 过敏史
|
||||||
|
$image->text('对阿莫西林过敏对阿莫西林过敏', 405, 1030, function ($font) use($fontPath) {
|
||||||
|
$font->file($fontPath);
|
||||||
|
$font->size(60);
|
||||||
|
$font->align('left');
|
||||||
|
});
|
||||||
|
|
||||||
|
// 初步诊断
|
||||||
|
$image->text('对阿莫西林过敏对阿莫西林过敏', 445, 1145, function ($font) use($fontPath) {
|
||||||
|
$font->file($fontPath);
|
||||||
|
$font->size(60);
|
||||||
|
$font->align('left');
|
||||||
|
});
|
||||||
|
|
||||||
|
// 医生建议
|
||||||
|
$image->text('没有建议', 445, 1252, function ($font) use($fontPath) {
|
||||||
|
$font->file($fontPath);
|
||||||
|
$font->size(60);
|
||||||
|
$font->align('left');
|
||||||
|
});
|
||||||
|
|
||||||
|
$data = array();
|
||||||
|
$data['product'] = [
|
||||||
|
[
|
||||||
|
"product_name" => "感冒药1(50ml*10)",
|
||||||
|
"single_unit" => "一次一包",
|
||||||
|
"frequency_use" => "1天3次",
|
||||||
|
"single_use" => "口服",
|
||||||
|
"prescription_product_num" => "X1盒",
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"product_name" => "感冒药2(50ml*10)",
|
||||||
|
"single_unit" => "一次一包",
|
||||||
|
"frequency_use" => "1天3次",
|
||||||
|
"single_use" => "口服",
|
||||||
|
"prescription_product_num" => "X1盒",
|
||||||
|
]
|
||||||
|
];
|
||||||
|
|
||||||
|
// 用药
|
||||||
|
foreach ($data['product'] as $key => $item){
|
||||||
|
$image->text($item['product_name'], 229, 1530 + ($key+1) * 100, function ($font) use($fontPath) {
|
||||||
|
$font->file($fontPath);
|
||||||
|
$font->size(60);
|
||||||
|
$font->align('left');
|
||||||
|
});
|
||||||
|
|
||||||
|
$image->text("用量:" . $item['single_unit'] . " " . $item['frequency_use'], 229, 1530 + ($key+1) * 100, function ($font) use($fontPath) {
|
||||||
|
$font->file($fontPath);
|
||||||
|
$font->size(60);
|
||||||
|
$font->align('left');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 将处理后的图片重新保存到其他路径
|
||||||
|
$image->save('./runtime/2.jpg');
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -358,15 +358,5 @@ class UserController extends AbstractController
|
|||||||
// $result = $RecentContact->getRecentContactPage();
|
// $result = $RecentContact->getRecentContactPage();
|
||||||
|
|
||||||
|
|
||||||
$ca = new Ca();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 添加签章配置(首次)
|
|
||||||
|
|
||||||
dump($result);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -48,7 +48,7 @@ class PatientFamilyService extends BaseService
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增家庭成员-cuowu
|
* 新增家庭成员
|
||||||
* @return array
|
* @return array
|
||||||
* @throws GuzzleException
|
* @throws GuzzleException
|
||||||
*/
|
*/
|
||||||
@ -356,6 +356,7 @@ class PatientFamilyService extends BaseService
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 检测省市区
|
// 检测省市区
|
||||||
|
if (isset($request_params['province_id']) && isset($request_params['city_id']) && isset($request_params['county_id'])){
|
||||||
if ($request_params['province_id'] != $patient_family['province_id'] || $request_params['city_id'] != $patient_family['city_id'] || $request_params['county_id'] != $patient_family['county_id']){
|
if ($request_params['province_id'] != $patient_family['province_id'] || $request_params['city_id'] != $patient_family['city_id'] || $request_params['county_id'] != $patient_family['county_id']){
|
||||||
$areaService = new AreaService();
|
$areaService = new AreaService();
|
||||||
|
|
||||||
@ -366,6 +367,7 @@ class PatientFamilyService extends BaseService
|
|||||||
|
|
||||||
$area = $areaService->getAreaById($request_params['province_id'],$request_params['city_id'],$request_params['county_id']);
|
$area = $areaService->getAreaById($request_params['province_id'],$request_params['city_id'],$request_params['county_id']);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 检测证件号是否修改
|
// 检测证件号是否修改
|
||||||
if ($patient_family['id_number'] != $request_params['id_number'] || $patient_family['card_name'] != $request_params['card_name']){
|
if ($patient_family['id_number'] != $request_params['id_number'] || $patient_family['card_name'] != $request_params['card_name']){
|
||||||
@ -551,52 +553,68 @@ class PatientFamilyService extends BaseService
|
|||||||
|
|
||||||
// 修改
|
// 修改
|
||||||
$data = array();
|
$data = array();
|
||||||
|
if (isset($request_params['is_allergy_history'])){
|
||||||
if ($request_params['is_allergy_history'] != $patient_family_personal['is_allergy_history']){
|
if ($request_params['is_allergy_history'] != $patient_family_personal['is_allergy_history']){
|
||||||
// 是否存在过敏史(0:否 1:是)
|
// 是否存在过敏史(0:否 1:是)
|
||||||
$data['is_allergy_history'] = $request_params['is_allergy_history'];
|
$data['is_allergy_history'] = $request_params['is_allergy_history'];
|
||||||
$data['allergy_history'] = $request_params['allergy_history'];
|
$data['allergy_history'] = $request_params['allergy_history'];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($request_params['is_family_history'])){
|
||||||
if ($request_params['is_family_history'] != $patient_family_personal['is_family_history']){
|
if ($request_params['is_family_history'] != $patient_family_personal['is_family_history']){
|
||||||
// 是否存在家族病史(0:否 1:是)
|
// 是否存在家族病史(0:否 1:是)
|
||||||
$data['is_family_history'] = $request_params['is_family_history'];
|
$data['is_family_history'] = $request_params['is_family_history'];
|
||||||
$data['family_history'] = $request_params['family_history'];
|
$data['family_history'] = $request_params['family_history'];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($request_params['is_pregnant'])){
|
||||||
if ($request_params['is_pregnant'] != $patient_family_personal['is_pregnant']){
|
if ($request_params['is_pregnant'] != $patient_family_personal['is_pregnant']){
|
||||||
// 是否备孕、妊娠、哺乳期(0:否 1:是)
|
// 是否备孕、妊娠、哺乳期(0:否 1:是)
|
||||||
$data['is_pregnant'] = $request_params['is_pregnant'];
|
$data['is_pregnant'] = $request_params['is_pregnant'];
|
||||||
$data['pregnant'] = $request_params['pregnant'];
|
$data['pregnant'] = $request_params['pregnant'];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($request_params['is_operation'])){
|
||||||
if ($request_params['is_operation'] != $patient_family_personal['is_operation']){
|
if ($request_params['is_operation'] != $patient_family_personal['is_operation']){
|
||||||
// 是否存在手术(0:否 1:是)
|
// 是否存在手术(0:否 1:是)
|
||||||
$data['is_operation'] = $request_params['is_operation'];
|
$data['is_operation'] = $request_params['is_operation'];
|
||||||
$data['operation'] = $request_params['operation'];
|
$data['operation'] = $request_params['operation'];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($request_params['drink_wine_status'])){
|
||||||
if ($request_params['drink_wine_status'] != $patient_family_personal['drink_wine_status']){
|
if ($request_params['drink_wine_status'] != $patient_family_personal['drink_wine_status']){
|
||||||
// 饮酒状态(1:从不 2:偶尔 3:经常 4:每天 5:已戒酒)
|
// 饮酒状态(1:从不 2:偶尔 3:经常 4:每天 5:已戒酒)
|
||||||
$data['drink_wine_status'] = $request_params['drink_wine_status'];
|
$data['drink_wine_status'] = $request_params['drink_wine_status'];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($request_params['smoke_status'])){
|
||||||
if ($request_params['smoke_status'] != $patient_family_personal['smoke_status']){
|
if ($request_params['smoke_status'] != $patient_family_personal['smoke_status']){
|
||||||
// 吸烟状态(1:从不 2:偶尔 3:经常 4:每天 5:已戒烟)
|
// 吸烟状态(1:从不 2:偶尔 3:经常 4:每天 5:已戒烟)
|
||||||
$data['smoke_status'] = $request_params['smoke_status'];
|
$data['smoke_status'] = $request_params['smoke_status'];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($request_params['chemical_compound_status'])){
|
||||||
if ($request_params['chemical_compound_status'] != $patient_family_personal['chemical_compound_status']){
|
if ($request_params['chemical_compound_status'] != $patient_family_personal['chemical_compound_status']){
|
||||||
// 化合物状态(1:从不 2:偶尔 3:经常 4:每天)
|
// 化合物状态(1:从不 2:偶尔 3:经常 4:每天)
|
||||||
$data['chemical_compound_status'] = $request_params['chemical_compound_status'];
|
$data['chemical_compound_status'] = $request_params['chemical_compound_status'];
|
||||||
$data['chemical_compound_describe'] = $request_params['chemical_compound_describe'];
|
$data['chemical_compound_describe'] = $request_params['chemical_compound_describe'];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($data)){
|
||||||
$data['updated_at'] = date('Y-m-d H:i:s', time());
|
$data['updated_at'] = date('Y-m-d H:i:s', time());
|
||||||
|
|
||||||
$params = array();
|
$params = array();
|
||||||
$params['family_personal_id'] = $patient_family_personal['family_personal_id'];
|
$params['family_personal_id'] = $patient_family_personal['family_personal_id'];
|
||||||
|
|
||||||
PatientFamilyPersonalModel::edit($params, $data);
|
PatientFamilyPersonalModel::edit($params, $data);
|
||||||
|
}
|
||||||
|
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -630,18 +648,36 @@ class PatientFamilyService extends BaseService
|
|||||||
$data = array();
|
$data = array();
|
||||||
$data['family_id'] = $request_params['family_id'];
|
$data['family_id'] = $request_params['family_id'];
|
||||||
$data['patient_id'] = $user_info['client_user_id'];
|
$data['patient_id'] = $user_info['client_user_id'];
|
||||||
|
if (isset($request_params['is_allergy_history'])){
|
||||||
$data['is_allergy_history'] = $request_params['is_allergy_history'];
|
$data['is_allergy_history'] = $request_params['is_allergy_history'];
|
||||||
$data['allergy_history'] = $request_params['allergy_history'];
|
$data['allergy_history'] = $request_params['allergy_history'] ?? "";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($request_params['is_family_history'])){
|
||||||
$data['is_family_history'] = $request_params['is_family_history'];
|
$data['is_family_history'] = $request_params['is_family_history'];
|
||||||
$data['family_history'] = $request_params['family_history'];
|
$data['family_history'] = $request_params['family_history'] ?? "";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($request_params['is_pregnant'])){
|
||||||
$data['is_pregnant'] = $request_params['is_pregnant'];
|
$data['is_pregnant'] = $request_params['is_pregnant'];
|
||||||
$data['pregnant'] = $request_params['pregnant'];
|
$data['pregnant'] = $request_params['pregnant'] ?? "";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($request_params['is_operation'])){
|
||||||
$data['is_operation'] = $request_params['is_operation'];
|
$data['is_operation'] = $request_params['is_operation'];
|
||||||
$data['operation'] = $request_params['operation'];
|
$data['operation'] = $request_params['operation'] ?? "";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($request_params['drink_wine_status'])){
|
||||||
$data['drink_wine_status'] = $request_params['drink_wine_status'];
|
$data['drink_wine_status'] = $request_params['drink_wine_status'];
|
||||||
$data['smoke_status'] = $request_params['smoke_status'];
|
$data['smoke_status'] = $request_params['smoke_status'] ?? "";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($request_params['chemical_compound_status'])){
|
||||||
$data['chemical_compound_status'] = $request_params['chemical_compound_status'];
|
$data['chemical_compound_status'] = $request_params['chemical_compound_status'];
|
||||||
$data['chemical_compound_describe'] = $request_params['chemical_compound_describe'];
|
$data['chemical_compound_describe'] = $request_params['chemical_compound_describe'];
|
||||||
|
}
|
||||||
|
|
||||||
$patient_family_personal = PatientFamilyPersonalModel::addPatientFamilyPersonal($data);
|
$patient_family_personal = PatientFamilyPersonalModel::addPatientFamilyPersonal($data);
|
||||||
if (empty($patient_family_personal)){
|
if (empty($patient_family_personal)){
|
||||||
return fail();
|
return fail();
|
||||||
@ -691,6 +727,7 @@ class PatientFamilyService extends BaseService
|
|||||||
}
|
}
|
||||||
|
|
||||||
$data = array();
|
$data = array();
|
||||||
|
if (isset($request_params['disease_class_id'])){
|
||||||
if ($request_params['disease_class_id'] != $patient_family_health['disease_class_id']){
|
if ($request_params['disease_class_id'] != $patient_family_health['disease_class_id']){
|
||||||
// 疾病分类id-系统
|
// 疾病分类id-系统
|
||||||
$data['disease_class_id'] = $request_params['disease_class_id'];
|
$data['disease_class_id'] = $request_params['disease_class_id'];
|
||||||
@ -705,25 +742,34 @@ class PatientFamilyService extends BaseService
|
|||||||
|
|
||||||
$data['disease_class_name'] = $disease_class['disease_class_name'];
|
$data['disease_class_name'] = $disease_class['disease_class_name'];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($request_params['diagnosis_date'])){
|
||||||
if ($request_params['diagnosis_date'] != $patient_family_health['diagnosis_date']){
|
if ($request_params['diagnosis_date'] != $patient_family_health['diagnosis_date']){
|
||||||
$data['diagnosis_date'] = $request_params['diagnosis_date'];
|
$data['diagnosis_date'] = $request_params['diagnosis_date'];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($request_params['diagnosis_hospital'])){
|
||||||
if ($request_params['diagnosis_hospital'] != $patient_family_health['diagnosis_hospital']){
|
if ($request_params['diagnosis_hospital'] != $patient_family_health['diagnosis_hospital']){
|
||||||
$data['diagnosis_hospital'] = $request_params['diagnosis_hospital'];
|
$data['diagnosis_hospital'] = $request_params['diagnosis_hospital'];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($request_params['drugs_name'])){
|
||||||
if ($request_params['drugs_name'] != $patient_family_health['drugs_name']){
|
if ($request_params['drugs_name'] != $patient_family_health['drugs_name']){
|
||||||
$data['drugs_name'] = $request_params['drugs_name'];
|
$data['drugs_name'] = $request_params['drugs_name'];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($data)){
|
||||||
$data['updated_at'] = date('Y-m-d H:i:s', time());
|
$data['updated_at'] = date('Y-m-d H:i:s', time());
|
||||||
|
|
||||||
$params = array();
|
$params = array();
|
||||||
$params['family_health_id'] = $patient_family_health['family_health_id'];
|
$params['family_health_id'] = $patient_family_health['family_health_id'];
|
||||||
|
|
||||||
PatientFamilyHealth::edit($params,$data);
|
PatientFamilyHealth::edit($params,$data);
|
||||||
|
}
|
||||||
|
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1351,7 +1351,7 @@ class UserDoctorService extends BaseService
|
|||||||
|
|
||||||
$oss = new Oss();
|
$oss = new Oss();
|
||||||
|
|
||||||
$filename = $user_doctor['doctor_id'] . '.' . 'jpg';
|
$filename = "applet/doctor/card/" . $user_doctor['doctor_id'] . '.' . 'jpg';
|
||||||
|
|
||||||
$qr_code = $oss->putObject($filename, $img_buffer);
|
$qr_code = $oss->putObject($filename, $img_buffer);
|
||||||
|
|
||||||
|
|||||||
@ -36,7 +36,10 @@
|
|||||||
"hyperf/redis": "~3.0.0",
|
"hyperf/redis": "~3.0.0",
|
||||||
"hyperf/snowflake": "^3.0",
|
"hyperf/snowflake": "^3.0",
|
||||||
"hyperf/validation": "^3.0",
|
"hyperf/validation": "^3.0",
|
||||||
"w7corp/easywechat": "^6.7"
|
"intervention/image": "^2.7",
|
||||||
|
"tecnickcom/tcpdf": "^6.6",
|
||||||
|
"w7corp/easywechat": "^6.7",
|
||||||
|
"ext-gd": "*"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"friendsofphp/php-cs-fixer": "^3.0",
|
"friendsofphp/php-cs-fixer": "^3.0",
|
||||||
|
|||||||
148
composer.lock
generated
148
composer.lock
generated
@ -4,7 +4,7 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "dd1e834ab0ebf2d88fbc1edb5950d65f",
|
"content-hash": "f11dd54f0558de3aed797460197d3986",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "adbario/php-dot-notation",
|
"name": "adbario/php-dot-notation",
|
||||||
@ -3005,6 +3005,85 @@
|
|||||||
],
|
],
|
||||||
"time": "2022-12-22T08:23:24+00:00"
|
"time": "2022-12-22T08:23:24+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "intervention/image",
|
||||||
|
"version": "2.7.2",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/Intervention/image.git",
|
||||||
|
"reference": "04be355f8d6734c826045d02a1079ad658322dad"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://mirrors.huaweicloud.com/repository/php/intervention/image/2.7.2/intervention-image-2.7.2.zip",
|
||||||
|
"reference": "04be355f8d6734c826045d02a1079ad658322dad",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"ext-fileinfo": "*",
|
||||||
|
"guzzlehttp/psr7": "~1.1 || ^2.0",
|
||||||
|
"php": ">=5.4.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"mockery/mockery": "~0.9.2",
|
||||||
|
"phpunit/phpunit": "^4.8 || ^5.7 || ^7.5.15"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"ext-gd": "to use GD library based image processing.",
|
||||||
|
"ext-imagick": "to use Imagick based image processing.",
|
||||||
|
"intervention/imagecache": "Caching extension for the Intervention Image library"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "2.4-dev"
|
||||||
|
},
|
||||||
|
"laravel": {
|
||||||
|
"providers": [
|
||||||
|
"Intervention\\Image\\ImageServiceProvider"
|
||||||
|
],
|
||||||
|
"aliases": {
|
||||||
|
"Image": "Intervention\\Image\\Facades\\Image"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Intervention\\Image\\": "src/Intervention/Image"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Oliver Vogel",
|
||||||
|
"email": "oliver@intervention.io",
|
||||||
|
"homepage": "https://intervention.io/"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Image handling and manipulation library with support for Laravel integration",
|
||||||
|
"homepage": "http://image.intervention.io/",
|
||||||
|
"keywords": [
|
||||||
|
"gd",
|
||||||
|
"image",
|
||||||
|
"imagick",
|
||||||
|
"laravel",
|
||||||
|
"thumbnail",
|
||||||
|
"watermark"
|
||||||
|
],
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://paypal.me/interventionio",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/Intervention",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2022-05-21T17:30:32+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "laminas/laminas-mime",
|
"name": "laminas/laminas-mime",
|
||||||
"version": "2.11.0",
|
"version": "2.11.0",
|
||||||
@ -6386,6 +6465,73 @@
|
|||||||
],
|
],
|
||||||
"time": "2022-12-22T17:53:58+00:00"
|
"time": "2022-12-22T17:53:58+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "tecnickcom/tcpdf",
|
||||||
|
"version": "6.6.2",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/tecnickcom/TCPDF.git",
|
||||||
|
"reference": "e3cffc9bcbc76e89e167e9eb0bbda0cab7518459"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://mirrors.huaweicloud.com/repository/php/tecnickcom/tcpdf/6.6.2/tecnickcom-tcpdf-6.6.2.zip",
|
||||||
|
"reference": "e3cffc9bcbc76e89e167e9eb0bbda0cab7518459",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=5.3.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"classmap": [
|
||||||
|
"config",
|
||||||
|
"include",
|
||||||
|
"tcpdf.php",
|
||||||
|
"tcpdf_parser.php",
|
||||||
|
"tcpdf_import.php",
|
||||||
|
"tcpdf_barcodes_1d.php",
|
||||||
|
"tcpdf_barcodes_2d.php",
|
||||||
|
"include/tcpdf_colors.php",
|
||||||
|
"include/tcpdf_filters.php",
|
||||||
|
"include/tcpdf_font_data.php",
|
||||||
|
"include/tcpdf_fonts.php",
|
||||||
|
"include/tcpdf_images.php",
|
||||||
|
"include/tcpdf_static.php",
|
||||||
|
"include/barcodes/datamatrix.php",
|
||||||
|
"include/barcodes/pdf417.php",
|
||||||
|
"include/barcodes/qrcode.php"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"license": [
|
||||||
|
"LGPL-3.0-only"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Nicola Asuni",
|
||||||
|
"email": "info@tecnick.com",
|
||||||
|
"role": "lead"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "TCPDF is a PHP class for generating PDF documents and barcodes.",
|
||||||
|
"homepage": "http://www.tcpdf.org/",
|
||||||
|
"keywords": [
|
||||||
|
"PDFD32000-2008",
|
||||||
|
"TCPDF",
|
||||||
|
"barcodes",
|
||||||
|
"datamatrix",
|
||||||
|
"pdf",
|
||||||
|
"pdf417",
|
||||||
|
"qrcode"
|
||||||
|
],
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://www.paypal.com/cgi-bin/webscr?cmd=_donations¤cy_code=GBP&business=paypal@tecnick.com&item_name=donation%20for%20tcpdf%20project",
|
||||||
|
"type": "custom"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2022-12-17T10:28:59+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "thenorthmemory/xml",
|
"name": "thenorthmemory/xml",
|
||||||
"version": "1.1.1",
|
"version": "1.1.1",
|
||||||
|
|||||||
@ -92,10 +92,9 @@ class Oss
|
|||||||
try {
|
try {
|
||||||
$ossClient = $this->createClient();
|
$ossClient = $this->createClient();
|
||||||
|
|
||||||
$object = "applet/doctor/card/".$filename;
|
$ossClient->putObject($this->config['bucket'], $filename, $content);
|
||||||
$ossClient->putObject($this->config['bucket'], $object, $content);
|
|
||||||
|
|
||||||
return $object;
|
return $filename;
|
||||||
}catch(\Exception $e) {
|
}catch(\Exception $e) {
|
||||||
throw new BusinessException($e->getMessage());
|
throw new BusinessException($e->getMessage());
|
||||||
}
|
}
|
||||||
@ -112,10 +111,6 @@ class Oss
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$ossClient = $this->createClient();
|
$ossClient = $this->createClient();
|
||||||
|
|
||||||
// 将图片缩放为固定宽高100 px后,再旋转90°。
|
|
||||||
|
|
||||||
|
|
||||||
$options = array(
|
$options = array(
|
||||||
OssClient::OSS_PROCESS => $style);
|
OssClient::OSS_PROCESS => $style);
|
||||||
|
|
||||||
@ -126,4 +121,19 @@ class Oss
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下载文件到内存
|
||||||
|
* @param string $filename
|
||||||
|
* @param string $style
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getObjectToRAM(string $filename): string
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$ossClient = $this->createClient();
|
||||||
|
return $ossClient->getObject($this->config['bucket'], $filename);
|
||||||
|
}catch(\Exception $e) {
|
||||||
|
throw new BusinessException($e->getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user