From cfbe014731c6c272d71dd3f42e26e57754f22aa3 Mon Sep 17 00:00:00 2001 From: pro Date: Fri, 23 Jan 2026 11:15:18 +0900 Subject: [PATCH] =?UTF-8?q?fix:=EC=A0=80=EC=9E=A5=EB=90=9C=20=EA=B3=84?= =?UTF-8?q?=EC=A0=95=EA=B3=BC=EB=AA=A9=20=EB=A7=A4=EC=B9=AD=20=ED=82=A4=20?= =?UTF-8?q?=ED=98=95=EC=8B=9D=20=ED=86=B5=EC=9D=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - decimal과 float 형식 차이로 매칭 실패하는 문제 수정 - 금액을 정수로 변환하여 키 생성 Co-Authored-By: Claude Opus 4.5 --- app/Http/Controllers/Barobill/EaccountController.php | 4 ++-- app/Models/Barobill/BankTransaction.php | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/Http/Controllers/Barobill/EaccountController.php b/app/Http/Controllers/Barobill/EaccountController.php index 54859ece..91bc2cf9 100644 --- a/app/Http/Controllers/Barobill/EaccountController.php +++ b/app/Http/Controllers/Barobill/EaccountController.php @@ -422,8 +422,8 @@ private function parseTransactionLogs($resultData, string $defaultBankName = '', $bankAccountNum = $log->BankAccountNum ?? ''; - // 고유 키 생성하여 저장된 데이터와 매칭 - $uniqueKey = implode('|', [$bankAccountNum, $transDT, $deposit, $withdraw, $balance]); + // 고유 키 생성하여 저장된 데이터와 매칭 (숫자는 정수로 변환하여 형식 통일) + $uniqueKey = implode('|', [$bankAccountNum, $transDT, (int) $deposit, (int) $withdraw, (int) $balance]); $savedItem = $savedData?->get($uniqueKey); $logItem = [ diff --git a/app/Models/Barobill/BankTransaction.php b/app/Models/Barobill/BankTransaction.php index 2d4d0a12..fa626b0f 100644 --- a/app/Models/Barobill/BankTransaction.php +++ b/app/Models/Barobill/BankTransaction.php @@ -50,15 +50,16 @@ public function tenant(): BelongsTo /** * 거래 고유 키 생성 (매칭용) + * 숫자는 정수로 변환하여 형식 통일 */ public function getUniqueKeyAttribute(): string { return implode('|', [ $this->bank_account_num, $this->trans_dt, - $this->deposit, - $this->withdraw, - $this->balance, + (int) $this->deposit, + (int) $this->withdraw, + (int) $this->balance, ]); }