account-service http://jira.mfd.msk:8088/browse/CLS-509 InformationAccount - их может быть много
This commit is contained in:
parent
4c287bfed8
commit
38333d5b95
1 changed files with 1 additions and 9 deletions
|
|
@ -55,15 +55,7 @@ public class InformationAccountValidationConfig {
|
|||
company -> {
|
||||
if (!WorkflowStatus.Active.equalsByKey(company.getWorkflowStatus()))
|
||||
return AccountError.CompanyNotActive;
|
||||
Long companyId = company.getId();
|
||||
Imdg<InformationAccount> informationAccountImdg = context.obtainMap(
|
||||
IMDGDistributedNames.Map_InformationAccount, InformationAccount.class
|
||||
);
|
||||
Collection<InformationAccount> infoAccounts = informationAccountImdg.getCollectionObjectsByFieldValues(
|
||||
Map.of("companyId", companyId)
|
||||
);
|
||||
if (infoAccounts.isEmpty()) return null;
|
||||
return AccountError.InfoAccountAlreadyExist;
|
||||
return null;
|
||||
}),
|
||||
DictionaryPresentRule.instance("status", InformationAccountNewRequest::getStatus,
|
||||
IMDGDistributedNames.Map_ServiceStatusDictionary, ServiceStatusDictionary.class,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue