FINERACT-1932: Add starter Configuration class for portfolio.savings module
This commit is contained in:
committed by
Aleksandar Vidakovic
parent
30ad4f50fa
commit
dc3b94d117
+4
-18
@@ -26,6 +26,7 @@ import java.time.LocalDate;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.apache.fineract.infrastructure.codes.data.CodeValueData;
|
import org.apache.fineract.infrastructure.codes.data.CodeValueData;
|
||||||
import org.apache.fineract.infrastructure.codes.service.CodeValueReadPlatformService;
|
import org.apache.fineract.infrastructure.codes.service.CodeValueReadPlatformService;
|
||||||
import org.apache.fineract.infrastructure.core.data.EnumOptionData;
|
import org.apache.fineract.infrastructure.core.data.EnumOptionData;
|
||||||
@@ -45,15 +46,13 @@ import org.apache.fineract.portfolio.savings.data.DepositAccountInterestIncentiv
|
|||||||
import org.apache.fineract.portfolio.savings.data.DepositAccountInterestRateChartData;
|
import org.apache.fineract.portfolio.savings.data.DepositAccountInterestRateChartData;
|
||||||
import org.apache.fineract.portfolio.savings.data.DepositAccountInterestRateChartSlabData;
|
import org.apache.fineract.portfolio.savings.data.DepositAccountInterestRateChartSlabData;
|
||||||
import org.apache.fineract.portfolio.savings.exception.DepositAccountInterestRateChartNotFoundException;
|
import org.apache.fineract.portfolio.savings.exception.DepositAccountInterestRateChartNotFoundException;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.dao.DataAccessException;
|
import org.springframework.dao.DataAccessException;
|
||||||
import org.springframework.dao.EmptyResultDataAccessException;
|
import org.springframework.dao.EmptyResultDataAccessException;
|
||||||
import org.springframework.jdbc.core.JdbcTemplate;
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
import org.springframework.jdbc.core.ResultSetExtractor;
|
import org.springframework.jdbc.core.ResultSetExtractor;
|
||||||
import org.springframework.jdbc.core.RowMapper;
|
import org.springframework.jdbc.core.RowMapper;
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
@Service
|
@RequiredArgsConstructor
|
||||||
public class DepositAccountInterestRateChartReadPlatformServiceImpl implements DepositAccountInterestRateChartReadPlatformService {
|
public class DepositAccountInterestRateChartReadPlatformServiceImpl implements DepositAccountInterestRateChartReadPlatformService {
|
||||||
|
|
||||||
private final PlatformSecurityContext context;
|
private final PlatformSecurityContext context;
|
||||||
@@ -64,19 +63,6 @@ public class DepositAccountInterestRateChartReadPlatformServiceImpl implements D
|
|||||||
private final InterestIncentiveDropdownReadPlatformService interestIncentiveDropdownReadPlatformService;
|
private final InterestIncentiveDropdownReadPlatformService interestIncentiveDropdownReadPlatformService;
|
||||||
private final CodeValueReadPlatformService codeValueReadPlatformService;
|
private final CodeValueReadPlatformService codeValueReadPlatformService;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
public DepositAccountInterestRateChartReadPlatformServiceImpl(PlatformSecurityContext context, final JdbcTemplate jdbcTemplate,
|
|
||||||
InterestRateChartDropdownReadPlatformService chartDropdownReadPlatformService,
|
|
||||||
final InterestIncentiveDropdownReadPlatformService interestIncentiveDropdownReadPlatformService,
|
|
||||||
final CodeValueReadPlatformService codeValueReadPlatformService, DatabaseSpecificSQLGenerator sqlGenerator) {
|
|
||||||
this.context = context;
|
|
||||||
this.jdbcTemplate = jdbcTemplate;
|
|
||||||
this.chartDropdownReadPlatformService = chartDropdownReadPlatformService;
|
|
||||||
this.interestIncentiveDropdownReadPlatformService = interestIncentiveDropdownReadPlatformService;
|
|
||||||
this.codeValueReadPlatformService = codeValueReadPlatformService;
|
|
||||||
chartExtractor = new DepositAccountInterestRateChartExtractor(sqlGenerator);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DepositAccountInterestRateChartData retrieveOne(Long chartId) {
|
public DepositAccountInterestRateChartData retrieveOne(Long chartId) {
|
||||||
try {
|
try {
|
||||||
@@ -182,7 +168,7 @@ public class DepositAccountInterestRateChartReadPlatformServiceImpl implements D
|
|||||||
clientClassificationOptions);
|
clientClassificationOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final class DepositAccountInterestRateChartExtractor
|
public static final class DepositAccountInterestRateChartExtractor
|
||||||
implements ResultSetExtractor<Collection<DepositAccountInterestRateChartData>> {
|
implements ResultSetExtractor<Collection<DepositAccountInterestRateChartData>> {
|
||||||
|
|
||||||
DepositAccountInterestRateChartMapper chartMapper = new DepositAccountInterestRateChartMapper();
|
DepositAccountInterestRateChartMapper chartMapper = new DepositAccountInterestRateChartMapper();
|
||||||
@@ -194,7 +180,7 @@ public class DepositAccountInterestRateChartReadPlatformServiceImpl implements D
|
|||||||
return this.schemaSql;
|
return this.schemaSql;
|
||||||
}
|
}
|
||||||
|
|
||||||
private DepositAccountInterestRateChartExtractor(DatabaseSpecificSQLGenerator sqlGenerator) {
|
public DepositAccountInterestRateChartExtractor(DatabaseSpecificSQLGenerator sqlGenerator) {
|
||||||
final StringBuilder sqlBuilder = new StringBuilder(400);
|
final StringBuilder sqlBuilder = new StringBuilder(400);
|
||||||
|
|
||||||
sqlBuilder.append("irc.id as ircId, irc.name as ircName, irc.description as ircDescription,")
|
sqlBuilder.append("irc.id as ircId, irc.name as ircName, irc.description as ircDescription,")
|
||||||
|
|||||||
+3
-14
@@ -24,6 +24,7 @@ import java.sql.SQLException;
|
|||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.apache.fineract.infrastructure.core.data.EnumOptionData;
|
import org.apache.fineract.infrastructure.core.data.EnumOptionData;
|
||||||
import org.apache.fineract.infrastructure.core.domain.JdbcSupport;
|
import org.apache.fineract.infrastructure.core.domain.JdbcSupport;
|
||||||
import org.apache.fineract.infrastructure.core.service.Page;
|
import org.apache.fineract.infrastructure.core.service.Page;
|
||||||
@@ -32,29 +33,17 @@ import org.apache.fineract.infrastructure.core.service.SearchParameters;
|
|||||||
import org.apache.fineract.infrastructure.core.service.database.DatabaseSpecificSQLGenerator;
|
import org.apache.fineract.infrastructure.core.service.database.DatabaseSpecificSQLGenerator;
|
||||||
import org.apache.fineract.infrastructure.security.utils.ColumnValidator;
|
import org.apache.fineract.infrastructure.security.utils.ColumnValidator;
|
||||||
import org.apache.fineract.portfolio.savings.data.DepositAccountOnHoldTransactionData;
|
import org.apache.fineract.portfolio.savings.data.DepositAccountOnHoldTransactionData;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.jdbc.core.JdbcTemplate;
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
import org.springframework.jdbc.core.RowMapper;
|
import org.springframework.jdbc.core.RowMapper;
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
@Service
|
@RequiredArgsConstructor
|
||||||
public class DepositAccountOnHoldTransactionReadPlatformServiceImpl implements DepositAccountOnHoldTransactionReadPlatformService {
|
public class DepositAccountOnHoldTransactionReadPlatformServiceImpl implements DepositAccountOnHoldTransactionReadPlatformService {
|
||||||
|
|
||||||
private final JdbcTemplate jdbcTemplate;
|
private final JdbcTemplate jdbcTemplate;
|
||||||
private final DatabaseSpecificSQLGenerator sqlGenerator;
|
private final DatabaseSpecificSQLGenerator sqlGenerator;
|
||||||
private final ColumnValidator columnValidator;
|
private final ColumnValidator columnValidator;
|
||||||
private final PaginationHelper paginationHelper;
|
private final PaginationHelper paginationHelper;
|
||||||
private final DepositAccountOnHoldTransactionsMapper mapper;
|
private final DepositAccountOnHoldTransactionsMapper mapper = new DepositAccountOnHoldTransactionsMapper();
|
||||||
|
|
||||||
@Autowired
|
|
||||||
public DepositAccountOnHoldTransactionReadPlatformServiceImpl(final JdbcTemplate jdbcTemplate, final ColumnValidator columnValidator,
|
|
||||||
DatabaseSpecificSQLGenerator sqlGenerator, PaginationHelper paginationHelper) {
|
|
||||||
this.jdbcTemplate = jdbcTemplate;
|
|
||||||
this.sqlGenerator = sqlGenerator;
|
|
||||||
this.mapper = new DepositAccountOnHoldTransactionsMapper();
|
|
||||||
this.columnValidator = columnValidator;
|
|
||||||
this.paginationHelper = paginationHelper;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Page<DepositAccountOnHoldTransactionData> retriveAll(Long savingsId, Long guarantorFundingId,
|
public Page<DepositAccountOnHoldTransactionData> retriveAll(Long savingsId, Long guarantorFundingId,
|
||||||
|
|||||||
+2
-18
@@ -23,6 +23,7 @@ import static org.apache.fineract.portfolio.savings.DepositsApiConstants.closedO
|
|||||||
import com.google.gson.JsonElement;
|
import com.google.gson.JsonElement;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.apache.fineract.infrastructure.configuration.domain.ConfigurationDomainService;
|
import org.apache.fineract.infrastructure.configuration.domain.ConfigurationDomainService;
|
||||||
import org.apache.fineract.infrastructure.core.api.JsonQuery;
|
import org.apache.fineract.infrastructure.core.api.JsonQuery;
|
||||||
import org.apache.fineract.infrastructure.core.data.EnumOptionData;
|
import org.apache.fineract.infrastructure.core.data.EnumOptionData;
|
||||||
@@ -40,11 +41,9 @@ import org.apache.fineract.portfolio.savings.domain.DepositAccountAssembler;
|
|||||||
import org.apache.fineract.portfolio.savings.domain.FixedDepositAccount;
|
import org.apache.fineract.portfolio.savings.domain.FixedDepositAccount;
|
||||||
import org.apache.fineract.portfolio.savings.domain.RecurringDepositAccount;
|
import org.apache.fineract.portfolio.savings.domain.RecurringDepositAccount;
|
||||||
import org.apache.fineract.portfolio.savings.domain.SavingsAccount;
|
import org.apache.fineract.portfolio.savings.domain.SavingsAccount;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
@Service
|
@RequiredArgsConstructor
|
||||||
public class DepositAccountPreMatureCalculationPlatformServiceImpl implements DepositAccountPreMatureCalculationPlatformService {
|
public class DepositAccountPreMatureCalculationPlatformServiceImpl implements DepositAccountPreMatureCalculationPlatformService {
|
||||||
|
|
||||||
private final FromJsonHelper fromJsonHelper;
|
private final FromJsonHelper fromJsonHelper;
|
||||||
@@ -54,21 +53,6 @@ public class DepositAccountPreMatureCalculationPlatformServiceImpl implements De
|
|||||||
private final ConfigurationDomainService configurationDomainService;
|
private final ConfigurationDomainService configurationDomainService;
|
||||||
private final PaymentTypeReadPlatformService paymentTypeReadPlatformService;
|
private final PaymentTypeReadPlatformService paymentTypeReadPlatformService;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
public DepositAccountPreMatureCalculationPlatformServiceImpl(final FromJsonHelper fromJsonHelper,
|
|
||||||
final DepositAccountTransactionDataValidator depositAccountTransactionDataValidator,
|
|
||||||
final DepositAccountAssembler depositAccountAssembler,
|
|
||||||
final SavingsAccountReadPlatformService savingsAccountReadPlatformService,
|
|
||||||
final ConfigurationDomainService configurationDomainService, PaymentTypeReadPlatformService paymentTypeReadPlatformService) {
|
|
||||||
this.fromJsonHelper = fromJsonHelper;
|
|
||||||
this.depositAccountTransactionDataValidator = depositAccountTransactionDataValidator;
|
|
||||||
this.depositAccountAssembler = depositAccountAssembler;
|
|
||||||
this.savingsAccountReadPlatformService = savingsAccountReadPlatformService;
|
|
||||||
this.configurationDomainService = configurationDomainService;
|
|
||||||
this.paymentTypeReadPlatformService = paymentTypeReadPlatformService;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
@Override
|
@Override
|
||||||
public DepositAccountData calculatePreMatureAmount(final Long accountId, final JsonQuery query,
|
public DepositAccountData calculatePreMatureAmount(final Long accountId, final JsonQuery query,
|
||||||
|
|||||||
+5
-41
@@ -31,6 +31,7 @@ import java.util.Collection;
|
|||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.apache.fineract.infrastructure.core.data.EnumOptionData;
|
import org.apache.fineract.infrastructure.core.data.EnumOptionData;
|
||||||
import org.apache.fineract.infrastructure.core.data.PaginationParameters;
|
import org.apache.fineract.infrastructure.core.data.PaginationParameters;
|
||||||
import org.apache.fineract.infrastructure.core.data.PaginationParametersDataValidator;
|
import org.apache.fineract.infrastructure.core.data.PaginationParametersDataValidator;
|
||||||
@@ -92,14 +93,13 @@ import org.apache.fineract.portfolio.savings.domain.SavingsAccountStatusType;
|
|||||||
import org.apache.fineract.portfolio.savings.exception.DepositAccountNotFoundException;
|
import org.apache.fineract.portfolio.savings.exception.DepositAccountNotFoundException;
|
||||||
import org.apache.fineract.portfolio.tax.data.TaxGroupData;
|
import org.apache.fineract.portfolio.tax.data.TaxGroupData;
|
||||||
import org.apache.fineract.useradministration.domain.AppUser;
|
import org.apache.fineract.useradministration.domain.AppUser;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.dao.EmptyResultDataAccessException;
|
import org.springframework.dao.EmptyResultDataAccessException;
|
||||||
import org.springframework.jdbc.core.JdbcTemplate;
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
import org.springframework.jdbc.core.RowMapper;
|
import org.springframework.jdbc.core.RowMapper;
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
@Service
|
@RequiredArgsConstructor
|
||||||
|
|
||||||
public class DepositAccountReadPlatformServiceImpl implements DepositAccountReadPlatformService {
|
public class DepositAccountReadPlatformServiceImpl implements DepositAccountReadPlatformService {
|
||||||
|
|
||||||
private static final FixedDepositAccountMapper FIXED_DEPOSIT_ACCOUNT_MAPPER = new FixedDepositAccountMapper();
|
private static final FixedDepositAccountMapper FIXED_DEPOSIT_ACCOUNT_MAPPER = new FixedDepositAccountMapper();
|
||||||
@@ -116,7 +116,7 @@ public class DepositAccountReadPlatformServiceImpl implements DepositAccountRead
|
|||||||
private final PaginationParametersDataValidator paginationParametersDataValidator;
|
private final PaginationParametersDataValidator paginationParametersDataValidator;
|
||||||
private final DatabaseSpecificSQLGenerator sqlGenerator;
|
private final DatabaseSpecificSQLGenerator sqlGenerator;
|
||||||
private final PaginationHelper paginationHelper;
|
private final PaginationHelper paginationHelper;
|
||||||
private final SavingsAccountTransactionsMapper transactionsMapper;
|
private final SavingsAccountTransactionsMapper transactionsMapper = new SavingsAccountTransactionsMapper();
|
||||||
private final ClientReadPlatformService clientReadPlatformService;
|
private final ClientReadPlatformService clientReadPlatformService;
|
||||||
private final GroupReadPlatformService groupReadPlatformService;
|
private final GroupReadPlatformService groupReadPlatformService;
|
||||||
private final DepositProductReadPlatformService depositProductReadPlatformService;
|
private final DepositProductReadPlatformService depositProductReadPlatformService;
|
||||||
@@ -125,47 +125,11 @@ public class DepositAccountReadPlatformServiceImpl implements DepositAccountRead
|
|||||||
private final StaffReadPlatformService staffReadPlatformService;
|
private final StaffReadPlatformService staffReadPlatformService;
|
||||||
private final DepositsDropdownReadPlatformService depositsDropdownReadPlatformService;
|
private final DepositsDropdownReadPlatformService depositsDropdownReadPlatformService;
|
||||||
private final SavingsAccountReadPlatformService savingsAccountReadPlatformService;
|
private final SavingsAccountReadPlatformService savingsAccountReadPlatformService;
|
||||||
private final RecurringAccountDepositTransactionTemplateMapper rdTransactionTemplateMapper;
|
private final RecurringAccountDepositTransactionTemplateMapper rdTransactionTemplateMapper = new RecurringAccountDepositTransactionTemplateMapper();
|
||||||
private final DropdownReadPlatformService dropdownReadPlatformService;
|
private final DropdownReadPlatformService dropdownReadPlatformService;
|
||||||
private final CalendarReadPlatformService calendarReadPlatformService;
|
private final CalendarReadPlatformService calendarReadPlatformService;
|
||||||
private final PaymentTypeReadPlatformService paymentTypeReadPlatformService;
|
private final PaymentTypeReadPlatformService paymentTypeReadPlatformService;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
public DepositAccountReadPlatformServiceImpl(final PlatformSecurityContext context, final JdbcTemplate jdbcTemplate,
|
|
||||||
final DepositAccountInterestRateChartReadPlatformService chartReadPlatformService,
|
|
||||||
final PaginationParametersDataValidator paginationParametersDataValidator,
|
|
||||||
final ClientReadPlatformService clientReadPlatformService, final GroupReadPlatformService groupReadPlatformService,
|
|
||||||
final DepositProductReadPlatformService depositProductReadPlatformService,
|
|
||||||
final SavingsDropdownReadPlatformService savingsDropdownReadPlatformService,
|
|
||||||
final ChargeReadPlatformService chargeReadPlatformService, final StaffReadPlatformService staffReadPlatformService,
|
|
||||||
final DepositsDropdownReadPlatformService depositsDropdownReadPlatformService,
|
|
||||||
final InterestRateChartReadPlatformService productChartReadPlatformService,
|
|
||||||
final SavingsAccountReadPlatformService savingsAccountReadPlatformService,
|
|
||||||
final DropdownReadPlatformService dropdownReadPlatformService, final CalendarReadPlatformService calendarReadPlatformService,
|
|
||||||
PaymentTypeReadPlatformService paymentTypeReadPlatformService, DatabaseSpecificSQLGenerator sqlGenerator,
|
|
||||||
PaginationHelper paginationHelper) {
|
|
||||||
this.context = context;
|
|
||||||
this.jdbcTemplate = jdbcTemplate;
|
|
||||||
this.accountChartReadPlatformService = chartReadPlatformService;
|
|
||||||
this.paginationParametersDataValidator = paginationParametersDataValidator;
|
|
||||||
this.sqlGenerator = sqlGenerator;
|
|
||||||
this.transactionsMapper = new SavingsAccountTransactionsMapper();
|
|
||||||
this.clientReadPlatformService = clientReadPlatformService;
|
|
||||||
this.groupReadPlatformService = groupReadPlatformService;
|
|
||||||
this.depositProductReadPlatformService = depositProductReadPlatformService;
|
|
||||||
this.savingsDropdownReadPlatformService = savingsDropdownReadPlatformService;
|
|
||||||
this.chargeReadPlatformService = chargeReadPlatformService;
|
|
||||||
this.staffReadPlatformService = staffReadPlatformService;
|
|
||||||
this.depositsDropdownReadPlatformService = depositsDropdownReadPlatformService;
|
|
||||||
this.productChartReadPlatformService = productChartReadPlatformService;
|
|
||||||
this.savingsAccountReadPlatformService = savingsAccountReadPlatformService;
|
|
||||||
this.rdTransactionTemplateMapper = new RecurringAccountDepositTransactionTemplateMapper();
|
|
||||||
this.dropdownReadPlatformService = dropdownReadPlatformService;
|
|
||||||
this.calendarReadPlatformService = calendarReadPlatformService;
|
|
||||||
this.paymentTypeReadPlatformService = paymentTypeReadPlatformService;
|
|
||||||
this.paginationHelper = paginationHelper;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Collection<DepositAccountData> retrieveAll(final DepositAccountType depositAccountType,
|
public Collection<DepositAccountData> retrieveAll(final DepositAccountType depositAccountType,
|
||||||
final PaginationParameters paginationParameters) {
|
final PaginationParameters paginationParameters) {
|
||||||
|
|||||||
-2
@@ -109,10 +109,8 @@ import org.apache.fineract.portfolio.savings.exception.DepositAccountTransaction
|
|||||||
import org.apache.fineract.portfolio.savings.exception.SavingsAccountTransactionNotFoundException;
|
import org.apache.fineract.portfolio.savings.exception.SavingsAccountTransactionNotFoundException;
|
||||||
import org.apache.fineract.portfolio.savings.exception.TransactionUpdateNotAllowedException;
|
import org.apache.fineract.portfolio.savings.exception.TransactionUpdateNotAllowedException;
|
||||||
import org.apache.fineract.useradministration.domain.AppUser;
|
import org.apache.fineract.useradministration.domain.AppUser;
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
@Service
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Transactional
|
@Transactional
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
|
|||||||
+5
-45
@@ -32,6 +32,8 @@ import java.util.LinkedHashMap;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.commons.lang3.exception.ExceptionUtils;
|
import org.apache.commons.lang3.exception.ExceptionUtils;
|
||||||
import org.apache.fineract.infrastructure.accountnumberformat.domain.AccountNumberFormat;
|
import org.apache.fineract.infrastructure.accountnumberformat.domain.AccountNumberFormat;
|
||||||
@@ -92,18 +94,13 @@ import org.apache.fineract.portfolio.savings.domain.SavingsProduct;
|
|||||||
import org.apache.fineract.portfolio.savings.domain.SavingsProductRepository;
|
import org.apache.fineract.portfolio.savings.domain.SavingsProductRepository;
|
||||||
import org.apache.fineract.portfolio.savings.exception.SavingsProductNotFoundException;
|
import org.apache.fineract.portfolio.savings.exception.SavingsProductNotFoundException;
|
||||||
import org.apache.fineract.useradministration.domain.AppUser;
|
import org.apache.fineract.useradministration.domain.AppUser;
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.dao.DataAccessException;
|
import org.springframework.dao.DataAccessException;
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
@Service
|
@RequiredArgsConstructor
|
||||||
|
@Slf4j
|
||||||
public class DepositApplicationProcessWritePlatformServiceJpaRepositoryImpl implements DepositApplicationProcessWritePlatformService {
|
public class DepositApplicationProcessWritePlatformServiceJpaRepositoryImpl implements DepositApplicationProcessWritePlatformService {
|
||||||
|
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(DepositApplicationProcessWritePlatformServiceJpaRepositoryImpl.class);
|
|
||||||
|
|
||||||
private final PlatformSecurityContext context;
|
private final PlatformSecurityContext context;
|
||||||
private final SavingsAccountRepositoryWrapper savingAccountRepository;
|
private final SavingsAccountRepositoryWrapper savingAccountRepository;
|
||||||
private final FixedDepositAccountRepository fixedDepositAccountRepository;
|
private final FixedDepositAccountRepository fixedDepositAccountRepository;
|
||||||
@@ -125,43 +122,6 @@ public class DepositApplicationProcessWritePlatformServiceJpaRepositoryImpl impl
|
|||||||
private final AccountNumberFormatRepositoryWrapper accountNumberFormatRepository;
|
private final AccountNumberFormatRepositoryWrapper accountNumberFormatRepository;
|
||||||
private final BusinessEventNotifierService businessEventNotifierService;
|
private final BusinessEventNotifierService businessEventNotifierService;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
public DepositApplicationProcessWritePlatformServiceJpaRepositoryImpl(final PlatformSecurityContext context,
|
|
||||||
final SavingsAccountRepositoryWrapper savingAccountRepository, final DepositAccountAssembler depositAccountAssembler,
|
|
||||||
final DepositAccountDataValidator depositAccountDataValidator, final AccountNumberGenerator accountNumberGenerator,
|
|
||||||
final ClientRepositoryWrapper clientRepository, final GroupRepository groupRepository,
|
|
||||||
final SavingsProductRepository savingsProductRepository, final NoteRepository noteRepository,
|
|
||||||
final StaffRepositoryWrapper staffRepository,
|
|
||||||
final SavingsAccountApplicationTransitionApiJsonValidator savingsAccountApplicationTransitionApiJsonValidator,
|
|
||||||
final SavingsAccountChargeAssembler savingsAccountChargeAssembler,
|
|
||||||
final FixedDepositAccountRepository fixedDepositAccountRepository,
|
|
||||||
final RecurringDepositAccountRepository recurringDepositAccountRepository,
|
|
||||||
final AccountAssociationsRepository accountAssociationsRepository, final FromJsonHelper fromJsonHelper,
|
|
||||||
final CalendarInstanceRepository calendarInstanceRepository, final ConfigurationDomainService configurationDomainService,
|
|
||||||
final AccountNumberFormatRepositoryWrapper accountNumberFormatRepository,
|
|
||||||
final BusinessEventNotifierService businessEventNotifierService) {
|
|
||||||
this.context = context;
|
|
||||||
this.savingAccountRepository = savingAccountRepository;
|
|
||||||
this.depositAccountAssembler = depositAccountAssembler;
|
|
||||||
this.accountNumberGenerator = accountNumberGenerator;
|
|
||||||
this.depositAccountDataValidator = depositAccountDataValidator;
|
|
||||||
this.clientRepository = clientRepository;
|
|
||||||
this.groupRepository = groupRepository;
|
|
||||||
this.savingsProductRepository = savingsProductRepository;
|
|
||||||
this.noteRepository = noteRepository;
|
|
||||||
this.staffRepository = staffRepository;
|
|
||||||
this.savingsAccountApplicationTransitionApiJsonValidator = savingsAccountApplicationTransitionApiJsonValidator;
|
|
||||||
this.savingsAccountChargeAssembler = savingsAccountChargeAssembler;
|
|
||||||
this.fixedDepositAccountRepository = fixedDepositAccountRepository;
|
|
||||||
this.recurringDepositAccountRepository = recurringDepositAccountRepository;
|
|
||||||
this.accountAssociationsRepository = accountAssociationsRepository;
|
|
||||||
this.fromJsonHelper = fromJsonHelper;
|
|
||||||
this.calendarInstanceRepository = calendarInstanceRepository;
|
|
||||||
this.configurationDomainService = configurationDomainService;
|
|
||||||
this.accountNumberFormatRepository = accountNumberFormatRepository;
|
|
||||||
this.businessEventNotifierService = businessEventNotifierService;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Guaranteed to throw an exception no matter what the data integrity issue is.
|
* Guaranteed to throw an exception no matter what the data integrity issue is.
|
||||||
*/
|
*/
|
||||||
@@ -184,7 +144,7 @@ public class DepositApplicationProcessWritePlatformServiceJpaRepositoryImpl impl
|
|||||||
}
|
}
|
||||||
|
|
||||||
errorCodeBuilder.append(".unknown.data.integrity.issue");
|
errorCodeBuilder.append(".unknown.data.integrity.issue");
|
||||||
LOG.error("Error occured.", dve);
|
log.error("Error occured.", dve);
|
||||||
throw new PlatformDataIntegrityException(errorCodeBuilder.toString(), "Unknown data integrity issue with savings account.");
|
throw new PlatformDataIntegrityException(errorCodeBuilder.toString(), "Unknown data integrity issue with savings account.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-11
@@ -22,6 +22,7 @@ import java.math.BigDecimal;
|
|||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.apache.fineract.accounting.common.AccountingEnumerations;
|
import org.apache.fineract.accounting.common.AccountingEnumerations;
|
||||||
import org.apache.fineract.infrastructure.core.data.EnumOptionData;
|
import org.apache.fineract.infrastructure.core.data.EnumOptionData;
|
||||||
import org.apache.fineract.infrastructure.core.domain.JdbcSupport;
|
import org.apache.fineract.infrastructure.core.domain.JdbcSupport;
|
||||||
@@ -35,13 +36,11 @@ import org.apache.fineract.portfolio.savings.data.FixedDepositProductData;
|
|||||||
import org.apache.fineract.portfolio.savings.data.RecurringDepositProductData;
|
import org.apache.fineract.portfolio.savings.data.RecurringDepositProductData;
|
||||||
import org.apache.fineract.portfolio.savings.exception.FixedDepositProductNotFoundException;
|
import org.apache.fineract.portfolio.savings.exception.FixedDepositProductNotFoundException;
|
||||||
import org.apache.fineract.portfolio.tax.data.TaxGroupData;
|
import org.apache.fineract.portfolio.tax.data.TaxGroupData;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.dao.EmptyResultDataAccessException;
|
import org.springframework.dao.EmptyResultDataAccessException;
|
||||||
import org.springframework.jdbc.core.JdbcTemplate;
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
import org.springframework.jdbc.core.RowMapper;
|
import org.springframework.jdbc.core.RowMapper;
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
@Service
|
@RequiredArgsConstructor
|
||||||
public class DepositProductReadPlatformServiceImpl implements DepositProductReadPlatformService {
|
public class DepositProductReadPlatformServiceImpl implements DepositProductReadPlatformService {
|
||||||
|
|
||||||
private static final FixedDepositProductMapper FIXED_DEPOSIT_PRODUCT_MAPPER = new FixedDepositProductMapper();
|
private static final FixedDepositProductMapper FIXED_DEPOSIT_PRODUCT_MAPPER = new FixedDepositProductMapper();
|
||||||
@@ -51,14 +50,6 @@ public class DepositProductReadPlatformServiceImpl implements DepositProductRead
|
|||||||
private final JdbcTemplate jdbcTemplate;
|
private final JdbcTemplate jdbcTemplate;
|
||||||
private final InterestRateChartReadPlatformService chartReadPlatformService;
|
private final InterestRateChartReadPlatformService chartReadPlatformService;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
public DepositProductReadPlatformServiceImpl(final PlatformSecurityContext context, final JdbcTemplate jdbcTemplate,
|
|
||||||
final InterestRateChartReadPlatformService chartReadPlatformService) {
|
|
||||||
this.context = context;
|
|
||||||
this.jdbcTemplate = jdbcTemplate;
|
|
||||||
this.chartReadPlatformService = chartReadPlatformService;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Collection<DepositProductData> retrieveAll(final DepositAccountType depositAccountType) {
|
public Collection<DepositProductData> retrieveAll(final DepositAccountType depositAccountType) {
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -20,12 +20,12 @@ package org.apache.fineract.portfolio.savings.service;
|
|||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import org.apache.fineract.infrastructure.core.data.EnumOptionData;
|
import org.apache.fineract.infrastructure.core.data.EnumOptionData;
|
||||||
import org.apache.fineract.portfolio.savings.DepositAccountOnClosureType;
|
import org.apache.fineract.portfolio.savings.DepositAccountOnClosureType;
|
||||||
import org.apache.fineract.portfolio.savings.PreClosurePenalInterestOnType;
|
import org.apache.fineract.portfolio.savings.PreClosurePenalInterestOnType;
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
@Service
|
@NoArgsConstructor
|
||||||
public class DepositsDropdownReadPlatformServiceImpl implements DepositsDropdownReadPlatformService {
|
public class DepositsDropdownReadPlatformServiceImpl implements DepositsDropdownReadPlatformService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
+5
-22
@@ -28,6 +28,8 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.lang3.exception.ExceptionUtils;
|
import org.apache.commons.lang3.exception.ExceptionUtils;
|
||||||
import org.apache.fineract.accounting.producttoaccountmapping.service.ProductToGLAccountMappingWritePlatformService;
|
import org.apache.fineract.accounting.producttoaccountmapping.service.ProductToGLAccountMappingWritePlatformService;
|
||||||
import org.apache.fineract.infrastructure.core.api.JsonCommand;
|
import org.apache.fineract.infrastructure.core.api.JsonCommand;
|
||||||
@@ -47,17 +49,13 @@ import org.apache.fineract.portfolio.savings.domain.FixedDepositProduct;
|
|||||||
import org.apache.fineract.portfolio.savings.domain.FixedDepositProductRepository;
|
import org.apache.fineract.portfolio.savings.domain.FixedDepositProductRepository;
|
||||||
import org.apache.fineract.portfolio.savings.exception.FixedDepositProductNotFoundException;
|
import org.apache.fineract.portfolio.savings.exception.FixedDepositProductNotFoundException;
|
||||||
import org.apache.fineract.portfolio.tax.domain.TaxGroup;
|
import org.apache.fineract.portfolio.tax.domain.TaxGroup;
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.dao.DataAccessException;
|
import org.springframework.dao.DataAccessException;
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
@Service
|
@Slf4j
|
||||||
|
@RequiredArgsConstructor
|
||||||
public class FixedDepositProductWritePlatformServiceJpaRepositoryImpl implements FixedDepositProductWritePlatformService {
|
public class FixedDepositProductWritePlatformServiceJpaRepositoryImpl implements FixedDepositProductWritePlatformService {
|
||||||
|
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(FixedDepositProductWritePlatformServiceJpaRepositoryImpl.class);
|
|
||||||
private final PlatformSecurityContext context;
|
private final PlatformSecurityContext context;
|
||||||
private final FixedDepositProductRepository fixedDepositProductRepository;
|
private final FixedDepositProductRepository fixedDepositProductRepository;
|
||||||
private final DepositProductDataValidator fromApiJsonDataValidator;
|
private final DepositProductDataValidator fromApiJsonDataValidator;
|
||||||
@@ -65,21 +63,6 @@ public class FixedDepositProductWritePlatformServiceJpaRepositoryImpl implements
|
|||||||
private final ProductToGLAccountMappingWritePlatformService accountMappingWritePlatformService;
|
private final ProductToGLAccountMappingWritePlatformService accountMappingWritePlatformService;
|
||||||
private final InterestRateChartAssembler chartAssembler;
|
private final InterestRateChartAssembler chartAssembler;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
public FixedDepositProductWritePlatformServiceJpaRepositoryImpl(final PlatformSecurityContext context,
|
|
||||||
final FixedDepositProductRepository fixedDepositProductRepository, final DepositProductDataValidator fromApiJsonDataValidator,
|
|
||||||
final DepositProductAssembler depositProductAssembler,
|
|
||||||
final ProductToGLAccountMappingWritePlatformService accountMappingWritePlatformService,
|
|
||||||
final InterestRateChartAssembler chartAssembler) {
|
|
||||||
this.context = context;
|
|
||||||
this.fixedDepositProductRepository = fixedDepositProductRepository;
|
|
||||||
this.fromApiJsonDataValidator = fromApiJsonDataValidator;
|
|
||||||
this.depositProductAssembler = depositProductAssembler;
|
|
||||||
|
|
||||||
this.accountMappingWritePlatformService = accountMappingWritePlatformService;
|
|
||||||
this.chartAssembler = chartAssembler;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
@Override
|
@Override
|
||||||
public CommandProcessingResult create(final JsonCommand command) {
|
public CommandProcessingResult create(final JsonCommand command) {
|
||||||
@@ -206,6 +189,6 @@ public class FixedDepositProductWritePlatformServiceJpaRepositoryImpl implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void logAsErrorUnexpectedDataIntegrityException(final Exception dae) {
|
private void logAsErrorUnexpectedDataIntegrityException(final Exception dae) {
|
||||||
LOG.error("Error occured.", dae);
|
log.error("Error occured.", dae);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-12
@@ -27,6 +27,7 @@ import java.time.LocalDate;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.apache.fineract.infrastructure.core.data.EnumOptionData;
|
import org.apache.fineract.infrastructure.core.data.EnumOptionData;
|
||||||
import org.apache.fineract.infrastructure.core.domain.JdbcSupport;
|
import org.apache.fineract.infrastructure.core.domain.JdbcSupport;
|
||||||
import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext;
|
import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext;
|
||||||
@@ -41,27 +42,16 @@ import org.apache.fineract.portfolio.savings.data.SavingsAccountApplicationTimel
|
|||||||
import org.apache.fineract.portfolio.savings.data.SavingsAccountStatusEnumData;
|
import org.apache.fineract.portfolio.savings.data.SavingsAccountStatusEnumData;
|
||||||
import org.apache.fineract.portfolio.savings.data.SavingsAccountSubStatusEnumData;
|
import org.apache.fineract.portfolio.savings.data.SavingsAccountSubStatusEnumData;
|
||||||
import org.apache.fineract.portfolio.savings.domain.SavingsAccountStatusType;
|
import org.apache.fineract.portfolio.savings.domain.SavingsAccountStatusType;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.jdbc.core.JdbcTemplate;
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
import org.springframework.jdbc.core.RowMapper;
|
import org.springframework.jdbc.core.RowMapper;
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
@Service
|
@RequiredArgsConstructor
|
||||||
public class GSIMReadPlatformServiceImpl implements GSIMReadPlatformService {
|
public class GSIMReadPlatformServiceImpl implements GSIMReadPlatformService {
|
||||||
|
|
||||||
private final JdbcTemplate jdbcTemplate;
|
private final JdbcTemplate jdbcTemplate;
|
||||||
private final PlatformSecurityContext context;
|
private final PlatformSecurityContext context;
|
||||||
private final ColumnValidator columnValidator;
|
private final ColumnValidator columnValidator;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
public GSIMReadPlatformServiceImpl(final PlatformSecurityContext context, final JdbcTemplate jdbcTemplate,
|
|
||||||
final ColumnValidator columnValidator) {
|
|
||||||
this.context = context;
|
|
||||||
this.jdbcTemplate = jdbcTemplate;
|
|
||||||
this.columnValidator = columnValidator;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private static final class GSIMFieldsMapper implements RowMapper<GroupSavingsIndividualMonitoringAccountData> {
|
private static final class GSIMFieldsMapper implements RowMapper<GroupSavingsIndividualMonitoringAccountData> {
|
||||||
|
|
||||||
public String schema() {
|
public String schema() {
|
||||||
|
|||||||
+2
-11
@@ -19,16 +19,15 @@
|
|||||||
package org.apache.fineract.portfolio.savings.service;
|
package org.apache.fineract.portfolio.savings.service;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext;
|
import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext;
|
||||||
import org.apache.fineract.portfolio.group.domain.Group;
|
import org.apache.fineract.portfolio.group.domain.Group;
|
||||||
import org.apache.fineract.portfolio.loanaccount.domain.LoanRepository;
|
import org.apache.fineract.portfolio.loanaccount.domain.LoanRepository;
|
||||||
import org.apache.fineract.portfolio.savings.domain.GSIMRepositoy;
|
import org.apache.fineract.portfolio.savings.domain.GSIMRepositoy;
|
||||||
import org.apache.fineract.portfolio.savings.domain.GroupSavingsIndividualMonitoring;
|
import org.apache.fineract.portfolio.savings.domain.GroupSavingsIndividualMonitoring;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
@Service
|
@RequiredArgsConstructor
|
||||||
@Transactional
|
@Transactional
|
||||||
public class GroupSavingsIndividualMonitoringWritePlatformServiceImpl implements GroupSavingsIndividualMonitoringWritePlatformService {
|
public class GroupSavingsIndividualMonitoringWritePlatformServiceImpl implements GroupSavingsIndividualMonitoringWritePlatformService {
|
||||||
|
|
||||||
@@ -38,14 +37,6 @@ public class GroupSavingsIndividualMonitoringWritePlatformServiceImpl implements
|
|||||||
|
|
||||||
private final LoanRepository loanRepository;
|
private final LoanRepository loanRepository;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
public GroupSavingsIndividualMonitoringWritePlatformServiceImpl(final PlatformSecurityContext context,
|
|
||||||
final GSIMRepositoy gsimAccountRepository, final LoanRepository loanRepository) {
|
|
||||||
this.context = context;
|
|
||||||
this.gsimAccountRepository = gsimAccountRepository;
|
|
||||||
this.loanRepository = loanRepository;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public GroupSavingsIndividualMonitoring addGSIMAccountInfo(String accountNumber, Group group, BigDecimal parentDeposit,
|
public GroupSavingsIndividualMonitoring addGSIMAccountInfo(String accountNumber, Group group, BigDecimal parentDeposit,
|
||||||
Long childAccountsCount, Boolean isAcceptingChild, Integer loanStatus, BigDecimal applicationId) {
|
Long childAccountsCount, Boolean isAcceptingChild, Integer loanStatus, BigDecimal applicationId) {
|
||||||
|
|||||||
+5
-22
@@ -28,6 +28,8 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.lang3.exception.ExceptionUtils;
|
import org.apache.commons.lang3.exception.ExceptionUtils;
|
||||||
import org.apache.fineract.accounting.producttoaccountmapping.service.ProductToGLAccountMappingWritePlatformService;
|
import org.apache.fineract.accounting.producttoaccountmapping.service.ProductToGLAccountMappingWritePlatformService;
|
||||||
import org.apache.fineract.infrastructure.core.api.JsonCommand;
|
import org.apache.fineract.infrastructure.core.api.JsonCommand;
|
||||||
@@ -47,17 +49,13 @@ import org.apache.fineract.portfolio.savings.domain.RecurringDepositProduct;
|
|||||||
import org.apache.fineract.portfolio.savings.domain.RecurringDepositProductRepository;
|
import org.apache.fineract.portfolio.savings.domain.RecurringDepositProductRepository;
|
||||||
import org.apache.fineract.portfolio.savings.exception.RecurringDepositProductNotFoundException;
|
import org.apache.fineract.portfolio.savings.exception.RecurringDepositProductNotFoundException;
|
||||||
import org.apache.fineract.portfolio.tax.domain.TaxGroup;
|
import org.apache.fineract.portfolio.tax.domain.TaxGroup;
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.dao.DataAccessException;
|
import org.springframework.dao.DataAccessException;
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
@Service
|
@Slf4j
|
||||||
|
@RequiredArgsConstructor
|
||||||
public class RecurringDepositProductWritePlatformServiceJpaRepositoryImpl implements RecurringDepositProductWritePlatformService {
|
public class RecurringDepositProductWritePlatformServiceJpaRepositoryImpl implements RecurringDepositProductWritePlatformService {
|
||||||
|
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(RecurringDepositProductWritePlatformServiceJpaRepositoryImpl.class);
|
|
||||||
private final PlatformSecurityContext context;
|
private final PlatformSecurityContext context;
|
||||||
private final RecurringDepositProductRepository recurringDepositProductRepository;
|
private final RecurringDepositProductRepository recurringDepositProductRepository;
|
||||||
private final DepositProductDataValidator fromApiJsonDataValidator;
|
private final DepositProductDataValidator fromApiJsonDataValidator;
|
||||||
@@ -65,21 +63,6 @@ public class RecurringDepositProductWritePlatformServiceJpaRepositoryImpl implem
|
|||||||
private final ProductToGLAccountMappingWritePlatformService accountMappingWritePlatformService;
|
private final ProductToGLAccountMappingWritePlatformService accountMappingWritePlatformService;
|
||||||
private final InterestRateChartAssembler chartAssembler;
|
private final InterestRateChartAssembler chartAssembler;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
public RecurringDepositProductWritePlatformServiceJpaRepositoryImpl(final PlatformSecurityContext context,
|
|
||||||
final RecurringDepositProductRepository recurringDepositProductRepository,
|
|
||||||
final DepositProductDataValidator fromApiJsonDataValidator, final DepositProductAssembler depositProductAssembler,
|
|
||||||
final ProductToGLAccountMappingWritePlatformService accountMappingWritePlatformService,
|
|
||||||
final InterestRateChartAssembler chartAssembler) {
|
|
||||||
this.context = context;
|
|
||||||
this.recurringDepositProductRepository = recurringDepositProductRepository;
|
|
||||||
this.fromApiJsonDataValidator = fromApiJsonDataValidator;
|
|
||||||
this.depositProductAssembler = depositProductAssembler;
|
|
||||||
|
|
||||||
this.accountMappingWritePlatformService = accountMappingWritePlatformService;
|
|
||||||
this.chartAssembler = chartAssembler;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
@Override
|
@Override
|
||||||
public CommandProcessingResult create(final JsonCommand command) {
|
public CommandProcessingResult create(final JsonCommand command) {
|
||||||
@@ -206,6 +189,6 @@ public class RecurringDepositProductWritePlatformServiceJpaRepositoryImpl implem
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void logAsErrorUnexpectedDataIntegrityException(final Exception dae) {
|
private void logAsErrorUnexpectedDataIntegrityException(final Exception dae) {
|
||||||
LOG.error("Error occured.", dae);
|
log.error("Error occured.", dae);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-8
@@ -28,25 +28,19 @@ import java.util.HashSet;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.fineract.infrastructure.core.data.ApiParameterError;
|
import org.apache.fineract.infrastructure.core.data.ApiParameterError;
|
||||||
import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder;
|
import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder;
|
||||||
import org.apache.fineract.infrastructure.core.exception.InvalidJsonException;
|
import org.apache.fineract.infrastructure.core.exception.InvalidJsonException;
|
||||||
import org.apache.fineract.infrastructure.core.exception.PlatformApiDataValidationException;
|
import org.apache.fineract.infrastructure.core.exception.PlatformApiDataValidationException;
|
||||||
import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper;
|
import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
@Component
|
@RequiredArgsConstructor
|
||||||
public final class SavingsAccountApplicationTransitionApiJsonValidator {
|
public final class SavingsAccountApplicationTransitionApiJsonValidator {
|
||||||
|
|
||||||
private final FromJsonHelper fromApiJsonHelper;
|
private final FromJsonHelper fromApiJsonHelper;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
public SavingsAccountApplicationTransitionApiJsonValidator(final FromJsonHelper fromApiJsonHelper) {
|
|
||||||
this.fromApiJsonHelper = fromApiJsonHelper;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void throwExceptionIfValidationWarningsExist(final List<ApiParameterError> dataValidationErrors) {
|
private void throwExceptionIfValidationWarningsExist(final List<ApiParameterError> dataValidationErrors) {
|
||||||
if (!dataValidationErrors.isEmpty()) {
|
if (!dataValidationErrors.isEmpty()) {
|
||||||
throw new PlatformApiDataValidationException(dataValidationErrors);
|
throw new PlatformApiDataValidationException(dataValidationErrors);
|
||||||
|
|||||||
-4
@@ -43,13 +43,10 @@ import org.apache.fineract.portfolio.savings.data.SavingsAccountAnnualFeeData;
|
|||||||
import org.apache.fineract.portfolio.savings.data.SavingsAccountChargeData;
|
import org.apache.fineract.portfolio.savings.data.SavingsAccountChargeData;
|
||||||
import org.apache.fineract.portfolio.savings.domain.SavingsAccountStatusType;
|
import org.apache.fineract.portfolio.savings.domain.SavingsAccountStatusType;
|
||||||
import org.apache.fineract.portfolio.tax.data.TaxGroupData;
|
import org.apache.fineract.portfolio.tax.data.TaxGroupData;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.dao.EmptyResultDataAccessException;
|
import org.springframework.dao.EmptyResultDataAccessException;
|
||||||
import org.springframework.jdbc.core.JdbcTemplate;
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
import org.springframework.jdbc.core.RowMapper;
|
import org.springframework.jdbc.core.RowMapper;
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
@Service
|
|
||||||
public class SavingsAccountChargeReadPlatformServiceImpl implements SavingsAccountChargeReadPlatformService {
|
public class SavingsAccountChargeReadPlatformServiceImpl implements SavingsAccountChargeReadPlatformService {
|
||||||
|
|
||||||
private final JdbcTemplate jdbcTemplate;
|
private final JdbcTemplate jdbcTemplate;
|
||||||
@@ -61,7 +58,6 @@ public class SavingsAccountChargeReadPlatformServiceImpl implements SavingsAccou
|
|||||||
// mappers
|
// mappers
|
||||||
private final SavingsAccountChargeDueMapper chargeDueMapper;
|
private final SavingsAccountChargeDueMapper chargeDueMapper;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
public SavingsAccountChargeReadPlatformServiceImpl(final PlatformSecurityContext context,
|
public SavingsAccountChargeReadPlatformServiceImpl(final PlatformSecurityContext context,
|
||||||
final ChargeDropdownReadPlatformService chargeDropdownReadPlatformService, final JdbcTemplate jdbcTemplate,
|
final ChargeDropdownReadPlatformService chargeDropdownReadPlatformService, final JdbcTemplate jdbcTemplate,
|
||||||
final DropdownReadPlatformService dropdownReadPlatformService, DatabaseSpecificSQLGenerator sqlGenerator) {
|
final DropdownReadPlatformService dropdownReadPlatformService, DatabaseSpecificSQLGenerator sqlGenerator) {
|
||||||
|
|||||||
+2
-8
@@ -30,6 +30,7 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.apache.fineract.infrastructure.core.domain.LocalDateInterval;
|
import org.apache.fineract.infrastructure.core.domain.LocalDateInterval;
|
||||||
import org.apache.fineract.infrastructure.core.service.DateUtils;
|
import org.apache.fineract.infrastructure.core.service.DateUtils;
|
||||||
import org.apache.fineract.organisation.monetary.domain.MonetaryCurrency;
|
import org.apache.fineract.organisation.monetary.domain.MonetaryCurrency;
|
||||||
@@ -47,19 +48,12 @@ import org.apache.fineract.portfolio.savings.domain.SavingsHelper;
|
|||||||
import org.apache.fineract.portfolio.savings.domain.interest.PostingPeriod;
|
import org.apache.fineract.portfolio.savings.domain.interest.PostingPeriod;
|
||||||
import org.apache.fineract.portfolio.tax.data.TaxComponentData;
|
import org.apache.fineract.portfolio.tax.data.TaxComponentData;
|
||||||
import org.apache.fineract.portfolio.tax.service.TaxUtils;
|
import org.apache.fineract.portfolio.tax.service.TaxUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
@Service
|
@RequiredArgsConstructor
|
||||||
public class SavingsAccountInterestPostingServiceImpl implements SavingsAccountInterestPostingService {
|
public class SavingsAccountInterestPostingServiceImpl implements SavingsAccountInterestPostingService {
|
||||||
|
|
||||||
private final SavingsHelper savingsHelper;
|
private final SavingsHelper savingsHelper;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
public SavingsAccountInterestPostingServiceImpl(final SavingsHelper savingsHelper) {
|
|
||||||
this.savingsHelper = savingsHelper;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SavingsAccountData postInterest(final MathContext mc, final LocalDate interestPostingUpToDate, final boolean isInterestTransfer,
|
public SavingsAccountData postInterest(final MathContext mc, final LocalDate interestPostingUpToDate, final boolean isInterestTransfer,
|
||||||
final boolean isSavingsInterestPostingAtCurrentPeriodEnd, final Integer financialYearBeginningMonth,
|
final boolean isSavingsInterestPostingAtCurrentPeriodEnd, final Integer financialYearBeginningMonth,
|
||||||
|
|||||||
-4
@@ -87,16 +87,13 @@ import org.apache.fineract.portfolio.tax.data.TaxComponentData;
|
|||||||
import org.apache.fineract.portfolio.tax.data.TaxDetailsData;
|
import org.apache.fineract.portfolio.tax.data.TaxDetailsData;
|
||||||
import org.apache.fineract.portfolio.tax.data.TaxGroupData;
|
import org.apache.fineract.portfolio.tax.data.TaxGroupData;
|
||||||
import org.apache.fineract.useradministration.domain.AppUser;
|
import org.apache.fineract.useradministration.domain.AppUser;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.dao.DataAccessException;
|
import org.springframework.dao.DataAccessException;
|
||||||
import org.springframework.dao.EmptyResultDataAccessException;
|
import org.springframework.dao.EmptyResultDataAccessException;
|
||||||
import org.springframework.jdbc.core.JdbcTemplate;
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
import org.springframework.jdbc.core.ResultSetExtractor;
|
import org.springframework.jdbc.core.ResultSetExtractor;
|
||||||
import org.springframework.jdbc.core.RowMapper;
|
import org.springframework.jdbc.core.RowMapper;
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
@Service
|
|
||||||
public class SavingsAccountReadPlatformServiceImpl implements SavingsAccountReadPlatformService {
|
public class SavingsAccountReadPlatformServiceImpl implements SavingsAccountReadPlatformService {
|
||||||
|
|
||||||
private final PlatformSecurityContext context;
|
private final PlatformSecurityContext context;
|
||||||
@@ -126,7 +123,6 @@ public class SavingsAccountReadPlatformServiceImpl implements SavingsAccountRead
|
|||||||
|
|
||||||
private final SavingsAccountRepositoryWrapper savingsAccountRepositoryWrapper;
|
private final SavingsAccountRepositoryWrapper savingsAccountRepositoryWrapper;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
public SavingsAccountReadPlatformServiceImpl(final PlatformSecurityContext context, final JdbcTemplate jdbcTemplate,
|
public SavingsAccountReadPlatformServiceImpl(final PlatformSecurityContext context, final JdbcTemplate jdbcTemplate,
|
||||||
final ClientReadPlatformService clientReadPlatformService, final GroupReadPlatformService groupReadPlatformService,
|
final ClientReadPlatformService clientReadPlatformService, final GroupReadPlatformService groupReadPlatformService,
|
||||||
final SavingsProductReadPlatformService savingProductReadPlatformService,
|
final SavingsProductReadPlatformService savingProductReadPlatformService,
|
||||||
|
|||||||
-2
@@ -131,13 +131,11 @@ import org.apache.fineract.useradministration.domain.AppUserRepositoryWrapper;
|
|||||||
import org.springframework.data.domain.PageRequest;
|
import org.springframework.data.domain.PageRequest;
|
||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
import org.springframework.data.domain.Sort;
|
import org.springframework.data.domain.Sort;
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@Service
|
|
||||||
public class SavingsAccountWritePlatformServiceJpaRepositoryImpl implements SavingsAccountWritePlatformService {
|
public class SavingsAccountWritePlatformServiceJpaRepositoryImpl implements SavingsAccountWritePlatformService {
|
||||||
|
|
||||||
private final PlatformSecurityContext context;
|
private final PlatformSecurityContext context;
|
||||||
|
|||||||
-2
@@ -87,10 +87,8 @@ import org.apache.fineract.portfolio.savings.domain.SavingsProductRepository;
|
|||||||
import org.apache.fineract.portfolio.savings.exception.SavingsProductNotFoundException;
|
import org.apache.fineract.portfolio.savings.exception.SavingsProductNotFoundException;
|
||||||
import org.apache.fineract.useradministration.domain.AppUser;
|
import org.apache.fineract.useradministration.domain.AppUser;
|
||||||
import org.springframework.dao.DataAccessException;
|
import org.springframework.dao.DataAccessException;
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
@Service
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class SavingsApplicationProcessWritePlatformServiceJpaRepositoryImpl implements SavingsApplicationProcessWritePlatformService {
|
public class SavingsApplicationProcessWritePlatformServiceJpaRepositoryImpl implements SavingsApplicationProcessWritePlatformService {
|
||||||
|
|||||||
+2
-2
@@ -21,6 +21,7 @@ package org.apache.fineract.portfolio.savings.service;
|
|||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import org.apache.fineract.infrastructure.core.data.EnumOptionData;
|
import org.apache.fineract.infrastructure.core.data.EnumOptionData;
|
||||||
import org.apache.fineract.portfolio.savings.SavingsCompoundingInterestPeriodType;
|
import org.apache.fineract.portfolio.savings.SavingsCompoundingInterestPeriodType;
|
||||||
import org.apache.fineract.portfolio.savings.SavingsInterestCalculationDaysInYearType;
|
import org.apache.fineract.portfolio.savings.SavingsInterestCalculationDaysInYearType;
|
||||||
@@ -28,9 +29,8 @@ import org.apache.fineract.portfolio.savings.SavingsInterestCalculationType;
|
|||||||
import org.apache.fineract.portfolio.savings.SavingsPeriodFrequencyType;
|
import org.apache.fineract.portfolio.savings.SavingsPeriodFrequencyType;
|
||||||
import org.apache.fineract.portfolio.savings.SavingsPostingInterestPeriodType;
|
import org.apache.fineract.portfolio.savings.SavingsPostingInterestPeriodType;
|
||||||
import org.apache.fineract.portfolio.savings.SavingsWithdrawalFeesType;
|
import org.apache.fineract.portfolio.savings.SavingsWithdrawalFeesType;
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
@Service
|
@NoArgsConstructor
|
||||||
public class SavingsDropdownReadPlatformServiceImpl implements SavingsDropdownReadPlatformService {
|
public class SavingsDropdownReadPlatformServiceImpl implements SavingsDropdownReadPlatformService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
-2
@@ -37,9 +37,7 @@ import org.apache.fineract.portfolio.tax.data.TaxGroupData;
|
|||||||
import org.springframework.dao.EmptyResultDataAccessException;
|
import org.springframework.dao.EmptyResultDataAccessException;
|
||||||
import org.springframework.jdbc.core.JdbcTemplate;
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
import org.springframework.jdbc.core.RowMapper;
|
import org.springframework.jdbc.core.RowMapper;
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
@Service
|
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class SavingsProductReadPlatformServiceImpl implements SavingsProductReadPlatformService {
|
public class SavingsProductReadPlatformServiceImpl implements SavingsProductReadPlatformService {
|
||||||
|
|
||||||
|
|||||||
+5
-21
@@ -28,6 +28,8 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.lang3.exception.ExceptionUtils;
|
import org.apache.commons.lang3.exception.ExceptionUtils;
|
||||||
import org.apache.fineract.accounting.producttoaccountmapping.service.ProductToGLAccountMappingWritePlatformService;
|
import org.apache.fineract.accounting.producttoaccountmapping.service.ProductToGLAccountMappingWritePlatformService;
|
||||||
import org.apache.fineract.infrastructure.core.api.JsonCommand;
|
import org.apache.fineract.infrastructure.core.api.JsonCommand;
|
||||||
@@ -48,17 +50,13 @@ import org.apache.fineract.portfolio.savings.domain.SavingsProductAssembler;
|
|||||||
import org.apache.fineract.portfolio.savings.domain.SavingsProductRepository;
|
import org.apache.fineract.portfolio.savings.domain.SavingsProductRepository;
|
||||||
import org.apache.fineract.portfolio.savings.exception.SavingsProductNotFoundException;
|
import org.apache.fineract.portfolio.savings.exception.SavingsProductNotFoundException;
|
||||||
import org.apache.fineract.portfolio.tax.domain.TaxGroup;
|
import org.apache.fineract.portfolio.tax.domain.TaxGroup;
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.dao.DataAccessException;
|
import org.springframework.dao.DataAccessException;
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
@Service
|
@Slf4j
|
||||||
|
@RequiredArgsConstructor
|
||||||
public class SavingsProductWritePlatformServiceJpaRepositoryImpl implements SavingsProductWritePlatformService {
|
public class SavingsProductWritePlatformServiceJpaRepositoryImpl implements SavingsProductWritePlatformService {
|
||||||
|
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(SavingsProductWritePlatformServiceJpaRepositoryImpl.class);
|
|
||||||
private final PlatformSecurityContext context;
|
private final PlatformSecurityContext context;
|
||||||
private final SavingsProductRepository savingProductRepository;
|
private final SavingsProductRepository savingProductRepository;
|
||||||
private final SavingsProductDataValidator fromApiJsonDataValidator;
|
private final SavingsProductDataValidator fromApiJsonDataValidator;
|
||||||
@@ -66,20 +64,6 @@ public class SavingsProductWritePlatformServiceJpaRepositoryImpl implements Savi
|
|||||||
private final ProductToGLAccountMappingWritePlatformService accountMappingWritePlatformService;
|
private final ProductToGLAccountMappingWritePlatformService accountMappingWritePlatformService;
|
||||||
private final FineractEntityAccessUtil fineractEntityAccessUtil;
|
private final FineractEntityAccessUtil fineractEntityAccessUtil;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
public SavingsProductWritePlatformServiceJpaRepositoryImpl(final PlatformSecurityContext context,
|
|
||||||
final SavingsProductRepository savingProductRepository, final SavingsProductDataValidator fromApiJsonDataValidator,
|
|
||||||
final SavingsProductAssembler savingsProductAssembler,
|
|
||||||
final ProductToGLAccountMappingWritePlatformService accountMappingWritePlatformService,
|
|
||||||
final FineractEntityAccessUtil fineractEntityAccessUtil) {
|
|
||||||
this.context = context;
|
|
||||||
this.savingProductRepository = savingProductRepository;
|
|
||||||
this.fromApiJsonDataValidator = fromApiJsonDataValidator;
|
|
||||||
this.savingsProductAssembler = savingsProductAssembler;
|
|
||||||
this.accountMappingWritePlatformService = accountMappingWritePlatformService;
|
|
||||||
this.fineractEntityAccessUtil = fineractEntityAccessUtil;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Guaranteed to throw an exception no matter what the data integrity issue is.
|
* Guaranteed to throw an exception no matter what the data integrity issue is.
|
||||||
*/
|
*/
|
||||||
@@ -103,7 +87,7 @@ public class SavingsProductWritePlatformServiceJpaRepositoryImpl implements Savi
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void logAsErrorUnexpectedDataIntegrityException(final Exception dae) {
|
private void logAsErrorUnexpectedDataIntegrityException(final Exception dae) {
|
||||||
LOG.error("Error occured.", dae);
|
log.error("Error occured.", dae);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
|
|||||||
-4
@@ -41,18 +41,14 @@ import org.apache.fineract.infrastructure.security.service.PlatformSecurityConte
|
|||||||
import org.apache.fineract.portfolio.savings.data.SavingsAccountData;
|
import org.apache.fineract.portfolio.savings.data.SavingsAccountData;
|
||||||
import org.apache.fineract.portfolio.savings.data.SavingsAccountSummaryData;
|
import org.apache.fineract.portfolio.savings.data.SavingsAccountSummaryData;
|
||||||
import org.apache.fineract.portfolio.savings.data.SavingsAccountTransactionData;
|
import org.apache.fineract.portfolio.savings.data.SavingsAccountTransactionData;
|
||||||
import org.springframework.context.annotation.Scope;
|
|
||||||
import org.springframework.dao.DataAccessException;
|
import org.springframework.dao.DataAccessException;
|
||||||
import org.springframework.jdbc.core.JdbcTemplate;
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
import org.springframework.transaction.annotation.Isolation;
|
import org.springframework.transaction.annotation.Isolation;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@Setter
|
@Setter
|
||||||
@Component
|
|
||||||
@Scope("prototype")
|
|
||||||
public class SavingsSchedularInterestPoster {
|
public class SavingsSchedularInterestPoster {
|
||||||
|
|
||||||
private static final String SAVINGS_TRANSACTION_IDENTIFIER = "S";
|
private static final String SAVINGS_TRANSACTION_IDENTIFIER = "S";
|
||||||
|
|||||||
-4
@@ -26,8 +26,6 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.apache.fineract.infrastructure.core.domain.FineractContext;
|
import org.apache.fineract.infrastructure.core.domain.FineractContext;
|
||||||
import org.apache.fineract.infrastructure.core.service.ThreadLocalContextUtil;
|
import org.apache.fineract.infrastructure.core.service.ThreadLocalContextUtil;
|
||||||
import org.apache.fineract.portfolio.savings.data.SavingsAccountData;
|
import org.apache.fineract.portfolio.savings.data.SavingsAccountData;
|
||||||
import org.springframework.context.annotation.Scope;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author manoj
|
* @author manoj
|
||||||
@@ -35,8 +33,6 @@ import org.springframework.stereotype.Component;
|
|||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@Component
|
|
||||||
@Scope("prototype")
|
|
||||||
public class SavingsSchedularInterestPosterTask implements Callable<Void> {
|
public class SavingsSchedularInterestPosterTask implements Callable<Void> {
|
||||||
|
|
||||||
private final SavingsSchedularInterestPoster interestPoster;
|
private final SavingsSchedularInterestPoster interestPoster;
|
||||||
|
|||||||
-2
@@ -57,10 +57,8 @@ import org.springframework.data.domain.Sort;
|
|||||||
import org.springframework.data.support.PageableExecutionUtils;
|
import org.springframework.data.support.PageableExecutionUtils;
|
||||||
import org.springframework.jdbc.core.JdbcTemplate;
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
import org.springframework.jdbc.support.rowset.SqlRowSet;
|
import org.springframework.jdbc.support.rowset.SqlRowSet;
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
@Service
|
|
||||||
@Transactional(readOnly = true)
|
@Transactional(readOnly = true)
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class SavingsAccountTransactionsSearchServiceImpl implements SavingsAccountTransactionSearchService {
|
public class SavingsAccountTransactionsSearchServiceImpl implements SavingsAccountTransactionSearchService {
|
||||||
|
|||||||
+440
@@ -0,0 +1,440 @@
|
|||||||
|
/**
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
* or more contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. The ASF licenses this file
|
||||||
|
* to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
|
package org.apache.fineract.portfolio.savings.starter;
|
||||||
|
|
||||||
|
import org.apache.fineract.accounting.journalentry.service.JournalEntryWritePlatformService;
|
||||||
|
import org.apache.fineract.accounting.producttoaccountmapping.service.ProductToGLAccountMappingWritePlatformService;
|
||||||
|
import org.apache.fineract.batch.exception.ErrorHandler;
|
||||||
|
import org.apache.fineract.commands.service.CommandProcessingService;
|
||||||
|
import org.apache.fineract.infrastructure.accountnumberformat.domain.AccountNumberFormatRepositoryWrapper;
|
||||||
|
import org.apache.fineract.infrastructure.codes.service.CodeValueReadPlatformService;
|
||||||
|
import org.apache.fineract.infrastructure.configuration.domain.ConfigurationDomainService;
|
||||||
|
import org.apache.fineract.infrastructure.core.data.PaginationParametersDataValidator;
|
||||||
|
import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper;
|
||||||
|
import org.apache.fineract.infrastructure.core.service.PaginationHelper;
|
||||||
|
import org.apache.fineract.infrastructure.core.service.database.DatabaseSpecificSQLGenerator;
|
||||||
|
import org.apache.fineract.infrastructure.dataqueries.data.DataTableValidator;
|
||||||
|
import org.apache.fineract.infrastructure.dataqueries.service.EntityDatatableChecksReadService;
|
||||||
|
import org.apache.fineract.infrastructure.dataqueries.service.EntityDatatableChecksWritePlatformService;
|
||||||
|
import org.apache.fineract.infrastructure.dataqueries.service.GenericDataService;
|
||||||
|
import org.apache.fineract.infrastructure.dataqueries.service.ReadWriteNonCoreDataServiceImpl;
|
||||||
|
import org.apache.fineract.infrastructure.entityaccess.service.FineractEntityAccessUtil;
|
||||||
|
import org.apache.fineract.infrastructure.event.business.service.BusinessEventNotifierService;
|
||||||
|
import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext;
|
||||||
|
import org.apache.fineract.infrastructure.security.utils.ColumnValidator;
|
||||||
|
import org.apache.fineract.organisation.holiday.domain.HolidayRepositoryWrapper;
|
||||||
|
import org.apache.fineract.organisation.monetary.domain.ApplicationCurrencyRepositoryWrapper;
|
||||||
|
import org.apache.fineract.organisation.staff.domain.StaffRepositoryWrapper;
|
||||||
|
import org.apache.fineract.organisation.staff.service.StaffReadPlatformService;
|
||||||
|
import org.apache.fineract.organisation.workingdays.domain.WorkingDaysRepositoryWrapper;
|
||||||
|
import org.apache.fineract.portfolio.account.domain.AccountAssociationsRepository;
|
||||||
|
import org.apache.fineract.portfolio.account.domain.StandingInstructionRepository;
|
||||||
|
import org.apache.fineract.portfolio.account.service.AccountAssociationsReadPlatformService;
|
||||||
|
import org.apache.fineract.portfolio.account.service.AccountTransfersReadPlatformService;
|
||||||
|
import org.apache.fineract.portfolio.account.service.AccountTransfersWritePlatformService;
|
||||||
|
import org.apache.fineract.portfolio.calendar.domain.CalendarInstanceRepository;
|
||||||
|
import org.apache.fineract.portfolio.calendar.service.CalendarReadPlatformService;
|
||||||
|
import org.apache.fineract.portfolio.charge.domain.ChargeRepositoryWrapper;
|
||||||
|
import org.apache.fineract.portfolio.charge.service.ChargeDropdownReadPlatformService;
|
||||||
|
import org.apache.fineract.portfolio.charge.service.ChargeReadPlatformService;
|
||||||
|
import org.apache.fineract.portfolio.client.domain.AccountNumberGenerator;
|
||||||
|
import org.apache.fineract.portfolio.client.domain.ClientRepositoryWrapper;
|
||||||
|
import org.apache.fineract.portfolio.client.service.ClientReadPlatformService;
|
||||||
|
import org.apache.fineract.portfolio.common.service.DropdownReadPlatformService;
|
||||||
|
import org.apache.fineract.portfolio.group.domain.GroupRepository;
|
||||||
|
import org.apache.fineract.portfolio.group.domain.GroupRepositoryWrapper;
|
||||||
|
import org.apache.fineract.portfolio.group.service.GroupReadPlatformService;
|
||||||
|
import org.apache.fineract.portfolio.interestratechart.service.InterestIncentiveDropdownReadPlatformService;
|
||||||
|
import org.apache.fineract.portfolio.interestratechart.service.InterestRateChartAssembler;
|
||||||
|
import org.apache.fineract.portfolio.interestratechart.service.InterestRateChartDropdownReadPlatformService;
|
||||||
|
import org.apache.fineract.portfolio.interestratechart.service.InterestRateChartReadPlatformService;
|
||||||
|
import org.apache.fineract.portfolio.loanaccount.domain.LoanRepository;
|
||||||
|
import org.apache.fineract.portfolio.note.domain.NoteRepository;
|
||||||
|
import org.apache.fineract.portfolio.paymentdetail.service.PaymentDetailWritePlatformService;
|
||||||
|
import org.apache.fineract.portfolio.paymenttype.service.PaymentTypeReadPlatformService;
|
||||||
|
import org.apache.fineract.portfolio.savings.data.DepositAccountDataValidator;
|
||||||
|
import org.apache.fineract.portfolio.savings.data.DepositAccountTransactionDataValidator;
|
||||||
|
import org.apache.fineract.portfolio.savings.data.DepositProductDataValidator;
|
||||||
|
import org.apache.fineract.portfolio.savings.data.SavingsAccountChargeDataValidator;
|
||||||
|
import org.apache.fineract.portfolio.savings.data.SavingsAccountDataValidator;
|
||||||
|
import org.apache.fineract.portfolio.savings.data.SavingsAccountTransactionDataValidator;
|
||||||
|
import org.apache.fineract.portfolio.savings.data.SavingsProductDataValidator;
|
||||||
|
import org.apache.fineract.portfolio.savings.domain.DepositAccountAssembler;
|
||||||
|
import org.apache.fineract.portfolio.savings.domain.DepositAccountDomainService;
|
||||||
|
import org.apache.fineract.portfolio.savings.domain.DepositAccountOnHoldTransactionRepository;
|
||||||
|
import org.apache.fineract.portfolio.savings.domain.DepositProductAssembler;
|
||||||
|
import org.apache.fineract.portfolio.savings.domain.FixedDepositAccountRepository;
|
||||||
|
import org.apache.fineract.portfolio.savings.domain.FixedDepositProductRepository;
|
||||||
|
import org.apache.fineract.portfolio.savings.domain.GSIMRepositoy;
|
||||||
|
import org.apache.fineract.portfolio.savings.domain.RecurringDepositAccountRepository;
|
||||||
|
import org.apache.fineract.portfolio.savings.domain.RecurringDepositProductRepository;
|
||||||
|
import org.apache.fineract.portfolio.savings.domain.SavingsAccountAssembler;
|
||||||
|
import org.apache.fineract.portfolio.savings.domain.SavingsAccountChargeAssembler;
|
||||||
|
import org.apache.fineract.portfolio.savings.domain.SavingsAccountChargeRepositoryWrapper;
|
||||||
|
import org.apache.fineract.portfolio.savings.domain.SavingsAccountDomainService;
|
||||||
|
import org.apache.fineract.portfolio.savings.domain.SavingsAccountRepositoryWrapper;
|
||||||
|
import org.apache.fineract.portfolio.savings.domain.SavingsAccountTransactionRepository;
|
||||||
|
import org.apache.fineract.portfolio.savings.domain.SavingsHelper;
|
||||||
|
import org.apache.fineract.portfolio.savings.domain.SavingsProductAssembler;
|
||||||
|
import org.apache.fineract.portfolio.savings.domain.SavingsProductRepository;
|
||||||
|
import org.apache.fineract.portfolio.savings.service.DepositAccountInterestRateChartReadPlatformService;
|
||||||
|
import org.apache.fineract.portfolio.savings.service.DepositAccountInterestRateChartReadPlatformServiceImpl;
|
||||||
|
import org.apache.fineract.portfolio.savings.service.DepositAccountOnHoldTransactionReadPlatformService;
|
||||||
|
import org.apache.fineract.portfolio.savings.service.DepositAccountOnHoldTransactionReadPlatformServiceImpl;
|
||||||
|
import org.apache.fineract.portfolio.savings.service.DepositAccountPreMatureCalculationPlatformService;
|
||||||
|
import org.apache.fineract.portfolio.savings.service.DepositAccountPreMatureCalculationPlatformServiceImpl;
|
||||||
|
import org.apache.fineract.portfolio.savings.service.DepositAccountReadPlatformService;
|
||||||
|
import org.apache.fineract.portfolio.savings.service.DepositAccountReadPlatformServiceImpl;
|
||||||
|
import org.apache.fineract.portfolio.savings.service.DepositAccountWritePlatformService;
|
||||||
|
import org.apache.fineract.portfolio.savings.service.DepositAccountWritePlatformServiceJpaRepositoryImpl;
|
||||||
|
import org.apache.fineract.portfolio.savings.service.DepositApplicationProcessWritePlatformService;
|
||||||
|
import org.apache.fineract.portfolio.savings.service.DepositApplicationProcessWritePlatformServiceJpaRepositoryImpl;
|
||||||
|
import org.apache.fineract.portfolio.savings.service.DepositProductReadPlatformService;
|
||||||
|
import org.apache.fineract.portfolio.savings.service.DepositProductReadPlatformServiceImpl;
|
||||||
|
import org.apache.fineract.portfolio.savings.service.DepositsDropdownReadPlatformService;
|
||||||
|
import org.apache.fineract.portfolio.savings.service.DepositsDropdownReadPlatformServiceImpl;
|
||||||
|
import org.apache.fineract.portfolio.savings.service.FixedDepositProductWritePlatformService;
|
||||||
|
import org.apache.fineract.portfolio.savings.service.FixedDepositProductWritePlatformServiceJpaRepositoryImpl;
|
||||||
|
import org.apache.fineract.portfolio.savings.service.GSIMReadPlatformService;
|
||||||
|
import org.apache.fineract.portfolio.savings.service.GSIMReadPlatformServiceImpl;
|
||||||
|
import org.apache.fineract.portfolio.savings.service.GroupSavingsIndividualMonitoringWritePlatformService;
|
||||||
|
import org.apache.fineract.portfolio.savings.service.GroupSavingsIndividualMonitoringWritePlatformServiceImpl;
|
||||||
|
import org.apache.fineract.portfolio.savings.service.RecurringDepositProductWritePlatformService;
|
||||||
|
import org.apache.fineract.portfolio.savings.service.RecurringDepositProductWritePlatformServiceJpaRepositoryImpl;
|
||||||
|
import org.apache.fineract.portfolio.savings.service.SavingsAccountApplicationTransitionApiJsonValidator;
|
||||||
|
import org.apache.fineract.portfolio.savings.service.SavingsAccountChargeReadPlatformService;
|
||||||
|
import org.apache.fineract.portfolio.savings.service.SavingsAccountChargeReadPlatformServiceImpl;
|
||||||
|
import org.apache.fineract.portfolio.savings.service.SavingsAccountInterestPostingService;
|
||||||
|
import org.apache.fineract.portfolio.savings.service.SavingsAccountInterestPostingServiceImpl;
|
||||||
|
import org.apache.fineract.portfolio.savings.service.SavingsAccountReadPlatformService;
|
||||||
|
import org.apache.fineract.portfolio.savings.service.SavingsAccountReadPlatformServiceImpl;
|
||||||
|
import org.apache.fineract.portfolio.savings.service.SavingsAccountWritePlatformService;
|
||||||
|
import org.apache.fineract.portfolio.savings.service.SavingsAccountWritePlatformServiceJpaRepositoryImpl;
|
||||||
|
import org.apache.fineract.portfolio.savings.service.SavingsApplicationProcessWritePlatformService;
|
||||||
|
import org.apache.fineract.portfolio.savings.service.SavingsApplicationProcessWritePlatformServiceJpaRepositoryImpl;
|
||||||
|
import org.apache.fineract.portfolio.savings.service.SavingsDropdownReadPlatformService;
|
||||||
|
import org.apache.fineract.portfolio.savings.service.SavingsDropdownReadPlatformServiceImpl;
|
||||||
|
import org.apache.fineract.portfolio.savings.service.SavingsProductReadPlatformService;
|
||||||
|
import org.apache.fineract.portfolio.savings.service.SavingsProductReadPlatformServiceImpl;
|
||||||
|
import org.apache.fineract.portfolio.savings.service.SavingsProductWritePlatformService;
|
||||||
|
import org.apache.fineract.portfolio.savings.service.SavingsProductWritePlatformServiceJpaRepositoryImpl;
|
||||||
|
import org.apache.fineract.portfolio.savings.service.SavingsSchedularInterestPoster;
|
||||||
|
import org.apache.fineract.portfolio.savings.service.SavingsSchedularInterestPosterTask;
|
||||||
|
import org.apache.fineract.portfolio.savings.service.search.SavingsAccountTransactionSearchService;
|
||||||
|
import org.apache.fineract.portfolio.savings.service.search.SavingsAccountTransactionsSearchServiceImpl;
|
||||||
|
import org.apache.fineract.useradministration.domain.AppUserRepositoryWrapper;
|
||||||
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.context.annotation.Scope;
|
||||||
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
public class SavingsConfiguration {
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
@ConditionalOnMissingBean(SavingsAccountTransactionSearchService.class)
|
||||||
|
public SavingsAccountTransactionSearchService savingsAccountTransactionSearchService(PlatformSecurityContext context,
|
||||||
|
GenericDataService genericDataService, DatabaseSpecificSQLGenerator sqlGenerator,
|
||||||
|
ReadWriteNonCoreDataServiceImpl datatableService, DataTableValidator dataTableValidator, JdbcTemplate jdbcTemplate) {
|
||||||
|
return new SavingsAccountTransactionsSearchServiceImpl(context, genericDataService, sqlGenerator, datatableService,
|
||||||
|
dataTableValidator, jdbcTemplate);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public DepositAccountInterestRateChartReadPlatformServiceImpl.DepositAccountInterestRateChartExtractor depositAccountInterestRateChartExtractor(
|
||||||
|
DatabaseSpecificSQLGenerator sqlGenerator) {
|
||||||
|
return new DepositAccountInterestRateChartReadPlatformServiceImpl.DepositAccountInterestRateChartExtractor(sqlGenerator);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
@ConditionalOnMissingBean(DepositAccountInterestRateChartReadPlatformService.class)
|
||||||
|
public DepositAccountInterestRateChartReadPlatformService depositAccountInterestRateChartReadPlatformService(
|
||||||
|
PlatformSecurityContext context, JdbcTemplate jdbcTemplate,
|
||||||
|
DepositAccountInterestRateChartReadPlatformServiceImpl.DepositAccountInterestRateChartExtractor chartExtractor,
|
||||||
|
InterestRateChartDropdownReadPlatformService chartDropdownReadPlatformService,
|
||||||
|
InterestIncentiveDropdownReadPlatformService interestIncentiveDropdownReadPlatformService,
|
||||||
|
CodeValueReadPlatformService codeValueReadPlatformService) {
|
||||||
|
return new DepositAccountInterestRateChartReadPlatformServiceImpl(context, jdbcTemplate, chartExtractor,
|
||||||
|
chartDropdownReadPlatformService, interestIncentiveDropdownReadPlatformService, codeValueReadPlatformService);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
@ConditionalOnMissingBean(DepositAccountOnHoldTransactionReadPlatformService.class)
|
||||||
|
public DepositAccountOnHoldTransactionReadPlatformService depositAccountOnHoldTransactionReadPlatformService(JdbcTemplate jdbcTemplate,
|
||||||
|
ColumnValidator columnValidator, DatabaseSpecificSQLGenerator sqlGenerator, PaginationHelper paginationHelper) {
|
||||||
|
return new DepositAccountOnHoldTransactionReadPlatformServiceImpl(jdbcTemplate, sqlGenerator, columnValidator, paginationHelper);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
@ConditionalOnMissingBean(DepositAccountPreMatureCalculationPlatformService.class)
|
||||||
|
public DepositAccountPreMatureCalculationPlatformService depositAccountPreMatureCalculationPlatformService(
|
||||||
|
FromJsonHelper fromJsonHelper, DepositAccountTransactionDataValidator depositAccountTransactionDataValidator,
|
||||||
|
DepositAccountAssembler depositAccountAssembler, SavingsAccountReadPlatformService savingsAccountReadPlatformService,
|
||||||
|
ConfigurationDomainService configurationDomainService, PaymentTypeReadPlatformService paymentTypeReadPlatformService) {
|
||||||
|
return new DepositAccountPreMatureCalculationPlatformServiceImpl(fromJsonHelper, depositAccountTransactionDataValidator,
|
||||||
|
depositAccountAssembler, savingsAccountReadPlatformService, configurationDomainService, paymentTypeReadPlatformService);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
@ConditionalOnMissingBean(DepositAccountReadPlatformService.class)
|
||||||
|
public DepositAccountReadPlatformService depositAccountReadPlatformService(PlatformSecurityContext context, JdbcTemplate jdbcTemplate,
|
||||||
|
DepositAccountInterestRateChartReadPlatformService chartReadPlatformService,
|
||||||
|
InterestRateChartReadPlatformService productChartReadPlatformService,
|
||||||
|
PaginationParametersDataValidator paginationParametersDataValidator, DatabaseSpecificSQLGenerator sqlGenerator,
|
||||||
|
PaginationHelper paginationHelper, ClientReadPlatformService clientReadPlatformService,
|
||||||
|
GroupReadPlatformService groupReadPlatformService, DepositProductReadPlatformService depositProductReadPlatformService,
|
||||||
|
SavingsDropdownReadPlatformService savingsDropdownReadPlatformService, ChargeReadPlatformService chargeReadPlatformService,
|
||||||
|
StaffReadPlatformService staffReadPlatformService, DepositsDropdownReadPlatformService depositsDropdownReadPlatformService,
|
||||||
|
SavingsAccountReadPlatformService savingsAccountReadPlatformService, DropdownReadPlatformService dropdownReadPlatformService,
|
||||||
|
CalendarReadPlatformService calendarReadPlatformService, PaymentTypeReadPlatformService paymentTypeReadPlatformService) {
|
||||||
|
return new DepositAccountReadPlatformServiceImpl(context, jdbcTemplate, chartReadPlatformService, productChartReadPlatformService,
|
||||||
|
paginationParametersDataValidator, sqlGenerator, paginationHelper, clientReadPlatformService, groupReadPlatformService,
|
||||||
|
depositProductReadPlatformService, savingsDropdownReadPlatformService, chargeReadPlatformService, staffReadPlatformService,
|
||||||
|
depositsDropdownReadPlatformService, savingsAccountReadPlatformService, dropdownReadPlatformService,
|
||||||
|
calendarReadPlatformService, paymentTypeReadPlatformService);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
@ConditionalOnMissingBean(DepositAccountWritePlatformService.class)
|
||||||
|
public DepositAccountWritePlatformService depositAccountWritePlatformService(PlatformSecurityContext context,
|
||||||
|
SavingsAccountRepositoryWrapper savingAccountRepositoryWrapper,
|
||||||
|
SavingsAccountTransactionRepository savingsAccountTransactionRepository, DepositAccountAssembler depositAccountAssembler,
|
||||||
|
DepositAccountTransactionDataValidator depositAccountTransactionDataValidator,
|
||||||
|
SavingsAccountChargeDataValidator savingsAccountChargeDataValidator,
|
||||||
|
PaymentDetailWritePlatformService paymentDetailWritePlatformService,
|
||||||
|
ApplicationCurrencyRepositoryWrapper applicationCurrencyRepositoryWrapper,
|
||||||
|
JournalEntryWritePlatformService journalEntryWritePlatformService, DepositAccountDomainService depositAccountDomainService,
|
||||||
|
NoteRepository noteRepository, AccountTransfersReadPlatformService accountTransfersReadPlatformService,
|
||||||
|
ChargeRepositoryWrapper chargeRepository, SavingsAccountChargeRepositoryWrapper savingsAccountChargeRepository,
|
||||||
|
AccountAssociationsReadPlatformService accountAssociationsReadPlatformService,
|
||||||
|
AccountTransfersWritePlatformService accountTransfersWritePlatformService,
|
||||||
|
DepositAccountReadPlatformService depositAccountReadPlatformService, CalendarInstanceRepository calendarInstanceRepository,
|
||||||
|
ConfigurationDomainService configurationDomainService, HolidayRepositoryWrapper holidayRepository,
|
||||||
|
WorkingDaysRepositoryWrapper workingDaysRepository,
|
||||||
|
DepositAccountOnHoldTransactionRepository depositAccountOnHoldTransactionRepository
|
||||||
|
|
||||||
|
) {
|
||||||
|
return new DepositAccountWritePlatformServiceJpaRepositoryImpl(context, savingAccountRepositoryWrapper,
|
||||||
|
savingsAccountTransactionRepository, depositAccountAssembler, depositAccountTransactionDataValidator,
|
||||||
|
savingsAccountChargeDataValidator, paymentDetailWritePlatformService, applicationCurrencyRepositoryWrapper,
|
||||||
|
journalEntryWritePlatformService, depositAccountDomainService, noteRepository, accountTransfersReadPlatformService,
|
||||||
|
chargeRepository, savingsAccountChargeRepository, accountAssociationsReadPlatformService,
|
||||||
|
accountTransfersWritePlatformService, depositAccountReadPlatformService, calendarInstanceRepository,
|
||||||
|
configurationDomainService, holidayRepository, workingDaysRepository, depositAccountOnHoldTransactionRepository);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
@ConditionalOnMissingBean(DepositApplicationProcessWritePlatformService.class)
|
||||||
|
public DepositApplicationProcessWritePlatformService depositApplicationProcessWritePlatformService(PlatformSecurityContext context,
|
||||||
|
SavingsAccountRepositoryWrapper savingAccountRepository, FixedDepositAccountRepository fixedDepositAccountRepository,
|
||||||
|
RecurringDepositAccountRepository recurringDepositAccountRepository, DepositAccountAssembler depositAccountAssembler,
|
||||||
|
DepositAccountDataValidator depositAccountDataValidator, AccountNumberGenerator accountNumberGenerator,
|
||||||
|
ClientRepositoryWrapper clientRepository, GroupRepository groupRepository, SavingsProductRepository savingsProductRepository,
|
||||||
|
NoteRepository noteRepository, StaffRepositoryWrapper staffRepository,
|
||||||
|
SavingsAccountApplicationTransitionApiJsonValidator savingsAccountApplicationTransitionApiJsonValidator,
|
||||||
|
SavingsAccountChargeAssembler savingsAccountChargeAssembler, AccountAssociationsRepository accountAssociationsRepository,
|
||||||
|
FromJsonHelper fromJsonHelper, CalendarInstanceRepository calendarInstanceRepository,
|
||||||
|
ConfigurationDomainService configurationDomainService, AccountNumberFormatRepositoryWrapper accountNumberFormatRepository,
|
||||||
|
BusinessEventNotifierService businessEventNotifierService) {
|
||||||
|
return new DepositApplicationProcessWritePlatformServiceJpaRepositoryImpl(context, savingAccountRepository,
|
||||||
|
fixedDepositAccountRepository, recurringDepositAccountRepository, depositAccountAssembler, depositAccountDataValidator,
|
||||||
|
accountNumberGenerator, clientRepository, groupRepository, savingsProductRepository, noteRepository, staffRepository,
|
||||||
|
savingsAccountApplicationTransitionApiJsonValidator, savingsAccountChargeAssembler, accountAssociationsRepository,
|
||||||
|
fromJsonHelper, calendarInstanceRepository, configurationDomainService, accountNumberFormatRepository,
|
||||||
|
businessEventNotifierService);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
@ConditionalOnMissingBean(DepositProductReadPlatformService.class)
|
||||||
|
public DepositProductReadPlatformService depositProductReadPlatformService(PlatformSecurityContext context, JdbcTemplate jdbcTemplate,
|
||||||
|
InterestRateChartReadPlatformService interestRateChartReadPlatformService) {
|
||||||
|
return new DepositProductReadPlatformServiceImpl(context, jdbcTemplate, interestRateChartReadPlatformService);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
@ConditionalOnMissingBean(DepositsDropdownReadPlatformService.class)
|
||||||
|
public DepositsDropdownReadPlatformService depositsDropdownReadPlatformService() {
|
||||||
|
return new DepositsDropdownReadPlatformServiceImpl();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
@ConditionalOnMissingBean(FixedDepositProductWritePlatformService.class)
|
||||||
|
public FixedDepositProductWritePlatformService fixedDepositProductWritePlatformService(PlatformSecurityContext context,
|
||||||
|
FixedDepositProductRepository fixedDepositProductRepository, DepositProductDataValidator fromApiJsonDataValidator,
|
||||||
|
DepositProductAssembler depositProductAssembler,
|
||||||
|
ProductToGLAccountMappingWritePlatformService accountMappingWritePlatformService, InterestRateChartAssembler chartAssembler) {
|
||||||
|
return new FixedDepositProductWritePlatformServiceJpaRepositoryImpl(context, fixedDepositProductRepository,
|
||||||
|
fromApiJsonDataValidator, depositProductAssembler, accountMappingWritePlatformService, chartAssembler);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
@ConditionalOnMissingBean(GroupSavingsIndividualMonitoringWritePlatformService.class)
|
||||||
|
public GroupSavingsIndividualMonitoringWritePlatformService groupSavingsIndividualMonitoringWritePlatformService(
|
||||||
|
PlatformSecurityContext context, GSIMRepositoy gsimAccountRepository, LoanRepository loanRepository) {
|
||||||
|
return new GroupSavingsIndividualMonitoringWritePlatformServiceImpl(context, gsimAccountRepository, loanRepository);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
@ConditionalOnMissingBean(GSIMReadPlatformService.class)
|
||||||
|
public GSIMReadPlatformService gsimReadPlatformService(JdbcTemplate jdbcTemplate, PlatformSecurityContext context,
|
||||||
|
ColumnValidator columnValidator) {
|
||||||
|
return new GSIMReadPlatformServiceImpl(jdbcTemplate, context, columnValidator);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
@ConditionalOnMissingBean(RecurringDepositProductWritePlatformService.class)
|
||||||
|
public RecurringDepositProductWritePlatformService recurringDepositProductWritePlatformService(PlatformSecurityContext context,
|
||||||
|
RecurringDepositProductRepository recurringDepositProductRepository, DepositProductDataValidator fromApiJsonDataValidator,
|
||||||
|
DepositProductAssembler depositProductAssembler,
|
||||||
|
ProductToGLAccountMappingWritePlatformService accountMappingWritePlatformService, InterestRateChartAssembler chartAssembler) {
|
||||||
|
return new RecurringDepositProductWritePlatformServiceJpaRepositoryImpl(context, recurringDepositProductRepository,
|
||||||
|
fromApiJsonDataValidator, depositProductAssembler, accountMappingWritePlatformService, chartAssembler);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
@ConditionalOnMissingBean(SavingsAccountApplicationTransitionApiJsonValidator.class)
|
||||||
|
public SavingsAccountApplicationTransitionApiJsonValidator savingsAccountApplicationTransitionApiJsonValidator(
|
||||||
|
FromJsonHelper fromApiJsonHelper) {
|
||||||
|
return new SavingsAccountApplicationTransitionApiJsonValidator(fromApiJsonHelper);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
@ConditionalOnMissingBean(SavingsAccountChargeReadPlatformService.class)
|
||||||
|
public SavingsAccountChargeReadPlatformService savingsAccountChargeReadPlatformService(PlatformSecurityContext context,
|
||||||
|
ChargeDropdownReadPlatformService chargeDropdownReadPlatformService, JdbcTemplate jdbcTemplate,
|
||||||
|
DropdownReadPlatformService dropdownReadPlatformService, DatabaseSpecificSQLGenerator sqlGenerator) {
|
||||||
|
return new SavingsAccountChargeReadPlatformServiceImpl(context, chargeDropdownReadPlatformService, jdbcTemplate,
|
||||||
|
dropdownReadPlatformService, sqlGenerator);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
@ConditionalOnMissingBean(SavingsAccountInterestPostingService.class)
|
||||||
|
public SavingsAccountInterestPostingService savingsAccountInterestPostingService(SavingsHelper savingsHelper) {
|
||||||
|
return new SavingsAccountInterestPostingServiceImpl(savingsHelper);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
@ConditionalOnMissingBean(SavingsAccountReadPlatformService.class)
|
||||||
|
public SavingsAccountReadPlatformService savingsAccountReadPlatformService(PlatformSecurityContext context, JdbcTemplate jdbcTemplate,
|
||||||
|
ClientReadPlatformService clientReadPlatformService, GroupReadPlatformService groupReadPlatformService,
|
||||||
|
SavingsProductReadPlatformService savingProductReadPlatformService, StaffReadPlatformService staffReadPlatformService,
|
||||||
|
SavingsDropdownReadPlatformService dropdownReadPlatformService, ChargeReadPlatformService chargeReadPlatformService,
|
||||||
|
EntityDatatableChecksReadService entityDatatableChecksReadService, ColumnValidator columnValidator,
|
||||||
|
SavingsAccountAssembler savingAccountAssembler, PaginationHelper paginationHelper, DatabaseSpecificSQLGenerator sqlGenerator,
|
||||||
|
SavingsAccountRepositoryWrapper savingsAccountRepositoryWrapper) {
|
||||||
|
return new SavingsAccountReadPlatformServiceImpl(context, jdbcTemplate, clientReadPlatformService, groupReadPlatformService,
|
||||||
|
savingProductReadPlatformService, staffReadPlatformService, dropdownReadPlatformService, chargeReadPlatformService,
|
||||||
|
entityDatatableChecksReadService, columnValidator, savingAccountAssembler, paginationHelper, sqlGenerator,
|
||||||
|
savingsAccountRepositoryWrapper);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
@ConditionalOnMissingBean(SavingsAccountWritePlatformService.class)
|
||||||
|
public SavingsAccountWritePlatformService savingsAccountWritePlatformService(PlatformSecurityContext context,
|
||||||
|
SavingsAccountDataValidator fromApiJsonDeserializer, SavingsAccountRepositoryWrapper savingAccountRepositoryWrapper,
|
||||||
|
StaffRepositoryWrapper staffRepository, SavingsAccountTransactionRepository savingsAccountTransactionRepository,
|
||||||
|
SavingsAccountAssembler savingAccountAssembler, SavingsAccountTransactionDataValidator savingsAccountTransactionDataValidator,
|
||||||
|
SavingsAccountChargeDataValidator savingsAccountChargeDataValidator,
|
||||||
|
PaymentDetailWritePlatformService paymentDetailWritePlatformService,
|
||||||
|
JournalEntryWritePlatformService journalEntryWritePlatformService, SavingsAccountDomainService savingsAccountDomainService,
|
||||||
|
NoteRepository noteRepository, AccountTransfersReadPlatformService accountTransfersReadPlatformService,
|
||||||
|
AccountAssociationsReadPlatformService accountAssociationsReadPlatformService, ChargeRepositoryWrapper chargeRepository,
|
||||||
|
SavingsAccountChargeRepositoryWrapper savingsAccountChargeRepository, HolidayRepositoryWrapper holidayRepository,
|
||||||
|
WorkingDaysRepositoryWrapper workingDaysRepository, ConfigurationDomainService configurationDomainService,
|
||||||
|
DepositAccountOnHoldTransactionRepository depositAccountOnHoldTransactionRepository,
|
||||||
|
EntityDatatableChecksWritePlatformService entityDatatableChecksWritePlatformService, AppUserRepositoryWrapper appuserRepository,
|
||||||
|
StandingInstructionRepository standingInstructionRepository, BusinessEventNotifierService businessEventNotifierService,
|
||||||
|
GSIMRepositoy gsimRepository, SavingsAccountInterestPostingService savingsAccountInterestPostingService,
|
||||||
|
ErrorHandler errorHandler) {
|
||||||
|
return new SavingsAccountWritePlatformServiceJpaRepositoryImpl(context, fromApiJsonDeserializer, savingAccountRepositoryWrapper,
|
||||||
|
staffRepository, savingsAccountTransactionRepository, savingAccountAssembler, savingsAccountTransactionDataValidator,
|
||||||
|
savingsAccountChargeDataValidator, paymentDetailWritePlatformService, journalEntryWritePlatformService,
|
||||||
|
savingsAccountDomainService, noteRepository, accountTransfersReadPlatformService, accountAssociationsReadPlatformService,
|
||||||
|
chargeRepository, savingsAccountChargeRepository, holidayRepository, workingDaysRepository, configurationDomainService,
|
||||||
|
depositAccountOnHoldTransactionRepository, entityDatatableChecksWritePlatformService, appuserRepository,
|
||||||
|
standingInstructionRepository, businessEventNotifierService, gsimRepository, savingsAccountInterestPostingService,
|
||||||
|
errorHandler);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
@ConditionalOnMissingBean(SavingsApplicationProcessWritePlatformService.class)
|
||||||
|
public SavingsApplicationProcessWritePlatformService savingsApplicationProcessWritePlatformService(PlatformSecurityContext context,
|
||||||
|
SavingsAccountRepositoryWrapper savingAccountRepository, SavingsAccountAssembler savingAccountAssembler,
|
||||||
|
SavingsAccountDataValidator savingsAccountDataValidator, AccountNumberGenerator accountNumberGenerator,
|
||||||
|
ClientRepositoryWrapper clientRepository, GroupRepository groupRepository, SavingsProductRepository savingsProductRepository,
|
||||||
|
NoteRepository noteRepository, StaffRepositoryWrapper staffRepository,
|
||||||
|
SavingsAccountApplicationTransitionApiJsonValidator savingsAccountApplicationTransitionApiJsonValidator,
|
||||||
|
SavingsAccountChargeAssembler savingsAccountChargeAssembler, CommandProcessingService commandProcessingService,
|
||||||
|
SavingsAccountDomainService savingsAccountDomainService, SavingsAccountWritePlatformService savingsAccountWritePlatformService,
|
||||||
|
AccountNumberFormatRepositoryWrapper accountNumberFormatRepository, BusinessEventNotifierService businessEventNotifierService,
|
||||||
|
EntityDatatableChecksWritePlatformService entityDatatableChecksWritePlatformService, GSIMRepositoy gsimRepository,
|
||||||
|
GroupRepositoryWrapper groupRepositoryWrapper, GroupSavingsIndividualMonitoringWritePlatformService gsimWritePlatformService) {
|
||||||
|
return new SavingsApplicationProcessWritePlatformServiceJpaRepositoryImpl(context, savingAccountRepository, savingAccountAssembler,
|
||||||
|
savingsAccountDataValidator, accountNumberGenerator, clientRepository, groupRepository, savingsProductRepository,
|
||||||
|
noteRepository, staffRepository, savingsAccountApplicationTransitionApiJsonValidator, savingsAccountChargeAssembler,
|
||||||
|
commandProcessingService, savingsAccountDomainService, savingsAccountWritePlatformService, accountNumberFormatRepository,
|
||||||
|
businessEventNotifierService, entityDatatableChecksWritePlatformService, gsimRepository, groupRepositoryWrapper,
|
||||||
|
gsimWritePlatformService);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
@ConditionalOnMissingBean(SavingsDropdownReadPlatformService.class)
|
||||||
|
public SavingsDropdownReadPlatformService savingsDropdownReadPlatformService() {
|
||||||
|
return new SavingsDropdownReadPlatformServiceImpl();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
@ConditionalOnMissingBean(SavingsProductReadPlatformService.class)
|
||||||
|
public SavingsProductReadPlatformService savingsProductReadPlatformService(PlatformSecurityContext context, JdbcTemplate jdbcTemplate,
|
||||||
|
FineractEntityAccessUtil fineractEntityAccessUtil) {
|
||||||
|
return new SavingsProductReadPlatformServiceImpl(context, jdbcTemplate, fineractEntityAccessUtil);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
@ConditionalOnMissingBean(SavingsProductWritePlatformService.class)
|
||||||
|
public SavingsProductWritePlatformService savingsProductWritePlatformService(PlatformSecurityContext context,
|
||||||
|
SavingsProductRepository savingProductRepository, SavingsProductDataValidator fromApiJsonDataValidator,
|
||||||
|
SavingsProductAssembler savingsProductAssembler,
|
||||||
|
ProductToGLAccountMappingWritePlatformService accountMappingWritePlatformService,
|
||||||
|
FineractEntityAccessUtil fineractEntityAccessUtil) {
|
||||||
|
return new SavingsProductWritePlatformServiceJpaRepositoryImpl(context, savingProductRepository, fromApiJsonDataValidator,
|
||||||
|
savingsProductAssembler, accountMappingWritePlatformService, fineractEntityAccessUtil);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
@Scope("prototype")
|
||||||
|
@ConditionalOnMissingBean(SavingsSchedularInterestPoster.class)
|
||||||
|
public SavingsSchedularInterestPoster savingsSchedularInterestPoster(
|
||||||
|
SavingsAccountWritePlatformService savingsAccountWritePlatformService, JdbcTemplate jdbcTemplate,
|
||||||
|
SavingsAccountReadPlatformService savingsAccountReadPlatformService, PlatformSecurityContext platformSecurityContext
|
||||||
|
|
||||||
|
) {
|
||||||
|
return new SavingsSchedularInterestPoster(savingsAccountWritePlatformService, jdbcTemplate, savingsAccountReadPlatformService,
|
||||||
|
platformSecurityContext);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
@Scope("prototype")
|
||||||
|
@ConditionalOnMissingBean(SavingsSchedularInterestPosterTask.class)
|
||||||
|
public SavingsSchedularInterestPosterTask savingsSchedularInterestPosterTask(SavingsSchedularInterestPoster interestPoster) {
|
||||||
|
return new SavingsSchedularInterestPosterTask(interestPoster);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user