diff --git a/app/Services/CaService.php b/app/Services/CaService.php index 39d3f3a..9f7434a 100644 --- a/app/Services/CaService.php +++ b/app/Services/CaService.php @@ -76,7 +76,7 @@ class CaService extends BaseService $this->hospital_entity_id = "5345345461"; } - if (empty($user_sign_image_path) || empty($user_entity_id)) { + if (empty($user_sign_image_path) || empty($this->user_entity_id)) { throw new BusinessException("无签名图片/用户唯一标识"); } @@ -448,18 +448,24 @@ class CaService extends BaseService $lly = "210"; // 左边底部Y坐标 控制上下(越小越下) $urx = "520"; // 右边上部x坐标 $ury = "360"; // 右边上部y坐标 + + $entity_id = $this->hospital_entity_id; } elseif ($type == 2){ // 医生端 $llx = "120"; // 左边底部X坐标 $lly = "190"; // 左边底部Y坐标 $urx = "190"; // 右边上部x坐标 $ury = "140"; // 右边上部y坐标 + + $entity_id = $this->user_entity_id; }else{ // 药师端 $llx = "350"; // 左边底部X坐标 $lly = "190"; // 左边底部Y坐标 $urx = "440"; // 右边上部x坐标 $ury = "140"; // 右边上部y坐标 + + $entity_id = $this->user_entity_id; } $sign_param = [ @@ -485,7 +491,7 @@ class CaService extends BaseService $data = array(); $data['sign_param'] = json_encode($sign_param); $data['pdf_file'] = $pdf_file; - $sign_pdf_result = $CaOnline->addSignPdf($this->user_entity_id, $data); + $sign_pdf_result = $CaOnline->addSignPdf($entity_id, $data); if (empty($sign_pdf_result[0]['fileId'])) { throw new BusinessException("处方签章失败"); }