заполнение statement#contract

This commit is contained in:
ialbert 2023-07-09 15:21:05 +03:00
parent d805a1d462
commit a63782a57b

View file

@ -177,8 +177,6 @@ public class Sdf57Executor extends AbstractExecutor<SDf57> {
Statement stmt = stmtCmpAcc.statement();
Company company = stmtCmpAcc.company();
Account account = stmtCmpAcc.account();
if (account == null)
return;
Optional<EnumMessage> err = validateActiveness(company, account);
if (err.isEmpty()) {
Optional<Registry> amtFound = RegistrySearch.builder(registryImdg)
@ -593,7 +591,7 @@ public class Sdf57Executor extends AbstractExecutor<SDf57> {
return comment.replaceAll("\\s+", "");
}
private String getContractFromSpecif(String specif) {
private static String getContractFromSpecif(String specif) {
if (specif == null) {
return null;
}
@ -601,7 +599,23 @@ public class Sdf57Executor extends AbstractExecutor<SDf57> {
if (index == -1) {
return null;
}
return specif.substring(index + 1).replaceAll("\\s+", "");
StringBuilder buffer = new StringBuilder();
String afterN = specif.substring(index + 1);
int countSlashes = 0;
for(int i = 0; i < afterN.length(); i++) {
char c = afterN.charAt(i);
if (!Character.isWhitespace(c)) {
buffer.append(c);
if (c == '/') {
countSlashes++;
}
} else {
if (countSlashes == 3) {
break;
}
}
}
return buffer.toString();
}
@FunctionalInterface