account-service http://jira.mfd.msk:8088/browse/CLS-230 (переделал)

This commit is contained in:
AKurakin 2023-01-17 13:25:50 +03:00
parent 8923d0e2cf
commit 299ecd9b26
3 changed files with 13 additions and 1 deletions

View file

@ -90,6 +90,7 @@ public class BankAccountService extends QueueConsumer implements InitializingBea
bankAccount.setTaxpayerIdentificationNumber(req.getTaxpayerIdentificationNumber());
bankAccount.setTaxRegistrationReasonCode(req.getTaxRegistrationReasonCode());
bankAccount.setAccount(req.getAccount());
bankAccount.setCompanyId(req.getCompanyId());
Account account = new Account();
account.setAccount(req.account);
@ -101,7 +102,6 @@ public class BankAccountService extends QueueConsumer implements InitializingBea
if (relationByCompany != null) {
account.setRelationId(relationByCompany.getId());
account.setCompanyId(relationByCompany.getConsumerId());
bankAccount.setCompanyId(relationByCompany.getConsumerId());
} else {
log.warn("Not found relation by condition: {}", relationSqlCondition);
}

View file

@ -44,6 +44,9 @@ public class BankAccountNewAction implements IAction<BankAccountNewRequest> {
@ApiModelProperty(value = "Номер счета", example = "1234567")
@JsonProperty
private String account;
@ApiModelProperty(value = "Компания", example = "1234")
@JsonProperty
private Long companyId;
@Override
public Collection<EnumMessage> validate() {
@ -88,6 +91,7 @@ public class BankAccountNewAction implements IAction<BankAccountNewRequest> {
req.setTaxpayerIdentificationNumber(this.taxpayerIdentificationNumber);
req.setTaxRegistrationReasonCode(this.taxRegistrationReasonCode);
req.setAccount(this.account);
req.setCompanyId(this.companyId);
return req;
}

View file

@ -95,4 +95,12 @@ public class BankAccountNewRequest {
public void setAccount(String account) {
this.account = account;
}
public Long getCompanyId() {
return companyId;
}
public void setCompanyId(Long companyId) {
this.companyId = companyId;
}
}