This commit is contained in:
parent
d903be76b2
commit
becdf6dbc2
16 changed files with 880 additions and 1 deletions
|
|
@ -0,0 +1,38 @@
|
||||||
|
package ru.spcex.clearing.backendapi.controller.queue.scheduler;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import io.swagger.annotations.ApiResponse;
|
||||||
|
import io.swagger.annotations.ApiResponses;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
import ru.clearing.classes.statics.data.scheduler.SchedulerAllToday;
|
||||||
|
import ru.spcex.clearing.backendapi.controller.response.entity.schedule.SchedulerAllTodayBackendGetAll;
|
||||||
|
import ru.spcex.clearing.backendapi.service.IStateLoader;
|
||||||
|
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
@Controller
|
||||||
|
@RequestMapping("/schedule/schedulers-all-today")
|
||||||
|
public class SchedulerAllTodayController {
|
||||||
|
private final IStateLoader stateLoader;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public SchedulerAllTodayController(IStateLoader stateLoader) {
|
||||||
|
this.stateLoader = stateLoader;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "get all SchedulerAllToday objects.")
|
||||||
|
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = SchedulerAllTodayBackendGetAll.class)})
|
||||||
|
@RequestMapping(method = RequestMethod.GET)
|
||||||
|
@ResponseBody
|
||||||
|
public SchedulerAllTodayBackendGetAll getAll() {
|
||||||
|
Collection<SchedulerAllToday> all = stateLoader.getAll(IMDGDistributedNames.Map_SchedulerAllToday, SchedulerAllToday.class);
|
||||||
|
var response = new SchedulerAllTodayBackendGetAll();
|
||||||
|
response.fromEntity(all);
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,38 @@
|
||||||
|
package ru.spcex.clearing.backendapi.controller.queue.scheduler;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import io.swagger.annotations.ApiResponse;
|
||||||
|
import io.swagger.annotations.ApiResponses;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
import ru.clearing.classes.statics.data.scheduler.Scheduler;
|
||||||
|
import ru.spcex.clearing.backendapi.controller.response.entity.schedule.SchedulerBackendGetAll;
|
||||||
|
import ru.spcex.clearing.backendapi.service.IStateLoader;
|
||||||
|
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
@Controller
|
||||||
|
@RequestMapping("/schedule/schedulers")
|
||||||
|
public class SchedulerController {
|
||||||
|
private final IStateLoader stateLoader;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public SchedulerController(IStateLoader stateLoader) {
|
||||||
|
this.stateLoader = stateLoader;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "get all Schedulers.")
|
||||||
|
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = SchedulerBackendGetAll.class)})
|
||||||
|
@RequestMapping(method = RequestMethod.GET)
|
||||||
|
@ResponseBody
|
||||||
|
public SchedulerBackendGetAll getAll() {
|
||||||
|
Collection<Scheduler> all = stateLoader.getAll(IMDGDistributedNames.Map_Scheduler, Scheduler.class);
|
||||||
|
var response = new SchedulerBackendGetAll();
|
||||||
|
response.fromEntity(all);
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,38 @@
|
||||||
|
package ru.spcex.clearing.backendapi.controller.queue.scheduler;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import io.swagger.annotations.ApiResponse;
|
||||||
|
import io.swagger.annotations.ApiResponses;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
import ru.clearing.classes.statics.data.scheduler.TaskRunner;
|
||||||
|
import ru.spcex.clearing.backendapi.controller.response.entity.schedule.TaskRunnerBackendGetAll;
|
||||||
|
import ru.spcex.clearing.backendapi.service.IStateLoader;
|
||||||
|
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
@Controller
|
||||||
|
@RequestMapping("/schedule/task-runners")
|
||||||
|
public class TaskRunnerController {
|
||||||
|
private final IStateLoader stateLoader;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public TaskRunnerController(IStateLoader stateLoader) {
|
||||||
|
this.stateLoader = stateLoader;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "get all TaskRunners.")
|
||||||
|
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = TaskRunnerBackendGetAll.class)})
|
||||||
|
@RequestMapping(method = RequestMethod.GET)
|
||||||
|
@ResponseBody
|
||||||
|
public TaskRunnerBackendGetAll getAll() {
|
||||||
|
Collection<TaskRunner> all = stateLoader.getAll(IMDGDistributedNames.Map_TaskRunner, TaskRunner.class);
|
||||||
|
var response = new TaskRunnerBackendGetAll();
|
||||||
|
response.fromEntity(all);
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,38 @@
|
||||||
|
package ru.spcex.clearing.backendapi.controller.queue.scheduler;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import io.swagger.annotations.ApiResponse;
|
||||||
|
import io.swagger.annotations.ApiResponses;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
import ru.clearing.classes.statics.data.scheduler.Timetable;
|
||||||
|
import ru.spcex.clearing.backendapi.controller.response.entity.schedule.TimetableBackendGetAll;
|
||||||
|
import ru.spcex.clearing.backendapi.service.IStateLoader;
|
||||||
|
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
@Controller
|
||||||
|
@RequestMapping("/schedule/timetables")
|
||||||
|
public class TimeTableController {
|
||||||
|
private final IStateLoader stateLoader;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public TimeTableController(IStateLoader stateLoader) {
|
||||||
|
this.stateLoader = stateLoader;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "get all Timetables.")
|
||||||
|
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = TimetableBackendGetAll.class)})
|
||||||
|
@RequestMapping(method = RequestMethod.GET)
|
||||||
|
@ResponseBody
|
||||||
|
public TimetableBackendGetAll getAll() {
|
||||||
|
Collection<Timetable> all = stateLoader.getAll(IMDGDistributedNames.Map_Timetable, Timetable.class);
|
||||||
|
var response = new TimetableBackendGetAll();
|
||||||
|
response.fromEntity(all);
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,38 @@
|
||||||
|
package ru.spcex.clearing.backendapi.controller.queue.scheduler;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import io.swagger.annotations.ApiResponse;
|
||||||
|
import io.swagger.annotations.ApiResponses;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
import ru.clearing.classes.statics.data.scheduler.TradingCalendar;
|
||||||
|
import ru.spcex.clearing.backendapi.controller.response.entity.schedule.TradingCalendarBackendGetAll;
|
||||||
|
import ru.spcex.clearing.backendapi.service.IStateLoader;
|
||||||
|
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
@Controller
|
||||||
|
@RequestMapping("/schedule/trading-calendars")
|
||||||
|
public class TradingCalendarController {
|
||||||
|
private final IStateLoader stateLoader;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public TradingCalendarController(IStateLoader stateLoader) {
|
||||||
|
this.stateLoader = stateLoader;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "get all trading calendars.")
|
||||||
|
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = TradingCalendarBackendGetAll.class)})
|
||||||
|
@RequestMapping(method = RequestMethod.GET)
|
||||||
|
@ResponseBody
|
||||||
|
public TradingCalendarBackendGetAll getAll() {
|
||||||
|
Collection<TradingCalendar> all = stateLoader.getAll(IMDGDistributedNames.Map_TradingCalendar, TradingCalendar.class);
|
||||||
|
var response = new TradingCalendarBackendGetAll();
|
||||||
|
response.fromEntity(all);
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -25,7 +25,7 @@ public class UserSettingsSessionController {
|
||||||
this.stateLoader = stateLoader;
|
this.stateLoader = stateLoader;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "get all user role sessions.")
|
@ApiOperation(value = "get all user settings.")
|
||||||
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = UserSettingsBackendGetAll.class)})
|
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = UserSettingsBackendGetAll.class)})
|
||||||
@RequestMapping(method = RequestMethod.GET)
|
@RequestMapping(method = RequestMethod.GET)
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,57 @@
|
||||||
|
package ru.spcex.clearing.backendapi.controller.response.entity.schedule;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import ru.clearing.classes.statics.data.scheduler.SchedulerAllToday;
|
||||||
|
import ru.spcex.clearing.backendapi.controller.response.BasicSpcexResponse;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@ApiModel(description = "Ответ при получении объектов SchedulerAllToday.")
|
||||||
|
public class SchedulerAllTodayBackendGetAll extends BasicSpcexResponse {
|
||||||
|
|
||||||
|
@JsonProperty
|
||||||
|
@ApiModelProperty(value = "Полезная нагрузка")
|
||||||
|
private SchedulerAllTodayBackendPayload payload = new SchedulerAllTodayBackendPayload();
|
||||||
|
|
||||||
|
private static class SchedulerAllTodayBackendPayload {
|
||||||
|
private List<SchedulerAllTodayBackendGetFields> items = new ArrayList<>();
|
||||||
|
|
||||||
|
public List<SchedulerAllTodayBackendGetFields> getItems() {
|
||||||
|
return items;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setItems(List<SchedulerAllTodayBackendGetFields> items) {
|
||||||
|
this.items = items;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public SchedulerAllTodayBackendPayload getPayload() {
|
||||||
|
return payload;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPayload(SchedulerAllTodayBackendPayload payload) {
|
||||||
|
this.payload = payload;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void fromEntity(Collection<SchedulerAllToday> schedulersAllToday) {
|
||||||
|
var payload = this.getPayload();
|
||||||
|
for (var schedulerAllToday : schedulersAllToday) {
|
||||||
|
var singleItem = new SchedulerAllTodayBackendGetFields();
|
||||||
|
singleItem.setId(schedulerAllToday.getId());
|
||||||
|
singleItem.setTask(schedulerAllToday.getTask());
|
||||||
|
singleItem.setTaskTime(schedulerAllToday.getTaskTime());
|
||||||
|
singleItem.setClearingDate(schedulerAllToday.getClearingDate());
|
||||||
|
singleItem.setMarket(schedulerAllToday.getMarket());
|
||||||
|
singleItem.setTaskStatus(schedulerAllToday.getTaskStatus());
|
||||||
|
singleItem.setSecurityId(schedulerAllToday.getSecurityId());
|
||||||
|
singleItem.setSource(schedulerAllToday.getSource());
|
||||||
|
singleItem.setOrigId(schedulerAllToday.getOrigId());
|
||||||
|
payload.getItems().add(singleItem);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,102 @@
|
||||||
|
package ru.spcex.clearing.backendapi.controller.response.entity.schedule;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import ru.spcex.clearing.platform.messaging.domain.json.serialize.InstantSerializer;
|
||||||
|
|
||||||
|
import java.time.Instant;
|
||||||
|
|
||||||
|
public class SchedulerAllTodayBackendGetFields {
|
||||||
|
@JsonProperty
|
||||||
|
private Long id;
|
||||||
|
@JsonProperty
|
||||||
|
private String task;
|
||||||
|
@JsonProperty
|
||||||
|
@JsonSerialize(using = InstantSerializer.class)
|
||||||
|
private Instant taskTime;
|
||||||
|
@JsonProperty
|
||||||
|
@JsonSerialize(using = InstantSerializer.class)
|
||||||
|
private Instant clearingDate;
|
||||||
|
@JsonProperty
|
||||||
|
private String market;
|
||||||
|
@JsonProperty
|
||||||
|
private String taskStatus;
|
||||||
|
@JsonProperty
|
||||||
|
private Long securityId;
|
||||||
|
@JsonProperty
|
||||||
|
private String source;
|
||||||
|
@JsonProperty
|
||||||
|
private Long origId;
|
||||||
|
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTask() {
|
||||||
|
return task;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTask(String task) {
|
||||||
|
this.task = task;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Instant getTaskTime() {
|
||||||
|
return taskTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTaskTime(Instant taskTime) {
|
||||||
|
this.taskTime = taskTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Instant getClearingDate() {
|
||||||
|
return clearingDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClearingDate(Instant clearingDate) {
|
||||||
|
this.clearingDate = clearingDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMarket() {
|
||||||
|
return market;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMarket(String market) {
|
||||||
|
this.market = market;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTaskStatus() {
|
||||||
|
return taskStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTaskStatus(String taskStatus) {
|
||||||
|
this.taskStatus = taskStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getSecurityId() {
|
||||||
|
return securityId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSecurityId(Long securityId) {
|
||||||
|
this.securityId = securityId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSource() {
|
||||||
|
return source;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSource(String source) {
|
||||||
|
this.source = source;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getOrigId() {
|
||||||
|
return origId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOrigId(Long origId) {
|
||||||
|
this.origId = origId;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,57 @@
|
||||||
|
package ru.spcex.clearing.backendapi.controller.response.entity.schedule;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import ru.clearing.classes.statics.data.scheduler.Scheduler;
|
||||||
|
import ru.spcex.clearing.backendapi.controller.response.BasicSpcexResponse;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@ApiModel(description = "Ответ при получении объектов Scheduler.")
|
||||||
|
public class SchedulerBackendGetAll extends BasicSpcexResponse {
|
||||||
|
|
||||||
|
@JsonProperty
|
||||||
|
@ApiModelProperty(value = "Полезная нагрузка")
|
||||||
|
private SchedulerBackendPayload payload = new SchedulerBackendPayload();
|
||||||
|
|
||||||
|
private static class SchedulerBackendPayload {
|
||||||
|
private List<SchedulerBackendGetFields> items = new ArrayList<>();
|
||||||
|
|
||||||
|
public List<SchedulerBackendGetFields> getItems() {
|
||||||
|
return items;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setItems(List<SchedulerBackendGetFields> items) {
|
||||||
|
this.items = items;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public SchedulerBackendPayload getPayload() {
|
||||||
|
return payload;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPayload(SchedulerBackendPayload payload) {
|
||||||
|
this.payload = payload;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void fromEntity(Collection<Scheduler> schedulers) {
|
||||||
|
var payload = this.getPayload();
|
||||||
|
for (var scheduler : schedulers) {
|
||||||
|
var singleItem = new SchedulerBackendGetFields();
|
||||||
|
singleItem.setId(scheduler.getId());
|
||||||
|
singleItem.setTask(scheduler.getTask());
|
||||||
|
singleItem.setTaskTime(scheduler.getTaskTime());
|
||||||
|
singleItem.setClearingDate(scheduler.getClearingDate());
|
||||||
|
singleItem.setMarket(scheduler.getMarket());
|
||||||
|
singleItem.setTaskStatus(scheduler.getTaskStatus());
|
||||||
|
singleItem.setSecurityId(scheduler.getSecurityId());
|
||||||
|
singleItem.setCreated(scheduler.getCreated());
|
||||||
|
singleItem.setUpdated(scheduler.getUpdated());
|
||||||
|
payload.getItems().add(singleItem);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,104 @@
|
||||||
|
package ru.spcex.clearing.backendapi.controller.response.entity.schedule;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import ru.spcex.clearing.platform.messaging.domain.json.serialize.InstantSerializer;
|
||||||
|
|
||||||
|
import java.time.Instant;
|
||||||
|
|
||||||
|
public class SchedulerBackendGetFields {
|
||||||
|
@JsonProperty
|
||||||
|
private Long id;
|
||||||
|
@JsonProperty
|
||||||
|
private String task;
|
||||||
|
@JsonProperty
|
||||||
|
@JsonSerialize(using = InstantSerializer.class)
|
||||||
|
private Instant taskTime;
|
||||||
|
@JsonProperty
|
||||||
|
@JsonSerialize(using = InstantSerializer.class)
|
||||||
|
private Instant clearingDate;
|
||||||
|
@JsonProperty
|
||||||
|
private String market;
|
||||||
|
@JsonProperty
|
||||||
|
private String taskStatus;
|
||||||
|
@JsonProperty
|
||||||
|
private Long securityId;
|
||||||
|
@JsonProperty
|
||||||
|
@JsonSerialize(using = InstantSerializer.class)
|
||||||
|
private Instant created;
|
||||||
|
@JsonProperty
|
||||||
|
@JsonSerialize(using = InstantSerializer.class)
|
||||||
|
private Instant updated;
|
||||||
|
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTask() {
|
||||||
|
return task;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTask(String task) {
|
||||||
|
this.task = task;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Instant getTaskTime() {
|
||||||
|
return taskTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTaskTime(Instant taskTime) {
|
||||||
|
this.taskTime = taskTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Instant getClearingDate() {
|
||||||
|
return clearingDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClearingDate(Instant clearingDate) {
|
||||||
|
this.clearingDate = clearingDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMarket() {
|
||||||
|
return market;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMarket(String market) {
|
||||||
|
this.market = market;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTaskStatus() {
|
||||||
|
return taskStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTaskStatus(String taskStatus) {
|
||||||
|
this.taskStatus = taskStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getSecurityId() {
|
||||||
|
return securityId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSecurityId(Long securityId) {
|
||||||
|
this.securityId = securityId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Instant getCreated() {
|
||||||
|
return created;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreated(Instant created) {
|
||||||
|
this.created = created;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Instant getUpdated() {
|
||||||
|
return updated;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdated(Instant updated) {
|
||||||
|
this.updated = updated;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,53 @@
|
||||||
|
package ru.spcex.clearing.backendapi.controller.response.entity.schedule;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import ru.clearing.classes.statics.data.scheduler.TaskRunner;
|
||||||
|
import ru.spcex.clearing.backendapi.controller.response.BasicSpcexResponse;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@ApiModel(description = "Ответ при получении объектов TaskRunner.")
|
||||||
|
public class TaskRunnerBackendGetAll extends BasicSpcexResponse {
|
||||||
|
|
||||||
|
@JsonProperty
|
||||||
|
@ApiModelProperty(value = "Полезная нагрузка")
|
||||||
|
private TaskRunnerBackendPayload payload = new TaskRunnerBackendPayload();
|
||||||
|
|
||||||
|
private static class TaskRunnerBackendPayload {
|
||||||
|
private List<TaskRunnerBackendGetFields> items = new ArrayList<>();
|
||||||
|
|
||||||
|
public List<TaskRunnerBackendGetFields> getItems() {
|
||||||
|
return items;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setItems(List<TaskRunnerBackendGetFields> items) {
|
||||||
|
this.items = items;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public TaskRunnerBackendPayload getPayload() {
|
||||||
|
return payload;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPayload(TaskRunnerBackendPayload payload) {
|
||||||
|
this.payload = payload;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void fromEntity(Collection<TaskRunner> taskRunners) {
|
||||||
|
var payload = this.getPayload();
|
||||||
|
for (var taskRunner : taskRunners) {
|
||||||
|
var singleItem = new TaskRunnerBackendGetFields();
|
||||||
|
singleItem.setId(taskRunner.getId());
|
||||||
|
singleItem.setSenderId(taskRunner.getSenderId());
|
||||||
|
singleItem.setTask(taskRunner.getTask());
|
||||||
|
singleItem.setCreated(taskRunner.getCreated());
|
||||||
|
singleItem.setUpdated(taskRunner.getUpdated());
|
||||||
|
payload.getItems().add(singleItem);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,62 @@
|
||||||
|
package ru.spcex.clearing.backendapi.controller.response.entity.schedule;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import ru.spcex.clearing.platform.messaging.domain.json.serialize.InstantSerializer;
|
||||||
|
|
||||||
|
import java.time.Instant;
|
||||||
|
|
||||||
|
public class TaskRunnerBackendGetFields {
|
||||||
|
@JsonProperty
|
||||||
|
private Long id;
|
||||||
|
@JsonProperty
|
||||||
|
private Long senderId;
|
||||||
|
@JsonProperty
|
||||||
|
private String task;
|
||||||
|
@JsonSerialize(using = InstantSerializer.class)
|
||||||
|
@JsonProperty
|
||||||
|
private Instant created;
|
||||||
|
@JsonSerialize(using = InstantSerializer.class)
|
||||||
|
@JsonProperty
|
||||||
|
private Instant updated;
|
||||||
|
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getSenderId() {
|
||||||
|
return senderId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSenderId(Long senderId) {
|
||||||
|
this.senderId = senderId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTask() {
|
||||||
|
return task;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTask(String task) {
|
||||||
|
this.task = task;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Instant getCreated() {
|
||||||
|
return created;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreated(Instant created) {
|
||||||
|
this.created = created;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Instant getUpdated() {
|
||||||
|
return updated;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdated(Instant updated) {
|
||||||
|
this.updated = updated;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,54 @@
|
||||||
|
package ru.spcex.clearing.backendapi.controller.response.entity.schedule;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import ru.clearing.classes.statics.data.scheduler.Timetable;
|
||||||
|
import ru.spcex.clearing.backendapi.controller.response.BasicSpcexResponse;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@ApiModel(description = "Ответ при получении объектов Timetable.")
|
||||||
|
public class TimetableBackendGetAll extends BasicSpcexResponse {
|
||||||
|
|
||||||
|
@JsonProperty
|
||||||
|
@ApiModelProperty(value = "Полезная нагрузка")
|
||||||
|
private TimetableBackendPayload payload = new TimetableBackendPayload();
|
||||||
|
|
||||||
|
private static class TimetableBackendPayload {
|
||||||
|
private List<TimetableBackendGetFields> items = new ArrayList<>();
|
||||||
|
|
||||||
|
public List<TimetableBackendGetFields> getItems() {
|
||||||
|
return items;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setItems(List<TimetableBackendGetFields> items) {
|
||||||
|
this.items = items;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public TimetableBackendPayload getPayload() {
|
||||||
|
return payload;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPayload(TimetableBackendPayload payload) {
|
||||||
|
this.payload = payload;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void fromEntity(Collection<Timetable> timeTables) {
|
||||||
|
var payload = this.getPayload();
|
||||||
|
for (var timetable : timeTables) {
|
||||||
|
var singleItem = new TimetableBackendGetFields();
|
||||||
|
singleItem.setId(timetable.getId());
|
||||||
|
singleItem.setTask(timetable.getTask());
|
||||||
|
singleItem.setTaskTime(timetable.getTaskTime());
|
||||||
|
singleItem.setTaskStatus(timetable.getTaskStatus());
|
||||||
|
singleItem.setCreated(timetable.getCreated());
|
||||||
|
singleItem.setUpdated(timetable.getUpdated());
|
||||||
|
payload.getItems().add(singleItem);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,73 @@
|
||||||
|
package ru.spcex.clearing.backendapi.controller.response.entity.schedule;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import ru.spcex.clearing.platform.messaging.domain.json.serialize.InstantSerializer;
|
||||||
|
|
||||||
|
import java.time.Instant;
|
||||||
|
|
||||||
|
public class TimetableBackendGetFields {
|
||||||
|
@JsonProperty
|
||||||
|
private Long id;
|
||||||
|
@JsonProperty
|
||||||
|
private String task;
|
||||||
|
@JsonProperty
|
||||||
|
@JsonSerialize(using = InstantSerializer.class)
|
||||||
|
private Instant taskTime;
|
||||||
|
@JsonProperty
|
||||||
|
private String taskStatus;
|
||||||
|
@JsonProperty
|
||||||
|
@JsonSerialize(using = InstantSerializer.class)
|
||||||
|
private Instant created;
|
||||||
|
@JsonProperty
|
||||||
|
@JsonSerialize(using = InstantSerializer.class)
|
||||||
|
private Instant updated;
|
||||||
|
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTask() {
|
||||||
|
return task;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTask(String task) {
|
||||||
|
this.task = task;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Instant getTaskTime() {
|
||||||
|
return taskTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTaskTime(Instant taskTime) {
|
||||||
|
this.taskTime = taskTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTaskStatus() {
|
||||||
|
return taskStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTaskStatus(String taskStatus) {
|
||||||
|
this.taskStatus = taskStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Instant getCreated() {
|
||||||
|
return created;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreated(Instant created) {
|
||||||
|
this.created = created;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Instant getUpdated() {
|
||||||
|
return updated;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdated(Instant updated) {
|
||||||
|
this.updated = updated;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,54 @@
|
||||||
|
package ru.spcex.clearing.backendapi.controller.response.entity.schedule;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import ru.clearing.classes.statics.data.scheduler.TradingCalendar;
|
||||||
|
import ru.spcex.clearing.backendapi.controller.response.BasicSpcexResponse;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@ApiModel(description = "Ответ при получении объектов TradingCalendar.")
|
||||||
|
public class TradingCalendarBackendGetAll extends BasicSpcexResponse {
|
||||||
|
|
||||||
|
@JsonProperty
|
||||||
|
@ApiModelProperty(value = "Полезная нагрузка")
|
||||||
|
private TradingCalendarBackendPayload payload = new TradingCalendarBackendPayload();
|
||||||
|
|
||||||
|
private static class TradingCalendarBackendPayload {
|
||||||
|
private List<TradingCalendarBackendGetFields> items = new ArrayList<>();
|
||||||
|
|
||||||
|
public List<TradingCalendarBackendGetFields> getItems() {
|
||||||
|
return items;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setItems(List<TradingCalendarBackendGetFields> items) {
|
||||||
|
this.items = items;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public TradingCalendarBackendPayload getPayload() {
|
||||||
|
return payload;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPayload(TradingCalendarBackendPayload payload) {
|
||||||
|
this.payload = payload;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void fromEntity(Collection<TradingCalendar> tradingCalendars) {
|
||||||
|
var payload = this.getPayload();
|
||||||
|
for (var tradingCalendar : tradingCalendars) {
|
||||||
|
var singleItem = new TradingCalendarBackendGetFields();
|
||||||
|
singleItem.setId(tradingCalendar.getId());
|
||||||
|
singleItem.setClearingDate(tradingCalendar.getClearingDate());
|
||||||
|
singleItem.setCompanyId(tradingCalendar.getCompanyId());
|
||||||
|
singleItem.setTradingStatus(tradingCalendar.getTradingStatus());
|
||||||
|
singleItem.setCreated(tradingCalendar.getCreated());
|
||||||
|
singleItem.setUpdated(tradingCalendar.getUpdated());
|
||||||
|
payload.getItems().add(singleItem);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,73 @@
|
||||||
|
package ru.spcex.clearing.backendapi.controller.response.entity.schedule;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import ru.spcex.clearing.platform.messaging.domain.json.serialize.InstantSerializer;
|
||||||
|
|
||||||
|
import java.time.Instant;
|
||||||
|
|
||||||
|
public class TradingCalendarBackendGetFields {
|
||||||
|
@JsonProperty
|
||||||
|
private Long id;
|
||||||
|
@JsonProperty
|
||||||
|
@JsonSerialize(using = InstantSerializer.class)
|
||||||
|
private Instant clearingDate;
|
||||||
|
@JsonProperty
|
||||||
|
private Long companyId;
|
||||||
|
@JsonProperty
|
||||||
|
private String tradingStatus;
|
||||||
|
@JsonProperty
|
||||||
|
@JsonSerialize(using = InstantSerializer.class)
|
||||||
|
private Instant created;
|
||||||
|
@JsonProperty
|
||||||
|
@JsonSerialize(using = InstantSerializer.class)
|
||||||
|
private Instant updated;
|
||||||
|
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Instant getClearingDate() {
|
||||||
|
return clearingDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClearingDate(Instant clearingDate) {
|
||||||
|
this.clearingDate = clearingDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getCompanyId() {
|
||||||
|
return companyId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCompanyId(Long companyId) {
|
||||||
|
this.companyId = companyId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTradingStatus() {
|
||||||
|
return tradingStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTradingStatus(String tradingStatus) {
|
||||||
|
this.tradingStatus = tradingStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Instant getCreated() {
|
||||||
|
return created;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreated(Instant created) {
|
||||||
|
this.created = created;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Instant getUpdated() {
|
||||||
|
return updated;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdated(Instant updated) {
|
||||||
|
this.updated = updated;
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Reference in a new issue