修改物流
This commit is contained in:
@@ -6,6 +6,7 @@ use App\Amqp\Producer\AssignDoctorDelayDirectProducer;
|
||||
use App\Amqp\Producer\CancelUnpayOrdersDelayDirectProducer;
|
||||
use App\Constants\DoctorTitleCode;
|
||||
use App\Constants\HttpEnumCode;
|
||||
use App\Model\BasicLogisticsCompany;
|
||||
use App\Model\Hospital;
|
||||
use App\Model\OrderInquiry;
|
||||
use App\Model\OrderInquiryCase;
|
||||
@@ -1211,20 +1212,27 @@ class PatientOrderService extends BaseService
|
||||
$params['order_product_id'] = $order_product_id;
|
||||
$order_product_logistics = OrderProductLogistic::getOne($params);
|
||||
if (empty($order_product_logistics)){
|
||||
$logistics = array();
|
||||
$logistics['logistics_no'] = $order_product['logistics_no'] ?: "";
|
||||
if (!empty($order_product['logistics_no']) && !empty($order_product['logistics_company_code'])){
|
||||
// 获取快递公司名称
|
||||
$params = array();
|
||||
$params['company_code'] = $order_product['logistics_company_code'];
|
||||
$params['company_type'] = 1;
|
||||
$basic_logistics_company = BasicLogisticsCompany::getOne($params);
|
||||
if (!empty($basic_logistics_company)){
|
||||
$logistics = array();
|
||||
$logistics['order_product_id'] = $order_product_id;
|
||||
$logistics['company_name'] = $basic_logistics_company['company_name'];
|
||||
$logistics['company_code'] = $order_product['logistics_company_code'];
|
||||
$logistics['logistics_no'] = $order_product['logistics_no'];
|
||||
$result['logistics'] = $logistics;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
$order_product_logistics = $order_product_logistics->toArray();
|
||||
|
||||
// 获取快递公司名称
|
||||
|
||||
|
||||
return success($result);
|
||||
$order_product_logistics['logistics_content'] = json_decode($order_product_logistics['logistics_content'],true);
|
||||
$result['logistics'] = $order_product_logistics;
|
||||
}
|
||||
|
||||
$order_product_logistics = $order_product_logistics->toArray();
|
||||
|
||||
$order_product_logistics['logistics_content'] = json_decode($order_product_logistics['logistics_content'],true);
|
||||
$result['logistics'] = $order_product_logistics;
|
||||
|
||||
return success($result);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user