diff --git a/app/Services/OrderPrescriptionService.php b/app/Services/OrderPrescriptionService.php index 05a9a53..779a345 100644 --- a/app/Services/OrderPrescriptionService.php +++ b/app/Services/OrderPrescriptionService.php @@ -455,7 +455,7 @@ class OrderPrescriptionService extends BaseService $arg['presList'][0]['drugList'][$key]['singleDosageUnit'] = "片"; // 单次用量单位 $arg['presList'][0]['drugList'][$key]['useName'] = $product['single_use']; // 用法名称 $arg['presList'][0]['drugList'][$key]['frequencyName'] = $product['frequency_use']; // 频次名称 - $arg['presList'][0]['drugList'][$key]['useDays'] = $product['available_days']; // 使用天数 + $arg['presList'][0]['drugList'][$key]['useDays'] = $product['available_days'] ? $product['available_days'] * $item['amount'] : 7; // 使用天数 $arg['presList'][0]['orderDrugList'][$key]['drugCode'] = $product['product_platform_code']; // 药品编码 $arg['presList'][0]['orderDrugList'][$key]['approvalNumber'] = $product['license_number']; // 批准文号 diff --git a/extend/Prescription/Prescription.php b/extend/Prescription/Prescription.php index 3b9fe2c..ed5ed71 100644 --- a/extend/Prescription/Prescription.php +++ b/extend/Prescription/Prescription.php @@ -169,8 +169,8 @@ class Prescription $response = $this->httpRequest($this->api_url . $this->version . '/pharmacy/transportationExpenses', $option); if (empty($response['data'])){ // 返回值为空 - if (!empty($response['message'])){ - throw new BusinessException($response['message']); + if (!empty($response['resultDesc'])){ + throw new BusinessException($response['resultDesc']); } throw new BusinessException(HttpEnumCode::getMessage(HttpEnumCode::SERVER_ERROR)); }