From ad67a88d0f1062760ceb8332702d5e96d4748c0a Mon Sep 17 00:00:00 2001 From: "WIN-C27C5MSVTPO\\16961" <1696136552@qq.com> Date: Thu, 30 Oct 2025 18:11:50 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=B0=B4=E5=8D=95=E5=A4=9A=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/service/FinReceiptService.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/common/service/FinReceiptService.php b/app/common/service/FinReceiptService.php index f55ac9a..676ab0f 100644 --- a/app/common/service/FinReceiptService.php +++ b/app/common/service/FinReceiptService.php @@ -114,6 +114,7 @@ class FinReceiptService $data['arrived_at'] = strtotime( $data['arrived_at']); $data['created_by'] = $request->user->uid; $data['updated_by'] = $request->user->uid; + $data['fx_receipt_file'] = json_encode($data['fx_receipt_file']); if($data['fx_receipt_file'] == '[]' || $data['fx_receipt_file'] == '{}' ) $data['fx_receipt_file'] = ''; return $data; @@ -135,6 +136,7 @@ class FinReceiptService if(isset($data['received_at'])) $data['received_at'] = strtotime($data['received_at']); + $data['fx_receipt_file'] = json_encode($data['fx_receipt_file']); if($data['fx_receipt_file'] == '[]' || $data['fx_receipt_file'] == '{}' ) $data['fx_receipt_file'] = ''; return $data; From 72fa638cf56877a56bc484af1970b8ff28838df1 Mon Sep 17 00:00:00 2001 From: "WIN-C27C5MSVTPO\\16961" <1696136552@qq.com> Date: Thu, 30 Oct 2025 18:37:40 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=8E=92=E5=BA=8F=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/service/FinPaymentApplyService.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/common/service/FinPaymentApplyService.php b/app/common/service/FinPaymentApplyService.php index 0f6bec7..78d0d37 100644 --- a/app/common/service/FinPaymentApplyService.php +++ b/app/common/service/FinPaymentApplyService.php @@ -233,12 +233,12 @@ class FinPaymentApplyService } if (!empty($remitter)) { - $similarityOrder[] = "CASE WHEN remitter = {$remitter} THEN 0 ELSE 1 END"; + $similarityOrder[] = "CASE WHEN remitter = '{$remitter}' THEN 0 ELSE 1 END"; } if (!empty($amount)) { $amount = (float)$amount; - $similarityOrder[] = "ABS(amount - {$amount}) ASC"; + $similarityOrder[] = "ABS(amount - {$amount})"; $similarityOrder[] = "CASE WHEN (ABS(amount - {$amount}) / {$amount} * 100) <= 5 THEN 0 ELSE 1 END"; } @@ -252,9 +252,9 @@ class FinPaymentApplyService END ASC, "; } - $orderByClause .= "CASE - WHEN created_at > {$sevenDaysAgo} THEN id - ELSE 999999 + $orderByClause .= "CASE + WHEN created_at > {$sevenDaysAgo} THEN id + ELSE 999999 END DESC, "; $orderByClause .= "id DESC"; From 206eff87e2b2a73ac5474371eef0360c8df8e224 Mon Sep 17 00:00:00 2001 From: "WIN-C27C5MSVTPO\\16961" <1696136552@qq.com> Date: Thu, 30 Oct 2025 18:49:28 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E9=99=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/service/FinPaymentApplyService.php | 8 ++++---- app/common/service/FinReceiptService.php | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/common/service/FinPaymentApplyService.php b/app/common/service/FinPaymentApplyService.php index 78d0d37..e55b6a7 100644 --- a/app/common/service/FinPaymentApplyService.php +++ b/app/common/service/FinPaymentApplyService.php @@ -91,9 +91,9 @@ class FinPaymentApplyService $data['submit_files'] = json_encode($data['submit_files']); redis::set('stock_' . $data['doc_user_id'], json_encode($request->post('stock')), 'EX', 30); unset($data['stock']); - if($data['voucher_file'] == '[]' || $data['voucher_file'] == '{}' ) + if($data['voucher_file'] == '[]' || $data['voucher_file'] == '{}' || $data['voucher_file'] == '""') $data['voucher_file'] = ''; - if($data['submit_files'] == '[]' || $data['submit_files'] == '{}' ) + if($data['submit_files'] == '[]' || $data['submit_files'] == '{}' || $data['submit_files'] == '""') $data['submit_files'] = ''; return $data; } @@ -119,10 +119,10 @@ class FinPaymentApplyService { unset($data['stock']); $data['submit_files'] = json_encode($data['submit_files']); - if($data['submit_files'] == '[]' || $data['submit_files'] == '{}' ) + if($data['submit_files'] == '[]' || $data['submit_files'] == '{}' || $data['submit_files'] == '""') $data['submit_files'] = ''; $data['voucher_file'] = json_encode($data['voucher_file']); - if($data['voucher_file'] == '[]' || $data['voucher_file'] == '{}' ) + if($data['voucher_file'] == '[]' || $data['voucher_file'] == '{}' || $data['voucher_file'] == '""') $data['voucher_file'] = ''; return $data; } diff --git a/app/common/service/FinReceiptService.php b/app/common/service/FinReceiptService.php index 676ab0f..775d77d 100644 --- a/app/common/service/FinReceiptService.php +++ b/app/common/service/FinReceiptService.php @@ -115,7 +115,7 @@ class FinReceiptService $data['created_by'] = $request->user->uid; $data['updated_by'] = $request->user->uid; $data['fx_receipt_file'] = json_encode($data['fx_receipt_file']); - if($data['fx_receipt_file'] == '[]' || $data['fx_receipt_file'] == '{}' ) + if($data['fx_receipt_file'] == '[]' || $data['fx_receipt_file'] == '{}' || $data['fx_receipt_file'] == '""') $data['fx_receipt_file'] = ''; return $data; } @@ -137,7 +137,7 @@ class FinReceiptService $data['received_at'] = strtotime($data['received_at']); $data['fx_receipt_file'] = json_encode($data['fx_receipt_file']); - if($data['fx_receipt_file'] == '[]' || $data['fx_receipt_file'] == '{}' ) + if($data['fx_receipt_file'] == '[]' || $data['fx_receipt_file'] == '{}' || $data['fx_receipt_file'] == '""') $data['fx_receipt_file'] = ''; return $data; }