待入账列表

This commit is contained in:
2025-11-01 08:56:48 +08:00
parent 29ba35f9b6
commit f7faf79809
4 changed files with 45 additions and 6 deletions
+12 -5
View File
@@ -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);
}
}