public void updateSearchIndex(List<BookingEntity> bookings) { bookingIdSearchList = new HashMap<>(); new LinkedList<>(bookings) .descendingIterator() .forEachRemaining(booking -> { List<String> search = new ArrayList(); if (booking.getBookingCategory() != null) { if (StringUtils.hasText(booking.getBookingCategory().getReceiver())) { search.add(booking.getBookingCategory().getReceiver()); } } if (booking.getOtherAccount() != null) { if (StringUtils.hasText(booking.getOtherAccount().getName())) { search.add(booking.getOtherAccount().getName()); } if (StringUtils.hasText(booking.getOtherAccount().getOwner())) { search.add(booking.getOtherAccount().getOwner()); } } bookingIdSearchList.put(booking.getId(), search); }); } }
booking.getOtherAccount().setOwner(booking.getOtherAccount().getOwner() + " " + differentInitiator);
static List<Booking> convertInput(Collection<BookingEntity> bookings) { List<Booking> interfaceBookings = new ArrayList<>(); for (BookingEntity booking : bookings) { Booking smartanalyticsBooking = new Booking(); smartanalyticsBooking.setBookingId(booking.getExternalId()); smartanalyticsBooking.setCreditorId(booking.getCreditorId()); smartanalyticsBooking.setPurpose(booking.getUsage()); smartanalyticsBooking.setIban(booking.getOtherAccount() != null ? booking.getOtherAccount().getIban() : null); smartanalyticsBooking.setAccountNumber(booking.getOtherAccount() != null ? booking.getOtherAccount().getAccountNumber() : null); smartanalyticsBooking.setBankCode(booking.getOtherAccount() != null ? booking.getOtherAccount().getBlz() : null); smartanalyticsBooking.setAmount(booking.getAmount()); smartanalyticsBooking.setExecutionDate(booking.getValutaDate()); smartanalyticsBooking.setStandingOrder(booking.isStandingOrder()); smartanalyticsBooking.setMandateReference(booking.getMandateReference()); if (booking.getOtherAccount() != null) { if (booking.getOtherAccount().getOwner() != null) { smartanalyticsBooking.setReferenceName(booking.getOtherAccount().getOwner()); } else { smartanalyticsBooking.setReferenceName(booking.getOtherAccount().getName()); } } interfaceBookings.add(smartanalyticsBooking); } return interfaceBookings; }
static List<Booking> convertInput(Collection<BookingEntity> bookings) { List<Booking> interfaceBookings = new ArrayList<>(); for (BookingEntity booking : bookings) { Booking smartanalyticsBooking = new Booking(); smartanalyticsBooking.setBookingId(booking.getExternalId()); smartanalyticsBooking.setCreditorId(booking.getCreditorId()); smartanalyticsBooking.setPurpose(booking.getUsage()); smartanalyticsBooking.setIban(booking.getOtherAccount() != null ? booking.getOtherAccount().getIban() : null); smartanalyticsBooking.setAccountNumber(booking.getOtherAccount() != null ? booking.getOtherAccount().getAccountNumber() : null); smartanalyticsBooking.setBankCode(booking.getOtherAccount() != null ? booking.getOtherAccount().getBlz() : null); smartanalyticsBooking.setAmount(booking.getAmount()); smartanalyticsBooking.setExecutionDate(booking.getValutaDate()); smartanalyticsBooking.setStandingOrder(booking.isStandingOrder()); smartanalyticsBooking.setMandateReference(booking.getMandateReference()); if (booking.getOtherAccount() != null) { if (booking.getOtherAccount().getOwner() != null) { smartanalyticsBooking.setReferenceName(booking.getOtherAccount().getOwner()); } else { smartanalyticsBooking.setReferenceName(booking.getOtherAccount().getName()); } } interfaceBookings.add(smartanalyticsBooking); } return interfaceBookings; }
@Override protected AbstractSEPAGV createHbciJob(AbstractScaTransaction transaction, PinTanPassport passport, String rawData) { StandingOrder standingOrder = (StandingOrder) transaction; Konto src = getDebtorAccount(transaction, passport); Konto dst = new Konto(); dst.name = standingOrder.getOtherAccount().getOwner(); dst.iban = standingOrder.getOtherAccount().getIban(); dst.bic = standingOrder.getOtherAccount().getBic(); GVDauerSEPANew gvDauerSEPANew = new GVDauerSEPANew(passport, rawData); gvDauerSEPANew.setParam("src", src); gvDauerSEPANew.setParam("dst", dst); gvDauerSEPANew.setParam("btg", new Value(standingOrder.getAmount())); gvDauerSEPANew.setParam("usage", standingOrder.getUsage()); // standing order specific parameter if (standingOrder.getFirstExecutionDate() != null) { gvDauerSEPANew.setParam("firstdate", standingOrder.getFirstExecutionDate().toString()); } if (standingOrder.getCycle() != null) { gvDauerSEPANew.setParam("timeunit", HbciMapping.cycleToTimeunit(standingOrder.getCycle())); // M month, W week gvDauerSEPANew.setParam("turnus", HbciMapping.cycleToTurnus(standingOrder.getCycle())); // 1W = every week, 2M = every two months } gvDauerSEPANew.setParam("execday", standingOrder.getExecutionDay()); // W: 1-7, M: 1-31 if (standingOrder.getLastExecutionDate() != null) { gvDauerSEPANew.setParam("lastdate", standingOrder.getLastExecutionDate().toString()); } gvDauerSEPANew.verifyConstraints(); return gvDauerSEPANew; }
@Override protected AbstractSEPAGV createHbciJob(AbstractScaTransaction transaction, PinTanPassport passport, String rawData) { StandingOrder standingOrder = (StandingOrder) transaction; Konto src = getDebtorAccount(transaction, passport); Konto dst = new Konto(); dst.name = standingOrder.getOtherAccount().getOwner(); dst.iban = standingOrder.getOtherAccount().getIban(); dst.bic = standingOrder.getOtherAccount().getBic(); GVDauerSEPADel gvDauerSEPADel = new GVDauerSEPADel(passport, rawData); gvDauerSEPADel.setParam("src", src); gvDauerSEPADel.setParam("dst", dst); gvDauerSEPADel.setParam("btg", new Value(standingOrder.getAmount())); gvDauerSEPADel.setParam("usage", standingOrder.getUsage()); gvDauerSEPADel.setParam("orderid", standingOrder.getOrderId()); // standing order specific parameter if (standingOrder.getFirstExecutionDate() != null) { gvDauerSEPADel.setParam("firstdate", standingOrder.getFirstExecutionDate().toString()); } if (standingOrder.getCycle() != null) { gvDauerSEPADel.setParam("timeunit", HbciMapping.cycleToTimeunit(standingOrder.getCycle())); // M month, W week gvDauerSEPADel.setParam("turnus", HbciMapping.cycleToTurnus(standingOrder.getCycle())); // 1W = every week, 2M = every two months } gvDauerSEPADel.setParam("execday", standingOrder.getExecutionDay()); // W: 1-7, M: 1-31 if (standingOrder.getLastExecutionDate() != null) { gvDauerSEPADel.setParam("lastdate", standingOrder.getLastExecutionDate().toString()); } gvDauerSEPADel.verifyConstraints(); return gvDauerSEPADel; }