新增消息推送,新增处方平台查询处方状态

This commit is contained in:
2023-04-04 19:54:33 +08:00
parent ecbd558c22
commit 4bd15135c7
4 changed files with 99 additions and 71 deletions
+29
View File
@@ -202,6 +202,35 @@ class Prescription
}
}
/**
* 获取处方订单
* @param string $order_product_no 商品订单号
* @param string $prescription_code 处方单号
* @return array
*/
public function getPrescription(string $order_product_no,string $prescription_code): array
{
$option = [
"json" => [
"terminalCode" => "ZD-10003",
"orderNo" => $order_product_no,
"prescriptionNo" => $prescription_code,
]
];
try {
$response = $this->httpRequest($this->api_url . $this->version . '/prescription/searchPresStatus', $option);
if (empty($response)){
// 返回值错误为空
throw new BusinessException(HttpEnumCode::getMessage(HttpEnumCode::SERVER_ERROR));
}
return $response;
} catch (GuzzleException $e) {
throw new BusinessException($e->getMessage());
}
}
/**
* 请求封装
* @param string $path