Skip to content
Permalink
Browse files
store denomination flag in DB
  • Loading branch information
mgeiss committed Oct 17, 2017
1 parent 0d73a37 commit 32542849f4f5abcb4faaaf49a1d67437dd64a6bb
Showing 4 changed files with 20 additions and 1 deletion.
@@ -136,6 +136,10 @@ public String process(final ChangeTellerCommand changeTellerCommand) {
tellerEntity.setVaultAccountIdentifier(teller.getVaultAccountIdentifier());
tellerEntity.setChequesReceivableAccount(teller.getChequesReceivableAccount());
tellerEntity.setCashdrawLimit(teller.getCashdrawLimit());
tellerEntity.setCashOverShortAccount(teller.getCashOverShortAccount());
tellerEntity.setDenominationRequired(
teller.getDenominationRequired() != null ? teller.getDenominationRequired() : Boolean.FALSE
);
tellerEntity.setLastModifiedBy(UserContextHolder.checkedGetUser());
tellerEntity.setLastModifiedOn(LocalDateTime.now(Clock.systemUTC()));

@@ -34,6 +34,7 @@ public static Teller map(final TellerEntity tellerEntity) {
teller.setAssignedEmployee(tellerEntity.getAssignedEmployeeIdentifier());
teller.setChequesReceivableAccount(tellerEntity.getChequesReceivableAccount());
teller.setCashOverShortAccount(tellerEntity.getCashOverShortAccount());
teller.setDenominationRequired(tellerEntity.getDenominationRequired());
teller.setState(tellerEntity.getState());
if (tellerEntity.getCreatedBy() != null) {
teller.setCreatedBy(tellerEntity.getCreatedBy());
@@ -59,8 +60,11 @@ public static TellerEntity map(final String officeIdentifier, final Teller telle
tellerEntity.setTellerAccountIdentifier(teller.getTellerAccountIdentifier());
tellerEntity.setVaultAccountIdentifier(teller.getVaultAccountIdentifier());
tellerEntity.setChequesReceivableAccount(teller.getChequesReceivableAccount());
tellerEntity.setCashOverShortAccount(teller.getCashOverShortAccount());
tellerEntity.setCashdrawLimit(teller.getCashdrawLimit());
tellerEntity.setCashOverShortAccount(teller.getCashOverShortAccount());
tellerEntity.setDenominationRequired(
teller.getDenominationRequired() != null ? teller.getDenominationRequired() : Boolean.FALSE
);
tellerEntity.setAssignedEmployeeIdentifier(teller.getAssignedEmployee());
if (teller.getState() != null) {
tellerEntity.setState(teller.getState());
@@ -53,6 +53,8 @@ public class TellerEntity {
private String chequesReceivableAccount;
@Column(name = "cash_over_short_account", nullable = false, length = 34)
private String cashOverShortAccount;
@Column(name = "denomination_required", nullable = false)
private Boolean denominationRequired;
@Column(name = "assigned_employee_identifier", nullable = true, length = 32)
private String assignedEmployeeIdentifier;
@Column(name = "a_state", nullable = false, length = 256)
@@ -158,6 +160,14 @@ public void setCashOverShortAccount(final String cashOverShortAccount) {
this.cashOverShortAccount = cashOverShortAccount;
}

public Boolean getDenominationRequired() {
return this.denominationRequired;
}

public void setDenominationRequired(final Boolean denominationRequired) {
this.denominationRequired = denominationRequired;
}

public String getAssignedEmployeeIdentifier() {
return this.assignedEmployeeIdentifier;
}
@@ -15,6 +15,7 @@
--

ALTER TABLE tajet_teller ADD cash_over_short_account VARCHAR(34) NULL;
ALTER TABLE tajet_teller ADD denomination_required BOOLEAN NOT NULL DEFAULT FALSE;

CREATE TABLE tajet_teller_denominations (
id BIGINT NOT NULL AUTO_INCREMENT,

0 comments on commit 3254284

Please sign in to comment.