修改上报商品订单command
This commit is contained in:
parent
a4d2cc47ce
commit
21f2cf12da
@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Command;
|
||||
|
||||
use App\Exception\BusinessException;
|
||||
use App\Model\OrderPrescription;
|
||||
use App\Model\OrderProduct;
|
||||
use App\Model\UserPatient;
|
||||
@ -55,6 +56,20 @@ class ReportPreProductOrderCommand extends HyperfCommand
|
||||
foreach ($order_product_ids as $item){
|
||||
$this->line("本次请求订单号:" . $item['order_product_id']);
|
||||
|
||||
// 获取商品订单数据
|
||||
$params = array();
|
||||
$params['order_product_id'] = $item['order_product_id'];
|
||||
$order_product = OrderProduct::getOne($params);
|
||||
if (empty($order_product)) {
|
||||
$this->line("结束,商品订单数据错误");
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($order_product['report_pre_status'] == 1){
|
||||
$this->line("结束,订单已上报");
|
||||
continue;
|
||||
}
|
||||
|
||||
Db::beginTransaction();
|
||||
|
||||
try {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user