Commit a55d86e9 by 朱继来

调整导出

parent b3206861
Showing with 8 additions and 3 deletions
...@@ -248,7 +248,7 @@ class OrderModel extends Model ...@@ -248,7 +248,7 @@ class OrderModel extends Model
->where(function ($query) use ($map) { ->where(function ($query) use ($map) {
// 自营其他业务类型 // 自营其他业务类型
if ($map['business_type'] != '') { if ($map['business_type'] != '') {
$query->where('oe.order_type', '=', 3)->whereIn('oe.business_type', explode(',', $map['business_type'])); $query->whereIn('oe.business_type', explode(',', $map['business_type']));
} }
}) })
->where(function ($query) use ($map) { ->where(function ($query) use ($map) {
...@@ -257,14 +257,19 @@ class OrderModel extends Model ...@@ -257,14 +257,19 @@ class OrderModel extends Model
$query->where('o.sale_type', '=', $map['sale_type']); $query->where('o.sale_type', '=', $map['sale_type']);
} }
}) })
->where('it.status', '<>', -1) ->where('it.status', 1)
->where('o.order_goods_type', '=', $map['order_goods_type']) ->where('o.order_goods_type', '=', $map['order_goods_type'])
->select('it.goods_id', 'it.goods_name', 'it.goods_number', 'it.goods_price', 'it.single_pre_price', 'it.brand_name', 'it.supplier_name', 'o.order_id', 'o.order_sn', 'o.order_type', 'o.order_pay_type', 'o.order_goods_type', 'o.order_source', 'o.create_time', 'o.status', 'o.order_amount', 'o.sale_type', 'o.currency', 'o.sale_id', 'o.cancel_reason', 'i.tax_title', 'i.inv_type', 'i.invoice_status', 'i.tax_title', 'i.company_address', 'i.company_phone', 'i.tax_no', 'i.bank_name', 'i.bank_account', 'a.consignee', 'a.address', 's.status as shipping_status', 'u.user_id', 'u.mobile', 'u.email', 'u.client_source', 'u.is_new', 'u.is_test', 'c.com_name', 'oe.send_remark', 'oe.is_new as is_new_order', 'oe.business_type', 'oe.jd_order_id', 'oe.exchange_rate') ->select('it.goods_id', 'it.goods_name', 'it.goods_number', 'it.goods_price', 'it.single_pre_price', 'it.brand_name', 'it.supplier_name', 'o.order_id', 'o.order_sn', 'o.order_type', 'o.order_pay_type', 'o.order_goods_type', 'o.order_source', 'o.create_time', 'o.status', 'o.order_amount', 'o.sale_type', 'o.currency', 'o.sale_id', 'o.cancel_reason', 'i.tax_title', 'i.inv_type', 'i.invoice_status', 'i.tax_title', 'i.company_address', 'i.company_phone', 'i.tax_no', 'i.bank_name', 'i.bank_account', 'a.consignee', 'a.address', 's.status as shipping_status', 'u.user_id', 'u.mobile', 'u.email', 'u.client_source', 'u.is_new', 'u.is_test', 'c.com_name', 'oe.send_remark', 'oe.is_new as is_new_order', 'oe.business_type', 'oe.jd_order_id', 'oe.exchange_rate')
->groupBy('it.rec_id') ->groupBy('it.rec_id')
->orderBy('o.create_time', 'DESC') ->orderBy('o.create_time', 'DESC')
->get() ->get()
->toArray(); ->toArray();
// dump($list->getBindings());
// dump($list->toSql());
// $tmp = str_replace('?', '"'.'%s'.'"', $list->toSql());
// $tmp = vsprintf($tmp, $list->getBindings());
// echo $tmp;
// exit;
if (!empty($list)) { if (!empty($list)) {
// 订单数据处理 // 订单数据处理
$cellData = $this->exportList($list); $cellData = $this->exportList($list);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment