revert experimental changes in BaseOfficeDataImport

This commit is contained in:
Michael Hoennig 2024-11-29 10:52:40 +01:00
parent ad9ae3d766
commit b0c26df632

View File

@ -884,15 +884,15 @@ public abstract class BaseOfficeDataImport extends CsvDataImport {
final var legacyId = entry.getKey();
final var assetTransaction = entry.getValue();
if (assetTransaction.getTransactionType() == HsOfficeCoopAssetsTransactionType.REVERSAL) {
connectToRelatedRevertedAssetTx(legacyId, assetTransaction);
connectToRelatedRevertedAssetTx(assetTransaction);
}
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 revertedAssetTx = coopAssets.values().stream().filter(a ->
a.getTransactionType() != HsOfficeCoopAssetsTransactionType.REVERSAL &&
@ -905,7 +905,7 @@ public abstract class BaseOfficeDataImport extends CsvDataImport {
//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 adoptionAssetTx = coopAssets.values().stream().filter(a ->
a.getTransactionType() == HsOfficeCoopAssetsTransactionType.ADOPTION &&