Compare commits
No commits in common. "b15e30c3c0d154d0eca662e64271c24bd2468357" and "0d0c5530f22a7087744882db3542a2b36eae8b6b" have entirely different histories.
b15e30c3c0
...
0d0c5530f2
37 changed files with 55 additions and 1185 deletions
|
|
@ -6,6 +6,7 @@ import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
||||||
import ru.spcex.clearing.xml.importer.config.settings.ImportXMLServiceSettings;
|
import ru.spcex.clearing.xml.importer.config.settings.ImportXMLServiceSettings;
|
||||||
|
import ru.spcex.platform.imdg.api.ImdgProvider;
|
||||||
import ru.spcex.platform.imdg.iml.hazelcast.service.HazelcastService;
|
import ru.spcex.platform.imdg.iml.hazelcast.service.HazelcastService;
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,7 @@ import java.io.File;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.enums.ETable;
|
import ru.spcex.clearing.xml.importer.logic.data.enums.ETable;
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.enums.StageResult;
|
import ru.spcex.clearing.xml.importer.logic.data.enums.StageResult;
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.tags.accountlist.firmdoctags.AbstractFirmDocTag;
|
import ru.spcex.clearing.xml.importer.logic.data.tags.DocumentTag;
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.tags.sdf.DocumentTag;
|
|
||||||
|
|
||||||
public class ResultContainer {
|
public class ResultContainer {
|
||||||
private UUID uuid;
|
private UUID uuid;
|
||||||
|
|
@ -13,7 +12,6 @@ public class ResultContainer {
|
||||||
private File xmlFile;
|
private File xmlFile;
|
||||||
private StageResult lastStageStatus;
|
private StageResult lastStageStatus;
|
||||||
private DocumentTag documentTag;
|
private DocumentTag documentTag;
|
||||||
private AbstractFirmDocTag firmDocTag;
|
|
||||||
|
|
||||||
public ResultContainer(ETable xmlTable, File xmlFile) {
|
public ResultContainer(ETable xmlTable, File xmlFile) {
|
||||||
this.xmlTable = xmlTable;
|
this.xmlTable = xmlTable;
|
||||||
|
|
@ -60,24 +58,4 @@ public class ResultContainer {
|
||||||
public void setDocumentTag(DocumentTag documentTag) {
|
public void setDocumentTag(DocumentTag documentTag) {
|
||||||
this.documentTag = documentTag;
|
this.documentTag = documentTag;
|
||||||
}
|
}
|
||||||
|
|
||||||
public AbstractFirmDocTag getFirmDocTag() {
|
|
||||||
return firmDocTag;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFirmDocTag(AbstractFirmDocTag firmDocTag) {
|
|
||||||
this.firmDocTag = firmDocTag;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return "ResultContainer{" +
|
|
||||||
"uuid=" + uuid +
|
|
||||||
", xmlTable=" + xmlTable +
|
|
||||||
", xmlFile=" + xmlFile +
|
|
||||||
", lastStageStatus=" + lastStageStatus +
|
|
||||||
", documentTag=" + documentTag +
|
|
||||||
", firmDocTag=" + firmDocTag +
|
|
||||||
'}';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,42 +1,26 @@
|
||||||
package ru.spcex.clearing.xml.importer.logic.data.enums;
|
package ru.spcex.clearing.xml.importer.logic.data.enums;
|
||||||
|
|
||||||
import java.util.regex.Pattern;
|
|
||||||
|
|
||||||
public enum ETable {
|
public enum ETable {
|
||||||
DF_01("DF-01", Pattern.compile("DF-01.*"), FileType.SDF),
|
DF_01("DF-01"),
|
||||||
DF_04("DF-04", Pattern.compile("DF-04.*"), FileType.SDF),
|
DF_04("DF-04"),
|
||||||
DF_06("DF-06", Pattern.compile("DF-06.*"), FileType.SDF),
|
DF_06("DF-06"),
|
||||||
DF_52("DF-52", Pattern.compile("DF-52.*"), FileType.SDF),
|
DF_52("DF-52"),
|
||||||
DF_55("DF-55", Pattern.compile("DF-55.*"), FileType.SDF),
|
DF_55("DF-55"),
|
||||||
DF_57("DF-57", Pattern.compile("DF-57.*"), FileType.SDF),
|
DF_57("DF-57");
|
||||||
RUBLE_FIRMDOC("RUBLE_FIRMDOC", Pattern.compile(".*_ACCOUNT_LIST_.*_RUB_.*"), FileType.ACCOUNT_LIST),
|
|
||||||
FOREIGN_CURRENCY_FIRMDOC("FOREIGN_CURRENCY_FIRMDOC", Pattern.compile(".*_ACCOUNT_LIST_.*_((?!RUB).)*_.*"), FileType.ACCOUNT_LIST),
|
|
||||||
RUBLE_DEBITING_FIRMDOC("RUBLE_DEBITING_FIRMDOC", Pattern.compile(".*_ACCOUNT_OUT_.*"), FileType.ACCOUNT_LIST),
|
|
||||||
FOREIGN_CURRENCY_DEBITING_FIRMDOC("FOREIGN_CURRENCY_DEBITING_FIRMDOC", Pattern.compile(".*_ACCOUNT_OUT_.*"), FileType.ACCOUNT_LIST);
|
|
||||||
|
|
||||||
private final String prefix;
|
|
||||||
private final Pattern pattern;
|
|
||||||
private final FileType fileType;
|
|
||||||
|
|
||||||
ETable(String prefix, Pattern pattern, FileType fileType) {
|
|
||||||
this.prefix = prefix;
|
|
||||||
this.pattern = pattern;
|
|
||||||
this.fileType = fileType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPrefix() {
|
public String getPrefix() {
|
||||||
return prefix;
|
return prefix;
|
||||||
}
|
}
|
||||||
|
|
||||||
public FileType getFileType() {
|
private final String prefix;
|
||||||
return fileType;
|
|
||||||
|
ETable(String prefix) {
|
||||||
|
this.prefix = prefix;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ETable getTableForFilename(String filename) {
|
public static ETable getTableForFilename(String filename) {
|
||||||
for (ETable table : ETable.values()) {
|
for (ETable table : ETable.values()) {
|
||||||
if (table.pattern.matcher(filename).matches()) {
|
if (table.fileForThisTable(filename)) return table;
|
||||||
return table;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
@ -48,4 +32,8 @@ public enum ETable {
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean fileForThisTable(String filename) {
|
||||||
|
return filename != null && filename.startsWith(prefix);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
package ru.spcex.clearing.xml.importer.logic.data.enums;
|
|
||||||
|
|
||||||
public enum FileType {
|
|
||||||
SDF,
|
|
||||||
ACCOUNT_LIST
|
|
||||||
}
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package ru.spcex.clearing.xml.importer.logic.data.tags.sdf;
|
package ru.spcex.clearing.xml.importer.logic.data.tags;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
|
||||||
|
|
@ -8,7 +8,7 @@ import java.time.LocalDate;
|
||||||
import java.time.LocalTime;
|
import java.time.LocalTime;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.tags.sdf.objects.ObjectTag;
|
import ru.spcex.clearing.xml.importer.logic.data.tags.objects.ObjectTag;
|
||||||
import ru.spcex.platform.classes.base.SpcexObjectBase;
|
import ru.spcex.platform.classes.base.SpcexObjectBase;
|
||||||
|
|
||||||
@JacksonXmlRootElement(localName = "DOCUMENT")
|
@JacksonXmlRootElement(localName = "DOCUMENT")
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package ru.spcex.clearing.xml.importer.logic.data.tags.sdf;
|
package ru.spcex.clearing.xml.importer.logic.data.tags;
|
||||||
|
|
||||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
@ -1,130 +0,0 @@
|
||||||
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;
|
|
||||||
|
|
||||||
public class ForeignCurrencyAccountTag {
|
|
||||||
private final String currency;
|
|
||||||
private final String beneficiaryName;
|
|
||||||
private final String beneficiarySwift;
|
|
||||||
private final String location;
|
|
||||||
private final String accountNumber;
|
|
||||||
private final String bankTitle;
|
|
||||||
private final String bankLocation;
|
|
||||||
private final String bankSwift;
|
|
||||||
private final String bankAccountNumber;
|
|
||||||
private final String intermediaryBankTitle1;
|
|
||||||
private final String intermediaryBankLocation1;
|
|
||||||
private final String intermediaryBankSwift1;
|
|
||||||
private final String intermediaryBankAccountNumber1;
|
|
||||||
private final String intermediaryBankTitle2;
|
|
||||||
private final String intermediaryBankLocation2;
|
|
||||||
private final String intermediaryBankSwift2;
|
|
||||||
private final String intermediaryBankAccountNumber2;
|
|
||||||
private final String reason;
|
|
||||||
|
|
||||||
@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,
|
|
||||||
@JacksonXmlProperty(isAttribute = true, localName = "INTERMEDIARY_BANK_LOCATION_1")
|
|
||||||
String intermediaryBankLocation1,
|
|
||||||
@JacksonXmlProperty(isAttribute = true, localName = "INTERMEDIARY_BANK_SWIFT_1")
|
|
||||||
String intermediaryBankSwift1,
|
|
||||||
@JacksonXmlProperty(isAttribute = true, localName = "INTERMEDIARY_BANK_ACCOUNT_NUMBER_1")
|
|
||||||
String intermediaryBankAccountNumber1,
|
|
||||||
@JacksonXmlProperty(isAttribute = true, localName = "INTERMEDIARY_BANK_TITLE_2")
|
|
||||||
String intermediaryBankTitle2,
|
|
||||||
@JacksonXmlProperty(isAttribute = true, localName = "INTERMEDIARY_BANK_LOCATION_2")
|
|
||||||
String intermediaryBankLocation2,
|
|
||||||
@JacksonXmlProperty(isAttribute = true, localName = "INTERMEDIARY_BANK_SWIFT_2")
|
|
||||||
String intermediaryBankSwift2,
|
|
||||||
@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;
|
|
||||||
this.beneficiarySwift = beneficiarySwift;
|
|
||||||
this.location = location;
|
|
||||||
this.accountNumber = accountNumber;
|
|
||||||
this.bankTitle = bankTitle;
|
|
||||||
this.bankLocation = bankLocation;
|
|
||||||
this.bankSwift = bankSwift;
|
|
||||||
this.bankAccountNumber = bankAccountNumber;
|
|
||||||
this.intermediaryBankTitle1 = intermediaryBankTitle1;
|
|
||||||
this.intermediaryBankLocation1 = intermediaryBankLocation1;
|
|
||||||
this.intermediaryBankSwift1 = intermediaryBankSwift1;
|
|
||||||
this.intermediaryBankAccountNumber1 = intermediaryBankAccountNumber1;
|
|
||||||
this.intermediaryBankTitle2 = intermediaryBankTitle2;
|
|
||||||
this.intermediaryBankLocation2 = intermediaryBankLocation2;
|
|
||||||
this.intermediaryBankSwift2 = intermediaryBankSwift2;
|
|
||||||
this.intermediaryBankAccountNumber2 = intermediaryBankAccountNumber2;
|
|
||||||
this.reason = reason;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean equals(Object o) {
|
|
||||||
if (this == o) return true;
|
|
||||||
if (o == null || getClass() != o.getClass()) return false;
|
|
||||||
ForeignCurrencyAccountTag that = (ForeignCurrencyAccountTag) o;
|
|
||||||
return Objects.equals(currency, that.currency) && Objects.equals(beneficiaryName, that.beneficiaryName) && Objects.equals(beneficiarySwift, that.beneficiarySwift) && Objects.equals(location, that.location) && Objects.equals(accountNumber, that.accountNumber) && Objects.equals(bankTitle, that.bankTitle) && Objects.equals(bankLocation, that.bankLocation) && Objects.equals(bankSwift, that.bankSwift) && Objects.equals(bankAccountNumber, that.bankAccountNumber) && Objects.equals(intermediaryBankTitle1, that.intermediaryBankTitle1) && Objects.equals(intermediaryBankLocation1, that.intermediaryBankLocation1) && Objects.equals(intermediaryBankSwift1, that.intermediaryBankSwift1) && Objects.equals(intermediaryBankAccountNumber1, that.intermediaryBankAccountNumber1) && Objects.equals(intermediaryBankTitle2, that.intermediaryBankTitle2) && Objects.equals(intermediaryBankLocation2, that.intermediaryBankLocation2) && Objects.equals(intermediaryBankSwift2, that.intermediaryBankSwift2) && Objects.equals(intermediaryBankAccountNumber2, that.intermediaryBankAccountNumber2) && Objects.equals(reason, that.reason);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int hashCode() {
|
|
||||||
return Objects.hash(currency, beneficiaryName, beneficiarySwift, location, accountNumber, bankTitle, bankLocation, bankSwift, bankAccountNumber, intermediaryBankTitle1, intermediaryBankLocation1, intermediaryBankSwift1, intermediaryBankAccountNumber1, intermediaryBankTitle2, intermediaryBankLocation2, intermediaryBankSwift2, intermediaryBankAccountNumber2, reason);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return "ForeignCurrencyAccountTag{" +
|
|
||||||
"currency='" + currency + '\'' +
|
|
||||||
", beneficiaryName='" + beneficiaryName + '\'' +
|
|
||||||
", beneficiarySwift='" + beneficiarySwift + '\'' +
|
|
||||||
", location='" + location + '\'' +
|
|
||||||
", accountNumber='" + accountNumber + '\'' +
|
|
||||||
", bankTitle='" + bankTitle + '\'' +
|
|
||||||
", bankLocation='" + bankLocation + '\'' +
|
|
||||||
", bankSwift='" + bankSwift + '\'' +
|
|
||||||
", bankAccountNumber='" + bankAccountNumber + '\'' +
|
|
||||||
", intermediaryBankTitle1='" + intermediaryBankTitle1 + '\'' +
|
|
||||||
", intermediaryBankLocation1='" + intermediaryBankLocation1 + '\'' +
|
|
||||||
", intermediaryBankSwift1='" + intermediaryBankSwift1 + '\'' +
|
|
||||||
", intermediaryBankAccountNumber1='" + intermediaryBankAccountNumber1 + '\'' +
|
|
||||||
", intermediaryBankTitle2='" + intermediaryBankTitle2 + '\'' +
|
|
||||||
", intermediaryBankLocation2='" + intermediaryBankLocation2 + '\'' +
|
|
||||||
", intermediaryBankSwift2='" + intermediaryBankSwift2 + '\'' +
|
|
||||||
", intermediaryBankAccountNumber2='" + intermediaryBankAccountNumber2 + '\'' +
|
|
||||||
", reason='" + reason + '\'' +
|
|
||||||
'}';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,86 +0,0 @@
|
||||||
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;
|
|
||||||
|
|
||||||
public class ForeignCurrencyDebitingAccountTag {
|
|
||||||
private final String currency;
|
|
||||||
private final String beneficiarySwift;
|
|
||||||
private final String accountNumber;
|
|
||||||
private final String bankSwift;
|
|
||||||
private final String bankAccountNumber;
|
|
||||||
private final String intermediaryBankSwift1;
|
|
||||||
private final String intermediaryBankAccountNumber1;
|
|
||||||
private final String intermediaryBankSwift2;
|
|
||||||
private final String intermediaryBankAccountNumber2;
|
|
||||||
private final String reason;
|
|
||||||
|
|
||||||
@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,
|
|
||||||
@JacksonXmlProperty(isAttribute = true, localName = "INTERMEDIARY_BANK_ACCOUNT_NUMBER_1")
|
|
||||||
String intermediaryBankAccountNumber1,
|
|
||||||
@JacksonXmlProperty(isAttribute = true, localName = "INTERMEDIARY_BANK_SWIFT_2")
|
|
||||||
String intermediaryBankSwift2,
|
|
||||||
@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;
|
|
||||||
this.accountNumber = accountNumber;
|
|
||||||
this.bankSwift = bankSwift;
|
|
||||||
this.bankAccountNumber = bankAccountNumber;
|
|
||||||
this.intermediaryBankSwift1 = intermediaryBankSwift1;
|
|
||||||
this.intermediaryBankAccountNumber1 = intermediaryBankAccountNumber1;
|
|
||||||
this.intermediaryBankSwift2 = intermediaryBankSwift2;
|
|
||||||
this.intermediaryBankAccountNumber2 = intermediaryBankAccountNumber2;
|
|
||||||
this.reason = reason;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean equals(Object o) {
|
|
||||||
if (this == o) return true;
|
|
||||||
if (o == null || getClass() != o.getClass()) return false;
|
|
||||||
ForeignCurrencyDebitingAccountTag that = (ForeignCurrencyDebitingAccountTag) o;
|
|
||||||
return Objects.equals(currency, that.currency) && Objects.equals(beneficiarySwift, that.beneficiarySwift) && Objects.equals(accountNumber, that.accountNumber) && Objects.equals(bankSwift, that.bankSwift) && Objects.equals(bankAccountNumber, that.bankAccountNumber) && Objects.equals(intermediaryBankSwift1, that.intermediaryBankSwift1) && Objects.equals(intermediaryBankAccountNumber1, that.intermediaryBankAccountNumber1) && Objects.equals(intermediaryBankSwift2, that.intermediaryBankSwift2) && Objects.equals(intermediaryBankAccountNumber2, that.intermediaryBankAccountNumber2) && Objects.equals(reason, that.reason);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int hashCode() {
|
|
||||||
return Objects.hash(currency, beneficiarySwift, accountNumber, bankSwift, bankAccountNumber, intermediaryBankSwift1, intermediaryBankAccountNumber1, intermediaryBankSwift2, intermediaryBankAccountNumber2, reason);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return "ForeignCurrencyDebitingAccountTag{" +
|
|
||||||
"currency='" + currency + '\'' +
|
|
||||||
", beneficiarySwift='" + beneficiarySwift + '\'' +
|
|
||||||
", accountNumber='" + accountNumber + '\'' +
|
|
||||||
", bankSwift='" + bankSwift + '\'' +
|
|
||||||
", bankAccountNumber='" + bankAccountNumber + '\'' +
|
|
||||||
", intermediaryBankSwift1='" + intermediaryBankSwift1 + '\'' +
|
|
||||||
", intermediaryBankAccountNumber1='" + intermediaryBankAccountNumber1 + '\'' +
|
|
||||||
", intermediaryBankSwift2='" + intermediaryBankSwift2 + '\'' +
|
|
||||||
", intermediaryBankAccountNumber2='" + intermediaryBankAccountNumber2 + '\'' +
|
|
||||||
", reason='" + reason + '\'' +
|
|
||||||
'}';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,112 +0,0 @@
|
||||||
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 {
|
|
||||||
private final String currency;
|
|
||||||
private final String beneficiaryName;
|
|
||||||
private final String beneficiaryAccount;
|
|
||||||
private final String kbk;
|
|
||||||
private final String oktmo;
|
|
||||||
private final String inn;
|
|
||||||
private final String kpp;
|
|
||||||
private final String accountNumber;
|
|
||||||
private final String bankTitle;
|
|
||||||
private final String bankLocation;
|
|
||||||
private final String bik;
|
|
||||||
private final String correspondentAccountNumber;
|
|
||||||
private final String reason;
|
|
||||||
private final LocalDate exclusionDate;
|
|
||||||
|
|
||||||
@JsonCreator
|
|
||||||
public RubleAccountTag(@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_ACCOUNT")
|
|
||||||
String beneficiaryAccount,
|
|
||||||
@JacksonXmlProperty(isAttribute = true, localName = "KBK")
|
|
||||||
String kbk,
|
|
||||||
@JacksonXmlProperty(isAttribute = true, localName = "OKTMO")
|
|
||||||
String oktmo,
|
|
||||||
@JacksonXmlProperty(isAttribute = true, localName = "INN")
|
|
||||||
String inn,
|
|
||||||
@JacksonXmlProperty(isAttribute = true, localName = "KPP")
|
|
||||||
String kpp,
|
|
||||||
@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 = "BIK")
|
|
||||||
@JsonProperty(required = true)
|
|
||||||
String bik,
|
|
||||||
@JacksonXmlProperty(isAttribute = true, localName = "CORRESPONDENT_ACCOUNT_NUMBER")
|
|
||||||
@JsonProperty(required = true)
|
|
||||||
String correspondentAccountNumber,
|
|
||||||
@JacksonXmlProperty(isAttribute = true, localName = "REASON")
|
|
||||||
@JsonProperty(required = true)
|
|
||||||
String reason,
|
|
||||||
@JacksonXmlProperty(isAttribute = true, localName = "EXCLUSION_DATE")
|
|
||||||
@JsonFormat(pattern = "dd.MM.yyyy")
|
|
||||||
LocalDate exclusionDate) {
|
|
||||||
this.currency = currency;
|
|
||||||
this.beneficiaryName = beneficiaryName;
|
|
||||||
this.beneficiaryAccount = beneficiaryAccount;
|
|
||||||
this.kbk = kbk;
|
|
||||||
this.oktmo = oktmo;
|
|
||||||
this.inn = inn;
|
|
||||||
this.kpp = kpp;
|
|
||||||
this.accountNumber = accountNumber;
|
|
||||||
this.bankTitle = bankTitle;
|
|
||||||
this.bankLocation = bankLocation;
|
|
||||||
this.bik = bik;
|
|
||||||
this.correspondentAccountNumber = correspondentAccountNumber;
|
|
||||||
this.reason = reason;
|
|
||||||
this.exclusionDate = exclusionDate;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean equals(Object o) {
|
|
||||||
if (this == o) return true;
|
|
||||||
if (o == null || getClass() != o.getClass()) return false;
|
|
||||||
RubleAccountTag that = (RubleAccountTag) o;
|
|
||||||
return Objects.equals(currency, that.currency) && Objects.equals(beneficiaryName, that.beneficiaryName) && Objects.equals(beneficiaryAccount, that.beneficiaryAccount) && Objects.equals(kbk, that.kbk) && Objects.equals(oktmo, that.oktmo) && Objects.equals(inn, that.inn) && Objects.equals(kpp, that.kpp) && Objects.equals(accountNumber, that.accountNumber) && Objects.equals(bankTitle, that.bankTitle) && Objects.equals(bankLocation, that.bankLocation) && Objects.equals(bik, that.bik) && Objects.equals(correspondentAccountNumber, that.correspondentAccountNumber) && Objects.equals(reason, that.reason) && Objects.equals(exclusionDate, that.exclusionDate);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int hashCode() {
|
|
||||||
return Objects.hash(currency, beneficiaryName, beneficiaryAccount, kbk, oktmo, inn, kpp, accountNumber, bankTitle, bankLocation, bik, correspondentAccountNumber, reason, exclusionDate);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return "RubleAccountTag{" +
|
|
||||||
"currency='" + currency + '\'' +
|
|
||||||
", beneficiaryName='" + beneficiaryName + '\'' +
|
|
||||||
", beneficiaryAccount='" + beneficiaryAccount + '\'' +
|
|
||||||
", kbk='" + kbk + '\'' +
|
|
||||||
", oktmo='" + oktmo + '\'' +
|
|
||||||
", inn='" + inn + '\'' +
|
|
||||||
", kpp='" + kpp + '\'' +
|
|
||||||
", accountNumber='" + accountNumber + '\'' +
|
|
||||||
", bankTitle='" + bankTitle + '\'' +
|
|
||||||
", bankLocation='" + bankLocation + '\'' +
|
|
||||||
", bik='" + bik + '\'' +
|
|
||||||
", correspondentAccountNumber='" + correspondentAccountNumber + '\'' +
|
|
||||||
", reason='" + reason + '\'' +
|
|
||||||
", exclusionDate=" + exclusionDate +
|
|
||||||
'}';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,65 +0,0 @@
|
||||||
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;
|
|
||||||
|
|
||||||
public class RubleDebitingAccountTag {
|
|
||||||
private final String amount;
|
|
||||||
private final String currency;
|
|
||||||
private final String inn;
|
|
||||||
private final String beneficiaryAccountNumber;
|
|
||||||
private final String bik;
|
|
||||||
private final String bankCorrespondentAccountNumber;
|
|
||||||
|
|
||||||
@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;
|
|
||||||
this.inn = inn;
|
|
||||||
this.beneficiaryAccountNumber = beneficiaryAccountNumber;
|
|
||||||
this.bik = bik;
|
|
||||||
this.bankCorrespondentAccountNumber = bankCorrespondentAccountNumber;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean equals(Object o) {
|
|
||||||
if (this == o) return true;
|
|
||||||
if (o == null || getClass() != o.getClass()) return false;
|
|
||||||
RubleDebitingAccountTag that = (RubleDebitingAccountTag) o;
|
|
||||||
return Objects.equals(amount, that.amount) && Objects.equals(currency, that.currency) && Objects.equals(inn, that.inn) && Objects.equals(beneficiaryAccountNumber, that.beneficiaryAccountNumber) && Objects.equals(bik, that.bik) && Objects.equals(bankCorrespondentAccountNumber, that.bankCorrespondentAccountNumber);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int hashCode() {
|
|
||||||
return Objects.hash(amount, currency, inn, beneficiaryAccountNumber, bik, bankCorrespondentAccountNumber);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return "RubleDebitingAccountTag{" +
|
|
||||||
"amount='" + amount + '\'' +
|
|
||||||
", currency='" + currency + '\'' +
|
|
||||||
", inn='" + inn + '\'' +
|
|
||||||
", beneficiaryAccountNumber='" + beneficiaryAccountNumber + '\'' +
|
|
||||||
", bik='" + bik + '\'' +
|
|
||||||
", bankCorrespondentAccountNumber='" + bankCorrespondentAccountNumber + '\'' +
|
|
||||||
'}';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
||||||
package ru.spcex.clearing.xml.importer.logic.data.tags.accountlist.clienttags;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
|
||||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
public class ClientTag {
|
|
||||||
private final String clientName;
|
|
||||||
|
|
||||||
@JsonCreator
|
|
||||||
public ClientTag(@JacksonXmlProperty(isAttribute = true, localName = "CLIENT_NAME")
|
|
||||||
String clientName) {
|
|
||||||
this.clientName = clientName;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean equals(Object o) {
|
|
||||||
if (this == o) return true;
|
|
||||||
if (o == null || getClass() != o.getClass()) return false;
|
|
||||||
ClientTag clientTag = (ClientTag) o;
|
|
||||||
return Objects.equals(clientName, clientTag.clientName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int hashCode() {
|
|
||||||
return Objects.hashCode(clientName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return "ClientTag{" +
|
|
||||||
"clientName='" + clientName + '\'' +
|
|
||||||
'}';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,43 +0,0 @@
|
||||||
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;
|
|
||||||
|
|
||||||
public class ForeignCurrencyDebitingClientTag {
|
|
||||||
private final String clientName;
|
|
||||||
private final String debitingAmount;
|
|
||||||
|
|
||||||
@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;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean equals(Object o) {
|
|
||||||
if (this == o) return true;
|
|
||||||
if (o == null || getClass() != o.getClass()) return false;
|
|
||||||
ForeignCurrencyDebitingClientTag that = (ForeignCurrencyDebitingClientTag) o;
|
|
||||||
return Objects.equals(clientName, that.clientName) && Objects.equals(debitingAmount, that.debitingAmount);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int hashCode() {
|
|
||||||
return Objects.hash(clientName, debitingAmount);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return "ForeignCurrencyDebitingClientTag{" +
|
|
||||||
"clientName='" + clientName + '\'' +
|
|
||||||
", debitingAmount='" + debitingAmount + '\'' +
|
|
||||||
'}';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,66 +0,0 @@
|
||||||
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.time.LocalTime;
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
public class DocumentTag {
|
|
||||||
private final String author;
|
|
||||||
private final LocalTime time;
|
|
||||||
private final LocalDate date;
|
|
||||||
private final String name;
|
|
||||||
private final String documentId;
|
|
||||||
|
|
||||||
@JsonCreator
|
|
||||||
public DocumentTag(@JacksonXmlProperty(isAttribute = true, localName = "AUTHOR")
|
|
||||||
@JsonProperty(required = true)
|
|
||||||
String author,
|
|
||||||
@JacksonXmlProperty(isAttribute = true, localName = "TIME")
|
|
||||||
@JsonProperty(required = true)
|
|
||||||
@JsonFormat(pattern = "HH:mm:ss")
|
|
||||||
LocalTime time,
|
|
||||||
@JacksonXmlProperty(isAttribute = true, localName = "DATE")
|
|
||||||
@JsonProperty(required = true)
|
|
||||||
@JsonFormat(pattern = "dd.MM.yyyy")
|
|
||||||
LocalDate date,
|
|
||||||
@JacksonXmlProperty(isAttribute = true, localName = "NAME")
|
|
||||||
@JsonProperty(required = true)
|
|
||||||
String name,
|
|
||||||
@JacksonXmlProperty(isAttribute = true, localName = "DOCUMENT_ID")
|
|
||||||
@JsonProperty(required = true)
|
|
||||||
String documentId) {
|
|
||||||
this.author = author;
|
|
||||||
this.time = time;
|
|
||||||
this.date = date;
|
|
||||||
this.name = name;
|
|
||||||
this.documentId = documentId;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean equals(Object o) {
|
|
||||||
if (this == o) return true;
|
|
||||||
if (o == null || getClass() != o.getClass()) return false;
|
|
||||||
DocumentTag that = (DocumentTag) o;
|
|
||||||
return Objects.equals(author, that.author) && Objects.equals(time, that.time) && Objects.equals(date, that.date) && Objects.equals(name, that.name) && Objects.equals(documentId, that.documentId);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int hashCode() {
|
|
||||||
return Objects.hash(author, time, date, name, documentId);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return "DocumentTag{" +
|
|
||||||
"author='" + author + '\'' +
|
|
||||||
", time=" + time +
|
|
||||||
", date=" + date +
|
|
||||||
", name='" + name + '\'' +
|
|
||||||
", documentId='" + documentId + '\'' +
|
|
||||||
'}';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,46 +0,0 @@
|
||||||
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;
|
|
||||||
|
|
||||||
public class ForeignCurrencyDebitingDocumentTag {
|
|
||||||
private final String documentId;
|
|
||||||
private final LocalDate date;
|
|
||||||
|
|
||||||
@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;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean equals(Object o) {
|
|
||||||
if (this == o) return true;
|
|
||||||
if (o == null || getClass() != o.getClass()) return false;
|
|
||||||
ForeignCurrencyDebitingDocumentTag that = (ForeignCurrencyDebitingDocumentTag) o;
|
|
||||||
return Objects.equals(documentId, that.documentId) && Objects.equals(date, that.date);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int hashCode() {
|
|
||||||
return Objects.hash(documentId, date);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return "ForeignCurrencyDebitingDocumentTag{" +
|
|
||||||
"documentId='" + documentId + '\'' +
|
|
||||||
", date=" + date +
|
|
||||||
'}';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
package ru.spcex.clearing.xml.importer.logic.data.tags.accountlist.firmdoctags;
|
|
||||||
|
|
||||||
public abstract class AbstractFirmDocTag {
|
|
||||||
}
|
|
||||||
|
|
@ -1,68 +0,0 @@
|
||||||
package ru.spcex.clearing.xml.importer.logic.data.tags.accountlist.firmdoctags;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
||||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
|
||||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
|
|
||||||
import java.util.Objects;
|
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.tags.accountlist.accounttags.ForeignCurrencyDebitingAccountTag;
|
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.tags.accountlist.clienttags.ForeignCurrencyDebitingClientTag;
|
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.tags.accountlist.documenttags.ForeignCurrencyDebitingDocumentTag;
|
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.tags.accountlist.registratortags.DebitingRegistratorTag;
|
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.tags.accountlist.respondtags.DebitingRespondTag;
|
|
||||||
|
|
||||||
@JacksonXmlRootElement(localName = "FIRM_DOC")
|
|
||||||
public class ForeignCurrencyDebitingFirmDocTag extends AbstractFirmDocTag {
|
|
||||||
private final ForeignCurrencyDebitingDocumentTag document;
|
|
||||||
private final DebitingRegistratorTag registrator;
|
|
||||||
private final ForeignCurrencyDebitingClientTag client;
|
|
||||||
private final ForeignCurrencyDebitingAccountTag account;
|
|
||||||
private final DebitingRespondTag respond;
|
|
||||||
|
|
||||||
@JsonCreator
|
|
||||||
public ForeignCurrencyDebitingFirmDocTag(@JacksonXmlProperty(localName = "DOCUMENT")
|
|
||||||
@JsonProperty(required = true)
|
|
||||||
ForeignCurrencyDebitingDocumentTag document,
|
|
||||||
@JacksonXmlProperty(localName = "REGISTRATOR")
|
|
||||||
@JsonProperty(required = true)
|
|
||||||
DebitingRegistratorTag registrator,
|
|
||||||
@JacksonXmlProperty(localName = "CLIENT")
|
|
||||||
@JsonProperty(required = true)
|
|
||||||
ForeignCurrencyDebitingClientTag client,
|
|
||||||
@JacksonXmlProperty(localName = "ACCOUNT")
|
|
||||||
@JsonProperty(required = true)
|
|
||||||
ForeignCurrencyDebitingAccountTag account,
|
|
||||||
@JacksonXmlProperty(localName = "RESPOND")
|
|
||||||
@JsonProperty(required = true)
|
|
||||||
DebitingRespondTag respond) {
|
|
||||||
this.document = document;
|
|
||||||
this.registrator = registrator;
|
|
||||||
this.client = client;
|
|
||||||
this.account = account;
|
|
||||||
this.respond = respond;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean equals(Object o) {
|
|
||||||
if (this == o) return true;
|
|
||||||
if (o == null || getClass() != o.getClass()) return false;
|
|
||||||
ForeignCurrencyDebitingFirmDocTag that = (ForeignCurrencyDebitingFirmDocTag) o;
|
|
||||||
return Objects.equals(document, that.document) && Objects.equals(registrator, that.registrator) && Objects.equals(client, that.client) && Objects.equals(account, that.account) && Objects.equals(respond, that.respond);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int hashCode() {
|
|
||||||
return Objects.hash(document, registrator, client, account, respond);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return "ForeignCurrencyDebitingFirmDocTag{" +
|
|
||||||
"document=" + document +
|
|
||||||
", registrator=" + registrator +
|
|
||||||
", client=" + client +
|
|
||||||
", account=" + account +
|
|
||||||
", respond=" + respond +
|
|
||||||
'}';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,68 +0,0 @@
|
||||||
package ru.spcex.clearing.xml.importer.logic.data.tags.accountlist.firmdoctags;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
||||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
|
||||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
|
|
||||||
import java.util.Objects;
|
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.tags.accountlist.accounttags.ForeignCurrencyAccountTag;
|
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.tags.accountlist.clienttags.ClientTag;
|
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.tags.accountlist.documenttags.DocumentTag;
|
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.tags.accountlist.registratortags.RegistratorTag;
|
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.tags.accountlist.respondtags.RespondTag;
|
|
||||||
|
|
||||||
@JacksonXmlRootElement(localName = "FIRM_DOC")
|
|
||||||
public class ForeignCurrencyFirmDocTag extends AbstractFirmDocTag {
|
|
||||||
private final DocumentTag document;
|
|
||||||
private final RegistratorTag registrator;
|
|
||||||
private final ClientTag client;
|
|
||||||
private final ForeignCurrencyAccountTag account;
|
|
||||||
private final RespondTag respond;
|
|
||||||
|
|
||||||
@JsonCreator
|
|
||||||
public ForeignCurrencyFirmDocTag(@JacksonXmlProperty(localName = "DOCUMENT")
|
|
||||||
@JsonProperty(required = true)
|
|
||||||
DocumentTag document,
|
|
||||||
@JacksonXmlProperty(localName = "REGISTRATOR")
|
|
||||||
@JsonProperty(required = true)
|
|
||||||
RegistratorTag registrator,
|
|
||||||
@JacksonXmlProperty(localName = "CLIENT")
|
|
||||||
@JsonProperty(required = true)
|
|
||||||
ClientTag client,
|
|
||||||
@JacksonXmlProperty(localName = "ACCOUNT")
|
|
||||||
@JsonProperty(required = true)
|
|
||||||
ForeignCurrencyAccountTag account,
|
|
||||||
@JacksonXmlProperty(localName = "RESPOND")
|
|
||||||
@JsonProperty(required = true)
|
|
||||||
RespondTag respond) {
|
|
||||||
this.document = document;
|
|
||||||
this.registrator = registrator;
|
|
||||||
this.client = client;
|
|
||||||
this.account = account;
|
|
||||||
this.respond = respond;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean equals(Object o) {
|
|
||||||
if (this == o) return true;
|
|
||||||
if (o == null || getClass() != o.getClass()) return false;
|
|
||||||
ForeignCurrencyFirmDocTag that = (ForeignCurrencyFirmDocTag) o;
|
|
||||||
return Objects.equals(document, that.document) && Objects.equals(registrator, that.registrator) && Objects.equals(client, that.client) && Objects.equals(account, that.account) && Objects.equals(respond, that.respond);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int hashCode() {
|
|
||||||
return Objects.hash(document, registrator, client, account, respond);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return "ForeignCurrencyFirmDocTag{" +
|
|
||||||
"document=" + document +
|
|
||||||
", registrator=" + registrator +
|
|
||||||
", client=" + client +
|
|
||||||
", account=" + account +
|
|
||||||
", respond=" + respond +
|
|
||||||
'}';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,68 +0,0 @@
|
||||||
package ru.spcex.clearing.xml.importer.logic.data.tags.accountlist.firmdoctags;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
||||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
|
||||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
|
|
||||||
import java.util.Objects;
|
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.tags.accountlist.clienttags.ClientTag;
|
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.tags.accountlist.documenttags.DocumentTag;
|
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.tags.accountlist.accounttags.RubleDebitingAccountTag;
|
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.tags.accountlist.registratortags.DebitingRegistratorTag;
|
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.tags.accountlist.respondtags.DebitingRespondTag;
|
|
||||||
|
|
||||||
@JacksonXmlRootElement(localName = "FIRM_DOC")
|
|
||||||
public class RubleDebitingFirmDocTag extends AbstractFirmDocTag {
|
|
||||||
private final DocumentTag document;
|
|
||||||
private final DebitingRegistratorTag registrator;
|
|
||||||
private final ClientTag client;
|
|
||||||
private final RubleDebitingAccountTag account;
|
|
||||||
private final DebitingRespondTag respond;
|
|
||||||
|
|
||||||
@JsonCreator
|
|
||||||
public RubleDebitingFirmDocTag(@JacksonXmlProperty(localName = "DOCUMENT")
|
|
||||||
@JsonProperty(required = true)
|
|
||||||
DocumentTag document,
|
|
||||||
@JacksonXmlProperty(localName = "REGISTRATOR")
|
|
||||||
@JsonProperty(required = true)
|
|
||||||
DebitingRegistratorTag registrator,
|
|
||||||
@JacksonXmlProperty(localName = "CLIENT")
|
|
||||||
@JsonProperty(required = true)
|
|
||||||
ClientTag client,
|
|
||||||
@JacksonXmlProperty(localName = "ACCOUNT")
|
|
||||||
@JsonProperty(required = true)
|
|
||||||
RubleDebitingAccountTag account,
|
|
||||||
@JacksonXmlProperty(localName = "RESPOND")
|
|
||||||
@JsonProperty(required = true)
|
|
||||||
DebitingRespondTag respond) {
|
|
||||||
this.document = document;
|
|
||||||
this.registrator = registrator;
|
|
||||||
this.client = client;
|
|
||||||
this.account = account;
|
|
||||||
this.respond = respond;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean equals(Object o) {
|
|
||||||
if (this == o) return true;
|
|
||||||
if (o == null || getClass() != o.getClass()) return false;
|
|
||||||
RubleDebitingFirmDocTag that = (RubleDebitingFirmDocTag) o;
|
|
||||||
return Objects.equals(document, that.document) && Objects.equals(registrator, that.registrator) && Objects.equals(client, that.client) && Objects.equals(account, that.account) && Objects.equals(respond, that.respond);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int hashCode() {
|
|
||||||
return Objects.hash(document, registrator, client, account, respond);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return "RubleDebitingFirmDocTag{" +
|
|
||||||
"document=" + document +
|
|
||||||
", registrator=" + registrator +
|
|
||||||
", client=" + client +
|
|
||||||
", account=" + account +
|
|
||||||
", respond=" + respond +
|
|
||||||
'}';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,68 +0,0 @@
|
||||||
package ru.spcex.clearing.xml.importer.logic.data.tags.accountlist.firmdoctags;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
||||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
|
||||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
|
|
||||||
import java.util.Objects;
|
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.tags.accountlist.accounttags.RubleAccountTag;
|
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.tags.accountlist.clienttags.ClientTag;
|
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.tags.accountlist.documenttags.DocumentTag;
|
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.tags.accountlist.registratortags.RegistratorTag;
|
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.tags.accountlist.respondtags.RespondTag;
|
|
||||||
|
|
||||||
@JacksonXmlRootElement(localName = "FIRM_DOC")
|
|
||||||
public class RubleFirmDocTag extends AbstractFirmDocTag {
|
|
||||||
private final DocumentTag document;
|
|
||||||
private final RegistratorTag registrator;
|
|
||||||
private final ClientTag client;
|
|
||||||
private final RubleAccountTag account;
|
|
||||||
private final RespondTag respond;
|
|
||||||
|
|
||||||
@JsonCreator
|
|
||||||
public RubleFirmDocTag(@JacksonXmlProperty(localName = "DOCUMENT")
|
|
||||||
@JsonProperty(required = true)
|
|
||||||
DocumentTag document,
|
|
||||||
@JacksonXmlProperty(localName = "REGISTRATOR")
|
|
||||||
@JsonProperty(required = true)
|
|
||||||
RegistratorTag registrator,
|
|
||||||
@JacksonXmlProperty(localName = "CLIENT")
|
|
||||||
@JsonProperty(required = true)
|
|
||||||
ClientTag client,
|
|
||||||
@JacksonXmlProperty(localName = "ACCOUNT")
|
|
||||||
@JsonProperty(required = true)
|
|
||||||
RubleAccountTag account,
|
|
||||||
@JacksonXmlProperty(localName = "RESPOND")
|
|
||||||
@JsonProperty(required = true)
|
|
||||||
RespondTag respond) {
|
|
||||||
this.document = document;
|
|
||||||
this.registrator = registrator;
|
|
||||||
this.client = client;
|
|
||||||
this.account = account;
|
|
||||||
this.respond = respond;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean equals(Object o) {
|
|
||||||
if (this == o) return true;
|
|
||||||
if (o == null || getClass() != o.getClass()) return false;
|
|
||||||
RubleFirmDocTag that = (RubleFirmDocTag) o;
|
|
||||||
return Objects.equals(document, that.document) && Objects.equals(registrator, that.registrator) && Objects.equals(client, that.client) && Objects.equals(account, that.account) && Objects.equals(respond, that.respond);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int hashCode() {
|
|
||||||
return Objects.hash(document, registrator, client, account, respond);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return "FirmDocTag{" +
|
|
||||||
"document=" + document +
|
|
||||||
", registrator=" + registrator +
|
|
||||||
", client=" + client +
|
|
||||||
", account=" + account +
|
|
||||||
", respond=" + respond +
|
|
||||||
'}';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,49 +0,0 @@
|
||||||
package ru.spcex.clearing.xml.importer.logic.data.tags.accountlist.registratortags;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
||||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
public class DebitingRegistratorTag {
|
|
||||||
private final String firmId;
|
|
||||||
private final String name;
|
|
||||||
private final String tkr;
|
|
||||||
|
|
||||||
@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)
|
|
||||||
String tkr) {
|
|
||||||
this.firmId = firmId;
|
|
||||||
this.name = name;
|
|
||||||
this.tkr = tkr;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean equals(Object o) {
|
|
||||||
if (this == o) return true;
|
|
||||||
if (o == null || getClass() != o.getClass()) return false;
|
|
||||||
DebitingRegistratorTag that = (DebitingRegistratorTag) o;
|
|
||||||
return Objects.equals(firmId, that.firmId) && Objects.equals(name, that.name) && Objects.equals(tkr, that.tkr);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int hashCode() {
|
|
||||||
return Objects.hash(firmId, name, tkr);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return "DebitingRegistratorTag{" +
|
|
||||||
"firmId='" + firmId + '\'' +
|
|
||||||
", name='" + name + '\'' +
|
|
||||||
", tkr='" + tkr + '\'' +
|
|
||||||
'}';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,43 +0,0 @@
|
||||||
package ru.spcex.clearing.xml.importer.logic.data.tags.accountlist.registratortags;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
||||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
public class RegistratorTag {
|
|
||||||
private final String firmId;
|
|
||||||
private final String name;
|
|
||||||
|
|
||||||
@JsonCreator
|
|
||||||
public RegistratorTag(@JacksonXmlProperty(isAttribute = true, localName = "FIRMID")
|
|
||||||
@JsonProperty(required = true)
|
|
||||||
String firmId,
|
|
||||||
@JacksonXmlProperty(isAttribute = true, localName = "NAME")
|
|
||||||
@JsonProperty(required = true)
|
|
||||||
String name) {
|
|
||||||
this.firmId = firmId;
|
|
||||||
this.name = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean equals(Object o) {
|
|
||||||
if (this == o) return true;
|
|
||||||
if (o == null || getClass() != o.getClass()) return false;
|
|
||||||
RegistratorTag that = (RegistratorTag) o;
|
|
||||||
return Objects.equals(firmId, that.firmId) && Objects.equals(name, that.name);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int hashCode() {
|
|
||||||
return Objects.hash(firmId, name);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return "RegistratorTag{" +
|
|
||||||
"firmId='" + firmId + '\'' +
|
|
||||||
", name='" + name + '\'' +
|
|
||||||
'}';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,50 +0,0 @@
|
||||||
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 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")
|
|
||||||
RespondResult respondResult,
|
|
||||||
@JacksonXmlProperty(isAttribute = true, localName = "REASON")
|
|
||||||
String reason) {
|
|
||||||
this.date = date;
|
|
||||||
this.respondResult = respondResult;
|
|
||||||
this.reason = reason;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean equals(Object o) {
|
|
||||||
if (this == o) return true;
|
|
||||||
if (o == null || getClass() != o.getClass()) return false;
|
|
||||||
DebitingRespondTag that = (DebitingRespondTag) o;
|
|
||||||
return Objects.equals(date, that.date) && respondResult == that.respondResult && Objects.equals(reason, that.reason);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int hashCode() {
|
|
||||||
return Objects.hash(date, respondResult, reason);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return "DebitingRespondTag{" +
|
|
||||||
"date=" + date +
|
|
||||||
", respondResult=" + respondResult +
|
|
||||||
", reason='" + reason + '\'' +
|
|
||||||
'}';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
||||||
package ru.spcex.clearing.xml.importer.logic.data.tags.accountlist.respondtags;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
|
||||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
public class RespondTag {
|
|
||||||
private final String accountStatus;
|
|
||||||
|
|
||||||
@JsonCreator
|
|
||||||
public RespondTag(@JacksonXmlProperty(isAttribute = true, localName = "ACCOUNT_STATUS")
|
|
||||||
String accountStatus) {
|
|
||||||
this.accountStatus = accountStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean equals(Object o) {
|
|
||||||
if (this == o) return true;
|
|
||||||
if (o == null || getClass() != o.getClass()) return false;
|
|
||||||
RespondTag that = (RespondTag) o;
|
|
||||||
return Objects.equals(accountStatus, that.accountStatus);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int hashCode() {
|
|
||||||
return Objects.hashCode(accountStatus);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return "RespondTag{" +
|
|
||||||
"accountStatus='" + accountStatus + '\'' +
|
|
||||||
'}';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package ru.spcex.clearing.xml.importer.logic.data.tags.sdf.objects;
|
package ru.spcex.clearing.xml.importer.logic.data.tags.objects;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package ru.spcex.clearing.xml.importer.logic.data.tags.sdf.objects;
|
package ru.spcex.clearing.xml.importer.logic.data.tags.objects;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package ru.spcex.clearing.xml.importer.logic.data.tags.sdf.objects;
|
package ru.spcex.clearing.xml.importer.logic.data.tags.objects;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package ru.spcex.clearing.xml.importer.logic.data.tags.sdf.objects;
|
package ru.spcex.clearing.xml.importer.logic.data.tags.objects;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package ru.spcex.clearing.xml.importer.logic.data.tags.sdf.objects;
|
package ru.spcex.clearing.xml.importer.logic.data.tags.objects;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package ru.spcex.clearing.xml.importer.logic.data.tags.sdf.objects;
|
package ru.spcex.clearing.xml.importer.logic.data.tags.objects;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package ru.spcex.clearing.xml.importer.logic.data.tags.sdf.objects;
|
package ru.spcex.clearing.xml.importer.logic.data.tags.objects;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
|
@ -38,16 +38,16 @@ public class ChangeDirOfFileStage {
|
||||||
File xmlFile = resultContainer.getXmlFile();
|
File xmlFile = resultContainer.getXmlFile();
|
||||||
|
|
||||||
if (!srcDir.exists()) {
|
if (!srcDir.exists()) {
|
||||||
log.error("Source directory does not exists!");
|
log.error("SettlementHouse_DocIn does not exists!");
|
||||||
notifyWithCode(resultContainer, StageResult.ERROR);
|
notifyWithCode(resultContainer, StageResult.ERROR);
|
||||||
return StageResult.ERROR;
|
return StageResult.ERROR;
|
||||||
}
|
}
|
||||||
if (!outDir.exists()) {
|
if (!outDir.exists()) {
|
||||||
log.warn("Output directory {} does not exists! Trying to create...", outDir.getAbsolutePath());
|
log.warn("ouput directory {} does not exists! Trying to made new!", outDir.getAbsolutePath());
|
||||||
if (outDir.mkdir()) {
|
if (outDir.mkdir()) {
|
||||||
log.error("Made directory {} successfully!", outDir.getName());
|
log.error("Made dir {} successfully!", outDir.getName());
|
||||||
} else {
|
} else {
|
||||||
log.error("Error raised while creating directory!");
|
log.error("SettlementHouse_DocIn does not exists!");
|
||||||
notifyWithCode(resultContainer, StageResult.ERROR);
|
notifyWithCode(resultContainer, StageResult.ERROR);
|
||||||
return StageResult.ERROR;
|
return StageResult.ERROR;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,8 @@ import ru.clearing.classes.statics.data.sdf.SDf57;
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.ResultContainer;
|
import ru.spcex.clearing.xml.importer.logic.data.ResultContainer;
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.enums.ETable;
|
import ru.spcex.clearing.xml.importer.logic.data.enums.ETable;
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.enums.StageResult;
|
import ru.spcex.clearing.xml.importer.logic.data.enums.StageResult;
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.tags.sdf.DocumentTag;
|
import ru.spcex.clearing.xml.importer.logic.data.tags.DocumentTag;
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.tags.sdf.objects.ObjectTag;
|
import ru.spcex.clearing.xml.importer.logic.data.tags.objects.ObjectTag;
|
||||||
import ru.spcex.platform.classes.base.SpcexObjectBase;
|
import ru.spcex.platform.classes.base.SpcexObjectBase;
|
||||||
import ru.spcex.platform.enumeration.ObjectType;
|
import ru.spcex.platform.enumeration.ObjectType;
|
||||||
import ru.spcex.platform.enumeration.Priority;
|
import ru.spcex.platform.enumeration.Priority;
|
||||||
|
|
@ -28,17 +28,6 @@ public class ImportToDB {
|
||||||
|
|
||||||
public StageResult process(ResultContainer resultContainer) {
|
public StageResult process(ResultContainer resultContainer) {
|
||||||
log.info("uuid {}. Stage: Import to DB", resultContainer.getUuid());
|
log.info("uuid {}. Stage: Import to DB", resultContainer.getUuid());
|
||||||
|
|
||||||
switch (resultContainer.getXmlTable().getFileType()) {
|
|
||||||
case SDF -> processSDf(resultContainer);
|
|
||||||
case ACCOUNT_LIST -> processAccountList(resultContainer);
|
|
||||||
}
|
|
||||||
|
|
||||||
log.info("uuid {}. Stage import to DB finished with status {}", resultContainer.getUuid(), StageResult.OK);
|
|
||||||
return StageResult.OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void processSDf(ResultContainer resultContainer) {
|
|
||||||
ETable currTable = resultContainer.getXmlTable();
|
ETable currTable = resultContainer.getXmlTable();
|
||||||
DocumentTag documentTag = resultContainer.getDocumentTag();
|
DocumentTag documentTag = resultContainer.getDocumentTag();
|
||||||
|
|
||||||
|
|
@ -64,9 +53,8 @@ public class ImportToDB {
|
||||||
}
|
}
|
||||||
kafkaMessenger.notifySystemIfNeeded(currTable, fileId);
|
kafkaMessenger.notifySystemIfNeeded(currTable, fileId);
|
||||||
kafkaMessenger.notifyUserAboutSuccessLoad(resultContainer);
|
kafkaMessenger.notifyUserAboutSuccessLoad(resultContainer);
|
||||||
}
|
|
||||||
|
|
||||||
private void processAccountList(ResultContainer resultContainer) {
|
log.info("uuid {}. Stage import to DB finished with status {}", resultContainer.getUuid(), StageResult.OK);
|
||||||
log.info("RESULT CONTAINER = {}", resultContainer);
|
return StageResult.OK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,11 +8,7 @@ import org.springframework.beans.factory.annotation.Qualifier;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.ResultContainer;
|
import ru.spcex.clearing.xml.importer.logic.data.ResultContainer;
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.enums.StageResult;
|
import ru.spcex.clearing.xml.importer.logic.data.enums.StageResult;
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.tags.accountlist.firmdoctags.ForeignCurrencyDebitingFirmDocTag;
|
import ru.spcex.clearing.xml.importer.logic.data.tags.DocumentTag;
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.tags.accountlist.firmdoctags.ForeignCurrencyFirmDocTag;
|
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.tags.accountlist.firmdoctags.RubleDebitingFirmDocTag;
|
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.tags.accountlist.firmdoctags.RubleFirmDocTag;
|
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.tags.sdf.DocumentTag;
|
|
||||||
import ru.spcex.platform.utils.log.ExceptionUtils;
|
import ru.spcex.platform.utils.log.ExceptionUtils;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
|
|
@ -30,24 +26,7 @@ public class ReadXMLFile {
|
||||||
public StageResult process(ResultContainer resultContainer) {
|
public StageResult process(ResultContainer resultContainer) {
|
||||||
log.info("uuid {}. Stage: Reading XML file", resultContainer.getUuid());
|
log.info("uuid {}. Stage: Reading XML file", resultContainer.getUuid());
|
||||||
try {
|
try {
|
||||||
switch (resultContainer.getXmlTable().getFileType()) {
|
resultContainer.setDocumentTag(xmlMapper.readValue(resultContainer.getXmlFile(), DocumentTag.class));
|
||||||
case SDF ->
|
|
||||||
resultContainer.setDocumentTag(xmlMapper.readValue(resultContainer.getXmlFile(), DocumentTag.class));
|
|
||||||
case ACCOUNT_LIST -> resultContainer.setFirmDocTag(
|
|
||||||
switch (resultContainer.getXmlTable()) {
|
|
||||||
case RUBLE_FIRMDOC ->
|
|
||||||
xmlMapper.readValue(resultContainer.getXmlFile(), RubleFirmDocTag.class);
|
|
||||||
case RUBLE_DEBITING_FIRMDOC ->
|
|
||||||
xmlMapper.readValue(resultContainer.getXmlFile(), RubleDebitingFirmDocTag.class);
|
|
||||||
case FOREIGN_CURRENCY_FIRMDOC ->
|
|
||||||
xmlMapper.readValue(resultContainer.getXmlFile(), ForeignCurrencyFirmDocTag.class);
|
|
||||||
case FOREIGN_CURRENCY_DEBITING_FIRMDOC ->
|
|
||||||
xmlMapper.readValue(resultContainer.getXmlFile(), ForeignCurrencyDebitingFirmDocTag.class);
|
|
||||||
default ->
|
|
||||||
throw new IllegalStateException("Unexpected value: " + resultContainer.getXmlTable());
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return StageResult.OK;
|
return StageResult.OK;
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
log.error(ExceptionUtils.getStackTrace(e));
|
log.error(ExceptionUtils.getStackTrace(e));
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,6 @@ import ru.spcex.clearing.platform.messaging.serialization.LogFormatter;
|
||||||
import ru.spcex.clearing.platform.messaging.service.sender.KafkaSender;
|
import ru.spcex.clearing.platform.messaging.service.sender.KafkaSender;
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.ResultContainer;
|
import ru.spcex.clearing.xml.importer.logic.data.ResultContainer;
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.enums.ETable;
|
import ru.spcex.clearing.xml.importer.logic.data.enums.ETable;
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.enums.FileType;
|
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.enums.StageResult;
|
import ru.spcex.clearing.xml.importer.logic.data.enums.StageResult;
|
||||||
import ru.spcex.platform.enumeration.ObjectType;
|
import ru.spcex.platform.enumeration.ObjectType;
|
||||||
import ru.spcex.platform.enumeration.Priority;
|
import ru.spcex.platform.enumeration.Priority;
|
||||||
|
|
@ -51,11 +50,9 @@ public class XmlImportKafkaMessenger implements InitializingBean {
|
||||||
* (обрабатывается, например, в balance-service, clearing-service)
|
* (обрабатывается, например, в balance-service, clearing-service)
|
||||||
*/
|
*/
|
||||||
public void notifySystemIfNeeded(ETable table, Long groupId) {
|
public void notifySystemIfNeeded(ETable table, Long groupId) {
|
||||||
if (table.getFileType() != FileType.ACCOUNT_LIST) {
|
Consumer<Long> messenger = messengers.get(table);
|
||||||
Consumer<Long> messenger = messengers.get(table);
|
if (messenger != null) {
|
||||||
if (messenger != null) {
|
messenger.accept(groupId);
|
||||||
messenger.accept(groupId);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,14 +39,14 @@ import ru.spcex.clearing.xml.importer.config.settings.ImportXMLServiceSettings;
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.ResultContainer;
|
import ru.spcex.clearing.xml.importer.logic.data.ResultContainer;
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.enums.ETable;
|
import ru.spcex.clearing.xml.importer.logic.data.enums.ETable;
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.enums.StageResult;
|
import ru.spcex.clearing.xml.importer.logic.data.enums.StageResult;
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.tags.sdf.DocumentTag;
|
import ru.spcex.clearing.xml.importer.logic.data.tags.DocumentTag;
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.tags.sdf.ParentDocTag;
|
import ru.spcex.clearing.xml.importer.logic.data.tags.ParentDocTag;
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.tags.sdf.objects.DF01ObjectTag;
|
import ru.spcex.clearing.xml.importer.logic.data.tags.objects.DF01ObjectTag;
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.tags.sdf.objects.DF04ObjectTag;
|
import ru.spcex.clearing.xml.importer.logic.data.tags.objects.DF04ObjectTag;
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.tags.sdf.objects.DF06ObjectTag;
|
import ru.spcex.clearing.xml.importer.logic.data.tags.objects.DF06ObjectTag;
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.tags.sdf.objects.DF52ObjectTag;
|
import ru.spcex.clearing.xml.importer.logic.data.tags.objects.DF52ObjectTag;
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.tags.sdf.objects.DF55ObjectTag;
|
import ru.spcex.clearing.xml.importer.logic.data.tags.objects.DF55ObjectTag;
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.tags.sdf.objects.DF57ObjectTag;
|
import ru.spcex.clearing.xml.importer.logic.data.tags.objects.DF57ObjectTag;
|
||||||
import ru.spcex.platform.imdg.api.Imdg;
|
import ru.spcex.platform.imdg.api.Imdg;
|
||||||
import ru.spcex.platform.imdg.iml.hazelcast.service.HazelcastService;
|
import ru.spcex.platform.imdg.iml.hazelcast.service.HazelcastService;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,13 +20,13 @@ import ru.spcex.clearing.xml.importer.config.settings.ImportXMLServiceSettings;
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.ResultContainer;
|
import ru.spcex.clearing.xml.importer.logic.data.ResultContainer;
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.enums.ETable;
|
import ru.spcex.clearing.xml.importer.logic.data.enums.ETable;
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.enums.StageResult;
|
import ru.spcex.clearing.xml.importer.logic.data.enums.StageResult;
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.tags.sdf.DocumentTag;
|
import ru.spcex.clearing.xml.importer.logic.data.tags.DocumentTag;
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.tags.sdf.objects.DF01ObjectTag;
|
import ru.spcex.clearing.xml.importer.logic.data.tags.objects.DF01ObjectTag;
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.tags.sdf.objects.DF04ObjectTag;
|
import ru.spcex.clearing.xml.importer.logic.data.tags.objects.DF04ObjectTag;
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.tags.sdf.objects.DF06ObjectTag;
|
import ru.spcex.clearing.xml.importer.logic.data.tags.objects.DF06ObjectTag;
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.tags.sdf.objects.DF52ObjectTag;
|
import ru.spcex.clearing.xml.importer.logic.data.tags.objects.DF52ObjectTag;
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.tags.sdf.objects.DF55ObjectTag;
|
import ru.spcex.clearing.xml.importer.logic.data.tags.objects.DF55ObjectTag;
|
||||||
import ru.spcex.clearing.xml.importer.logic.data.tags.sdf.objects.DF57ObjectTag;
|
import ru.spcex.clearing.xml.importer.logic.data.tags.objects.DF57ObjectTag;
|
||||||
|
|
||||||
@SpringBootTest(classes = {
|
@SpringBootTest(classes = {
|
||||||
ReadXMLFile.class,
|
ReadXMLFile.class,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue