From b961436de3fd6c0e04f27cb3927035a98f94728b Mon Sep 17 00:00:00 2001 From: wucongxing8150 <815046773@qq.com> Date: Tue, 10 Dec 2024 11:49:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E9=99=A4=E4=BA=86ca=E6=89=93=E5=8D=B0?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E6=94=B9=E4=BA=86=E4=B8=8A=E6=8A=A5=E5=A4=84?= =?UTF-8?q?=E6=96=B9=E8=AE=A2=E5=8D=95=E7=9A=84=E6=95=B0=E7=BB=84=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Controller/TestController.php | 42 ++++++++++++----------- app/Services/OrderPrescriptionService.php | 10 +++--- extend/Ca/Ca.php | 1 - 3 files changed, 27 insertions(+), 26 deletions(-) diff --git a/app/Controller/TestController.php b/app/Controller/TestController.php index 09aa401..a752847 100644 --- a/app/Controller/TestController.php +++ b/app/Controller/TestController.php @@ -327,7 +327,7 @@ class TestController extends AbstractController // } // dump(111); -// // 测试药师 + // 测试药师 // $data = array(); // $data['user_id'] = "534534546"; // $data['mobile'] = "18812345678"; @@ -351,25 +351,27 @@ class TestController extends AbstractController // } // 测试医院 - $data = array(); - $data['user_id'] = "5345345461"; - $data['mobile'] = "18221234167"; - $data['org_name'] = "成都金牛欣欣相照互联网医院有限公司"; - $data['org_number'] = "91510106MABTJY4K9R"; - - $result = $CaOnline->getCloudCert($data,'Organizational'); - - $data = array(); - $data['is_system'] = 1; - $data['type'] = 2; - $data['cert_base64'] = $result['certBase64']; - $data['cert_chain_p7'] = $result['certP7']; - $data['cert_serial_number'] = $result['certSerialnumber']; - $data['ca_pin'] = "5345345461"; - $doctor_pharmacist_cert = UserCaCert::addUserCaCert($data); - if (empty($doctor_pharmacist_cert)){ - return fail(); - } +// $data = array(); +// $data['user_id'] = "5345345461"; +// $data['mobile'] = "18221234167"; +// $data['card_name'] = "吴从兴"; +// $data['card_num'] = "372929199610075412"; +// $data['org_name'] = "成都金牛欣欣相照互联网医院有限公司"; +// $data['org_number'] = "91510106MABTJY4K9R"; +// +// $result = $CaOnline->getCloudCert($data,'Organizational'); +// +// $data = array(); +// $data['is_system'] = 1; +// $data['type'] = 2; +// $data['cert_base64'] = $result['certBase64']; +// $data['cert_chain_p7'] = $result['certP7']; +// $data['cert_serial_number'] = $result['certSerialnumber']; +// $data['ca_pin'] = "5345345461"; +// $doctor_pharmacist_cert = UserCaCert::addUserCaCert($data); +// if (empty($doctor_pharmacist_cert)){ +// return fail(); +// } return 111; } diff --git a/app/Services/OrderPrescriptionService.php b/app/Services/OrderPrescriptionService.php index 19ccc85..d21c7c9 100644 --- a/app/Services/OrderPrescriptionService.php +++ b/app/Services/OrderPrescriptionService.php @@ -332,7 +332,7 @@ class OrderPrescriptionService extends BaseService $params['coupon_id'] = $user_coupon['coupon_id']; $coupon = Coupon::getOne($params); if (!empty($coupon)){ - $product_coupons = array_push($product_coupons,$coupon->toArray()); + $product_coupons[] = $coupon->toArray(); } } } @@ -467,7 +467,7 @@ class OrderPrescriptionService extends BaseService $arg['presList'][0]['orderDrugList'][$key]['price'] = $product['product_price']; // 药品单价 $arg['presList'][0]['orderDrugList'][$key]['drugCount'] = $item['amount']; // 药品数量 $arg['presList'][0]['orderDrugList'][$key]['packingUnit'] = $product['packaging_unit']; // 药品单位 - $arg['presList'][0]['orderDrugList'][$key]['actualSellingPrice'] = $product['actual_product_price']; // 药品实际销售单价 + $arg['presList'][0]['orderDrugList'][$key]['actualSellingPrice'] = $item['actual_product_price']; // 药品实际销售单价 } // 处理上报处方平台药品优惠券相关数据 @@ -526,11 +526,11 @@ class OrderPrescriptionService extends BaseService /** * 处理上报处方平台药品优惠券相关数据 * @param array $product_coupons 药品订单优惠券,为coupon数据 - * @param array $order_product_item 药品订单明细 + * @param array|object $order_product_item 药品订单明细 * @param string $orderNo 药品订单编号 * @return array */ - public function handleReportPrescriptionProductCouponData(array $product_coupons,array $order_product_item,string $orderNo): array + public function handleReportPrescriptionProductCouponData(array $product_coupons,array|object $order_product_item,string $orderNo): array { $promotion = array(); @@ -547,7 +547,7 @@ class OrderPrescriptionService extends BaseService $result["amount"] = $product_coupon["coupon_price"]; // 优惠金额 $result["count"] = 1; - $promotion = array_push($promotion,$result); + $promotion[] = $result; } if ($product_coupon["application_scope"] == 5){ diff --git a/extend/Ca/Ca.php b/extend/Ca/Ca.php index e621b5c..851ebc9 100644 --- a/extend/Ca/Ca.php +++ b/extend/Ca/Ca.php @@ -366,7 +366,6 @@ abstract class Ca throw new BusinessException($response->getBody()->getContents()); } $body = json_decode($response->getBody(), true); - dump($body); if (empty($body)) { // 返回值为空 throw new BusinessException(HttpEnumCode::getMessage(HttpEnumCode::SERVER_ERROR));