This commit is contained in:
akulikov 2023-05-03 17:54:27 +03:00
parent 342db96a1e
commit 8ff70f65cf
5 changed files with 2 additions and 7 deletions

View file

@ -31,7 +31,6 @@ import java.util.function.Function;
@Configuration
public class ClearingAccountValidationConfig {
// todo add validation for clearingAccountType from dictionary
@Bean("clearingAccountNewRequestValidator")
public Function<ClearingAccountNewRequest, IValidator> clearingAccountNewRequestValidator(
Map<String, Imdg<? extends SpcexObjectBase>> imdgForValidation

View file

@ -9,6 +9,7 @@ import ru.clearing.classes.statics.data.account.ClearingAccount;
import ru.clearing.classes.statics.data.account.InformationAccount;
import ru.clearing.classes.statics.data.company.ClearingMemberCategory;
import ru.clearing.classes.statics.data.company.Company;
import ru.clearing.platform.dictionary.AccountTypeDictionary;
import ru.clearing.platform.dictionary.ClearingAccountTypeDictionary;
import ru.clearing.platform.dictionary.CurrencyCodeDictionary;
import ru.spcex.clearing.imdg.IMDGDistributedNames;
@ -35,7 +36,7 @@ public class ValidationConfig {
addImdg.accept(IMDGDistributedNames.Map_ClearingAccountTypeDictionary, ClearingAccountTypeDictionary.class);
addImdg.accept(IMDGDistributedNames.Map_Account, Account.class);
addImdg.accept(IMDGDistributedNames.Map_InformationAccount, InformationAccount.class);
addImdg.accept(IMDGDistributedNames.Map_AccountTypeDictionary, Account.class);
addImdg.accept(IMDGDistributedNames.Map_AccountTypeDictionary, AccountTypeDictionary.class);
addImdg.accept(IMDGDistributedNames.Map_BankAccount, BankAccount.class);
addImdg.accept(IMDGDistributedNames.Map_CurrencyCodeDictionary, CurrencyCodeDictionary.class);
addImdg.accept(IMDGDistributedNames.Map_ClearingAccount, ClearingAccount.class);

View file

@ -186,8 +186,6 @@ public class AccountService extends QueueConsumer implements InitializingBean {
public RequestInfoUpdate accountNewSdf01(BaseRequest<AccountSdf01Request> userRequest) {
log.debug("AccountSdf01Request received");
// todo add validation (create task for that?)
AccountSdf01Request req = userRequest.getRequestPayload();
List<AccountSdfToStatementRequestPart> accountToStatement = new ArrayList<>();
for (AccountSdfRequestPart accountReq : req.getAccounts()) {

View file

@ -136,7 +136,6 @@ public class BankAccountService extends QueueConsumer implements InitializingBea
imdgTransaction.commitTransaction();
log.debug("successfully processed, new bank account id {}, account id {}", bankAccountId, accountId);
} else {
// todo выяснить, что возвращать из метода в этой ситуации
log.debug("failed insert, new bank account id {}, new account id {} (if id = -1 then insert is failed)",
bankAccountId,
accountId);
@ -185,7 +184,6 @@ public class BankAccountService extends QueueConsumer implements InitializingBea
bankAccount.getId(),
account.getId());
} else {
// todo выяснить, что возвращать из метода в этой ситуации
log.debug("failed update, bank account id {}, new account id {}",
bankAccount.getId(),
account.getId());

View file

@ -85,7 +85,6 @@ public class InformationAccountService extends QueueConsumer implements Initiali
Long newId = informationAccountImdg.nextIDSequenceFor();
String accountValue = generateInfoAccount(newId);
// todo уточнить у репортера
ImdgPredicateBuilder accountPredicateBuilder = accountImdg.predicateBuilder();
ImdgPredicate companyIdPredicate = accountPredicateBuilder.equals("companyId", 1);
ImdgPredicate accountTypePredicate = accountPredicateBuilder.equals("accountType", AccountType.Anlt.getKey());