required fields added, respond result enum created
This commit is contained in:
parent
865d0674a0
commit
b15e30c3c0
10 changed files with 74 additions and 14 deletions
|
|
@ -1,6 +1,7 @@
|
|||
package ru.spcex.clearing.xml.importer.logic.data.tags.accountlist.accounttags;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||
import java.util.Objects;
|
||||
|
||||
|
|
@ -26,22 +27,30 @@ public class ForeignCurrencyAccountTag {
|
|||
|
||||
@JsonCreator
|
||||
public ForeignCurrencyAccountTag(@JacksonXmlProperty(isAttribute = true, localName = "CURRENCY")
|
||||
@JsonProperty(required = true)
|
||||
String currency,
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "BENEFICIARY_NAME")
|
||||
@JsonProperty(required = true)
|
||||
String beneficiaryName,
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "BENEFICIARY_SWIFT")
|
||||
String beneficiarySwift,
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "LOCATION")
|
||||
@JsonProperty(required = true)
|
||||
String location,
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "ACCOUNT_NUMBER")
|
||||
@JsonProperty(required = true)
|
||||
String accountNumber,
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "BANK_TITLE")
|
||||
@JsonProperty(required = true)
|
||||
String bankTitle,
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "BANK_LOCATION")
|
||||
@JsonProperty(required = true)
|
||||
String bankLocation,
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "BANK_SWIFT")
|
||||
@JsonProperty(required = true)
|
||||
String bankSwift,
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "BANK_ACCOUNT_NUMBER")
|
||||
@JsonProperty(required = true)
|
||||
String bankAccountNumber,
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "INTERMEDIARY_BANK_TITLE_1")
|
||||
String intermediaryBankTitle1,
|
||||
|
|
@ -60,6 +69,7 @@ public class ForeignCurrencyAccountTag {
|
|||
@JacksonXmlProperty(isAttribute = true, localName = "INTERMEDIARY_BANK_ACCOUNT_NUMBER_2")
|
||||
String intermediaryBankAccountNumber2,
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "REASON")
|
||||
@JsonProperty(required = true)
|
||||
String reason) {
|
||||
this.currency = currency;
|
||||
this.beneficiaryName = beneficiaryName;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package ru.spcex.clearing.xml.importer.logic.data.tags.accountlist.accounttags;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||
import java.util.Objects;
|
||||
|
||||
|
|
@ -18,14 +19,18 @@ public class ForeignCurrencyDebitingAccountTag {
|
|||
|
||||
@JsonCreator
|
||||
public ForeignCurrencyDebitingAccountTag(@JacksonXmlProperty(isAttribute = true, localName = "CURRENCY")
|
||||
@JsonProperty(required = true)
|
||||
String currency,
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "BENEFICIARY_SWIFT")
|
||||
String beneficiarySwift,
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "ACCOUNT_NUMBER")
|
||||
@JsonProperty(required = true)
|
||||
String accountNumber,
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "BANK_SWIFT")
|
||||
@JsonProperty(required = true)
|
||||
String bankSwift,
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "BANK_ACCOUNT_NUMBER")
|
||||
@JsonProperty(required = true)
|
||||
String bankAccountNumber,
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "INTERMEDIARY_BANK_SWIFT_1")
|
||||
String intermediaryBankSwift1,
|
||||
|
|
@ -36,6 +41,7 @@ public class ForeignCurrencyDebitingAccountTag {
|
|||
@JacksonXmlProperty(isAttribute = true, localName = "INTERMEDIARY_BANK_ACCOUNT_NUMBER_2")
|
||||
String intermediaryBankAccountNumber2,
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "REASON")
|
||||
@JsonProperty(required = true)
|
||||
String reason) {
|
||||
this.currency = currency;
|
||||
this.beneficiarySwift = beneficiarySwift;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
package ru.spcex.clearing.xml.importer.logic.data.tags.accountlist.accounttags;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Objects;
|
||||
|
||||
public class RubleAccountTag {
|
||||
|
|
@ -19,7 +21,7 @@ public class RubleAccountTag {
|
|||
private final String bik;
|
||||
private final String correspondentAccountNumber;
|
||||
private final String reason;
|
||||
private final String exclusionDate;
|
||||
private final LocalDate exclusionDate;
|
||||
|
||||
@JsonCreator
|
||||
public RubleAccountTag(@JacksonXmlProperty(isAttribute = true, localName = "CURRENCY")
|
||||
|
|
@ -57,7 +59,8 @@ public class RubleAccountTag {
|
|||
@JsonProperty(required = true)
|
||||
String reason,
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "EXCLUSION_DATE")
|
||||
String exclusionDate) {
|
||||
@JsonFormat(pattern = "dd.MM.yyyy")
|
||||
LocalDate exclusionDate) {
|
||||
this.currency = currency;
|
||||
this.beneficiaryName = beneficiaryName;
|
||||
this.beneficiaryAccount = beneficiaryAccount;
|
||||
|
|
@ -89,7 +92,7 @@ public class RubleAccountTag {
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "AccountTag{" +
|
||||
return "RubleAccountTag{" +
|
||||
"currency='" + currency + '\'' +
|
||||
", beneficiaryName='" + beneficiaryName + '\'' +
|
||||
", beneficiaryAccount='" + beneficiaryAccount + '\'' +
|
||||
|
|
@ -103,7 +106,7 @@ public class RubleAccountTag {
|
|||
", bik='" + bik + '\'' +
|
||||
", correspondentAccountNumber='" + correspondentAccountNumber + '\'' +
|
||||
", reason='" + reason + '\'' +
|
||||
", exclusionDate='" + exclusionDate + '\'' +
|
||||
", exclusionDate=" + exclusionDate +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package ru.spcex.clearing.xml.importer.logic.data.tags.accountlist.accounttags;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||
import java.util.Objects;
|
||||
|
||||
|
|
@ -14,16 +15,20 @@ public class RubleDebitingAccountTag {
|
|||
|
||||
@JsonCreator
|
||||
public RubleDebitingAccountTag(@JacksonXmlProperty(isAttribute = true, localName = "AMOUNT")
|
||||
@JsonProperty(required = true)
|
||||
String amount,
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "CURRENCY")
|
||||
@JsonProperty(required = true)
|
||||
String currency,
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "INN")
|
||||
String inn,
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "BENEFICIARY_ACCOUNT_NUMBER")
|
||||
String beneficiaryAccountNumber,
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "BIK")
|
||||
@JsonProperty(required = true)
|
||||
String bik,
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "BANK_CORRESPONDENT_ACCOUNT_NUMBER")
|
||||
@JsonProperty(required = true)
|
||||
String bankCorrespondentAccountNumber) {
|
||||
this.amount = amount;
|
||||
this.currency = currency;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package ru.spcex.clearing.xml.importer.logic.data.tags.accountlist.clienttags;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||
import java.util.Objects;
|
||||
|
||||
|
|
@ -10,8 +11,10 @@ public class ForeignCurrencyDebitingClientTag {
|
|||
|
||||
@JsonCreator
|
||||
public ForeignCurrencyDebitingClientTag(@JacksonXmlProperty(isAttribute = true, localName = "CLIENT_NAME")
|
||||
@JsonProperty(required = true)
|
||||
String clientName,
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "DEBITING_AMOUNT")
|
||||
@JsonProperty(required = true)
|
||||
String debitingAmount) {
|
||||
this.clientName = clientName;
|
||||
this.debitingAmount = debitingAmount;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package ru.spcex.clearing.xml.importer.logic.data.tags.accountlist.documenttags;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||
import java.time.LocalDate;
|
||||
|
|
@ -15,20 +16,22 @@ public class DocumentTag {
|
|||
private final String documentId;
|
||||
|
||||
@JsonCreator
|
||||
public DocumentTag(@JsonProperty(required = true)
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "AUTHOR")
|
||||
public DocumentTag(@JacksonXmlProperty(isAttribute = true, localName = "AUTHOR")
|
||||
@JsonProperty(required = true)
|
||||
String author,
|
||||
@JsonProperty(required = true)
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "TIME")
|
||||
@JsonProperty(required = true)
|
||||
@JsonFormat(pattern = "HH:mm:ss")
|
||||
LocalTime time,
|
||||
@JsonProperty(required = true)
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "DATE")
|
||||
@JsonProperty(required = true)
|
||||
@JsonFormat(pattern = "dd.MM.yyyy")
|
||||
LocalDate date,
|
||||
@JsonProperty(required = true)
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "NAME")
|
||||
String name,
|
||||
@JsonProperty(required = true)
|
||||
String name,
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "DOCUMENT_ID")
|
||||
@JsonProperty(required = true)
|
||||
String documentId) {
|
||||
this.author = author;
|
||||
this.time = time;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
package ru.spcex.clearing.xml.importer.logic.data.tags.accountlist.documenttags;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Objects;
|
||||
|
|
@ -11,8 +13,11 @@ public class ForeignCurrencyDebitingDocumentTag {
|
|||
|
||||
@JsonCreator
|
||||
public ForeignCurrencyDebitingDocumentTag(@JacksonXmlProperty(isAttribute = true, localName = "DOCUMENT_ID")
|
||||
@JsonProperty(required = true)
|
||||
String documentId,
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "DATE")
|
||||
@JsonProperty(required = true)
|
||||
@JsonFormat(pattern = "dd.MM.yyyy")
|
||||
LocalDate date) {
|
||||
this.documentId = documentId;
|
||||
this.date = date;
|
||||
|
|
|
|||
|
|
@ -12,8 +12,10 @@ public class DebitingRegistratorTag {
|
|||
|
||||
@JsonCreator
|
||||
public DebitingRegistratorTag(@JacksonXmlProperty(isAttribute = true, localName = "FIRMID")
|
||||
@JsonProperty(required = true)
|
||||
String firmId,
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "NAME")
|
||||
@JsonProperty(required = true)
|
||||
String name,
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "TKR")
|
||||
@JsonProperty(required = true)
|
||||
|
|
|
|||
|
|
@ -1,20 +1,24 @@
|
|||
package ru.spcex.clearing.xml.importer.logic.data.tags.accountlist.respondtags;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Objects;
|
||||
|
||||
public class DebitingRespondTag {
|
||||
private final LocalDate date;
|
||||
private final String respondResult;
|
||||
private final RespondResult respondResult;
|
||||
private final String reason;
|
||||
|
||||
@JsonCreator
|
||||
public DebitingRespondTag(@JacksonXmlProperty(isAttribute = true, localName = "DATE")
|
||||
@JsonProperty(required = true)
|
||||
@JsonFormat(pattern = "dd.MM.yyyy")
|
||||
LocalDate date,
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "RESPOND_RESULT")
|
||||
String respondResult,
|
||||
RespondResult respondResult,
|
||||
@JacksonXmlProperty(isAttribute = true, localName = "REASON")
|
||||
String reason) {
|
||||
this.date = date;
|
||||
|
|
@ -27,7 +31,7 @@ public class DebitingRespondTag {
|
|||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
DebitingRespondTag that = (DebitingRespondTag) o;
|
||||
return Objects.equals(date, that.date) && Objects.equals(respondResult, that.respondResult) && Objects.equals(reason, that.reason);
|
||||
return Objects.equals(date, that.date) && respondResult == that.respondResult && Objects.equals(reason, that.reason);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -39,7 +43,7 @@ public class DebitingRespondTag {
|
|||
public String toString() {
|
||||
return "DebitingRespondTag{" +
|
||||
"date=" + date +
|
||||
", respondResult='" + respondResult + '\'' +
|
||||
", respondResult=" + respondResult +
|
||||
", reason='" + reason + '\'' +
|
||||
'}';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,19 @@
|
|||
package ru.spcex.clearing.xml.importer.logic.data.tags.accountlist.respondtags;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
|
||||
public enum RespondResult {
|
||||
ACCEPTED("A"),
|
||||
REJECTED("R");
|
||||
|
||||
private String value;
|
||||
|
||||
RespondResult(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@JsonValue
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue