This commit is contained in:
wucongxing 2023-05-05 10:08:49 +08:00
parent 226e3530b6
commit 5cae0dab5a

View File

@ -39,13 +39,13 @@ class getPrescriptionOrderStatusCommand extends HyperfCommand
public function handle() public function handle()
{ {
$this->line("获取处方平台订单数据开始"); $this->line("开始");
try { try {
// 获取可查询商品订单 // 获取可查询商品订单
$order_product_ids = $this->getSearchableProductOrder(); $order_product_ids = $this->getSearchableProductOrder();
if (empty($order_product_ids)){ if (empty($order_product_ids)){
$this->line("获取处方平台订单数据结束,无可执行的商品订单"); $this->line("结束:无可执行的商品订单");
return; return;
} }
@ -60,7 +60,7 @@ class getPrescriptionOrderStatusCommand extends HyperfCommand
$order_prescription = OrderPrescription::getOne($params); $order_prescription = OrderPrescription::getOne($params);
if (empty($order_prescription)){ if (empty($order_prescription)){
Db::rollBack(); Db::rollBack();
$this->line("获取处方平台订单数据失败:无处方数据。"); $this->line("结束:无处方数据");
continue; continue;
} }
@ -68,19 +68,18 @@ class getPrescriptionOrderStatusCommand extends HyperfCommand
$Prescription = new Prescription(); $Prescription = new Prescription();
$result = $Prescription->getPrescription($item['order_product_no'],$order_prescription['prescription_code']); $result = $Prescription->getPrescription($item['order_product_no'],$order_prescription['prescription_code']);
Log::getInstance()->info("处方平台返回查询药品订单数据:",$result); $this->line("处方平台数据:" . json_encode($result,JSON_UNESCAPED_UNICODE));
$this->line("处方平台返回药品订单数据:" . json_encode($result,JSON_UNESCAPED_UNICODE));
if (!isset($result['status'])){ if (!isset($result['status'])){
Db::rollBack(); Db::rollBack();
$this->line("获取处方平台订单数据失败:处方平台返回数据错误"); $this->line("失败:处方平台返回数据错误");
continue; continue;
} }
if ($result['status'] == "CFD01"){ if ($result['status'] == "CFD01"){
// 正在处理中 // 正在处理中
Db::rollBack(); Db::rollBack();
$this->line("获取处方平台订单数据结束:处方平台正在处理中,无需处理。"); $this->line("结束:处方平台正在处理中,无需处理。");
continue; continue;
} }
@ -269,7 +268,6 @@ class getPrescriptionOrderStatusCommand extends HyperfCommand
return true; return true;
} }
/** /**
* 修改失败时药品订单数据 * 修改失败时药品订单数据
* @param array|object $order_product * @param array|object $order_product