StandingOrder auftrag = new StandingOrder(); auftrag.setFirstExecutionDate( line.firstdate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate()); auftrag.setLastExecutionDate( line.lastdate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate()); auftrag.setAmount(line.value.getBigDecimalValue()); auftrag.setOrderId(line.orderid); auftrag.setOtherAccount(toBankAccount(line.other)); auftrag.setUsage(getUsage(Arrays.asList(line.usage))); auftrag.setExecutionDay(line.execday); auftrag.setCycle(cycle);
@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; }
public static domain.StandingOrder mapStandingOrder(StandingOrder figoStandingOrder) { domain.StandingOrder standingOrder = new domain.StandingOrder(); standingOrder.setOrderId(figoStandingOrder.getStandingOrderId()); standingOrder.setExecutionDay(figoStandingOrder.getExecutionDay()); standingOrder.setAmount(figoStandingOrder.getAmount()); standingOrder.setUsage(figoStandingOrder.getPurposeText()); standingOrder.setCycle(Cycle.valueOf(figoStandingOrder.getInterval().toString())); standingOrder.setOtherAccount(new BankAccount() .owner(figoStandingOrder.getName()) .accountNumber(figoStandingOrder.getAccountNumber()) .blz(figoStandingOrder.getBankCode()) .currency(figoStandingOrder.getCurrency()) ); return standingOrder; }
standingOrders .stream() .filter(so -> so.getAmount().negate().compareTo(booking.getAmount()) == 0 && Utils.inCycle(booking.getValutaDate(), so.getExecutionDay()) && Utils.usageContains(booking.getUsage(), so.getUsage()) booking.setOtherAccount(standingOrder.getOtherAccount()); booking.setStandingOrder(true); }));
.map(standingOrder -> { if (StringUtils.isBlank(standingOrder.getOrderId())) { standingOrder.setOrderId(Ids.uuid()); StandingOrderEntity target = standingOrdersMap.get(standingOrder.getOrderId()); if (target == null) { target = new StandingOrderEntity(); Ids.id(target); standingOrdersMap.put(standingOrder.getOrderId(), target); target.setAccountId(bankAccount.getId()); target.setUserId(bankAccount.getUserId());
standingOrders .stream() .filter(so -> so.getAmount().negate().compareTo(booking.getAmount()) == 0 && Utils.inCycle(booking.getValutaDate(), so.getExecutionDay()) && Utils.usageContains(booking.getUsage(), so.getUsage()) booking.setOtherAccount(standingOrder.getOtherAccount()); booking.setStandingOrder(true); }));
.map(standingOrder -> { if (StringUtils.isBlank(standingOrder.getOrderId())) { standingOrder.setOrderId(Ids.uuid()); StandingOrderEntity target = standingOrdersMap.get(standingOrder.getOrderId()); if (target == null) { target = new StandingOrderEntity(); Ids.id(target); standingOrdersMap.put(standingOrder.getOrderId(), target); target.setAccountId(bankAccount.getId()); target.setUserId(bankAccount.getUserId());
@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; }