待入账列表
This commit is contained in:
@@ -218,17 +218,22 @@ class FinReceiptService
|
||||
// 构建查询
|
||||
$query = $this->modelClass::where($where);
|
||||
|
||||
// 没有付款记录的收款记录
|
||||
// 收款记录绑定情况
|
||||
if (isset($param['payment_apply']) && $param['payment_apply'] == 'not') {
|
||||
$query->whereNull('payment_apply_id');
|
||||
$query->where('payment_apply_id', '0');
|
||||
} elseif (isset($param['payment_apply']) && $param['payment_apply'] == 'already') {
|
||||
$query->whereNotNull('payment_apply_id');
|
||||
$query->where('payment_apply_id', '>' ,'0');
|
||||
} elseif (isset($param['payment_apply']) && $param['payment_apply'] == 'timeout') { //超时未认领
|
||||
$query->whereNull('payment_apply_id');
|
||||
$query->where('payment_apply_id', '0');
|
||||
$query->where('created_at', '<' ,time() - 24*60*60);
|
||||
}
|
||||
|
||||
if (isset($param['scene']) && $param['scene'] == 'list') {
|
||||
if($param['scene'] == 'pending'){ //待入账列表
|
||||
$query->where('payment_apply_id', '>' ,'0');
|
||||
$query->where('submit_files','!=','');
|
||||
}
|
||||
|
||||
if (isset($param['scene']) && ($param['scene'] == 'list' ||$param['scene'] == 'pending')) {
|
||||
return $query->paginate($limit, ['*'], 'page', $page);
|
||||
}
|
||||
|
||||
@@ -308,8 +313,10 @@ class FinReceiptService
|
||||
$payment = FinPaymentApply::where('id', $payment_apply_id)->first();
|
||||
$receipt = FinReceipt::find($id);
|
||||
$data['discount_amount'] = $payment->amount - $receipt->amount ?? 0;
|
||||
$data['submit_files'] = $payment->submit_files ?? '';
|
||||
|
||||
$updated = $this->logicUpdateBy($config, $data);
|
||||
return $this->postProcess(ucfirst($scene), $data);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user