MIFOSX-1911:CodeFormated
This commit is contained in:
+44
-2
@@ -22,6 +22,34 @@ public class DepositAccountOnHoldTransactionData {
|
||||
private final LocalDate transactionDate;
|
||||
@SuppressWarnings("unused")
|
||||
private final boolean reversed;
|
||||
@SuppressWarnings("unused")
|
||||
private final Long savingsId;
|
||||
@SuppressWarnings("unused")
|
||||
private final String savingsAccountNo;
|
||||
@SuppressWarnings("unused")
|
||||
private final String savingsClientName;
|
||||
@SuppressWarnings("unused")
|
||||
private final Long loanId;
|
||||
@SuppressWarnings("unused")
|
||||
private final String loanAccountNo;
|
||||
@SuppressWarnings("unused")
|
||||
private final String loanClientName;
|
||||
|
||||
private DepositAccountOnHoldTransactionData(final Long id, final BigDecimal amount, final EnumOptionData transactionType,
|
||||
final LocalDate transactionDate, final boolean reversed, final Long savingsId, final String savingsAccNo,
|
||||
final String savingsClientName, final Long loanId, final String loanAccNo, final String loanClientName) {
|
||||
this.id = id;
|
||||
this.amount = amount;
|
||||
this.transactionType = transactionType;
|
||||
this.transactionDate = transactionDate;
|
||||
this.reversed = reversed;
|
||||
this.savingsId = savingsId;
|
||||
this.savingsAccountNo = savingsAccNo;
|
||||
this.savingsClientName = savingsClientName;
|
||||
this.loanId = loanId;
|
||||
this.loanAccountNo = loanAccNo;
|
||||
this.loanClientName = loanClientName;
|
||||
}
|
||||
|
||||
private DepositAccountOnHoldTransactionData(final Long id, final BigDecimal amount, final EnumOptionData transactionType,
|
||||
final LocalDate transactionDate, final boolean reversed) {
|
||||
@@ -30,10 +58,24 @@ public class DepositAccountOnHoldTransactionData {
|
||||
this.transactionType = transactionType;
|
||||
this.transactionDate = transactionDate;
|
||||
this.reversed = reversed;
|
||||
this.savingsAccountNo = null;
|
||||
this.savingsId = 0L;
|
||||
this.savingsClientName = null;
|
||||
this.loanId = 0L;
|
||||
this.loanAccountNo = null;
|
||||
this.loanClientName = null;
|
||||
}
|
||||
|
||||
public static DepositAccountOnHoldTransactionData instance(final Long id, final BigDecimal amount,
|
||||
final EnumOptionData transactionType, final LocalDate transactionDate, final boolean reversed) {
|
||||
return new DepositAccountOnHoldTransactionData(id, amount, transactionType, transactionDate, reversed);
|
||||
final EnumOptionData transactionType, final LocalDate transactionDate, final boolean reversed, final Long savingsId,
|
||||
final String savingsAccountNo, final String savingsClientName, final Long loanId, final String loanAccountNo,
|
||||
final String loanClientName) {
|
||||
return new DepositAccountOnHoldTransactionData(id, amount, transactionType, transactionDate, reversed, savingsId, savingsAccountNo,
|
||||
savingsClientName, loanId, loanAccountNo, loanClientName);
|
||||
}
|
||||
|
||||
public static DepositAccountOnHoldTransactionData instance(Long transactionId, BigDecimal amount, EnumOptionData transactionType,
|
||||
LocalDate date, boolean transactionReversed) {
|
||||
return new DepositAccountOnHoldTransactionData(transactionId, amount, transactionType, date, transactionReversed);
|
||||
}
|
||||
}
|
||||
|
||||
+20
-5
@@ -79,11 +79,19 @@ public class DepositAccountOnHoldTransactionReadPlatformServiceImpl implements D
|
||||
public DepositAccountOnHoldTransactionsMapper() {
|
||||
|
||||
final StringBuilder sqlBuilder = new StringBuilder(400);
|
||||
sqlBuilder.append("tr.id as transactionId, tr.transaction_type_enum as transactionType, ");
|
||||
sqlBuilder.append("tr.transaction_date as transactionDate, tr.amount as transactionAmount,");
|
||||
sqlBuilder.append("tr.is_reversed as reversed ");
|
||||
sqlBuilder.append("from m_deposit_account_on_hold_transaction tr ");
|
||||
sqlBuilder.append(" tr.id as transactionId, tr.transaction_type_enum as transactionType, ");
|
||||
sqlBuilder.append(" tr.transaction_date as transactionDate, tr.amount as transactionAmount,");
|
||||
sqlBuilder.append(" tr.is_reversed as reversed, sa.account_no as savingsAccNum, ");
|
||||
sqlBuilder.append("sc.display_name as savingsClientName, ml.id as loanid, sa.id as savingid, ");
|
||||
sqlBuilder.append(" ml.account_no as loanAccountNum, lc.display_name as loanClientName");
|
||||
sqlBuilder.append(" from m_savings_account sa ");
|
||||
sqlBuilder.append(" join m_deposit_account_on_hold_transaction tr on sa.id = tr.savings_account_id ");
|
||||
sqlBuilder.append(" join m_client sc on sc.id = sa.client_id");
|
||||
sqlBuilder.append(" left join m_guarantor_transaction gt on gt.deposit_on_hold_transaction_id = tr.id ");
|
||||
sqlBuilder.append(" left join m_guarantor_funding_details mgfd on mgfd.id=gt.guarantor_fund_detail_id");
|
||||
sqlBuilder.append(" left join m_portfolio_account_associations pa on pa.id=mgfd.account_associations_id");
|
||||
sqlBuilder.append(" left join m_loan ml on ml.id = pa.loan_account_id");
|
||||
sqlBuilder.append(" left join m_client lc on lc.id = ml.client_id");
|
||||
|
||||
this.schemaSql = sqlBuilder.toString();
|
||||
}
|
||||
@@ -102,7 +110,14 @@ public class DepositAccountOnHoldTransactionReadPlatformServiceImpl implements D
|
||||
final LocalDate date = JdbcSupport.getLocalDate(rs, "transactionDate");
|
||||
final BigDecimal amount = JdbcSupport.getBigDecimalDefaultToZeroIfNull(rs, "transactionAmount");
|
||||
final boolean reversed = rs.getBoolean("reversed");
|
||||
return DepositAccountOnHoldTransactionData.instance(id, amount, transactionType, date, reversed);
|
||||
final String savingsAccountNum = rs.getString("savingsAccNum");
|
||||
final Long savingsId = rs.getLong("savingid");
|
||||
final String savingsClientName = rs.getString("savingsClientName");
|
||||
final String loanAccountNum = rs.getString("loanAccountNum");
|
||||
final Long loanId = rs.getLong("loanid");
|
||||
final String loanClientName = rs.getString("loanClientName");
|
||||
return DepositAccountOnHoldTransactionData.instance(id, amount, transactionType, date, reversed, savingsId, savingsAccountNum,
|
||||
savingsClientName, loanId, loanAccountNum, loanClientName);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user