Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
008a3dbf36
27 changed files with 301 additions and 58 deletions
|
|
@ -130,7 +130,7 @@ public class TradingClearingRegistryService extends QueueConsumer implements Ini
|
|||
tradingClearingRegistry.setId(id);
|
||||
tradingClearingRegistry.setCompanyId(req.getCompanyId());
|
||||
tradingClearingRegistry.setMoneyAccountId(req.getMoneyAccountId());
|
||||
tradingClearingRegistry.setDepoAaccountId(req.getDepoAccountId());
|
||||
tradingClearingRegistry.setDepoAccountId(req.getDepoAccountId());
|
||||
|
||||
DepoAccount depoAccount = req.getDepoAccountId() != null ? depoAccountImdg.getSingleObjectByID(req.getDepoAccountId()) : null;
|
||||
Account depoAccountMain = depoAccount != null ? accountImdg.getSingleObjectByID(depoAccount.getAccountId()) : null;
|
||||
|
|
@ -277,7 +277,7 @@ public class TradingClearingRegistryService extends QueueConsumer implements Ini
|
|||
tradingClearingRegistry.setId(id);
|
||||
tradingClearingRegistry.setCompanyId(req.getCompanyId());
|
||||
tradingClearingRegistry.setMoneyAccountId(req.getMoneyAccountId());
|
||||
tradingClearingRegistry.setDepoAaccountId(req.getDepoAccountId());
|
||||
tradingClearingRegistry.setDepoAccountId(req.getDepoAccountId());
|
||||
|
||||
DepoAccount depoAccount = req.getDepoAccountId() != null ? depoAccountImdg.getSingleObjectByID(req.getDepoAccountId()) : null;
|
||||
ClearingAccount clearingAccount = clearingAccountImdg.getSingleObjectByID(req.getMoneyAccountId());
|
||||
|
|
|
|||
|
|
@ -228,7 +228,7 @@ class TradingClearingRegistryServiceTest {
|
|||
predictableTradingClearingRegistry.setCompanyId(companyId);
|
||||
predictableTradingClearingRegistry.setCode("0077CDAT");
|
||||
predictableTradingClearingRegistry.setMoneyAccountId(clearingAccountId);
|
||||
predictableTradingClearingRegistry.setDepoAaccountId(depoAccountId);
|
||||
predictableTradingClearingRegistry.setDepoAccountId(depoAccountId);
|
||||
predictableTradingClearingRegistry.setTradingClearingRegistryType("DAT");
|
||||
predictableTradingClearingRegistry.setTradingClearingRegistryPurpose(TradingClearingRegistryPurpose.C.getKey());
|
||||
predictableTradingClearingRegistry.setStatus(ServiceStatus.Active.getKey());
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import org.springframework.stereotype.Controller;
|
|||
import org.springframework.web.bind.annotation.*;
|
||||
import ru.clearing.classes.statics.data.profile.Contact;
|
||||
import ru.spcex.clearing.backendapi.controller.queue.AbstractQueueController;
|
||||
import ru.spcex.clearing.backendapi.controller.request.cud.company.ContactNewAction;
|
||||
import ru.spcex.clearing.backendapi.controller.request.cud.company.ContactUpdateAction;
|
||||
import ru.spcex.clearing.backendapi.controller.response.BasicSpcexResponse;
|
||||
import ru.spcex.clearing.backendapi.controller.response.cud.CudResponse;
|
||||
|
|
@ -47,6 +48,16 @@ public class ContactController extends AbstractQueueController {
|
|||
return processRequest(Consts.DESTINATION_CONTACT_UPDATE, contactUpdateAction);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "create company contact.")
|
||||
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CudResponse.class), @ApiResponse(code = 400, message = "Ошибка валидации", response = BasicSpcexResponse.class)})
|
||||
@RequestMapping(method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
|
||||
@ResponseBody
|
||||
public CudResponse create(
|
||||
@ApiParam(value = "Значения полей нового объекта.", required = true)
|
||||
@RequestBody ContactNewAction contactNewAction) throws ExecutionException, InterruptedException {
|
||||
return processRequest(Consts.DESTINATION_CONTACT_NEW, contactNewAction);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "get all Contacts.")
|
||||
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CommonGetAllResponse.class)})
|
||||
@RequestMapping(method = RequestMethod.GET)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,60 @@
|
|||
package ru.spcex.clearing.backendapi.controller.request.cud.company;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import ru.spcex.clearing.backendapi.domain.actions.IAction;
|
||||
import ru.spcex.clearing.platform.messaging.domain.ActionType;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.company.ContactNewRequest;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.company.ContactUpdateRequest;
|
||||
|
||||
public class ContactNewAction implements IAction<ContactNewRequest> {
|
||||
|
||||
@ApiModelProperty(value = "Наименование компании", example = "ABCD")
|
||||
@JsonProperty
|
||||
private Long companyId;
|
||||
@ApiModelProperty(value = "Идентификатор справочника", example = "ABCD")
|
||||
@JsonProperty
|
||||
private String contactType;
|
||||
@ApiModelProperty(value = "Значение справочника", example = "example contact string")
|
||||
@JsonProperty
|
||||
private String contactValue;
|
||||
|
||||
@Override
|
||||
public ContactNewRequest toRequest() {
|
||||
ContactNewRequest request = new ContactNewRequest();
|
||||
request.setCompanyId(this.companyId);
|
||||
request.setContactType(this.contactType);
|
||||
request.setContactValue(this.contactValue);
|
||||
return request;
|
||||
}
|
||||
|
||||
@ApiModelProperty(hidden = true)
|
||||
@Override
|
||||
public ActionType getActionType() {
|
||||
return ActionType.NEW;
|
||||
}
|
||||
|
||||
public Long getCompanyId() {
|
||||
return companyId;
|
||||
}
|
||||
|
||||
public void setCompanyId(Long companyId) {
|
||||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
public String getContactType() {
|
||||
return contactType;
|
||||
}
|
||||
|
||||
public void setContactType(String contactType) {
|
||||
this.contactType = contactType;
|
||||
}
|
||||
|
||||
public String getContactValue() {
|
||||
return contactValue;
|
||||
}
|
||||
|
||||
public void setContactValue(String contactValue) {
|
||||
this.contactValue = contactValue;
|
||||
}
|
||||
}
|
||||
|
|
@ -14,13 +14,13 @@ import java.util.Collections;
|
|||
import java.util.List;
|
||||
|
||||
public class LauncherNew implements IAction<Object> {
|
||||
@ApiModelProperty(value = "Идентификатор единоличного исполнительного органа", example = "ABCD")
|
||||
@ApiModelProperty(value = "Код задачи", example = "ABCD")
|
||||
@JsonProperty
|
||||
private String task;
|
||||
@ApiModelProperty(value = "Идентификатор инициатора", example = "1000")
|
||||
@ApiModelProperty(value = "Наименование инициатора", example = "1000")
|
||||
@JsonProperty
|
||||
private Long companyId;
|
||||
@ApiModelProperty(value = "Идентификатор инструмента", example = "1000")
|
||||
@ApiModelProperty(value = "Наименование инструмента", example = "1000")
|
||||
@JsonProperty
|
||||
private Long securityId;
|
||||
@JsonIgnore
|
||||
|
|
|
|||
|
|
@ -40,7 +40,11 @@ public class PlannerNewAction implements IAction<PlannerNewRequest> {
|
|||
|
||||
@ApiModelProperty(value = "Секция", example = "ABCD")
|
||||
@JsonProperty
|
||||
public String market;
|
||||
public String section;
|
||||
|
||||
@ApiModelProperty(value = "Тип клиринговой сессии", example = "ABCD")
|
||||
@JsonProperty
|
||||
public String sessionType;
|
||||
|
||||
@ApiModelProperty(value = "Статус", example = "ABCD")
|
||||
@JsonProperty
|
||||
|
|
@ -60,7 +64,8 @@ public class PlannerNewAction implements IAction<PlannerNewRequest> {
|
|||
plannerNewRequest.setTask(task);
|
||||
plannerNewRequest.setTaskTime(taskTime);
|
||||
plannerNewRequest.setClearingDate(clearingDate);
|
||||
plannerNewRequest.setMarket(market);
|
||||
plannerNewRequest.setSection(section);
|
||||
plannerNewRequest.setSessionType(sessionType);
|
||||
plannerNewRequest.setTaskStatus(taskStatus);
|
||||
plannerNewRequest.setCompanyId(companyId);
|
||||
plannerNewRequest.setSecurityId(securityId);
|
||||
|
|
@ -115,12 +120,28 @@ public class PlannerNewAction implements IAction<PlannerNewRequest> {
|
|||
this.clearingDate = clearingDate;
|
||||
}
|
||||
|
||||
public String getMarket() {
|
||||
return market;
|
||||
public String getSection() {
|
||||
return section;
|
||||
}
|
||||
|
||||
public void setMarket(String market) {
|
||||
this.market = market;
|
||||
public void setSection(String section) {
|
||||
this.section = section;
|
||||
}
|
||||
|
||||
public String getSessionType() {
|
||||
return sessionType;
|
||||
}
|
||||
|
||||
public void setSessionType(String sessionType) {
|
||||
this.sessionType = sessionType;
|
||||
}
|
||||
|
||||
public Long getCompanyId() {
|
||||
return companyId;
|
||||
}
|
||||
|
||||
public void setCompanyId(Long companyId) {
|
||||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
public String getTaskStatus() {
|
||||
|
|
|
|||
|
|
@ -27,6 +27,12 @@ public class PlannerTemplateNewAction implements IAction<PlannerTemplateNewReque
|
|||
@JsonDeserialize(using = LocalTimeDeserializer.class)
|
||||
@JsonProperty
|
||||
public LocalTime taskTime;
|
||||
@ApiModelProperty(value = "Секция", example = "ABCD")
|
||||
@JsonProperty
|
||||
public String section;
|
||||
@ApiModelProperty(value = "Тип клиринговой сессии", example = "ABCD")
|
||||
@JsonProperty
|
||||
public String sessionType;
|
||||
@ApiModelProperty(value = "Статус", example = "ACTV")
|
||||
@JsonProperty
|
||||
public String taskStatus;
|
||||
|
|
@ -42,6 +48,8 @@ public class PlannerTemplateNewAction implements IAction<PlannerTemplateNewReque
|
|||
PlannerTemplateNewRequest plannerTemplateNewRequest = new PlannerTemplateNewRequest();
|
||||
plannerTemplateNewRequest.setTask(task);
|
||||
plannerTemplateNewRequest.setTaskTime(taskTime);
|
||||
plannerTemplateNewRequest.setSection(section);
|
||||
plannerTemplateNewRequest.setSessionType(sessionType);
|
||||
plannerTemplateNewRequest.setTaskStatus(taskStatus);
|
||||
plannerTemplateNewRequest.setCompanyId(companyId);
|
||||
plannerTemplateNewRequest.setSecurityId(securityId);
|
||||
|
|
@ -108,4 +116,20 @@ public class PlannerTemplateNewAction implements IAction<PlannerTemplateNewReque
|
|||
public void setSecurityId(Long securityId) {
|
||||
this.securityId = securityId;
|
||||
}
|
||||
|
||||
public String getSection() {
|
||||
return section;
|
||||
}
|
||||
|
||||
public void setSection(String section) {
|
||||
this.section = section;
|
||||
}
|
||||
|
||||
public String getSessionType() {
|
||||
return sessionType;
|
||||
}
|
||||
|
||||
public void setSessionType(String sessionType) {
|
||||
this.sessionType = sessionType;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,6 +31,12 @@ public class PlannerTemplateUpdateAction implements IAction<PlannerTemplateUpdat
|
|||
@JsonDeserialize(using = LocalTimeDeserializer.class)
|
||||
@JsonProperty
|
||||
public LocalTime taskTime;
|
||||
@ApiModelProperty(value = "Секция", example = "ABCD")
|
||||
@JsonProperty
|
||||
public String section;
|
||||
@ApiModelProperty(value = "Тип клиринговой сессии", example = "ABCD")
|
||||
@JsonProperty
|
||||
public String sessionType;
|
||||
@ApiModelProperty(value = "Статус", example = "ACTV")
|
||||
@JsonProperty
|
||||
public String taskStatus;
|
||||
|
|
@ -47,6 +53,8 @@ public class PlannerTemplateUpdateAction implements IAction<PlannerTemplateUpdat
|
|||
plannerTemplateUpdateRequest.setId(id);
|
||||
plannerTemplateUpdateRequest.setTask(task);
|
||||
plannerTemplateUpdateRequest.setTaskTime(taskTime);
|
||||
plannerTemplateUpdateRequest.setSection(section);
|
||||
plannerTemplateUpdateRequest.setSessionType(sessionType);
|
||||
plannerTemplateUpdateRequest.setTaskStatus(taskStatus);
|
||||
plannerTemplateUpdateRequest.setCompanyId(companyId);
|
||||
plannerTemplateUpdateRequest.setSecurityId(securityId);
|
||||
|
|
@ -125,4 +133,20 @@ public class PlannerTemplateUpdateAction implements IAction<PlannerTemplateUpdat
|
|||
public void setSecurityId(Long securityId) {
|
||||
this.securityId = securityId;
|
||||
}
|
||||
|
||||
public String getSection() {
|
||||
return section;
|
||||
}
|
||||
|
||||
public void setSection(String section) {
|
||||
this.section = section;
|
||||
}
|
||||
|
||||
public String getSessionType() {
|
||||
return sessionType;
|
||||
}
|
||||
|
||||
public void setSessionType(String sessionType) {
|
||||
this.sessionType = sessionType;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,7 +45,11 @@ public class PlannerUpdateAction implements IAction<PlannerUpdateRequest>, WithI
|
|||
|
||||
@ApiModelProperty(value = "Секция", example = "ABCD")
|
||||
@JsonProperty
|
||||
public String market;
|
||||
public String section;
|
||||
|
||||
@ApiModelProperty(value = "Тип клиринговой сессии", example = "ABCD")
|
||||
@JsonProperty
|
||||
public String sessionType;
|
||||
|
||||
@ApiModelProperty(value = "Статус", example = "ABCD")
|
||||
@JsonProperty
|
||||
|
|
@ -66,7 +70,8 @@ public class PlannerUpdateAction implements IAction<PlannerUpdateRequest>, WithI
|
|||
plannerUpdateRequest.setTask(task);
|
||||
plannerUpdateRequest.setTaskTime(taskTime);
|
||||
plannerUpdateRequest.setClearingDate(clearingDate);
|
||||
plannerUpdateRequest.setMarket(market);
|
||||
plannerUpdateRequest.setSection(section);
|
||||
plannerUpdateRequest.setSessionType(sessionType);
|
||||
plannerUpdateRequest.setTaskStatus(taskStatus);
|
||||
plannerUpdateRequest.setCompanyId(companyId);
|
||||
plannerUpdateRequest.setSecurityId(securityId);
|
||||
|
|
@ -133,12 +138,20 @@ public class PlannerUpdateAction implements IAction<PlannerUpdateRequest>, WithI
|
|||
this.clearingDate = clearingDate;
|
||||
}
|
||||
|
||||
public String getMarket() {
|
||||
return market;
|
||||
public String getSection() {
|
||||
return section;
|
||||
}
|
||||
|
||||
public void setMarket(String market) {
|
||||
this.market = market;
|
||||
public void setSection(String section) {
|
||||
this.section = section;
|
||||
}
|
||||
|
||||
public String getSessionType() {
|
||||
return sessionType;
|
||||
}
|
||||
|
||||
public void setSessionType(String sessionType) {
|
||||
this.sessionType = sessionType;
|
||||
}
|
||||
|
||||
public String getTaskStatus() {
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ public class TradingClearingRegistryBackendGetById extends BasicSpcexResponse {
|
|||
payload.setCompanyId(tcr.getCompanyId());
|
||||
payload.setCode(tcr.getCode());
|
||||
payload.setMoneyAccountId(tcr.getMoneyAccountId());
|
||||
payload.setDepoAaccountId(tcr.getDepoAaccountId());
|
||||
payload.setDepoAccountId(tcr.getDepoAccountId());
|
||||
payload.setTradingClearingRegistryType(tcr.getTradingClearingRegistryType());
|
||||
payload.setTradingClearingRegistryLevel(tcr.getTradingClearingRegistryLevel());
|
||||
payload.setTradingClearingRegistryPurpose(tcr.getTradingClearingRegistryPurpose());
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ public class TradingClearingRegistryBackendGetFields {
|
|||
private Long moneyAccountId;
|
||||
@JsonProperty
|
||||
@ApiModelProperty(value = "Идентификатор депозитарного счета", example = "")
|
||||
private Long depoAaccountId;
|
||||
private Long depoAccountId;
|
||||
@JsonProperty
|
||||
@ApiModelProperty(value = "Код торгово-клирингового регистра", example = "")
|
||||
private String tradingClearingRegistryType;
|
||||
|
|
@ -77,12 +77,12 @@ public class TradingClearingRegistryBackendGetFields {
|
|||
this.moneyAccountId = moneyAccountId;
|
||||
}
|
||||
|
||||
public Long getDepoAaccountId() {
|
||||
return depoAaccountId;
|
||||
public Long getDepoAccountId() {
|
||||
return depoAccountId;
|
||||
}
|
||||
|
||||
public void setDepoAaccountId(Long depoAaccountId) {
|
||||
this.depoAaccountId = depoAaccountId;
|
||||
public void setDepoAccountId(Long depoAaccountId) {
|
||||
this.depoAccountId = depoAaccountId;
|
||||
}
|
||||
|
||||
public String getTradingClearingRegistryType() {
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import ru.clearing.classes.statics.data.profile.Contact;
|
|||
import ru.spcex.clearing.backendapi.controller.queue.AbstractControllerTest;
|
||||
import ru.spcex.clearing.backendapi.controller.request.cud.company.ClearingMemberCategoryNewAction;
|
||||
import ru.spcex.clearing.backendapi.controller.request.cud.company.CompanySymbolUpdateAction;
|
||||
import ru.spcex.clearing.backendapi.controller.request.cud.company.ContactNewAction;
|
||||
import ru.spcex.clearing.backendapi.controller.request.cud.company.ContactUpdateAction;
|
||||
import ru.spcex.clearing.backendapi.domain.actions.IAction;
|
||||
import ru.spcex.clearing.backendapi.errors.ActionValidationException;
|
||||
|
|
@ -35,6 +36,28 @@ class ContactControllerTest extends AbstractControllerTest {
|
|||
assertThrowsFor(getClearingMemberCategoryNewAction("", 0L));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* {@link ContactController#create(Long, ContactNewAction)}<br>
|
||||
* Тест проверяет получение сущности {@link ContactNewAction} по REST API и отправку в Apache Kafka.<br>
|
||||
* Входной запрос {@link ContactNewAction}:<br>
|
||||
* {@link ContactNewAction#contactType} - ContactType<br>
|
||||
* {@link ContactNewAction#contactValue} - ContactValue<br>
|
||||
* {@link ContactNewAction#id} - currentId<br>
|
||||
*/
|
||||
@Test
|
||||
void create() throws Exception {
|
||||
//ARRANGE
|
||||
ContactNewAction companySymbolNewAction = new ContactNewAction();
|
||||
companySymbolNewAction.setContactType("ContactType");
|
||||
companySymbolNewAction.setContactValue("ContactValue");
|
||||
companySymbolNewAction.setCompanyId(currentId.get());
|
||||
|
||||
//ACT and ASSERT
|
||||
checkAddingByRestApi(REST_URL, companySymbolNewAction);
|
||||
checkSendedMessegeFromKafka(Consts.DESTINATION_CONTACT_NEW, companySymbolNewAction);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@link ContactController#update(Long, ContactUpdateAction)}<br>
|
||||
* Тест проверяет получение сущности {@link ContactUpdateAction} по REST API и отправку в Apache Kafka.<br>
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ class TradingClearingRegistryControllerTest extends AbstractControllerTest {
|
|||
existTradingClearingRegistry.setCompanyId(365L);
|
||||
existTradingClearingRegistry.setCode("99999");
|
||||
existTradingClearingRegistry.setMoneyAccountId(404L);
|
||||
existTradingClearingRegistry.setDepoAaccountId(512L);
|
||||
existTradingClearingRegistry.setDepoAccountId(512L);
|
||||
existTradingClearingRegistry.setTradingClearingRegistryType("RUB");
|
||||
existTradingClearingRegistry.setTradingClearingRegistryLevel("OOO ROGA I KOPITA");
|
||||
existTradingClearingRegistry.setTradingClearingRegistryPurpose("848484848484");
|
||||
|
|
@ -129,7 +129,7 @@ class TradingClearingRegistryControllerTest extends AbstractControllerTest {
|
|||
payload.setCompanyId(existTradingClearingRegistry.getCompanyId());
|
||||
payload.setCode(existTradingClearingRegistry.getCode());
|
||||
payload.setMoneyAccountId(existTradingClearingRegistry.getMoneyAccountId());
|
||||
payload.setDepoAaccountId(existTradingClearingRegistry.getDepoAaccountId());
|
||||
payload.setDepoAccountId(existTradingClearingRegistry.getDepoAccountId());
|
||||
payload.setTradingClearingRegistryType(existTradingClearingRegistry.getTradingClearingRegistryType());
|
||||
payload.setTradingClearingRegistryLevel(existTradingClearingRegistry.getTradingClearingRegistryLevel());
|
||||
payload.setTradingClearingRegistryPurpose(existTradingClearingRegistry.getTradingClearingRegistryPurpose());
|
||||
|
|
@ -160,7 +160,7 @@ class TradingClearingRegistryControllerTest extends AbstractControllerTest {
|
|||
existTradingClearingRegistry.setCompanyId(365L);
|
||||
existTradingClearingRegistry.setCode("99999");
|
||||
existTradingClearingRegistry.setMoneyAccountId(404L);
|
||||
existTradingClearingRegistry.setDepoAaccountId(512L);
|
||||
existTradingClearingRegistry.setDepoAccountId(512L);
|
||||
existTradingClearingRegistry.setTradingClearingRegistryType("RUB");
|
||||
existTradingClearingRegistry.setTradingClearingRegistryLevel("OOO ROGA I KOPITA");
|
||||
existTradingClearingRegistry.setTradingClearingRegistryPurpose("848484848484");
|
||||
|
|
|
|||
|
|
@ -15,8 +15,7 @@ public class TradingClearingRegistry extends BusinessObject {
|
|||
private Long companyId;
|
||||
private String code;
|
||||
private Long moneyAccountId;
|
||||
// todo fix typo
|
||||
private Long depoAaccountId;
|
||||
private Long depoAccountId;
|
||||
private String tradingClearingRegistryType;
|
||||
private String tradingClearingRegistryLevel;
|
||||
private String tradingClearingRegistryPurpose;
|
||||
|
|
@ -46,12 +45,12 @@ public class TradingClearingRegistry extends BusinessObject {
|
|||
this.moneyAccountId = value;
|
||||
}
|
||||
|
||||
public Long getDepoAaccountId() {
|
||||
return depoAaccountId;
|
||||
public Long getDepoAccountId() {
|
||||
return depoAccountId;
|
||||
}
|
||||
|
||||
public void setDepoAaccountId(Long value) {
|
||||
this.depoAaccountId = value;
|
||||
public void setDepoAccountId(Long value) {
|
||||
this.depoAccountId = value;
|
||||
}
|
||||
|
||||
public String getTradingClearingRegistryType() {
|
||||
|
|
|
|||
|
|
@ -260,7 +260,7 @@ public class ClientCodeService extends QueueConsumer implements InitializingBean
|
|||
query.put("moneyAccountId", moneyAccountId);
|
||||
query.put("tradingClearingRegistryType", TradingClearingRegistryType.Client_B.getKey());
|
||||
if (depoAccountId != null) {
|
||||
query.put("depoAaccountId", depoAccountId); // todo опечатка в поле класса, см. meta.xml!
|
||||
query.put("depoAccountId", depoAccountId);
|
||||
}
|
||||
TradingClearingRegistry result = tradingClearingRegistryMap.getSingleObjectByFieldValues(query);
|
||||
log.trace("TradingClearingRegistry by: {}; {}found", query, result == null ? "not " : "");
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ class ClientCodeServiceTest {
|
|||
registry1.setCompanyId(COMPANY_ID);
|
||||
registry1.setCode("code-120-101");
|
||||
registry1.setMoneyAccountId(131L);
|
||||
registry1.setDepoAaccountId(132L);
|
||||
registry1.setDepoAccountId(132L);
|
||||
registry1.setTradingClearingRegistryType(TradingClearingRegistryType.Client_B.getKey());
|
||||
registry1.setStatus(WorkflowStatus.Active.getKey());
|
||||
tcrImdg.insert(registry1);
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ public class TradingClearingRegistryHistoryMapStore extends TemplateEventMapStor
|
|||
@Override
|
||||
public String[] getFields() {
|
||||
return new String[]{"ID","EVENT_TIME", "EVENT_USER_ID", "EVENT_TYPE",
|
||||
"TRADING_CLEARING_REGISTRY_ID", "COMPANY_ID", "CODE", "MONEY_ACCOUNT_ID", "DEPO_AACCOUNT_ID", "TRADING_CLEARING_REGISTRY_TYPE", "TRADING_CLEARING_REGISTRY_LEVEL", "TRADING_CLEARING_REGISTRY_PURPOSE", "STATUS", "CREATED_AT", "UPDATED_AT"
|
||||
"TRADING_CLEARING_REGISTRY_ID", "COMPANY_ID", "CODE", "MONEY_ACCOUNT_ID", "DEPO_ACCOUNT_ID", "TRADING_CLEARING_REGISTRY_TYPE", "TRADING_CLEARING_REGISTRY_LEVEL", "TRADING_CLEARING_REGISTRY_PURPOSE", "STATUS", "CREATED_AT", "UPDATED_AT"
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -45,7 +45,7 @@ public class TradingClearingRegistryHistoryMapStore extends TemplateEventMapStor
|
|||
object.getCompanyId(),
|
||||
object.getCode(),
|
||||
object.getMoneyAccountId(),
|
||||
object.getDepoAaccountId(),
|
||||
object.getDepoAccountId(),
|
||||
object.getTradingClearingRegistryType(),
|
||||
object.getTradingClearingRegistryLevel(),
|
||||
object.getTradingClearingRegistryPurpose(),
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ public class TradingClearingRegistryMapStore extends TemplateMapStore<TradingCle
|
|||
@Override
|
||||
public String[] getFields() {
|
||||
return new String[]{
|
||||
"ID", "COMPANY_ID", "CODE", "MONEY_ACCOUNT_ID", "DEPO_AACCOUNT_ID", "TRADING_CLEARING_REGISTRY_TYPE", "TRADING_CLEARING_REGISTRY_LEVEL", "TRADING_CLEARING_REGISTRY_PURPOSE", "STATUS", "CREATED_AT", "UPDATED_AT"
|
||||
"ID", "COMPANY_ID", "CODE", "MONEY_ACCOUNT_ID", "DEPO_ACCOUNT_ID", "TRADING_CLEARING_REGISTRY_TYPE", "TRADING_CLEARING_REGISTRY_LEVEL", "TRADING_CLEARING_REGISTRY_PURPOSE", "STATUS", "CREATED_AT", "UPDATED_AT"
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -41,7 +41,7 @@ public class TradingClearingRegistryMapStore extends TemplateMapStore<TradingCle
|
|||
object.setCompanyId(resultSet.getObject("COMPANY_ID", Long.class));
|
||||
object.setCode(resultSet.getObject("CODE", String.class));
|
||||
object.setMoneyAccountId(resultSet.getObject("MONEY_ACCOUNT_ID", Long.class));
|
||||
object.setDepoAaccountId(resultSet.getObject("DEPO_AACCOUNT_ID", Long.class));
|
||||
object.setDepoAccountId(resultSet.getObject("DEPO_ACCOUNT_ID", Long.class));
|
||||
object.setTradingClearingRegistryType(resultSet.getObject("TRADING_CLEARING_REGISTRY_TYPE", String.class));
|
||||
object.setTradingClearingRegistryLevel(resultSet.getObject("TRADING_CLEARING_REGISTRY_LEVEL", String.class));
|
||||
object.setTradingClearingRegistryPurpose(resultSet.getObject("TRADING_CLEARING_REGISTRY_PURPOSE", String.class));
|
||||
|
|
@ -58,7 +58,7 @@ public class TradingClearingRegistryMapStore extends TemplateMapStore<TradingCle
|
|||
object.getCompanyId(),
|
||||
object.getCode(),
|
||||
object.getMoneyAccountId(),
|
||||
object.getDepoAaccountId(),
|
||||
object.getDepoAccountId(),
|
||||
object.getTradingClearingRegistryType(),
|
||||
object.getTradingClearingRegistryLevel(),
|
||||
object.getTradingClearingRegistryPurpose(),
|
||||
|
|
|
|||
|
|
@ -49,8 +49,8 @@ public class PlannerValidationConfig {
|
|||
TimeNotBeforeRule.instance("taskTime",
|
||||
PlannerNewRequest::getTaskTime,
|
||||
LocalDate.now().equals(plannerNewRequest.getClearingDate())),
|
||||
EnumPresentRule.instance("market",
|
||||
PlannerNewRequest::getMarket,
|
||||
EnumPresentRule.instance("section",
|
||||
PlannerNewRequest::getSection,
|
||||
Market.values(),
|
||||
false),
|
||||
DictionaryPresentRule.instance("taskStatus",
|
||||
|
|
@ -104,8 +104,8 @@ public class PlannerValidationConfig {
|
|||
DateNotBeforeRule.instance("clearingDate",
|
||||
PlannerUpdateRequest::getClearingDate,
|
||||
false),
|
||||
EnumPresentRule.instance("market",
|
||||
PlannerUpdateRequest::getMarket,
|
||||
EnumPresentRule.instance("section",
|
||||
PlannerUpdateRequest::getSection,
|
||||
Market.values(),
|
||||
false),
|
||||
DictionaryPresentRule.instance("taskStatus",
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ public class PlannerService extends QueueConsumer implements InitializingBean {
|
|||
planner.setTask(req.getTask());
|
||||
planner.setTaskTime(req.getTaskTime());
|
||||
planner.setClearingDate(req.getClearingDate());
|
||||
planner.setMarket(req.getMarket());
|
||||
planner.setMarket(req.getSection());
|
||||
planner.setTaskStatus(req.getTaskStatus());
|
||||
planner.setCompanyId(req.getCompanyId());
|
||||
planner.setSecurityId(req.getSecurityId());
|
||||
|
|
@ -122,7 +122,7 @@ public class PlannerService extends QueueConsumer implements InitializingBean {
|
|||
planner.setTask(req.getTask());
|
||||
planner.setTaskTime(req.getTaskTime());
|
||||
planner.setClearingDate(req.getClearingDate());
|
||||
planner.setMarket(req.getMarket());
|
||||
planner.setMarket(req.getSection());
|
||||
planner.setTaskStatus(req.getTaskStatus());
|
||||
planner.setCompanyId(req.getCompanyId());
|
||||
planner.setSecurityId(req.getSecurityId());
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import org.springframework.boot.test.mock.mockito.MockBean;
|
|||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit.jupiter.SpringExtension;
|
||||
import ru.clearing.classes.statics.data.company.Company;
|
||||
import ru.clearing.classes.statics.data.misc.Market;
|
||||
import ru.clearing.classes.statics.data.scheduler.*;
|
||||
import ru.clearing.classes.statics.data.security.Security;
|
||||
import ru.clearing.platform.dictionary.DayStatusDictionary;
|
||||
|
|
@ -140,6 +141,8 @@ public abstract class AbstractServiceTest {
|
|||
plannerTemplate.setTask(Task.accountBlock.getKey());
|
||||
plannerTemplate.setTaskTime(LocalTime.now().plusHours(1).withNano(0));
|
||||
plannerTemplate.setTaskStatus(Status.Active.getKey());
|
||||
plannerTemplate.setSection("BMIC");
|
||||
plannerTemplate.setSessionType("FINL");
|
||||
plannerTemplate.setCompanyId(companyId);
|
||||
plannerTemplate.setSecurityId(testSecurityId);
|
||||
return plannerTemplate;
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ class PlannerServiceTest extends AbstractServiceTest {
|
|||
plannerNewRequest.setTaskTime(planner.getTaskTime());
|
||||
plannerNewRequest.setTaskStatus(planner.getTaskStatus());
|
||||
plannerNewRequest.setClearingDate(planner.getClearingDate());
|
||||
plannerNewRequest.setMarket(planner.getMarket());
|
||||
plannerNewRequest.setSection(planner.getMarket());
|
||||
plannerNewRequest.setCompanyId(planner.getCompanyId());
|
||||
plannerNewRequest.setSecurityId(planner.getSecurityId());
|
||||
|
||||
|
|
@ -94,7 +94,7 @@ class PlannerServiceTest extends AbstractServiceTest {
|
|||
plannerUpdateRequest.setTaskTime(planner.getTaskTime());
|
||||
plannerUpdateRequest.setTaskStatus(planner.getTaskStatus());
|
||||
plannerUpdateRequest.setClearingDate(planner.getClearingDate());
|
||||
plannerUpdateRequest.setMarket(planner.getMarket());
|
||||
plannerUpdateRequest.setSection(planner.getMarket());
|
||||
plannerUpdateRequest.setCompanyId(planner.getCompanyId());
|
||||
plannerUpdateRequest.setSecurityId(planner.getSecurityId());
|
||||
|
||||
|
|
|
|||
|
|
@ -50,6 +50,8 @@ class PlannerTemplateServiceTest extends AbstractServiceTest {
|
|||
PlannerTemplateNewRequest templateNewRequest = new PlannerTemplateNewRequest();
|
||||
templateNewRequest.setTask(plannerTemplate.getTask());
|
||||
templateNewRequest.setTaskTime(plannerTemplate.getTaskTime());
|
||||
templateNewRequest.setSection(plannerTemplate.getSection());
|
||||
templateNewRequest.setSessionType(plannerTemplate.getSessionType());
|
||||
templateNewRequest.setTaskStatus(plannerTemplate.getTaskStatus());
|
||||
templateNewRequest.setCompanyId(plannerTemplate.getCompanyId());
|
||||
templateNewRequest.setSecurityId(plannerTemplate.getSecurityId());
|
||||
|
|
@ -83,6 +85,8 @@ class PlannerTemplateServiceTest extends AbstractServiceTest {
|
|||
plannerTemplateUpdateRequest.setId(plannerTemplate.getId());
|
||||
plannerTemplateUpdateRequest.setTask(plannerTemplate.getTask());
|
||||
plannerTemplateUpdateRequest.setTaskTime(plannerTemplate.getTaskTime());
|
||||
plannerTemplateUpdateRequest.setSection(plannerTemplate.getSection());
|
||||
plannerTemplateUpdateRequest.setSessionType(plannerTemplate.getSessionType());
|
||||
plannerTemplateUpdateRequest.setTaskStatus(plannerTemplate.getTaskStatus());
|
||||
plannerTemplateUpdateRequest.setCompanyId(plannerTemplate.getCompanyId());
|
||||
plannerTemplateUpdateRequest.setSecurityId(plannerTemplate.getSecurityId());
|
||||
|
|
|
|||
|
|
@ -27,7 +27,10 @@ public class PlannerNewRequest {
|
|||
public LocalDate clearingDate;
|
||||
|
||||
@JsonProperty
|
||||
public String market;
|
||||
public String section;
|
||||
|
||||
@JsonProperty
|
||||
public String sessionType;
|
||||
|
||||
@JsonProperty
|
||||
public String taskStatus;
|
||||
|
|
@ -62,12 +65,20 @@ public class PlannerNewRequest {
|
|||
this.clearingDate = clearingDate;
|
||||
}
|
||||
|
||||
public String getMarket() {
|
||||
return market;
|
||||
public String getSection() {
|
||||
return section;
|
||||
}
|
||||
|
||||
public void setMarket(String market) {
|
||||
this.market = market;
|
||||
public void setSection(String section) {
|
||||
this.section = section;
|
||||
}
|
||||
|
||||
public String getSessionType() {
|
||||
return sessionType;
|
||||
}
|
||||
|
||||
public void setSessionType(String sessionType) {
|
||||
this.sessionType = sessionType;
|
||||
}
|
||||
|
||||
public String getTaskStatus() {
|
||||
|
|
|
|||
|
|
@ -17,6 +17,10 @@ public class PlannerTemplateNewRequest {
|
|||
@JsonProperty
|
||||
public LocalTime taskTime;
|
||||
@JsonProperty
|
||||
public String section;
|
||||
@JsonProperty
|
||||
public String sessionType;
|
||||
@JsonProperty
|
||||
public String taskStatus;
|
||||
@JsonProperty
|
||||
public Long companyId;
|
||||
|
|
@ -47,6 +51,22 @@ public class PlannerTemplateNewRequest {
|
|||
this.taskStatus = taskStatus;
|
||||
}
|
||||
|
||||
public String getSection() {
|
||||
return section;
|
||||
}
|
||||
|
||||
public void setSection(String section) {
|
||||
this.section = section;
|
||||
}
|
||||
|
||||
public String getSessionType() {
|
||||
return sessionType;
|
||||
}
|
||||
|
||||
public void setSessionType(String sessionType) {
|
||||
this.sessionType = sessionType;
|
||||
}
|
||||
|
||||
public Long getCompanyId() {
|
||||
return companyId;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,6 +20,10 @@ public class PlannerTemplateUpdateRequest {
|
|||
@JsonProperty
|
||||
public LocalTime taskTime;
|
||||
@JsonProperty
|
||||
public String section;
|
||||
@JsonProperty
|
||||
public String sessionType;
|
||||
@JsonProperty
|
||||
public String taskStatus;
|
||||
@JsonProperty
|
||||
public Long companyId;
|
||||
|
|
@ -50,6 +54,22 @@ public class PlannerTemplateUpdateRequest {
|
|||
this.taskStatus = taskStatus;
|
||||
}
|
||||
|
||||
public String getSection() {
|
||||
return section;
|
||||
}
|
||||
|
||||
public void setSection(String section) {
|
||||
this.section = section;
|
||||
}
|
||||
|
||||
public String getSessionType() {
|
||||
return sessionType;
|
||||
}
|
||||
|
||||
public void setSessionType(String sessionType) {
|
||||
this.sessionType = sessionType;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,9 @@ public class PlannerUpdateRequest {
|
|||
@JsonProperty
|
||||
public LocalDate clearingDate;
|
||||
@JsonProperty
|
||||
public String market;
|
||||
public String section;
|
||||
@JsonProperty
|
||||
public String sessionType;
|
||||
@JsonProperty
|
||||
public String taskStatus;
|
||||
@JsonProperty
|
||||
|
|
@ -66,12 +68,20 @@ public class PlannerUpdateRequest {
|
|||
this.clearingDate = clearingDate;
|
||||
}
|
||||
|
||||
public String getMarket() {
|
||||
return market;
|
||||
public String getSection() {
|
||||
return section;
|
||||
}
|
||||
|
||||
public void setMarket(String market) {
|
||||
this.market = market;
|
||||
public void setSection(String section) {
|
||||
this.section = section;
|
||||
}
|
||||
|
||||
public String getSessionType() {
|
||||
return sessionType;
|
||||
}
|
||||
|
||||
public void setSessionType(String sessionType) {
|
||||
this.sessionType = sessionType;
|
||||
}
|
||||
|
||||
public String getTaskStatus() {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue