Merged PR 776: 階層の付け替えを誤っていたのを修正

## 概要
[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環境で確認など

## 補足
- 相談、参考資料などがあれば
This commit is contained in:
maruyama.t 2024-02-22 08:40:57 +00:00
parent cb68c16eb8
commit a65d6a2774

View File

@ -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をBCCountryの親に付け替える
distributor.dealerAccountId = account.dealerAccountId;
console.log(distributor);
if (distributor) {
// DistributorのdealerAccountIdをBCCountryの親に付け替える
distributor.dealerAccountId = account.dealerAccountId;
}
}
});
// typeがCountryのアカウントを取り除く