1
This commit is contained in:
parent
84d1ebbc12
commit
45e8b8ae6b
@ -216,20 +216,56 @@ class TestController extends AbstractController
|
||||
"frequency_use" => "1天3次",
|
||||
"single_use" => "口服",
|
||||
"prescription_product_num" => "X1盒",
|
||||
]
|
||||
],
|
||||
[
|
||||
"product_name" => "感冒药3(50ml*10)",
|
||||
"single_unit" => "一次一包",
|
||||
"frequency_use" => "1天3次",
|
||||
"single_use" => "口服",
|
||||
"prescription_product_num" => "X1盒",
|
||||
],
|
||||
[
|
||||
"product_name" => "感冒药4(50ml*10)",
|
||||
"single_unit" => "一次一包",
|
||||
"frequency_use" => "1天3次",
|
||||
"single_use" => "口服",
|
||||
"prescription_product_num" => "X1盒",
|
||||
],
|
||||
[
|
||||
"product_name" => "感冒药5(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) {
|
||||
if ($key <= 2){
|
||||
$x_axis = 229;
|
||||
$y_axis = 1600 + $key * 350;
|
||||
}else{
|
||||
$x_axis = 1240;
|
||||
$y_axis = 1600 + ($key - 3) * 350;
|
||||
}
|
||||
|
||||
|
||||
$image->text($item['product_name'], $x_axis, $y_axis, function ($font) use($fontPath) {
|
||||
$font->file($fontPath);
|
||||
$font->size(60);
|
||||
$font->size(50);
|
||||
$font->align('left');
|
||||
});
|
||||
|
||||
$image->text("用量:" . $item['single_unit'] . " " . $item['frequency_use'], 229, 1530 + ($key+1) * 100, function ($font) use($fontPath) {
|
||||
$image->text("用量:" . $item['single_unit'] . " " . $item['frequency_use'], $x_axis, $y_axis+90, function ($font) use($fontPath) {
|
||||
$font->file($fontPath);
|
||||
$font->size(60);
|
||||
$font->size(50);
|
||||
$font->align('left');
|
||||
});
|
||||
|
||||
$image->text("用法:" . $item['single_use'], $x_axis, $y_axis+180, function ($font) use($fontPath) {
|
||||
$font->file($fontPath);
|
||||
$font->size(50);
|
||||
$font->align('left');
|
||||
});
|
||||
}
|
||||
|
||||
@ -389,6 +389,7 @@ class PatientFamilyService extends BaseService
|
||||
}
|
||||
|
||||
// 民族
|
||||
if (!empty($request_params['nation_id'])){
|
||||
if ($patient_family['nation_id'] != $request_params['nation_id']){
|
||||
$params = array();
|
||||
$params['nation_id'] = $request_params['nation_id'];
|
||||
@ -397,8 +398,11 @@ class PatientFamilyService extends BaseService
|
||||
return fail(HttpEnumCode::HTTP_ERROR,"民族选择错误");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 职业
|
||||
if (!empty($request_params['job_id'])){
|
||||
if ($patient_family['job_id'] != $request_params['job_id']){
|
||||
$params = array();
|
||||
$params['job_id'] = $request_params['job_id'];
|
||||
@ -407,6 +411,7 @@ class PatientFamilyService extends BaseService
|
||||
return fail(HttpEnumCode::HTTP_ERROR,"职位选择错误");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Db::beginTransaction();
|
||||
|
||||
@ -427,8 +432,9 @@ class PatientFamilyService extends BaseService
|
||||
$params['family_id'] = $family_id;
|
||||
|
||||
$data = array();
|
||||
if (isset($request_params['relation'])) {
|
||||
$data['relation'] = $request_params['relation'];
|
||||
$data['status'] = 1;
|
||||
}
|
||||
|
||||
if (isset($request_params['is_default'])) {
|
||||
if ($request_params['is_default'] != ""){
|
||||
@ -444,10 +450,12 @@ class PatientFamilyService extends BaseService
|
||||
$data['id_number_mask'] = Mask::maskIdCard($request_params['id_number']);
|
||||
}
|
||||
|
||||
if(isset($request_params['mobile'])){
|
||||
if ($patient_family['mobile'] != $request_params['mobile']) {
|
||||
$data['mobile'] = $request_params['mobile'];
|
||||
$data['mobile_mask'] = Mask::maskPhoneStr($request_params['mobile']);
|
||||
}
|
||||
}
|
||||
|
||||
$data['type'] = $request_params['type'];
|
||||
if (isset($sex)) {
|
||||
@ -475,30 +483,42 @@ class PatientFamilyService extends BaseService
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($request_params['height'])){
|
||||
if ($request_params['height'] != $patient_family['height']){
|
||||
$data['height'] = $request_params['height'];
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($request_params['weight'])){
|
||||
if ($request_params['weight'] != $patient_family['weight']){
|
||||
$data['weight'] = $request_params['weight'];
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($request_params['marital_status'])){
|
||||
if ($request_params['marital_status'] != $patient_family['marital_status']){
|
||||
$data['marital_status'] = $request_params['marital_status'];
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($request_params['nation_id'])){
|
||||
if ($request_params['nation_id'] != $patient_family['nation_id']){
|
||||
$data['nation_id'] = $request_params['nation_id'];
|
||||
$data['nation_name'] = $nation['nation_name'];
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($request_params['job_id'])){
|
||||
if ($request_params['job_id'] != $patient_family['job_id']){
|
||||
$data['job_id'] = $request_params['job_id'];
|
||||
$data['job_name'] = $job['job_name'];
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($data)){
|
||||
$data['updated_at'] = date('Y-m-d H:i:s', time());
|
||||
PatientFamilyModel::edit($params, $data);
|
||||
}
|
||||
|
||||
Db::commit();
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user