account-service http://jira.mfd.msk:8088/browse/CLS-230 (переделал)
This commit is contained in:
parent
8923d0e2cf
commit
299ecd9b26
3 changed files with 13 additions and 1 deletions
|
|
@ -90,6 +90,7 @@ public class BankAccountService extends QueueConsumer implements InitializingBea
|
||||||
bankAccount.setTaxpayerIdentificationNumber(req.getTaxpayerIdentificationNumber());
|
bankAccount.setTaxpayerIdentificationNumber(req.getTaxpayerIdentificationNumber());
|
||||||
bankAccount.setTaxRegistrationReasonCode(req.getTaxRegistrationReasonCode());
|
bankAccount.setTaxRegistrationReasonCode(req.getTaxRegistrationReasonCode());
|
||||||
bankAccount.setAccount(req.getAccount());
|
bankAccount.setAccount(req.getAccount());
|
||||||
|
bankAccount.setCompanyId(req.getCompanyId());
|
||||||
|
|
||||||
Account account = new Account();
|
Account account = new Account();
|
||||||
account.setAccount(req.account);
|
account.setAccount(req.account);
|
||||||
|
|
@ -101,7 +102,6 @@ public class BankAccountService extends QueueConsumer implements InitializingBea
|
||||||
if (relationByCompany != null) {
|
if (relationByCompany != null) {
|
||||||
account.setRelationId(relationByCompany.getId());
|
account.setRelationId(relationByCompany.getId());
|
||||||
account.setCompanyId(relationByCompany.getConsumerId());
|
account.setCompanyId(relationByCompany.getConsumerId());
|
||||||
bankAccount.setCompanyId(relationByCompany.getConsumerId());
|
|
||||||
} else {
|
} else {
|
||||||
log.warn("Not found relation by condition: {}", relationSqlCondition);
|
log.warn("Not found relation by condition: {}", relationSqlCondition);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,9 @@ public class BankAccountNewAction implements IAction<BankAccountNewRequest> {
|
||||||
@ApiModelProperty(value = "Номер счета", example = "1234567")
|
@ApiModelProperty(value = "Номер счета", example = "1234567")
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
private String account;
|
private String account;
|
||||||
|
@ApiModelProperty(value = "Компания", example = "1234")
|
||||||
|
@JsonProperty
|
||||||
|
private Long companyId;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Collection<EnumMessage> validate() {
|
public Collection<EnumMessage> validate() {
|
||||||
|
|
@ -88,6 +91,7 @@ public class BankAccountNewAction implements IAction<BankAccountNewRequest> {
|
||||||
req.setTaxpayerIdentificationNumber(this.taxpayerIdentificationNumber);
|
req.setTaxpayerIdentificationNumber(this.taxpayerIdentificationNumber);
|
||||||
req.setTaxRegistrationReasonCode(this.taxRegistrationReasonCode);
|
req.setTaxRegistrationReasonCode(this.taxRegistrationReasonCode);
|
||||||
req.setAccount(this.account);
|
req.setAccount(this.account);
|
||||||
|
req.setCompanyId(this.companyId);
|
||||||
return req;
|
return req;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -95,4 +95,12 @@ public class BankAccountNewRequest {
|
||||||
public void setAccount(String account) {
|
public void setAccount(String account) {
|
||||||
this.account = account;
|
this.account = account;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Long getCompanyId() {
|
||||||
|
return companyId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCompanyId(Long companyId) {
|
||||||
|
this.companyId = companyId;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue