1
This commit is contained in:
parent
af3295eaa5
commit
751a87ab33
@ -1321,7 +1321,7 @@ class CallBackController extends AbstractController
|
|||||||
|
|
||||||
// 获取检测订单数据
|
// 获取检测订单数据
|
||||||
$params = array();
|
$params = array();
|
||||||
$params['detection_no'] = "D547725550262296576";
|
$params['detection_no'] = "D547790897904513024";
|
||||||
$order_detection = OrderDetection::getOne($params);
|
$order_detection = OrderDetection::getOne($params);
|
||||||
if (empty($order_detection)){
|
if (empty($order_detection)){
|
||||||
return $this->detectionResultFailReturn("非法订单");
|
return $this->detectionResultFailReturn("非法订单");
|
||||||
@ -1460,11 +1460,11 @@ class CallBackController extends AbstractController
|
|||||||
try {
|
try {
|
||||||
// 发送IM消息-检测报告结果-文字
|
// 发送IM消息-检测报告结果-文字
|
||||||
$imService->detectionTestReportStr(
|
$imService->detectionTestReportStr(
|
||||||
|
$order_detection,
|
||||||
$user_doctor['user_name'],
|
$user_doctor['user_name'],
|
||||||
$detection_project['detection_project_name'],
|
$detection_project['detection_project_name'],
|
||||||
$user_doctor['user_id'],
|
$user_doctor['user_id'],
|
||||||
$order_detection['user_id'],
|
$order_detection['user_id']
|
||||||
$order_detection_case['detection_disease_class_names']
|
|
||||||
);
|
);
|
||||||
|
|
||||||
// 患者-新报告生成通知
|
// 患者-新报告生成通知
|
||||||
|
|||||||
@ -10,8 +10,8 @@ use Hyperf\Database\Model\Collection;
|
|||||||
use Hyperf\Snowflake\Concern\Snowflake;
|
use Hyperf\Snowflake\Concern\Snowflake;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property int $gts_ccis_id 主键id
|
* @property int $detection_organ_id 主键id
|
||||||
* @property string $gts_ccis_name 检测机构名称
|
* @property string $detection_organ_name 检测机构名称
|
||||||
* @property int $status 状态(1:正常 2:删除)
|
* @property int $status 状态(1:正常 2:删除)
|
||||||
* @property \Carbon\Carbon $created_at 创建时间
|
* @property \Carbon\Carbon $created_at 创建时间
|
||||||
* @property \Carbon\Carbon $updated_at 修改时间
|
* @property \Carbon\Carbon $updated_at 修改时间
|
||||||
@ -28,9 +28,9 @@ class BasicDetectionOrgan extends Model
|
|||||||
/**
|
/**
|
||||||
* The attributes that are mass assignable.
|
* The attributes that are mass assignable.
|
||||||
*/
|
*/
|
||||||
protected array $fillable = ['gts_ccis_id', 'gts_ccis_name', 'status', 'created_at', 'updated_at'];
|
protected array $fillable = ['detection_organ_id', 'detection_organ_name', 'status', 'created_at', 'updated_at'];
|
||||||
|
|
||||||
protected string $primaryKey = "gts_ccis_id";
|
protected string $primaryKey = "detection_organ_id";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取信息-单条
|
* 获取信息-单条
|
||||||
|
|||||||
@ -669,6 +669,7 @@ class ImService extends BaseService
|
|||||||
* @param string $doctor_user_id 医生user_id
|
* @param string $doctor_user_id 医生user_id
|
||||||
* @param string $patient_user_id 患者user_id
|
* @param string $patient_user_id 患者user_id
|
||||||
* @param string $disease_class_names 疾病数据
|
* @param string $disease_class_names 疾病数据
|
||||||
|
* @param string $detection_project_name
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function detectionTestReport(array|object $order_detection,string $doctor_user_id, string $patient_user_id,string $disease_class_names,string $detection_project_name): void
|
public function detectionTestReport(array|object $order_detection,string $doctor_user_id, string $patient_user_id,string $disease_class_names,string $detection_project_name): void
|
||||||
@ -676,10 +677,11 @@ class ImService extends BaseService
|
|||||||
try {
|
try {
|
||||||
// 发送消息
|
// 发送消息
|
||||||
$cloud_custom_data = array();
|
$cloud_custom_data = array();
|
||||||
|
$cloud_custom_data['order_inquiry_id'] = $order_detection['order_inquiry_id'];
|
||||||
$cloud_custom_data['is_system'] = 1;
|
$cloud_custom_data['is_system'] = 1;
|
||||||
$cloud_custom_data['inquiry_type'] = 5; // 订单类型(1:专家问诊 2:快速问诊 3:公益问诊 4:问诊购药 5:检测)
|
$cloud_custom_data['inquiry_type'] = 5; // 订单类型(1:专家问诊 2:快速问诊 3:公益问诊 4:问诊购药 5:检测)
|
||||||
$cloud_custom_data['message_rounds'] = 0;
|
$cloud_custom_data['message_rounds'] = 0;
|
||||||
$cloud_custom_data['order_no'] = $order_detection['order_no'];
|
$cloud_custom_data['order_no'] = $order_detection['detection_no'];
|
||||||
$cloud_custom_data['patient_family_data']['patient_name'] = $order_detection['patient_name'];
|
$cloud_custom_data['patient_family_data']['patient_name'] = $order_detection['patient_name'];
|
||||||
$cloud_custom_data['patient_family_data']['patient_sex'] = $order_detection['patient_sex'];
|
$cloud_custom_data['patient_family_data']['patient_sex'] = $order_detection['patient_sex'];
|
||||||
$cloud_custom_data['patient_family_data']['patient_age'] = $order_detection['patient_age'];
|
$cloud_custom_data['patient_family_data']['patient_age'] = $order_detection['patient_age'];
|
||||||
@ -689,7 +691,7 @@ class ImService extends BaseService
|
|||||||
$message_content_data['message_type'] = 10;
|
$message_content_data['message_type'] = 10;
|
||||||
$message_content_data['title'] = $detection_project_name;
|
$message_content_data['title'] = $detection_project_name;
|
||||||
$message_content_data['desc'] = "";
|
$message_content_data['desc'] = "";
|
||||||
$message_content_data['data']['order_no'] = (string)$order_detection['order_no'];
|
$message_content_data['data']['order_no'] = (string)$order_detection['detection_no'];
|
||||||
$message_content_data['data']['disease_class_names'] = $disease_class_names;
|
$message_content_data['data']['disease_class_names'] = $disease_class_names;
|
||||||
$message_content_data['data']['message_path'] = "/pages/checkOrderDetail/checkOrderDetail?order_detection_id=" . $order_detection['detection_no']; // 跳转地址(小程序内页)
|
$message_content_data['data']['message_path'] = "/pages/checkOrderDetail/checkOrderDetail?order_detection_id=" . $order_detection['detection_no']; // 跳转地址(小程序内页)
|
||||||
$message_content = [
|
$message_content = [
|
||||||
@ -698,33 +700,41 @@ class ImService extends BaseService
|
|||||||
|
|
||||||
$this->sendMessage($patient_user_id,$doctor_user_id, $message_content, "TIMCustomElem", $cloud_custom_data);
|
$this->sendMessage($patient_user_id,$doctor_user_id, $message_content, "TIMCustomElem", $cloud_custom_data);
|
||||||
|
|
||||||
} catch (\Exception $e) {
|
} catch (\Throwable $e) {
|
||||||
throw new BusinessException($e->getMessage());
|
throw new BusinessException($e->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 糖组检测报告-文字
|
* 糖组检测报告-文字
|
||||||
* @param array|object $doctor_name 医生名称
|
* @param array|object $order_detection
|
||||||
|
* @param string $doctor_name 医生名称
|
||||||
* @param string $detection_project_name 检测项目名称
|
* @param string $detection_project_name 检测项目名称
|
||||||
* @param string $doctor_user_id 医生user_id
|
* @param string $doctor_user_id 医生user_id
|
||||||
* @param string $patient_user_id 患者user_id
|
* @param string $patient_user_id 患者user_id
|
||||||
* @param string $disease_class_names 疾病数据
|
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function detectionTestReportStr(string $doctor_name,string $detection_project_name,string $doctor_user_id, string $patient_user_id,string $disease_class_names): void
|
public function detectionTestReportStr(array|object $order_detection,string $doctor_name,string $detection_project_name,string $doctor_user_id, string $patient_user_id): void
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
// 消息内容
|
// 消息内容
|
||||||
$message_content_data = array();
|
$cloud_custom_data = array();
|
||||||
$message_content_data['Text'] = $doctor_name . "医生您好,我在您那里开具的【" . $detection_project_name . "】服务,报告单已出,请您查看报告并详细的做一下解读,谢谢医生。";
|
$cloud_custom_data['order_inquiry_id'] = $order_detection['order_inquiry_id'];
|
||||||
|
$cloud_custom_data['is_system'] = 1;
|
||||||
|
$cloud_custom_data['inquiry_type'] = 5; // 订单类型(1:专家问诊 2:快速问诊 3:公益问诊 4:问诊购药 5:检测)
|
||||||
|
$cloud_custom_data['message_rounds'] = 1;
|
||||||
|
$cloud_custom_data['order_no'] = $order_detection['detection_no'];
|
||||||
|
$cloud_custom_data['patient_family_data']['patient_name'] = $order_detection['patient_name'];
|
||||||
|
$cloud_custom_data['patient_family_data']['patient_sex'] = $order_detection['patient_sex'];
|
||||||
|
$cloud_custom_data['patient_family_data']['patient_age'] = $order_detection['patient_age'];
|
||||||
|
|
||||||
$message_content = [
|
$message_content = [
|
||||||
'Data' => json_encode($message_content_data, JSON_UNESCAPED_UNICODE),
|
'Text' => $doctor_name . "医生您好,我在您那里开具的【" . $detection_project_name . "】服务,报告单已出,请您查看报告并详细的做一下解读,谢谢医生。",
|
||||||
];
|
];
|
||||||
|
|
||||||
$this->sendMessage($patient_user_id,$doctor_user_id, $message_content, "TIMTextElem", []);
|
$this->sendMessage($patient_user_id,$doctor_user_id, $message_content, "TIMTextElem", $cloud_custom_data);
|
||||||
|
|
||||||
} catch (\Exception $e) {
|
} catch (\Throwable $e) {
|
||||||
throw new BusinessException($e->getMessage());
|
throw new BusinessException($e->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -95,6 +95,7 @@ class Base
|
|||||||
|
|
||||||
$content = json_decode($response->getBody(),true);
|
$content = json_decode($response->getBody(),true);
|
||||||
|
|
||||||
|
dump($content);
|
||||||
if (empty($content)){
|
if (empty($content)){
|
||||||
throw new BusinessException("请求失败");
|
throw new BusinessException("请求失败");
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user