refactoring scenario-tests #126
@ -884,15 +884,15 @@ public abstract class BaseOfficeDataImport extends CsvDataImport {
|
|||||||
final var legacyId = entry.getKey();
|
final var legacyId = entry.getKey();
|
||||||
final var assetTransaction = entry.getValue();
|
final var assetTransaction = entry.getValue();
|
||||||
if (assetTransaction.getTransactionType() == HsOfficeCoopAssetsTransactionType.REVERSAL) {
|
if (assetTransaction.getTransactionType() == HsOfficeCoopAssetsTransactionType.REVERSAL) {
|
||||||
connectToRelatedRevertedAssetTx(legacyId, assetTransaction);
|
connectToRelatedRevertedAssetTx(assetTransaction);
|
||||||
}
|
}
|
||||||
if (assetTransaction.getTransactionType() == HsOfficeCoopAssetsTransactionType.TRANSFER) {
|
if (assetTransaction.getTransactionType() == HsOfficeCoopAssetsTransactionType.TRANSFER) {
|
||||||
connectToRelatedAdoptionAssetTx(legacyId, assetTransaction);
|
connectToRelatedAdoptionAssetTx(assetTransaction);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void connectToRelatedRevertedAssetTx(final int legacyId, final HsOfficeCoopAssetsTransactionEntity assetTransaction) {
|
private static void connectToRelatedRevertedAssetTx(final HsOfficeCoopAssetsTransactionEntity assetTransaction) {
|
||||||
final var negativeValue = assetTransaction.getAssetValue().negate();
|
final var negativeValue = assetTransaction.getAssetValue().negate();
|
||||||
final var revertedAssetTx = coopAssets.values().stream().filter(a ->
|
final var revertedAssetTx = coopAssets.values().stream().filter(a ->
|
||||||
a.getTransactionType() != HsOfficeCoopAssetsTransactionType.REVERSAL &&
|
a.getTransactionType() != HsOfficeCoopAssetsTransactionType.REVERSAL &&
|
||||||
@ -905,7 +905,7 @@ public abstract class BaseOfficeDataImport extends CsvDataImport {
|
|||||||
//revertedAssetTx.setAssetReversalTx(assetTransaction);
|
//revertedAssetTx.setAssetReversalTx(assetTransaction);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void connectToRelatedAdoptionAssetTx(final Integer legacyId, final HsOfficeCoopAssetsTransactionEntity assetTransaction) {
|
private static void connectToRelatedAdoptionAssetTx(final HsOfficeCoopAssetsTransactionEntity assetTransaction) {
|
||||||
final var negativeValue = assetTransaction.getAssetValue().negate();
|
final var negativeValue = assetTransaction.getAssetValue().negate();
|
||||||
final var adoptionAssetTx = coopAssets.values().stream().filter(a ->
|
final var adoptionAssetTx = coopAssets.values().stream().filter(a ->
|
||||||
a.getTransactionType() == HsOfficeCoopAssetsTransactionType.ADOPTION &&
|
a.getTransactionType() == HsOfficeCoopAssetsTransactionType.ADOPTION &&
|
||||||
|
Loading…
Reference in New Issue
Block a user