|
@@ -223,7 +223,8 @@ class Export extends Base
|
|
|
public function orderPayExport()
|
|
|
{
|
|
|
$param = $this->request->only(['start' => '', 'end' => '', 'name' => '', 'bank' => '', 'status' => '', 'tradNo' => '', 'company' => '', 'userd_lower' => '', 'used_upper' => ''], 'post', 'trim');
|
|
|
- $where = [['a.is_del', '=', 0]];
|
|
|
+ $where = [['a.is_del', '=', 0],['b.is_del', '=', 0],['d.is_del', '=', 0],['d.is_del', '=', 0],["c.type","=",
|
|
|
+ 2],["c.status","in",[1,2]]];
|
|
|
if (($param['start'] != '') && ($param['end'] != '')) $where[] = ['a.trade_time', 'between', [$param['start'] . ' 00:00:00', $param['end'] . ' 23:59:59']];
|
|
|
if ($param['name'] != '') $where[] = ['a.trade_out', 'like', '%' . $param['name'] . '%'];
|
|
|
if ($param['bank'] != '') $where[] = ['a.trade_bank', 'like', '%' . $param['bank'] . '%'];
|
|
@@ -260,7 +261,7 @@ class Export extends Base
|
|
|
b.status 认领审批状态,
|
|
|
b.remark 驳回原因')
|
|
|
->leftJoin('trade_pool b', 'b.tradNo=a.tradNo')
|
|
|
- ->leftJoin('assoc c', 'c.viceCode=b.logNo and c.type=2 and c.status<>3')
|
|
|
+ ->leftJoin('assoc c', 'c.viceCode=b.logNo')
|
|
|
->leftJoin('qrd_info d', 'd.sequenceNo=c.orderCode')
|
|
|
->where($where)
|
|
|
->order('a.trade_time desc')
|