新增处方平台推送数据

This commit is contained in:
2023-05-08 17:44:31 +08:00
parent bb4b7295cf
commit d09f53fd49
9 changed files with 1186 additions and 30 deletions
+6 -22
View File
@@ -67,10 +67,10 @@ class TestController extends AbstractController
// $this->test_5();
// $this->test_1();
// $this->test_11();
// $this->test_12();
$this->test_12();
// $this->test_13();
// $this->test_14();
$this->test_15();
// $this->test_15();
}
@@ -93,7 +93,7 @@ class TestController extends AbstractController
$params['order_prescription_id'] = $order_prescription_id;
$order_prescription_product = OrderPrescriptionProduct::getList($params);
if (empty($order_prescription_product)) {
throw new BusinessException("处方药品数据错误");
throw new BusinessException("处方药品数据错误1");
}
// 获取问诊订单数据
@@ -101,7 +101,7 @@ class TestController extends AbstractController
$params['order_inquiry_id'] = $order_prescription['order_inquiry_id'];
$order_inquiry = OrderInquiry::getOne($params);
if (empty($order_inquiry)) {
throw new BusinessException("处方药品数据错误");
throw new BusinessException("处方药品数据错误2");
}
// 获取商品订单数据
@@ -109,7 +109,7 @@ class TestController extends AbstractController
$params['order_inquiry_id'] = $order_prescription['order_inquiry_id'];
$order_product = OrderProduct::getOne($params);
if (empty($order_product)) {
throw new BusinessException("处方药品数据错误");
throw new BusinessException("处方药品数据错误3");
}
// 获取商品订单数据
@@ -117,7 +117,7 @@ class TestController extends AbstractController
$params['order_inquiry_id'] = $order_prescription['order_inquiry_id'];
$order_product_item = OrderProductItem::getList($params);
if (empty($order_product_item)) {
throw new BusinessException("处方药品数据错误");
throw new BusinessException("处方药品数据错误4");
}
$OrderPrescriptionService = new OrderPrescriptionService();
@@ -327,22 +327,6 @@ class TestController extends AbstractController
}
public function test_15(){
// 短信
$data = array();
$data['template_code'] = "SMS_271540920";
$data['scene_desc'] = "处方审核通过";
$data['phone'] = "18221234167";
$template_param = array();
$template_param['name'] = "吴医生";
$data['template_param'] = $template_param;
$message = new SendSmsMessageProducer($data);
$producer = ApplicationContext::getContainer()->get(Producer::class);
$result = $producer->produce($message);
if (!$result) {
Log::getInstance("MessagePush")->error("错误:加入推送队列失败" . json_encode($data,JSON_UNESCAPED_UNICODE));
}
}
}