From a65d6a277466beff9a2e92bc2b27dc9542bf02dc Mon Sep 17 00:00:00 2001 From: "maruyama.t" Date: Thu, 22 Feb 2024 08:40:57 +0000 Subject: [PATCH] =?UTF-8?q?Merged=20PR=20776:=20=E9=9A=8E=E5=B1=A4?= =?UTF-8?q?=E3=81=AE=E4=BB=98=E3=81=91=E6=9B=BF=E3=81=88=E3=82=92=E8=AA=A4?= =?UTF-8?q?=E3=81=A3=E3=81=A6=E3=81=84=E3=81=9F=E3=81=AE=E3=82=92=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 概要 [Task3570: データ変換ツール(きれいなデータ版)作成+動作確認](https://paruru.nds-tyo.co.jp:8443/tfs/ReciproCollection/fa4924a4-d079-4fab-9fb5-a9a11eb205f0/_workitems/edit/3570) - 元PBI or タスクへのリンク(内容・目的などはそちらにあるはず) - 何をどう変更したか、追加したライブラリなど - このPull Requestでの対象/対象外 - 影響範囲(他の機能にも影響があるか) ## レビューポイント - 特にレビューしてほしい箇所 - 軽微なものや自明なものは記載不要 - 修正範囲が大きい場合などに記載 - 全体的にや仕様を満たしているか等は本当に必要な時のみ記載 ## UIの変更 - Before/Afterのスクショなど - スクショ置き場 ## 動作確認状況 - ローカルで確認、develop環境で確認など ## 補足 - 相談、参考資料などがあれば --- .../src/features/transfer/transfer.service.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/data_migration_tools/server/src/features/transfer/transfer.service.ts b/data_migration_tools/server/src/features/transfer/transfer.service.ts index 5a7a58a..31b75ed 100644 --- a/data_migration_tools/server/src/features/transfer/transfer.service.ts +++ b/data_migration_tools/server/src/features/transfer/transfer.service.ts @@ -173,16 +173,17 @@ export class TransferService { try { // dealerAccountIdを検索し、typeがCountryの場合 accountsOutputFileStep1.forEach((account) => { - console.log(account); if (account.type === MIGRATION_TYPE.COUNTRY) { + console.log(account); // そのacccountIdをdealerAccountIdにもつアカウント(Distributor)を検索する const distributor = accountsOutputFileStep1.find( - (distributor) => - account.type === MIGRATION_TYPE.DISTRIBUTOR && - distributor.dealerAccountId === account.accountId + (distributor) => distributor.accountId === account.dealerAccountId ); - // DistributorのdealerAccountIdをBC(Countryの親)に付け替える - distributor.dealerAccountId = account.dealerAccountId; + console.log(distributor); + if (distributor) { + // DistributorのdealerAccountIdをBC(Countryの親)に付け替える + distributor.dealerAccountId = account.dealerAccountId; + } } }); // typeがCountryのアカウントを取り除く