Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
ialbert 2023-05-23 14:44:05 +03:00
commit c537509c48
2 changed files with 92 additions and 1 deletions

View file

@ -2,6 +2,7 @@ package ru.spcex.clearing.backendapi.controller.request.cud.registry;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.StringUtils;
import ru.spcex.clearing.backendapi.domain.actions.IAction; import ru.spcex.clearing.backendapi.domain.actions.IAction;
import ru.spcex.clearing.backendapi.errors.BackEndError; import ru.spcex.clearing.backendapi.errors.BackEndError;
import ru.spcex.clearing.platform.messaging.domain.ActionType; import ru.spcex.clearing.platform.messaging.domain.ActionType;
@ -18,7 +19,19 @@ public class TradingClearingRegistryUpdateAction implements IAction<TradingClear
@ApiModelProperty(hidden = true) @ApiModelProperty(hidden = true)
@JsonProperty @JsonProperty
public Long id; public Long id;
@ApiModelProperty(value = "Наименование компании", example = "123")
@JsonProperty
public Long companyId;
@ApiModelProperty(value = "Код торгово-клирингового регистра", example = "123")
@JsonProperty
public String code;
@ApiModelProperty(value = "Номер денежного счета", example = "123")
@JsonProperty
public Long moneyAccountId;
@ApiModelProperty(value = "Номер депозитарного счета", example = "123")
@JsonProperty
public Long depoAccountId;
@ApiModelProperty(value = "Наименование статуса", example = "ACTV")
@JsonProperty @JsonProperty
private String status; private String status;
@ -27,6 +40,8 @@ public class TradingClearingRegistryUpdateAction implements IAction<TradingClear
List<EnumMessage> errors = new ArrayList<>(); List<EnumMessage> errors = new ArrayList<>();
if (this.id == null) if (this.id == null)
errors.add(new EnumMessage(BackEndError.ValidationError, "id")); errors.add(new EnumMessage(BackEndError.ValidationError, "id"));
if (StringUtils.isEmpty(this.status))
errors.add(new EnumMessage(BackEndError.ValidationError, "status"));
return errors.isEmpty() ? Collections.emptyList() : errors; return errors.isEmpty() ? Collections.emptyList() : errors;
} }
@ -34,6 +49,10 @@ public class TradingClearingRegistryUpdateAction implements IAction<TradingClear
public TradingClearingRegistryUpdateRequest toRequest() { public TradingClearingRegistryUpdateRequest toRequest() {
var req = new TradingClearingRegistryUpdateRequest(); var req = new TradingClearingRegistryUpdateRequest();
req.setId(this.id); req.setId(this.id);
req.setCompanyId(this.companyId);
req.setCode(this.code);
req.setMoneyAccountId(this.moneyAccountId);
req.setDepoAccountId(this.depoAccountId);
req.setStatus(this.status); req.setStatus(this.status);
return req; return req;
} }
@ -52,6 +71,38 @@ public class TradingClearingRegistryUpdateAction implements IAction<TradingClear
this.id = id; this.id = id;
} }
public Long getCompanyId() {
return companyId;
}
public void setCompanyId(Long companyId) {
this.companyId = companyId;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public Long getMoneyAccountId() {
return moneyAccountId;
}
public void setMoneyAccountId(Long moneyAccountId) {
this.moneyAccountId = moneyAccountId;
}
public Long getDepoAccountId() {
return depoAccountId;
}
public void setDepoAccountId(Long depoAccountId) {
this.depoAccountId = depoAccountId;
}
public String getStatus() { public String getStatus() {
return status; return status;
} }

View file

@ -6,6 +6,14 @@ public class TradingClearingRegistryUpdateRequest {
@JsonProperty @JsonProperty
private Long id; private Long id;
@JsonProperty @JsonProperty
public Long companyId;
@JsonProperty
public String code;
@JsonProperty
public Long moneyAccountId;
@JsonProperty
public Long depoAccountId;
@JsonProperty
private String status; private String status;
public Long getId() { public Long getId() {
@ -16,6 +24,38 @@ public class TradingClearingRegistryUpdateRequest {
this.id = id; this.id = id;
} }
public Long getCompanyId() {
return companyId;
}
public void setCompanyId(Long companyId) {
this.companyId = companyId;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public Long getMoneyAccountId() {
return moneyAccountId;
}
public void setMoneyAccountId(Long moneyAccountId) {
this.moneyAccountId = moneyAccountId;
}
public Long getDepoAccountId() {
return depoAccountId;
}
public void setDepoAccountId(Long depoAccountId) {
this.depoAccountId = depoAccountId;
}
public String getStatus() { public String getStatus() {
return status; return status;
} }