From 2dfd4371365221dbe0bd1a59fdcae93f8b37f447 Mon Sep 17 00:00:00 2001 From: lcc <1127794702@qq.com> Date: Mon, 17 Jun 2024 17:59:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AE=A2=E5=8D=95=E5=9B=BE?= =?UTF-8?q?=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/controllers/wxapp/licheb/Cusorder.php | 2 +- api/controllers/wxapp/licheb/Cusorderdata.php | 8 ++++- .../libraries/receiver/Order_datas_entity.php | 34 +++++++++++-------- 3 files changed, 28 insertions(+), 16 deletions(-) diff --git a/api/controllers/wxapp/licheb/Cusorder.php b/api/controllers/wxapp/licheb/Cusorder.php index 1cb6069d..75638a9d 100644 --- a/api/controllers/wxapp/licheb/Cusorder.php +++ b/api/controllers/wxapp/licheb/Cusorder.php @@ -393,7 +393,7 @@ class Cusorder extends Wxapp $brand_name = isset($brands[$val['brand_id']]) ? $brands[$val['brand_id']][0]['name'] : ''; $serie_name = isset($series[$val['series_id']]) ? $series[$val['series_id']][0]['name'] : ''; $car_name = isset($cars[$val['car_id']]) ? $cars[$val['car_id']][0]['name'] : ''; - $img_status = $this->order_datas_entity->data_status($order_datas[$val['id']][0]); + $img_status = $this->order_datas_entity->data_status($order_datas[$val['id']][0],$val['status']); $title = "{$brand_name}-{$serie_name}"; $o_data_1 = [ diff --git a/api/controllers/wxapp/licheb/Cusorderdata.php b/api/controllers/wxapp/licheb/Cusorderdata.php index c01ebaa3..d637b6c9 100644 --- a/api/controllers/wxapp/licheb/Cusorderdata.php +++ b/api/controllers/wxapp/licheb/Cusorderdata.php @@ -32,6 +32,7 @@ class Cusorderdata extends Wxapp $row = $this->orders_model->get(['id' => $id]); $data = []; $data['img_status'] = 1; + $data['order_status'] = intval($row['status']); $row_data = $this->receiver_order_datas_model->get(['o_id' => $id]); $cardidb = $cardida = $business_licence = $car_img = []; if ($row_data['car_img']) { @@ -225,7 +226,12 @@ class Cusorderdata extends Wxapp $img = $car_img; $result = $this->tcorc->VehicleLicense(build_qiniu_image_url($car_img)); if (!$result['code']) { - throw new Exception('行驶证识别失败,请重新上传', ERR_PARAMS_ERROR); +// throw new Exception('行驶证识别失败,请重新上传', ERR_PARAMS_ERROR); + $res_data['code'] = API_CODE_ORC_FAIL; + $res_data['data'] = [ + ['car_img' => false, 'errmsg' => '行驶证识别失败,请重新上传'], + ]; + return $res_data; } $jsondata['car_info'] = $result['data']['FrontInfo']; $update['jsondata'] = json_encode($jsondata, JSON_UNESCAPED_UNICODE); diff --git a/common/libraries/receiver/Order_datas_entity.php b/common/libraries/receiver/Order_datas_entity.php index 68bb29ee..69a1035e 100644 --- a/common/libraries/receiver/Order_datas_entity.php +++ b/common/libraries/receiver/Order_datas_entity.php @@ -11,7 +11,7 @@ class Order_datas_entity private $ci; const COLOR_UN_UPLOAD = '#c1b8b9'; //未传 - const COLOR_IS_UPLOAD = '#fd9737'; //已传 + const COLOR_IS_UPLOAD = '#ff0000'; //已传 const COLOR_UN_CHECK = '#f9394d'; //未通过 const COLOR_CHECK = '#36afa2'; //通过 @@ -34,24 +34,30 @@ class Order_datas_entity return $row; } - public function data_status($o_data) + public function data_status($o_data, $order_status) { $result = [ - 'contract_img' => ['text' => '未传', 'type' => 1, 'color' => self::COLOR_UN_UPLOAD], //合同图片 - 'pay_img' => ['text' => '未传', 'type' => 1, 'color' => self::COLOR_UN_UPLOAD], //支付凭证 - 'cardida' => ['text' => '未传', 'type' => 2, 'color' => self::COLOR_UN_UPLOAD], //身份证 - 'business_licence' => ['text' => '未传', 'type' => 3, 'color' => self::COLOR_UN_UPLOAD], //营业执照 - 'equity_ck_img' => ['text' => '未传', 'type' => 4, 'color' => self::COLOR_UN_UPLOAD], //权益确认书 - 'bill_img' => ['text' => '未传', 'type' => 5, 'color' => self::COLOR_UN_UPLOAD], //发票 - 'delivery_ck_img' => ['text' => '未传', 'type' => 5, 'color' => self::COLOR_UN_UPLOAD], //交车确认图片 - 'car_img' => ['text' => '未传', 'type' => 5, 'color' => self::COLOR_UN_UPLOAD], //行驶证 - 'car_auth_img' => ['text' => '未传', 'type' => 5, 'color' => self::COLOR_UN_UPLOAD], //车机实名认证 - 'insurance_img' => ['text' => '未传', 'type' => 5, 'color' => self::COLOR_UN_UPLOAD], //交强险图片 + 'contract_img' => ['text' => '未传', 'type' => 0, 'color' => self::COLOR_UN_UPLOAD], //合同图片 + 'pay_img' => ['text' => '未传', 'type' => 0, 'color' => self::COLOR_UN_UPLOAD], //支付凭证 + 'cardida' => ['text' => '未传', 'type' => 0, 'color' => self::COLOR_UN_UPLOAD], //身份证 + 'business_licence' => ['text' => '未传', 'type' => 0, 'color' => self::COLOR_UN_UPLOAD], //营业执照 + 'equity_ck_img' => ['text' => '未传', 'type' => 0, 'color' => self::COLOR_UN_UPLOAD], //权益确认书 + 'bill_img' => ['text' => '未传', 'type' => 1, 'color' => self::COLOR_UN_UPLOAD], //发票 + 'delivery_ck_img' => ['text' => '未传', 'type' => 2, 'color' => self::COLOR_UN_UPLOAD], //交车确认图片 + 'car_img' => ['text' => '未传', 'type' => 2, 'color' => self::COLOR_UN_UPLOAD], //行驶证 + 'car_auth_img' => ['text' => '未传', 'type' => 2, 'color' => self::COLOR_UN_UPLOAD], //车机实名认证 + 'insurance_img' => ['text' => '未传', 'type' => 2, 'color' => self::COLOR_UN_UPLOAD], //交强险图片 ]; foreach ($result as $key => $item) { if ($o_data[$key]) { - $result[$key]['text'] = '已传'; - $result[$key]['color'] = self::COLOR_IS_UPLOAD; + if ($order_status > $item['type']) { + $result[$key]['text'] = '已审核'; + $result[$key]['color'] = self::COLOR_CHECK; + } else { + $result[$key]['text'] = '已传'; + $result[$key]['color'] = self::COLOR_IS_UPLOAD; + } + } } return $result;