IMDG classes: http://jira.mfd.msk:8088/browse/CLS-46 http://jira.mfd.msk:8088/browse/CLS-47 http://jira.mfd.msk:8088/browse/CLS-49 http://jira.mfd.msk:8088/browse/CLS-50 http://jira.mfd.msk:8088/browse/CLS-55 http://jira.mfd.msk:8088/browse/CLS-58
This commit is contained in:
parent
a153aefbf1
commit
2f1c8208d0
56 changed files with 2403 additions and 135 deletions
|
|
@ -4,7 +4,7 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import ru.clearing.classes.statics.data.user.ClearingUser;
|
import ru.clearing.classes.statics.data.user.User;
|
||||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||||
import ru.spcex.platform.imdg.api.Imdg;
|
import ru.spcex.platform.imdg.api.Imdg;
|
||||||
import ru.spcex.platform.imdg.api.ImdgProvider;
|
import ru.spcex.platform.imdg.api.ImdgProvider;
|
||||||
|
|
@ -17,11 +17,11 @@ import java.util.Map;
|
||||||
public class UserAutoCreateService {
|
public class UserAutoCreateService {
|
||||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
private final Imdg<ClearingUser> userMap;
|
private final Imdg<User> userMap;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
public UserAutoCreateService(ImdgProvider imdgProvider) {
|
public UserAutoCreateService(ImdgProvider imdgProvider) {
|
||||||
this.userMap = imdgProvider.getImdg(IMDGDistributedNames.Map_ClearingUser, ClearingUser.class);
|
this.userMap = imdgProvider.getImdg(IMDGDistributedNames.Map_User, User.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -30,10 +30,11 @@ public class UserAutoCreateService {
|
||||||
public void createUserIfNeeded(String userName) {
|
public void createUserIfNeeded(String userName) {
|
||||||
userMap.lockAndPerform(() -> {
|
userMap.lockAndPerform(() -> {
|
||||||
try {
|
try {
|
||||||
ClearingUser username = userMap.getSingleObjectByFieldValues(Map.of("username", userName));
|
User username = userMap.getSingleObjectByFieldValues(Map.of("name", userName));
|
||||||
if (username == null) {
|
if (username == null) {
|
||||||
username = new ClearingUser();
|
username = new User();
|
||||||
username.setUsername(userName);
|
username.setId(userMap.nextIDSequenceFor());
|
||||||
|
username.setName(userName);
|
||||||
username.setCreated(Instant.now());
|
username.setCreated(Instant.now());
|
||||||
userMap.insert(username);
|
userMap.insert(username);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ public class Sdf02Service extends QueueConsumer implements InitializingBean {
|
||||||
sDf02.setSumunblock(req.getSumunblock());
|
sDf02.setSumunblock(req.getSumunblock());
|
||||||
sDf02.setFile_type(req.getFile_type());
|
sDf02.setFile_type(req.getFile_type());
|
||||||
sDf02.setResult(req.getResult());
|
sDf02.setResult(req.getResult());
|
||||||
sDf02.setFileName(req.getFileName());
|
// sDf02.setFileName(req.getFileName());
|
||||||
sDf02.setGenerationTime(req.getGenerationTime());
|
sDf02.setGenerationTime(req.getGenerationTime());
|
||||||
sDf02.setGenerationId(req.getGenerationId());
|
sDf02.setGenerationId(req.getGenerationId());
|
||||||
sdf8Map.insert(sDf02);
|
sdf8Map.insert(sDf02);
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,6 @@ public class Sdf08Service extends QueueConsumer implements InitializingBean {
|
||||||
SDf08 sDf08 = new SDf08();
|
SDf08 sDf08 = new SDf08();
|
||||||
sDf08.setNumber(req.getNumber());
|
sDf08.setNumber(req.getNumber());
|
||||||
sDf08.setDatetime(req.getDatetime());
|
sDf08.setDatetime(req.getDatetime());
|
||||||
sDf08.setFileName(req.getFileName());
|
|
||||||
sDf08.setGenerationTime(req.getGenerationTime());
|
sDf08.setGenerationTime(req.getGenerationTime());
|
||||||
sDf08.setGenerationId(req.getGenerationId());
|
sDf08.setGenerationId(req.getGenerationId());
|
||||||
sdf8Map.insert(sDf08);
|
sdf8Map.insert(sDf08);
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,135 @@
|
||||||
|
package ru.clearing.classes.statics.data.journal;
|
||||||
|
|
||||||
|
import ru.clearing.classes.ConstSerializable;
|
||||||
|
import ru.spcex.platform.classes.base.SpcexObjectBase;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.Instant;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Журнал входящих документов
|
||||||
|
* <p>
|
||||||
|
* DB table: IN_DOCUMENT_JOURNAL
|
||||||
|
**/
|
||||||
|
public class InDocumentJournal extends SpcexObjectBase {
|
||||||
|
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
|
||||||
|
|
||||||
|
private Instant registrationDate;
|
||||||
|
private Instant registrationTime;
|
||||||
|
private Long registrationNumber;
|
||||||
|
private String documentName;
|
||||||
|
private Long senderId;
|
||||||
|
private Long quantity;
|
||||||
|
private String clearingCode;
|
||||||
|
private String courierType;
|
||||||
|
private Instant emailDate;
|
||||||
|
private BigDecimal amount;
|
||||||
|
private Long dossierNumber;
|
||||||
|
private String comment;
|
||||||
|
private Instant receiptDate;
|
||||||
|
|
||||||
|
public Instant getRegistrationDate() {
|
||||||
|
return registrationDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRegistrationDate(Instant value) {
|
||||||
|
this.registrationDate = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Instant getRegistrationTime() {
|
||||||
|
return registrationTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRegistrationTime(Instant value) {
|
||||||
|
this.registrationTime = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getRegistrationNumber() {
|
||||||
|
return registrationNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRegistrationNumber(Long value) {
|
||||||
|
this.registrationNumber = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDocumentName() {
|
||||||
|
return documentName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDocumentName(String value) {
|
||||||
|
this.documentName = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getSenderId() {
|
||||||
|
return senderId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSenderId(Long value) {
|
||||||
|
this.senderId = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getQuantity() {
|
||||||
|
return quantity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQuantity(Long value) {
|
||||||
|
this.quantity = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getClearingCode() {
|
||||||
|
return clearingCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClearingCode(String value) {
|
||||||
|
this.clearingCode = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCourierType() {
|
||||||
|
return courierType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCourierType(String value) {
|
||||||
|
this.courierType = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Instant getEmailDate() {
|
||||||
|
return emailDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEmailDate(Instant value) {
|
||||||
|
this.emailDate = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getAmount() {
|
||||||
|
return amount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAmount(BigDecimal value) {
|
||||||
|
this.amount = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getDossierNumber() {
|
||||||
|
return dossierNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDossierNumber(Long value) {
|
||||||
|
this.dossierNumber = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getComment() {
|
||||||
|
return comment;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setComment(String value) {
|
||||||
|
this.comment = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Instant getReceiptDate() {
|
||||||
|
return receiptDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setReceiptDate(Instant value) {
|
||||||
|
this.receiptDate = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,126 @@
|
||||||
|
package ru.clearing.classes.statics.data.journal;
|
||||||
|
|
||||||
|
import ru.clearing.classes.ConstSerializable;
|
||||||
|
import ru.spcex.platform.classes.base.SpcexObjectBase;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.Instant;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Журнал исходящих документов
|
||||||
|
* <p>
|
||||||
|
* DB table: OUT_DOCUMENT_JOURNAL
|
||||||
|
**/
|
||||||
|
public class OutDocumentJournal extends SpcexObjectBase {
|
||||||
|
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
|
||||||
|
|
||||||
|
private Instant registrationDate;
|
||||||
|
private Instant registrationTime;
|
||||||
|
private Long registrationNumber;
|
||||||
|
private String documentName;
|
||||||
|
private Long addresseeId;
|
||||||
|
private Long quantity;
|
||||||
|
private String clearingCode;
|
||||||
|
private String courierType;
|
||||||
|
private Instant emailDate;
|
||||||
|
private BigDecimal amount;
|
||||||
|
private Long dossierNumber;
|
||||||
|
private Instant postDate;
|
||||||
|
|
||||||
|
public Instant getRegistrationDate() {
|
||||||
|
return registrationDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRegistrationDate(Instant value) {
|
||||||
|
this.registrationDate = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Instant getRegistrationTime() {
|
||||||
|
return registrationTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRegistrationTime(Instant value) {
|
||||||
|
this.registrationTime = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getRegistrationNumber() {
|
||||||
|
return registrationNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRegistrationNumber(Long value) {
|
||||||
|
this.registrationNumber = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDocumentName() {
|
||||||
|
return documentName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDocumentName(String value) {
|
||||||
|
this.documentName = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getAddresseeId() {
|
||||||
|
return addresseeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAddresseeId(Long value) {
|
||||||
|
this.addresseeId = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getQuantity() {
|
||||||
|
return quantity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQuantity(Long value) {
|
||||||
|
this.quantity = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getClearingCode() {
|
||||||
|
return clearingCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClearingCode(String value) {
|
||||||
|
this.clearingCode = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCourierType() {
|
||||||
|
return courierType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCourierType(String value) {
|
||||||
|
this.courierType = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Instant getEmailDate() {
|
||||||
|
return emailDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEmailDate(Instant value) {
|
||||||
|
this.emailDate = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getAmount() {
|
||||||
|
return amount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAmount(BigDecimal value) {
|
||||||
|
this.amount = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getDossierNumber() {
|
||||||
|
return dossierNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDossierNumber(Long value) {
|
||||||
|
this.dossierNumber = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Instant getPostDate() {
|
||||||
|
return postDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPostDate(Instant value) {
|
||||||
|
this.postDate = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,73 @@
|
||||||
|
package ru.clearing.classes.statics.data.scheduler;
|
||||||
|
|
||||||
|
import ru.clearing.classes.ConstSerializable;
|
||||||
|
import ru.clearing.classes.objects.BusinessObject;
|
||||||
|
import ru.spcex.platform.classes.base.SpcexObjectBase;
|
||||||
|
|
||||||
|
import java.time.Instant;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Расписание планировщика
|
||||||
|
* <p>
|
||||||
|
* DB table: SCHEDULER
|
||||||
|
**/
|
||||||
|
public class Scheduler extends BusinessObject {
|
||||||
|
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
|
||||||
|
|
||||||
|
private String task;
|
||||||
|
private Instant taskTime;
|
||||||
|
private Instant clearingDate;
|
||||||
|
private String market;
|
||||||
|
private String taskStatus;
|
||||||
|
private Long securityId;
|
||||||
|
|
||||||
|
|
||||||
|
public String getTask() {
|
||||||
|
return task;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTask(String value) {
|
||||||
|
this.task = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Instant getTaskTime() {
|
||||||
|
return taskTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTaskTime(Instant value) {
|
||||||
|
this.taskTime = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Instant getClearingDate() {
|
||||||
|
return clearingDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClearingDate(Instant value) {
|
||||||
|
this.clearingDate = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMarket() {
|
||||||
|
return market;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMarket(String value) {
|
||||||
|
this.market = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTaskStatus() {
|
||||||
|
return taskStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTaskStatus(String value) {
|
||||||
|
this.taskStatus = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getSecurityId() {
|
||||||
|
return securityId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSecurityId(Long value) {
|
||||||
|
this.securityId = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,89 @@
|
||||||
|
package ru.clearing.classes.statics.data.scheduler;
|
||||||
|
|
||||||
|
import ru.clearing.classes.ConstSerializable;
|
||||||
|
import ru.spcex.platform.classes.base.SpcexObjectBase;
|
||||||
|
|
||||||
|
import java.time.Instant;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Расписание на текущий день
|
||||||
|
* <p>
|
||||||
|
* DB table: SCHEDULER_ALL_TODAY
|
||||||
|
**/
|
||||||
|
public class SchedulerAllToday extends SpcexObjectBase {
|
||||||
|
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
|
||||||
|
|
||||||
|
private String task;
|
||||||
|
private Instant taskTime;
|
||||||
|
private Instant clearingDate;
|
||||||
|
private String market;
|
||||||
|
private String taskStatus;
|
||||||
|
private Long securityId;
|
||||||
|
private String source;
|
||||||
|
private Long origId;
|
||||||
|
|
||||||
|
public String getTask() {
|
||||||
|
return task;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTask(String value) {
|
||||||
|
this.task = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Instant getTaskTime() {
|
||||||
|
return taskTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTaskTime(Instant value) {
|
||||||
|
this.taskTime = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Instant getClearingDate() {
|
||||||
|
return clearingDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClearingDate(Instant value) {
|
||||||
|
this.clearingDate = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMarket() {
|
||||||
|
return market;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMarket(String value) {
|
||||||
|
this.market = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTaskStatus() {
|
||||||
|
return taskStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTaskStatus(String value) {
|
||||||
|
this.taskStatus = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getSecurityId() {
|
||||||
|
return securityId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSecurityId(Long value) {
|
||||||
|
this.securityId = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSource() {
|
||||||
|
return source;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSource(String value) {
|
||||||
|
this.source = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getOrigId() {
|
||||||
|
return origId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOrigId(Long value) {
|
||||||
|
this.origId = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,36 @@
|
||||||
|
package ru.clearing.classes.statics.data.scheduler;
|
||||||
|
|
||||||
|
import ru.clearing.classes.ConstSerializable;
|
||||||
|
import ru.clearing.classes.objects.BusinessObject;
|
||||||
|
import ru.spcex.platform.classes.base.SpcexObjectBase;
|
||||||
|
|
||||||
|
import java.time.Instant;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Запуск задачи
|
||||||
|
* <p>
|
||||||
|
* DB table: TASK_RUNNER
|
||||||
|
**/
|
||||||
|
public class TaskRunner extends BusinessObject {
|
||||||
|
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
|
||||||
|
|
||||||
|
private Long senderId;
|
||||||
|
private String task;
|
||||||
|
|
||||||
|
public Long getSenderId() {
|
||||||
|
return senderId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSenderId(Long value) {
|
||||||
|
this.senderId = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTask() {
|
||||||
|
return task;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTask(String value) {
|
||||||
|
this.task = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,44 @@
|
||||||
|
package ru.clearing.classes.statics.data.scheduler;
|
||||||
|
|
||||||
|
import ru.clearing.classes.ConstSerializable;
|
||||||
|
import ru.clearing.classes.objects.BusinessObject;
|
||||||
|
|
||||||
|
import java.time.Instant;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Постоянное расписание операционного дня
|
||||||
|
* <p>
|
||||||
|
* DB table: TIMETABLE
|
||||||
|
**/
|
||||||
|
public class Timetable extends BusinessObject {
|
||||||
|
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
|
||||||
|
|
||||||
|
private String task;
|
||||||
|
private Instant taskTime;
|
||||||
|
private String taskStatus;
|
||||||
|
|
||||||
|
public String getTask() {
|
||||||
|
return task;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTask(String value) {
|
||||||
|
this.task = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Instant getTaskTime() {
|
||||||
|
return taskTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTaskTime(Instant value) {
|
||||||
|
this.taskTime = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTaskStatus() {
|
||||||
|
return taskStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTaskStatus(String value) {
|
||||||
|
this.taskStatus = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,44 @@
|
||||||
|
package ru.clearing.classes.statics.data.scheduler;
|
||||||
|
|
||||||
|
import ru.clearing.classes.ConstSerializable;
|
||||||
|
import ru.clearing.classes.objects.BusinessObject;
|
||||||
|
|
||||||
|
import java.time.Instant;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Торговые и неторговые дни
|
||||||
|
* <p>
|
||||||
|
* DB table: TRADING_CALENDAR
|
||||||
|
**/
|
||||||
|
public class TradingCalendar extends BusinessObject {
|
||||||
|
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
|
||||||
|
|
||||||
|
private Instant clearingDate;
|
||||||
|
private Long companyId;
|
||||||
|
private String tradingStatus;
|
||||||
|
|
||||||
|
public Instant getClearingDate() {
|
||||||
|
return clearingDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClearingDate(Instant value) {
|
||||||
|
this.clearingDate = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getCompanyId() {
|
||||||
|
return companyId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCompanyId(Long value) {
|
||||||
|
this.companyId = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTradingStatus() {
|
||||||
|
return tradingStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTradingStatus(String value) {
|
||||||
|
this.tradingStatus = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -26,9 +26,9 @@ public class SDf02 extends SpcexObjectBase {
|
||||||
private String sumunblock;
|
private String sumunblock;
|
||||||
private String file_type;
|
private String file_type;
|
||||||
private String result;
|
private String result;
|
||||||
private String fileName;
|
|
||||||
private Instant generationTime;
|
private Instant generationTime;
|
||||||
private Long generationId;
|
private Long generationId;
|
||||||
|
private Long inSDf01Id;
|
||||||
|
|
||||||
public String getCurr_code() {
|
public String getCurr_code() {
|
||||||
return curr_code;
|
return curr_code;
|
||||||
|
|
@ -134,14 +134,6 @@ public class SDf02 extends SpcexObjectBase {
|
||||||
this.result = value;
|
this.result = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getFileName() {
|
|
||||||
return fileName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFileName(String value) {
|
|
||||||
this.fileName = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Instant getGenerationTime() {
|
public Instant getGenerationTime() {
|
||||||
return generationTime;
|
return generationTime;
|
||||||
}
|
}
|
||||||
|
|
@ -158,4 +150,12 @@ public class SDf02 extends SpcexObjectBase {
|
||||||
this.generationId = value;
|
this.generationId = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
public Long getInSDf01Id() {
|
||||||
|
return inSDf01Id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInSDf01Id(Long value) {
|
||||||
|
this.inSDf01Id = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -16,7 +16,6 @@ public class SDf08 extends SpcexObjectBase {
|
||||||
|
|
||||||
private BigDecimal number;
|
private BigDecimal number;
|
||||||
private Instant datetime;
|
private Instant datetime;
|
||||||
private String fileName;
|
|
||||||
private Instant generationTime;
|
private Instant generationTime;
|
||||||
private Long generationId;
|
private Long generationId;
|
||||||
|
|
||||||
|
|
@ -36,14 +35,6 @@ public class SDf08 extends SpcexObjectBase {
|
||||||
this.datetime = value;
|
this.datetime = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getFileName() {
|
|
||||||
return fileName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFileName(String value) {
|
|
||||||
this.fileName = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Instant getGenerationTime() {
|
public Instant getGenerationTime() {
|
||||||
return generationTime;
|
return generationTime;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,72 @@
|
||||||
|
package ru.clearing.classes.statics.data.sdf;
|
||||||
|
|
||||||
|
import ru.clearing.classes.ConstSerializable;
|
||||||
|
import ru.spcex.platform.classes.base.SpcexObjectBase;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.Instant;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ДФ-12 Из ПРЦ в КС Информация о блокировке/разблокировке/закрытии ТБС УК
|
||||||
|
* <p>
|
||||||
|
* DB table: S_DF12
|
||||||
|
**/
|
||||||
|
public class SDf12 extends SpcexObjectBase {
|
||||||
|
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
|
||||||
|
|
||||||
|
private String account;
|
||||||
|
private String deal;
|
||||||
|
private BigDecimal status;
|
||||||
|
private String fileName;
|
||||||
|
private Instant generationTime;
|
||||||
|
private Long generationId;
|
||||||
|
|
||||||
|
public String getAccount() {
|
||||||
|
return account;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAccount(String value) {
|
||||||
|
this.account = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDeal() {
|
||||||
|
return deal;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeal(String value) {
|
||||||
|
this.deal = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(BigDecimal value) {
|
||||||
|
this.status = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFileName() {
|
||||||
|
return fileName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFileName(String value) {
|
||||||
|
this.fileName = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Instant getGenerationTime() {
|
||||||
|
return generationTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGenerationTime(Instant value) {
|
||||||
|
this.generationTime = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getGenerationId() {
|
||||||
|
return generationId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGenerationId(Long value) {
|
||||||
|
this.generationId = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,81 @@
|
||||||
|
package ru.clearing.classes.statics.data.sdf;
|
||||||
|
|
||||||
|
import ru.clearing.classes.ConstSerializable;
|
||||||
|
import ru.spcex.platform.classes.base.SpcexObjectBase;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.Instant;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ДФ-18 Из КС в ПРЦ Квитанция о получении информации о состоянии счета (блокировка/разблокировка/закрытие)
|
||||||
|
* <p>
|
||||||
|
* DB table: S_DF18
|
||||||
|
**/
|
||||||
|
public class SDf18 extends SpcexObjectBase {
|
||||||
|
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
|
||||||
|
|
||||||
|
private String account;
|
||||||
|
private String deal;
|
||||||
|
private BigDecimal status;
|
||||||
|
private BigDecimal result;
|
||||||
|
private Instant generationTime;
|
||||||
|
private Long generationId;
|
||||||
|
private Long inSDf12Id;
|
||||||
|
|
||||||
|
public String getAccount() {
|
||||||
|
return account;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAccount(String value) {
|
||||||
|
this.account = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDeal() {
|
||||||
|
return deal;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeal(String value) {
|
||||||
|
this.deal = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(BigDecimal value) {
|
||||||
|
this.status = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getResult() {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setResult(BigDecimal value) {
|
||||||
|
this.result = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Instant getGenerationTime() {
|
||||||
|
return generationTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGenerationTime(Instant value) {
|
||||||
|
this.generationTime = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getGenerationId() {
|
||||||
|
return generationId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGenerationId(Long value) {
|
||||||
|
this.generationId = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getInSDf12Id() {
|
||||||
|
return inSDf12Id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInSDf12Id(Long value) {
|
||||||
|
this.inSDf12Id = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -30,6 +30,7 @@ public class Statement extends BusinessObject {
|
||||||
private String errorText;
|
private String errorText;
|
||||||
private Long inSDfId;
|
private Long inSDfId;
|
||||||
private Long outSDfId;
|
private Long outSDfId;
|
||||||
|
private String inOutSDfType;
|
||||||
|
|
||||||
public Long getAddresseeId() {
|
public Long getAddresseeId() {
|
||||||
return addresseeId;
|
return addresseeId;
|
||||||
|
|
@ -159,4 +160,12 @@ public class Statement extends BusinessObject {
|
||||||
this.outSDfId = value;
|
this.outSDfId = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getInOutSDfType() {
|
||||||
|
return inOutSDfType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInOutSDfType(String value) {
|
||||||
|
this.inOutSDfType = value;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,36 +0,0 @@
|
||||||
package ru.clearing.classes.statics.data.user;
|
|
||||||
|
|
||||||
|
|
||||||
import ru.clearing.classes.ConstSerializable;
|
|
||||||
import ru.clearing.classes.objects.BusinessObject;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Database table: USER_CLEARING todo name for user ?
|
|
||||||
*/
|
|
||||||
public class ClearingUser extends BusinessObject {
|
|
||||||
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
|
|
||||||
private String username;
|
|
||||||
|
|
||||||
public String getUsername() {
|
|
||||||
return username;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUsername(String username) {
|
|
||||||
this.username = username;
|
|
||||||
}
|
|
||||||
|
|
||||||
// private String idpUuid;
|
|
||||||
//
|
|
||||||
// public ClearingUser() {
|
|
||||||
// super();
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public String toString() {
|
|
||||||
// return String.format("%s{id=%d, idpUuid='%s'}", getClass().getSimpleName(), getId(), getIdpUuid());
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// public String getIdpUuid() {
|
|
||||||
// return idpUuid;
|
|
||||||
// }
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -0,0 +1,51 @@
|
||||||
|
package ru.clearing.classes.statics.data.user;
|
||||||
|
|
||||||
|
import ru.clearing.classes.ConstSerializable;
|
||||||
|
import ru.spcex.platform.classes.base.SpcexObjectBase;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Доступ к рынкам
|
||||||
|
* <p>
|
||||||
|
* DB table: MARKET_ACCESS
|
||||||
|
**/
|
||||||
|
public class MarketAccess extends SpcexObjectBase {
|
||||||
|
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
|
||||||
|
|
||||||
|
private Long userId;
|
||||||
|
private Long market;
|
||||||
|
private String status;
|
||||||
|
private Long companyId;
|
||||||
|
|
||||||
|
public Long getUserId() {
|
||||||
|
return userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserId(Long value) {
|
||||||
|
this.userId = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getMarket() {
|
||||||
|
return market;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMarket(Long value) {
|
||||||
|
this.market = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(String value) {
|
||||||
|
this.status = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getCompanyId() {
|
||||||
|
return companyId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCompanyId(Long value) {
|
||||||
|
this.companyId = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,43 @@
|
||||||
|
package ru.clearing.classes.statics.data.user;
|
||||||
|
|
||||||
|
import ru.clearing.classes.ConstSerializable;
|
||||||
|
import ru.clearing.classes.objects.BusinessObject;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Пользователь
|
||||||
|
* UserCls
|
||||||
|
* <p>
|
||||||
|
* DB table: USER_CLR
|
||||||
|
**/
|
||||||
|
public class User extends BusinessObject {
|
||||||
|
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
|
||||||
|
|
||||||
|
private Long companyId;
|
||||||
|
private String identifier;
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
public Long getCompanyId() {
|
||||||
|
return companyId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCompanyId(Long value) {
|
||||||
|
this.companyId = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIdentifier() {
|
||||||
|
return identifier;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIdentifier(String value) {
|
||||||
|
this.identifier = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String value) {
|
||||||
|
this.name = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,99 @@
|
||||||
|
package ru.clearing.classes.statics.data.user;
|
||||||
|
|
||||||
|
import ru.clearing.classes.ConstSerializable;
|
||||||
|
import ru.clearing.classes.objects.BusinessObject;
|
||||||
|
import ru.spcex.platform.classes.base.SpcexObjectBase;
|
||||||
|
|
||||||
|
import java.time.Instant;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Активность пользователей в системе
|
||||||
|
* <p>
|
||||||
|
* DB table: USER_CONNECT
|
||||||
|
**/
|
||||||
|
public class UserConnect extends BusinessObject {
|
||||||
|
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
|
||||||
|
|
||||||
|
private Long userId;
|
||||||
|
private Instant connectionTime;
|
||||||
|
private Instant disconnectionTime;
|
||||||
|
private String serverIP;
|
||||||
|
private String clientIP;
|
||||||
|
private String connectionState;
|
||||||
|
private Instant clearingDate;
|
||||||
|
private String errorCode;
|
||||||
|
private String errorText;
|
||||||
|
|
||||||
|
public Long getUserId() {
|
||||||
|
return userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserId(Long value) {
|
||||||
|
this.userId = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Instant getConnectionTime() {
|
||||||
|
return connectionTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setConnectionTime(Instant value) {
|
||||||
|
this.connectionTime = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Instant getDisconnectionTime() {
|
||||||
|
return disconnectionTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDisconnectionTime(Instant value) {
|
||||||
|
this.disconnectionTime = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getServerIP() {
|
||||||
|
return serverIP;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setServerIP(String value) {
|
||||||
|
this.serverIP = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getClientIP() {
|
||||||
|
return clientIP;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClientIP(String value) {
|
||||||
|
this.clientIP = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getConnectionState() {
|
||||||
|
return connectionState;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setConnectionState(String value) {
|
||||||
|
this.connectionState = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Instant getClearingDate() {
|
||||||
|
return clearingDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClearingDate(Instant value) {
|
||||||
|
this.clearingDate = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getErrorCode() {
|
||||||
|
return errorCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setErrorCode(String value) {
|
||||||
|
this.errorCode = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getErrorText() {
|
||||||
|
return errorText;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setErrorText(String value) {
|
||||||
|
this.errorText = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
package ru.clearing.classes.statics.data.user;
|
||||||
|
|
||||||
|
import ru.clearing.classes.ConstSerializable;
|
||||||
|
import ru.clearing.classes.objects.BusinessEvent;
|
||||||
|
import java.io.Serial;
|
||||||
|
/**
|
||||||
|
* Изменение состояния объекта Активность пользователей в системе
|
||||||
|
*
|
||||||
|
* DB table: USER_CONNECT_HISTORY
|
||||||
|
**/
|
||||||
|
public class UserConnectHistory extends BusinessEvent<UserConnect> {
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
|
||||||
|
|
||||||
|
private UserConnect object;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public UserConnect getObject() {
|
||||||
|
return object;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setObject(UserConnect object) {
|
||||||
|
this.object = object;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
package ru.clearing.classes.statics.data.user;
|
||||||
|
|
||||||
|
import ru.clearing.classes.ConstSerializable;
|
||||||
|
import ru.clearing.classes.objects.BusinessEvent;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Изменение состояния объекта Пользователь
|
||||||
|
* <p>
|
||||||
|
* DB table: USER_CLR_HISTORY
|
||||||
|
**/
|
||||||
|
public class UserHistory extends BusinessEvent<User> {
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
|
||||||
|
|
||||||
|
private User object;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public User getObject() {
|
||||||
|
return object;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setObject(User object) {
|
||||||
|
this.object = object;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,42 @@
|
||||||
|
package ru.clearing.classes.statics.data.user;
|
||||||
|
|
||||||
|
import ru.clearing.classes.ConstSerializable;
|
||||||
|
import ru.spcex.platform.classes.base.SpcexObjectBase;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Набор ролей
|
||||||
|
* <p>
|
||||||
|
* DB table: USER_ROLE_SESSION
|
||||||
|
**/
|
||||||
|
public class UserRoleSession extends SpcexObjectBase {
|
||||||
|
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
|
||||||
|
|
||||||
|
private Long userId;
|
||||||
|
private String userRole;
|
||||||
|
private Long companyId;
|
||||||
|
|
||||||
|
public Long getUserId() {
|
||||||
|
return userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserId(Long value) {
|
||||||
|
this.userId = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUserRole() {
|
||||||
|
return userRole;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserRole(String value) {
|
||||||
|
this.userRole = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getCompanyId() {
|
||||||
|
return companyId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCompanyId(Long value) {
|
||||||
|
this.companyId = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,42 @@
|
||||||
|
package ru.clearing.classes.statics.data.user;
|
||||||
|
|
||||||
|
import ru.clearing.classes.ConstSerializable;
|
||||||
|
import ru.spcex.platform.classes.base.SpcexObjectBase;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Настройки пользователя
|
||||||
|
* <p>
|
||||||
|
* DB table: USER_SETTINGS
|
||||||
|
**/
|
||||||
|
public class UserSettings extends SpcexObjectBase {
|
||||||
|
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
|
||||||
|
|
||||||
|
private Long userId;
|
||||||
|
private String version;
|
||||||
|
private String json;
|
||||||
|
|
||||||
|
public Long getUserId() {
|
||||||
|
return userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserId(Long value) {
|
||||||
|
this.userId = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVersion() {
|
||||||
|
return version;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVersion(String value) {
|
||||||
|
this.version = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getJson() {
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setJson(String value) {
|
||||||
|
this.json = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
package ru.clearing.platform.dictionary;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Справочник состояний соединений
|
||||||
|
*
|
||||||
|
* Dictionary DB table: CONNECTION_STATE_DICTIONARY
|
||||||
|
**/
|
||||||
|
public class ConnectionStateDictionary extends AbstractDictionary {
|
||||||
|
private static final long serialVersionUID = ConstDictionarySerializable.serialVersionUID;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
package ru.clearing.platform.dictionary;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Справочник источников
|
||||||
|
*
|
||||||
|
* Dictionary DB table: SOURCE_DICTIONARY
|
||||||
|
**/
|
||||||
|
public class SourceDictionary extends AbstractDictionary {
|
||||||
|
private static final long serialVersionUID = ConstDictionarySerializable.serialVersionUID;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package ru.clearing.platform.dictionary;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Справочник задач
|
||||||
|
*
|
||||||
|
* Dictionary DB table: TASK_DICTIONARY
|
||||||
|
**/
|
||||||
|
public class TaskDictionary extends AbstractDictionary {
|
||||||
|
private static final long serialVersionUID = ConstDictionarySerializable.serialVersionUID;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package ru.clearing.platform.dictionary;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Справочник статусов задач
|
||||||
|
* <p>
|
||||||
|
* Dictionary DB table: TASK_STATUS_DICTIONARY
|
||||||
|
**/
|
||||||
|
public class TaskStatusDictionary extends AbstractDictionary {
|
||||||
|
private static final long serialVersionUID = ConstDictionarySerializable.serialVersionUID;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
package ru.clearing.platform.dictionary;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Справочник торговых статусов
|
||||||
|
*
|
||||||
|
* Dictionary DB table: TRADING_STATUS_DICTIONARY
|
||||||
|
**/
|
||||||
|
public class TradingStatusDictionary extends AbstractDictionary {
|
||||||
|
private static final long serialVersionUID = ConstDictionarySerializable.serialVersionUID;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
package ru.clearing.platform.dictionary;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Роли пользователей
|
||||||
|
*
|
||||||
|
* Dictionary DB table: USER_ROLE_DICTIONARY
|
||||||
|
**/
|
||||||
|
public class UserRoleDictionary extends AbstractDictionary {
|
||||||
|
private static final long serialVersionUID = ConstDictionarySerializable.serialVersionUID;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,59 @@
|
||||||
|
package ru.spcex.clearing.imdg.businessevent;
|
||||||
|
|
||||||
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import ru.clearing.classes.statics.data.user.UserConnect;
|
||||||
|
import ru.clearing.classes.statics.data.user.UserConnectHistory;
|
||||||
|
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||||
|
import ru.spcex.clearing.imdg.base.TemplateEventMapStore;
|
||||||
|
import ru.spcex.clearing.imdg.utils.TimeUtil;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class UserConnectHistoryMapStore extends TemplateEventMapStore<UserConnectHistory> {
|
||||||
|
|
||||||
|
public UserConnectHistoryMapStore(JdbcTemplate jdbcTemplate) {
|
||||||
|
super(jdbcTemplate);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getMapName() {
|
||||||
|
return IMDGDistributedNames.Map_UserConnectHistory;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTableName() {
|
||||||
|
return "USER_CONNECT_HISTORY";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getFields() {
|
||||||
|
return new String[]{"ID", "EVENT_TIME", "EVENT_USER_ID",
|
||||||
|
"USER_CONNECT_ID", "CREATED_AT", "UPDATED_AT", "USER_ID", "CONNECTION_TIME", "DISCONNECTION_TIME", "SERVER_I_P", "CLIENT_I_P", "CONNECTION_STATE", "CLEARING_DATE", "ERROR_CODE", "ERROR_TEXT"
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object[] objectToField(UserConnectHistory historyLog) {
|
||||||
|
UserConnect object = historyLog.getObject();
|
||||||
|
Object[] args = new Object[]{
|
||||||
|
historyLog.getId(),
|
||||||
|
historyLog.getEventTime(),
|
||||||
|
historyLog.getUserId(),
|
||||||
|
|
||||||
|
object.getId(),
|
||||||
|
TimeUtil.fromInstant(object.getCreated()),
|
||||||
|
TimeUtil.fromInstant(object.getUpdated()),
|
||||||
|
object.getUserId(),
|
||||||
|
TimeUtil.fromInstant(object.getConnectionTime()),
|
||||||
|
TimeUtil.fromInstant(object.getDisconnectionTime()),
|
||||||
|
object.getServerIP(),
|
||||||
|
object.getClientIP(),
|
||||||
|
object.getConnectionState(),
|
||||||
|
TimeUtil.fromInstant(object.getClearingDate()),
|
||||||
|
object.getErrorCode(),
|
||||||
|
object.getErrorText()
|
||||||
|
};
|
||||||
|
return args;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,53 @@
|
||||||
|
package ru.spcex.clearing.imdg.businessevent;
|
||||||
|
|
||||||
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import ru.clearing.classes.statics.data.user.User;
|
||||||
|
import ru.clearing.classes.statics.data.user.UserHistory;
|
||||||
|
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||||
|
import ru.spcex.clearing.imdg.base.TemplateEventMapStore;
|
||||||
|
import ru.spcex.clearing.imdg.utils.TimeUtil;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class UserHistoryMapStore extends TemplateEventMapStore<UserHistory> {
|
||||||
|
|
||||||
|
public UserHistoryMapStore(JdbcTemplate jdbcTemplate) {
|
||||||
|
super(jdbcTemplate);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getMapName() {
|
||||||
|
return IMDGDistributedNames.Map_UserHistory;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTableName() {
|
||||||
|
return "USER_HISTORY";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getFields() {
|
||||||
|
return new String[]{"ID","EVENT_TIME", "EVENT_USER_ID",
|
||||||
|
"USER_ID", "CREATED_AT", "UPDATED_AT", "COMPANY_ID", "IDENTIFIER", "NAME"
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object[] objectToField(UserHistory historyLog) {
|
||||||
|
User object=historyLog.getObject();
|
||||||
|
Object[] args = new Object[]{
|
||||||
|
historyLog.getId(),
|
||||||
|
historyLog.getEventTime(),
|
||||||
|
historyLog.getUserId(),
|
||||||
|
|
||||||
|
object.getId(),
|
||||||
|
TimeUtil.fromInstant(object.getCreated()),
|
||||||
|
TimeUtil.fromInstant(object.getUpdated()),
|
||||||
|
object.getCompanyId(),
|
||||||
|
object.getIdentifier(),
|
||||||
|
object.getName()
|
||||||
|
};
|
||||||
|
return args;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,70 @@
|
||||||
|
package ru.spcex.clearing.imdg.businessobject;
|
||||||
|
|
||||||
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import ru.clearing.classes.statics.data.scheduler.Scheduler;
|
||||||
|
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||||
|
import ru.spcex.clearing.imdg.base.TemplateMapStore;
|
||||||
|
import ru.spcex.clearing.imdg.utils.DbUtilsHelper;
|
||||||
|
import ru.spcex.clearing.imdg.utils.TimeUtil;
|
||||||
|
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class SchedulerMapStore extends TemplateMapStore<Scheduler> {
|
||||||
|
|
||||||
|
public SchedulerMapStore(JdbcTemplate jdbcTemplate) {
|
||||||
|
super(jdbcTemplate);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getMapName() {
|
||||||
|
return IMDGDistributedNames.Map_Scheduler;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTableName() {
|
||||||
|
return "SCHEDULER";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getFields() {
|
||||||
|
return new String[]{
|
||||||
|
"ID", "CREATED_AT", "UPDATED_AT", "TASK", "TASK_TIME", "CLEARING_DATE", "MARKET", "TASK_STATUS", "SECURITY_ID"
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Scheduler objectReader(ResultSet resultSet) throws SQLException {
|
||||||
|
Scheduler object = new Scheduler();
|
||||||
|
object.setId(resultSet.getObject("ID", Long.class));
|
||||||
|
object.setCreated(getInstantFromTimestamp(resultSet, "CREATED_AT"));
|
||||||
|
object.setUpdated(getInstantFromTimestamp(resultSet, "UPDATED_AT"));
|
||||||
|
object.setTask(resultSet.getObject("TASK", String.class));
|
||||||
|
object.setTaskTime(getInstantFromTimestamp(resultSet, "TASK_TIME"));
|
||||||
|
object.setClearingDate(getInstantFromTimestamp(resultSet, "CLEARING_DATE"));
|
||||||
|
object.setMarket(resultSet.getObject("MARKET", String.class));
|
||||||
|
object.setTaskStatus(resultSet.getObject("TASK_STATUS", String.class));
|
||||||
|
object.setSecurityId(resultSet.getObject("SECURITY_ID", Long.class));
|
||||||
|
return object;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object[] objectToField(Scheduler object) {
|
||||||
|
Object[] args = new Object[]{
|
||||||
|
object.getId(),
|
||||||
|
TimeUtil.fromInstant(object.getCreated()),
|
||||||
|
TimeUtil.fromInstant(object.getUpdated()),
|
||||||
|
object.getTask(),
|
||||||
|
TimeUtil.fromInstant(object.getTaskTime()),
|
||||||
|
TimeUtil.fromInstant(object.getClearingDate()),
|
||||||
|
object.getMarket(),
|
||||||
|
object.getTaskStatus(),
|
||||||
|
object.getSecurityId()
|
||||||
|
};
|
||||||
|
return args;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -33,7 +33,7 @@ public class StatementMapStore extends TemplateMapStore<Statement> {
|
||||||
@Override
|
@Override
|
||||||
public String[] getFields() {
|
public String[] getFields() {
|
||||||
return new String[]{
|
return new String[]{
|
||||||
"ID", "ADDRESSEE_ID", "SENDER_ID", "CREATED_AT", "UPDATED_AT", "CLEARING_DATE", "STATEMENT_TYPE_ID", "COMMENT", "ACCOUNT_ID", "ACCOUNT", "IN_OUT_DIRECTION", "SETTLEMENT_DATE", "AMOUNT", "CASH_MOVEMENT_CURRENCY_CODE", "STATUS", "ERROR_CODE", "ERROR_TEXT", "IN_S_DF_ID", "OUT_S_DF_ID"
|
"ID", "ADDRESSEE_ID", "SENDER_ID", "CREATED_AT", "UPDATED_AT", "CLEARING_DATE", "STATEMENT_TYPE_ID", "COMMENT", "ACCOUNT_ID", "ACCOUNT", "IN_OUT_DIRECTION", "SETTLEMENT_DATE", "AMOUNT", "CASH_MOVEMENT_CURRENCY_CODE", "STATUS", "ERROR_CODE", "ERROR_TEXT", "IN_S_DF_ID", "OUT_S_DF_ID", "IN_OUT_S_DF_TYPE"
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -59,6 +59,7 @@ public class StatementMapStore extends TemplateMapStore<Statement> {
|
||||||
object.setErrorText(resultSet.getObject("ERROR_TEXT", String.class));
|
object.setErrorText(resultSet.getObject("ERROR_TEXT", String.class));
|
||||||
object.setInSDfId(resultSet.getObject("IN_S_DF_ID", Long.class));
|
object.setInSDfId(resultSet.getObject("IN_S_DF_ID", Long.class));
|
||||||
object.setOutSDfId(resultSet.getObject("OUT_S_DF_ID", Long.class));
|
object.setOutSDfId(resultSet.getObject("OUT_S_DF_ID", Long.class));
|
||||||
|
object.setInOutSDfType(resultSet.getObject("IN_OUT_S_DF_TYPE", String.class));
|
||||||
return object;
|
return object;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -83,7 +84,8 @@ public class StatementMapStore extends TemplateMapStore<Statement> {
|
||||||
object.getErrorCode(),
|
object.getErrorCode(),
|
||||||
object.getErrorText(),
|
object.getErrorText(),
|
||||||
object.getInSDfId(),
|
object.getInSDfId(),
|
||||||
object.getOutSDfId()
|
object.getOutSDfId(),
|
||||||
|
object.getInOutSDfType()
|
||||||
};
|
};
|
||||||
return args;
|
return args;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,62 @@
|
||||||
|
package ru.spcex.clearing.imdg.businessobject;
|
||||||
|
|
||||||
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import ru.clearing.classes.statics.data.scheduler.TaskRunner;
|
||||||
|
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||||
|
import ru.spcex.clearing.imdg.base.TemplateMapStore;
|
||||||
|
import ru.spcex.clearing.imdg.utils.DbUtilsHelper;
|
||||||
|
import ru.spcex.clearing.imdg.utils.TimeUtil;
|
||||||
|
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class TaskRunnerMapStore extends TemplateMapStore<TaskRunner> {
|
||||||
|
|
||||||
|
public TaskRunnerMapStore(JdbcTemplate jdbcTemplate) {
|
||||||
|
super(jdbcTemplate);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getMapName() {
|
||||||
|
return IMDGDistributedNames.Map_TaskRunner;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTableName() {
|
||||||
|
return "TASK_RUNNER";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getFields() {
|
||||||
|
return new String[]{
|
||||||
|
"ID", "CREATED_AT", "UPDATED_AT", "SENDER_ID", "TASK"
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TaskRunner objectReader(ResultSet resultSet) throws SQLException {
|
||||||
|
TaskRunner object = new TaskRunner();
|
||||||
|
object.setId(resultSet.getObject("ID", Long.class));
|
||||||
|
object.setCreated(getInstantFromTimestamp(resultSet, "CREATED_AT"));
|
||||||
|
object.setUpdated(getInstantFromTimestamp(resultSet, "UPDATED_AT"));
|
||||||
|
object.setSenderId(resultSet.getObject("SENDER_ID", Long.class));
|
||||||
|
object.setTask(resultSet.getObject("TASK", String.class));
|
||||||
|
return object;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object[] objectToField(TaskRunner object) {
|
||||||
|
Object[] args = new Object[]{
|
||||||
|
object.getId(),
|
||||||
|
TimeUtil.fromInstant(object.getCreated()),
|
||||||
|
TimeUtil.fromInstant(object.getUpdated()),
|
||||||
|
object.getSenderId(),
|
||||||
|
object.getTask()
|
||||||
|
};
|
||||||
|
return args;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,64 @@
|
||||||
|
package ru.spcex.clearing.imdg.businessobject;
|
||||||
|
|
||||||
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import ru.clearing.classes.statics.data.scheduler.Timetable;
|
||||||
|
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||||
|
import ru.spcex.clearing.imdg.base.TemplateMapStore;
|
||||||
|
import ru.spcex.clearing.imdg.utils.DbUtilsHelper;
|
||||||
|
import ru.spcex.clearing.imdg.utils.TimeUtil;
|
||||||
|
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class TimetableMapStore extends TemplateMapStore<Timetable> {
|
||||||
|
|
||||||
|
public TimetableMapStore(JdbcTemplate jdbcTemplate) {
|
||||||
|
super(jdbcTemplate);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getMapName() {
|
||||||
|
return IMDGDistributedNames.Map_Timetable;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTableName() {
|
||||||
|
return "TIMETABLE";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getFields() {
|
||||||
|
return new String[]{
|
||||||
|
"ID", "CREATED_AT", "UPDATED_AT", "TASK", "TASK_TIME", "TASK_STATUS"
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Timetable objectReader(ResultSet resultSet) throws SQLException {
|
||||||
|
Timetable object = new Timetable();
|
||||||
|
object.setId(resultSet.getObject("ID", Long.class));
|
||||||
|
object.setCreated(getInstantFromTimestamp(resultSet, "CREATED_AT"));
|
||||||
|
object.setUpdated(getInstantFromTimestamp(resultSet, "UPDATED_AT"));
|
||||||
|
object.setTask(resultSet.getObject("TASK", String.class));
|
||||||
|
object.setTaskTime(getInstantFromTimestamp(resultSet, "TASK_TIME"));
|
||||||
|
object.setTaskStatus(resultSet.getObject("TASK_STATUS", String.class));
|
||||||
|
return object;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object[] objectToField(Timetable object) {
|
||||||
|
Object[] args = new Object[]{
|
||||||
|
object.getId(),
|
||||||
|
TimeUtil.fromInstant(object.getCreated()),
|
||||||
|
TimeUtil.fromInstant(object.getUpdated()),
|
||||||
|
object.getTask(),
|
||||||
|
TimeUtil.fromInstant(object.getTaskTime()),
|
||||||
|
object.getTaskStatus()
|
||||||
|
};
|
||||||
|
return args;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,64 @@
|
||||||
|
package ru.spcex.clearing.imdg.businessobject;
|
||||||
|
|
||||||
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import ru.clearing.classes.statics.data.scheduler.TradingCalendar;
|
||||||
|
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||||
|
import ru.spcex.clearing.imdg.base.TemplateMapStore;
|
||||||
|
import ru.spcex.clearing.imdg.utils.DbUtilsHelper;
|
||||||
|
import ru.spcex.clearing.imdg.utils.TimeUtil;
|
||||||
|
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class TradingCalendarMapStore extends TemplateMapStore<TradingCalendar> {
|
||||||
|
|
||||||
|
public TradingCalendarMapStore(JdbcTemplate jdbcTemplate) {
|
||||||
|
super(jdbcTemplate);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getMapName() {
|
||||||
|
return IMDGDistributedNames.Map_TradingCalendar;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTableName() {
|
||||||
|
return "TRADING_CALENDAR";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getFields() {
|
||||||
|
return new String[]{
|
||||||
|
"ID", "CREATED_AT", "UPDATED_AT", "CLEARING_DATE", "COMPANY_ID", "TRADING_STATUS"
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TradingCalendar objectReader(ResultSet resultSet) throws SQLException {
|
||||||
|
TradingCalendar object = new TradingCalendar();
|
||||||
|
object.setId(resultSet.getObject("ID", Long.class));
|
||||||
|
object.setCreated(getInstantFromTimestamp(resultSet, "CREATED_AT"));
|
||||||
|
object.setUpdated(getInstantFromTimestamp(resultSet, "UPDATED_AT"));
|
||||||
|
object.setClearingDate(getInstantFromTimestamp(resultSet, "CLEARING_DATE"));
|
||||||
|
object.setCompanyId(resultSet.getObject("COMPANY_ID", Long.class));
|
||||||
|
object.setTradingStatus(resultSet.getObject("TRADING_STATUS", String.class));
|
||||||
|
return object;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object[] objectToField(TradingCalendar object) {
|
||||||
|
Object[] args = new Object[]{
|
||||||
|
object.getId(),
|
||||||
|
TimeUtil.fromInstant(object.getCreated()),
|
||||||
|
TimeUtil.fromInstant(object.getUpdated()),
|
||||||
|
TimeUtil.fromInstant(object.getClearingDate()),
|
||||||
|
object.getCompanyId(),
|
||||||
|
object.getTradingStatus()
|
||||||
|
};
|
||||||
|
return args;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,76 @@
|
||||||
|
package ru.spcex.clearing.imdg.businessobject;
|
||||||
|
|
||||||
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import ru.clearing.classes.statics.data.user.UserConnect;
|
||||||
|
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||||
|
import ru.spcex.clearing.imdg.base.TemplateMapStore;
|
||||||
|
import ru.spcex.clearing.imdg.utils.DbUtilsHelper;
|
||||||
|
import ru.spcex.clearing.imdg.utils.TimeUtil;
|
||||||
|
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class UserConnectMapStore extends TemplateMapStore<UserConnect> {
|
||||||
|
|
||||||
|
public UserConnectMapStore(JdbcTemplate jdbcTemplate) {
|
||||||
|
super(jdbcTemplate);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getMapName() {
|
||||||
|
return IMDGDistributedNames.Map_UserConnect;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTableName() {
|
||||||
|
return "USER_CONNECT";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getFields() {
|
||||||
|
return new String[]{
|
||||||
|
"ID", "CREATED_AT", "UPDATED_AT", "USER_ID", "CONNECTION_TIME", "DISCONNECTION_TIME", "SERVER_I_P", "CLIENT_I_P", "CONNECTION_STATE", "CLEARING_DATE", "ERROR_CODE", "ERROR_TEXT"
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public UserConnect objectReader(ResultSet resultSet) throws SQLException {
|
||||||
|
UserConnect object = new UserConnect();
|
||||||
|
object.setId(resultSet.getObject("ID", Long.class));
|
||||||
|
object.setCreated(getInstantFromTimestamp(resultSet, "CREATED_AT"));
|
||||||
|
object.setUpdated(getInstantFromTimestamp(resultSet, "UPDATED_AT"));
|
||||||
|
object.setUserId(resultSet.getObject("USER_ID", Long.class));
|
||||||
|
object.setConnectionTime(getInstantFromTimestamp(resultSet, "CONNECTION_TIME"));
|
||||||
|
object.setDisconnectionTime(getInstantFromTimestamp(resultSet, "DISCONNECTION_TIME"));
|
||||||
|
object.setServerIP(resultSet.getObject("SERVER_I_P", String.class));
|
||||||
|
object.setClientIP(resultSet.getObject("CLIENT_I_P", String.class));
|
||||||
|
object.setConnectionState(resultSet.getObject("CONNECTION_STATE", String.class));
|
||||||
|
object.setClearingDate(getInstantFromTimestamp(resultSet, "CLEARING_DATE"));
|
||||||
|
object.setErrorCode(resultSet.getObject("ERROR_CODE", String.class));
|
||||||
|
object.setErrorText(resultSet.getObject("ERROR_TEXT", String.class));
|
||||||
|
return object;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object[] objectToField(UserConnect object) {
|
||||||
|
Object[] args = new Object[]{
|
||||||
|
object.getId(),
|
||||||
|
TimeUtil.fromInstant(object.getCreated()),
|
||||||
|
TimeUtil.fromInstant(object.getUpdated()),
|
||||||
|
object.getUserId(),
|
||||||
|
TimeUtil.fromInstant(object.getConnectionTime()),
|
||||||
|
TimeUtil.fromInstant(object.getDisconnectionTime()),
|
||||||
|
object.getServerIP(),
|
||||||
|
object.getClientIP(),
|
||||||
|
object.getConnectionState(),
|
||||||
|
TimeUtil.fromInstant(object.getClearingDate()),
|
||||||
|
object.getErrorCode(),
|
||||||
|
object.getErrorText()
|
||||||
|
};
|
||||||
|
return args;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,62 @@
|
||||||
|
package ru.spcex.clearing.imdg.businessobject;
|
||||||
|
|
||||||
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import ru.clearing.classes.statics.data.user.User;
|
||||||
|
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||||
|
import ru.spcex.clearing.imdg.base.TemplateMapStore;
|
||||||
|
import ru.spcex.clearing.imdg.utils.TimeUtil;
|
||||||
|
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class UserMapStore extends TemplateMapStore<User> {
|
||||||
|
|
||||||
|
public UserMapStore(JdbcTemplate jdbcTemplate) {
|
||||||
|
super(jdbcTemplate);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getMapName() {
|
||||||
|
return IMDGDistributedNames.Map_User;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTableName() {
|
||||||
|
return "USER_CLR";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getFields() {
|
||||||
|
return new String[]{
|
||||||
|
"ID", "CREATED_AT", "UPDATED_AT", "COMPANY_ID", "IDENTIFIER", "NAME"
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public User objectReader(ResultSet resultSet) throws SQLException {
|
||||||
|
User object = new User();
|
||||||
|
object.setId(resultSet.getObject("ID", Long.class));
|
||||||
|
object.setCreated(getInstantFromTimestamp(resultSet, "CREATED_AT"));
|
||||||
|
object.setUpdated(getInstantFromTimestamp(resultSet, "UPDATED_AT"));
|
||||||
|
object.setCompanyId(resultSet.getObject("COMPANY_ID", Long.class));
|
||||||
|
object.setIdentifier(resultSet.getObject("IDENTIFIER", String.class));
|
||||||
|
object.setName(resultSet.getObject("NAME", String.class));
|
||||||
|
return object;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object[] objectToField(User object) {
|
||||||
|
Object[] args = new Object[]{
|
||||||
|
object.getId(),
|
||||||
|
TimeUtil.fromInstant(object.getCreated()),
|
||||||
|
TimeUtil.fromInstant(object.getUpdated()),
|
||||||
|
object.getCompanyId(),
|
||||||
|
object.getIdentifier(),
|
||||||
|
object.getName()
|
||||||
|
};
|
||||||
|
return args;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
package ru.spcex.clearing.imdg.dictionary;
|
||||||
|
|
||||||
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import ru.clearing.platform.dictionary.ConnectionStateDictionary;
|
||||||
|
import ru.spcex.clearing.imdg.base.DictionaryTMapStore;
|
||||||
|
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class ConnectionStateDictionaryMapStore extends DictionaryTMapStore<ConnectionStateDictionary> {
|
||||||
|
|
||||||
|
public ConnectionStateDictionaryMapStore(JdbcTemplate jdbcTemplate) {
|
||||||
|
super(jdbcTemplate);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getMapName() {
|
||||||
|
return IMDGDistributedNames.Map_ConnectionStateDictionary;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTableName() {
|
||||||
|
return "CONNECTION_STATE_DICTIONARY";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ConnectionStateDictionary getDictionaryObject() {
|
||||||
|
return new ConnectionStateDictionary();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
package ru.spcex.clearing.imdg.dictionary;
|
||||||
|
|
||||||
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import ru.clearing.platform.dictionary.SourceDictionary;
|
||||||
|
import ru.spcex.clearing.imdg.base.DictionaryTMapStore;
|
||||||
|
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class SourceDictionaryMapStore extends DictionaryTMapStore<SourceDictionary> {
|
||||||
|
|
||||||
|
public SourceDictionaryMapStore(JdbcTemplate jdbcTemplate) {
|
||||||
|
super(jdbcTemplate);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getMapName() {
|
||||||
|
return IMDGDistributedNames.Map_SourceDictionary;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTableName() {
|
||||||
|
return "SOURCE_DICTIONARY";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SourceDictionary getDictionaryObject() {
|
||||||
|
return new SourceDictionary();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
package ru.spcex.clearing.imdg.dictionary;
|
||||||
|
|
||||||
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import ru.clearing.platform.dictionary.TaskDictionary;
|
||||||
|
import ru.spcex.clearing.imdg.base.DictionaryTMapStore;
|
||||||
|
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class TaskDictionaryMapStore extends DictionaryTMapStore<TaskDictionary> {
|
||||||
|
|
||||||
|
public TaskDictionaryMapStore(JdbcTemplate jdbcTemplate) {
|
||||||
|
super(jdbcTemplate);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getMapName() {
|
||||||
|
return IMDGDistributedNames.Map_TaskDictionary;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTableName() {
|
||||||
|
return "TASK_DICTIONARY";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TaskDictionary getDictionaryObject() {
|
||||||
|
return new TaskDictionary();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
package ru.spcex.clearing.imdg.dictionary;
|
||||||
|
|
||||||
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import ru.clearing.platform.dictionary.TaskStatusDictionary;
|
||||||
|
import ru.spcex.clearing.imdg.base.DictionaryTMapStore;
|
||||||
|
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class TaskStatusDictionaryMapStore extends DictionaryTMapStore<TaskStatusDictionary> {
|
||||||
|
|
||||||
|
public TaskStatusDictionaryMapStore(JdbcTemplate jdbcTemplate) {
|
||||||
|
super(jdbcTemplate);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getMapName() {
|
||||||
|
return IMDGDistributedNames.Map_TaskStatusDictionary;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTableName() {
|
||||||
|
return "TASK_STATUS_DICTIONARY";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TaskStatusDictionary getDictionaryObject() {
|
||||||
|
return new TaskStatusDictionary();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
package ru.spcex.clearing.imdg.dictionary;
|
||||||
|
|
||||||
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import ru.clearing.platform.dictionary.TradingStatusDictionary;
|
||||||
|
import ru.spcex.clearing.imdg.base.DictionaryTMapStore;
|
||||||
|
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class TradingStatusDictionaryMapStore extends DictionaryTMapStore<TradingStatusDictionary> {
|
||||||
|
|
||||||
|
public TradingStatusDictionaryMapStore(JdbcTemplate jdbcTemplate) {
|
||||||
|
super(jdbcTemplate);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getMapName() {
|
||||||
|
return IMDGDistributedNames.Map_TradingStatusDictionary;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTableName() {
|
||||||
|
return "TRADING_STATUS_DICTIONARY";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TradingStatusDictionary getDictionaryObject() {
|
||||||
|
return new TradingStatusDictionary();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
package ru.spcex.clearing.imdg.dictionary;
|
||||||
|
|
||||||
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import ru.clearing.platform.dictionary.UserRoleDictionary;
|
||||||
|
import ru.spcex.clearing.imdg.base.DictionaryTMapStore;
|
||||||
|
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class UserRoleDictionaryMapStore extends DictionaryTMapStore<UserRoleDictionary> {
|
||||||
|
|
||||||
|
public UserRoleDictionaryMapStore(JdbcTemplate jdbcTemplate) {
|
||||||
|
super(jdbcTemplate);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getMapName() {
|
||||||
|
return IMDGDistributedNames.Map_UserRoleDictionary;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTableName() {
|
||||||
|
return "USER_ROLE_DICTIONARY";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public UserRoleDictionary getDictionaryObject() {
|
||||||
|
return new UserRoleDictionary();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,61 +0,0 @@
|
||||||
package ru.spcex.clearing.imdg.object;
|
|
||||||
|
|
||||||
import org.springframework.jdbc.core.JdbcTemplate;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
import ru.clearing.classes.statics.data.user.ClearingUser;
|
|
||||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
|
||||||
import ru.spcex.clearing.imdg.base.AutoconfiguredMap;
|
|
||||||
import ru.spcex.clearing.imdg.base.SimpleObjectMapStore;
|
|
||||||
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
//todo rewrite
|
|
||||||
@Component
|
|
||||||
public class ClearingUserMapStore extends SimpleObjectMapStore<ClearingUser> implements AutoconfiguredMap<ClearingUser> {
|
|
||||||
|
|
||||||
public ClearingUserMapStore(JdbcTemplate jdbcTemplate) {
|
|
||||||
super(jdbcTemplate);
|
|
||||||
//super(jdbcTemplate);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getTableName() {
|
|
||||||
|
|
||||||
return "COMPANY";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String[] getFields() {
|
|
||||||
return new String[0];
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void store(Map<Long, ClearingUser> map) {}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getMapName() {
|
|
||||||
return IMDGDistributedNames.Map_ClearingUser;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String[] getIndexingField() {
|
|
||||||
return new String[] {"username"};
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ClearingUser load(Long key) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Map<Long, ClearingUser> loadAll(Collection<Long> keys) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Iterable<Long> loadAllKeys() {
|
|
||||||
return Collections.emptyList();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -0,0 +1,81 @@
|
||||||
|
package ru.spcex.clearing.imdg.object;
|
||||||
|
|
||||||
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import ru.clearing.classes.statics.data.journal.InDocumentJournal;
|
||||||
|
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||||
|
import ru.spcex.clearing.imdg.base.TemplateMapStore;
|
||||||
|
import ru.spcex.clearing.imdg.utils.DbUtilsHelper;
|
||||||
|
import ru.spcex.clearing.imdg.utils.TimeUtil;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class InDocumentJournalMapStore extends TemplateMapStore<InDocumentJournal> {
|
||||||
|
|
||||||
|
public InDocumentJournalMapStore(JdbcTemplate jdbcTemplate) {
|
||||||
|
super(jdbcTemplate);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getMapName() {
|
||||||
|
return IMDGDistributedNames.Map_InDocumentJournal;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTableName() {
|
||||||
|
return "IN_DOCUMENT_JOURNAL";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getFields() {
|
||||||
|
return new String[]{
|
||||||
|
"ID", "REGISTRATION_DATE", "REGISTRATION_TIME", "REGISTRATION_NUMBER", "DOCUMENT_NAME", "SENDER_ID", "QUANTITY", "CLEARING_CODE", "COURIER_TYPE", "EMAIL_DATE", "AMOUNT", "DOSSIER_NUMBER", "COMMENT", "RECEIPT_DATE"
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public InDocumentJournal objectReader(ResultSet resultSet) throws SQLException {
|
||||||
|
InDocumentJournal object = new InDocumentJournal();
|
||||||
|
object.setId(resultSet.getObject("ID", Long.class));
|
||||||
|
object.setRegistrationDate(getInstantFromTimestamp(resultSet, "REGISTRATION_DATE"));
|
||||||
|
object.setRegistrationTime(getInstantFromTimestamp(resultSet, "REGISTRATION_TIME"));
|
||||||
|
object.setRegistrationNumber(resultSet.getObject("REGISTRATION_NUMBER", Long.class));
|
||||||
|
object.setDocumentName(resultSet.getObject("DOCUMENT_NAME", String.class));
|
||||||
|
object.setSenderId(resultSet.getObject("SENDER_ID", Long.class));
|
||||||
|
object.setQuantity(resultSet.getObject("QUANTITY", Long.class));
|
||||||
|
object.setClearingCode(resultSet.getObject("CLEARING_CODE", String.class));
|
||||||
|
object.setCourierType(resultSet.getObject("COURIER_TYPE", String.class));
|
||||||
|
object.setEmailDate(getInstantFromTimestamp(resultSet, "EMAIL_DATE"));
|
||||||
|
object.setAmount(resultSet.getObject("AMOUNT", BigDecimal.class));
|
||||||
|
object.setDossierNumber(resultSet.getObject("DOSSIER_NUMBER", Long.class));
|
||||||
|
object.setComment(resultSet.getObject("COMMENT", String.class));
|
||||||
|
object.setReceiptDate(getInstantFromTimestamp(resultSet, "RECEIPT_DATE"));
|
||||||
|
return object;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object[] objectToField(InDocumentJournal object) {
|
||||||
|
Object[] args = new Object[]{
|
||||||
|
object.getId(),
|
||||||
|
TimeUtil.fromInstant(object.getRegistrationDate()),
|
||||||
|
TimeUtil.fromInstant(object.getRegistrationTime()),
|
||||||
|
object.getRegistrationNumber(),
|
||||||
|
object.getDocumentName(),
|
||||||
|
object.getSenderId(),
|
||||||
|
object.getQuantity(),
|
||||||
|
object.getClearingCode(),
|
||||||
|
object.getCourierType(),
|
||||||
|
TimeUtil.fromInstant(object.getEmailDate()),
|
||||||
|
object.getAmount(),
|
||||||
|
object.getDossierNumber(),
|
||||||
|
object.getComment(),
|
||||||
|
TimeUtil.fromInstant(object.getReceiptDate())
|
||||||
|
};
|
||||||
|
return args;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,62 @@
|
||||||
|
package ru.spcex.clearing.imdg.object;
|
||||||
|
|
||||||
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import ru.clearing.classes.statics.data.user.MarketAccess;
|
||||||
|
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||||
|
import ru.spcex.clearing.imdg.base.TemplateMapStore;
|
||||||
|
import ru.spcex.clearing.imdg.utils.DbUtilsHelper;
|
||||||
|
import ru.spcex.clearing.imdg.utils.TimeUtil;
|
||||||
|
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class MarketAccessMapStore extends TemplateMapStore<MarketAccess> {
|
||||||
|
|
||||||
|
public MarketAccessMapStore(JdbcTemplate jdbcTemplate) {
|
||||||
|
super(jdbcTemplate);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getMapName() {
|
||||||
|
return IMDGDistributedNames.Map_MarketAccess;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTableName() {
|
||||||
|
return "MARKET_ACCESS";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getFields() {
|
||||||
|
return new String[]{
|
||||||
|
"ID", "USER_ID", "MARKET", "STATUS", "COMPANY_ID"
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MarketAccess objectReader(ResultSet resultSet) throws SQLException {
|
||||||
|
MarketAccess object = new MarketAccess();
|
||||||
|
object.setId(resultSet.getObject("ID", Long.class));
|
||||||
|
object.setUserId(resultSet.getObject("USER_ID", Long.class));
|
||||||
|
object.setMarket(resultSet.getObject("MARKET", Long.class));
|
||||||
|
object.setStatus(resultSet.getObject("STATUS", String.class));
|
||||||
|
object.setCompanyId(resultSet.getObject("COMPANY_ID", Long.class));
|
||||||
|
return object;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object[] objectToField(MarketAccess object) {
|
||||||
|
Object[] args = new Object[]{
|
||||||
|
object.getId(),
|
||||||
|
object.getUserId(),
|
||||||
|
object.getMarket(),
|
||||||
|
object.getStatus(),
|
||||||
|
object.getCompanyId()
|
||||||
|
};
|
||||||
|
return args;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,79 @@
|
||||||
|
package ru.spcex.clearing.imdg.object;
|
||||||
|
|
||||||
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import ru.clearing.classes.statics.data.journal.OutDocumentJournal;
|
||||||
|
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||||
|
import ru.spcex.clearing.imdg.base.TemplateMapStore;
|
||||||
|
import ru.spcex.clearing.imdg.utils.DbUtilsHelper;
|
||||||
|
import ru.spcex.clearing.imdg.utils.TimeUtil;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class OutDocumentJournalMapStore extends TemplateMapStore<OutDocumentJournal> {
|
||||||
|
|
||||||
|
public OutDocumentJournalMapStore(JdbcTemplate jdbcTemplate) {
|
||||||
|
super(jdbcTemplate);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getMapName() {
|
||||||
|
return IMDGDistributedNames.Map_OutDocumentJournal;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTableName() {
|
||||||
|
return "OUT_DOCUMENT_JOURNAL";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getFields() {
|
||||||
|
return new String[]{
|
||||||
|
"ID", "REGISTRATION_DATE", "REGISTRATION_TIME", "REGISTRATION_NUMBER", "DOCUMENT_NAME", "ADDRESSEE_ID", "QUANTITY", "CLEARING_CODE", "COURIER_TYPE", "EMAIL_DATE", "AMOUNT", "DOSSIER_NUMBER", "POST_DATE"
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public OutDocumentJournal objectReader(ResultSet resultSet) throws SQLException {
|
||||||
|
OutDocumentJournal object = new OutDocumentJournal();
|
||||||
|
object.setId(resultSet.getObject("ID", Long.class));
|
||||||
|
object.setRegistrationDate(getInstantFromTimestamp(resultSet, "REGISTRATION_DATE"));
|
||||||
|
object.setRegistrationTime(getInstantFromTimestamp(resultSet, "REGISTRATION_TIME"));
|
||||||
|
object.setRegistrationNumber(resultSet.getObject("REGISTRATION_NUMBER", Long.class));
|
||||||
|
object.setDocumentName(resultSet.getObject("DOCUMENT_NAME", String.class));
|
||||||
|
object.setAddresseeId(resultSet.getObject("ADDRESSEE_ID", Long.class));
|
||||||
|
object.setQuantity(resultSet.getObject("QUANTITY", Long.class));
|
||||||
|
object.setClearingCode(resultSet.getObject("CLEARING_CODE", String.class));
|
||||||
|
object.setCourierType(resultSet.getObject("COURIER_TYPE", String.class));
|
||||||
|
object.setEmailDate(getInstantFromTimestamp(resultSet, "EMAIL_DATE"));
|
||||||
|
object.setAmount(resultSet.getObject("AMOUNT", BigDecimal.class));
|
||||||
|
object.setDossierNumber(resultSet.getObject("DOSSIER_NUMBER", Long.class));
|
||||||
|
object.setPostDate(getInstantFromTimestamp(resultSet, "POST_DATE"));
|
||||||
|
return object;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object[] objectToField(OutDocumentJournal object) {
|
||||||
|
Object[] args = new Object[]{
|
||||||
|
object.getId(),
|
||||||
|
TimeUtil.fromInstant(object.getRegistrationDate()),
|
||||||
|
TimeUtil.fromInstant(object.getRegistrationTime()),
|
||||||
|
object.getRegistrationNumber(),
|
||||||
|
object.getDocumentName(),
|
||||||
|
object.getAddresseeId(),
|
||||||
|
object.getQuantity(),
|
||||||
|
object.getClearingCode(),
|
||||||
|
object.getCourierType(),
|
||||||
|
TimeUtil.fromInstant(object.getEmailDate()),
|
||||||
|
object.getAmount(),
|
||||||
|
object.getDossierNumber(),
|
||||||
|
TimeUtil.fromInstant(object.getPostDate())
|
||||||
|
};
|
||||||
|
return args;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -32,7 +32,7 @@ public class SDf02MapStore extends TemplateMapStore<SDf02> {
|
||||||
@Override
|
@Override
|
||||||
public String[] getFields() {
|
public String[] getFields() {
|
||||||
return new String[]{
|
return new String[]{
|
||||||
"ID", "CURR_CODE", "ACCOUNT", "REMAINDER", "DEAL", "ACC_CODE", "DAT", "MARKET", "ACC_NAME", "ACC_TYPE", "SUMENGAGE", "SUMUNBLOCK", "FILE_TYPE", "RESULT", "FILE_NAME", "GENERATION_TIME", "GENERATION_ID"
|
"ID", "CURR_CODE", "ACCOUNT", "REMAINDER", "DEAL", "ACC_CODE", "DAT", "MARKET", "ACC_NAME", "ACC_TYPE", "SUMENGAGE", "SUMUNBLOCK", "FILE_TYPE", "RESULT", "GENERATION_TIME", "GENERATION_ID", "IN_S_DF01_ID"
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -53,9 +53,9 @@ public class SDf02MapStore extends TemplateMapStore<SDf02> {
|
||||||
object.setSumunblock(resultSet.getObject("SUMUNBLOCK", String.class));
|
object.setSumunblock(resultSet.getObject("SUMUNBLOCK", String.class));
|
||||||
object.setFile_type(resultSet.getObject("FILE_TYPE", String.class));
|
object.setFile_type(resultSet.getObject("FILE_TYPE", String.class));
|
||||||
object.setResult(resultSet.getObject("RESULT", String.class));
|
object.setResult(resultSet.getObject("RESULT", String.class));
|
||||||
object.setFileName(resultSet.getObject("FILE_NAME", String.class));
|
|
||||||
object.setGenerationTime(getInstantFromTimestamp(resultSet, "GENERATION_TIME"));
|
object.setGenerationTime(getInstantFromTimestamp(resultSet, "GENERATION_TIME"));
|
||||||
object.setGenerationId(resultSet.getObject("GENERATION_ID", Long.class));
|
object.setGenerationId(resultSet.getObject("GENERATION_ID", Long.class));
|
||||||
|
object.setInSDf01Id(resultSet.getObject("IN_S_DF01_ID", Long.class));
|
||||||
return object;
|
return object;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -76,9 +76,9 @@ public class SDf02MapStore extends TemplateMapStore<SDf02> {
|
||||||
object.getSumunblock(),
|
object.getSumunblock(),
|
||||||
object.getFile_type(),
|
object.getFile_type(),
|
||||||
object.getResult(),
|
object.getResult(),
|
||||||
object.getFileName(),
|
|
||||||
TimeUtil.fromInstant(object.getGenerationTime()),
|
TimeUtil.fromInstant(object.getGenerationTime()),
|
||||||
object.getGenerationId()
|
object.getGenerationId(),
|
||||||
|
object.getInSDf01Id()
|
||||||
};
|
};
|
||||||
return args;
|
return args;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ public class SDf08MapStore extends TemplateMapStore<SDf08> {
|
||||||
@Override
|
@Override
|
||||||
public String[] getFields() {
|
public String[] getFields() {
|
||||||
return new String[]{
|
return new String[]{
|
||||||
"ID", "NUMBER", "DATETIME", "FILE_NAME", "GENERATION_TIME", "GENERATION_ID"
|
"ID", "NUMBER", "DATETIME", "GENERATION_TIME", "GENERATION_ID"
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -42,8 +42,7 @@ public class SDf08MapStore extends TemplateMapStore<SDf08> {
|
||||||
SDf08 object = new SDf08();
|
SDf08 object = new SDf08();
|
||||||
object.setId(resultSet.getObject("ID", Long.class));
|
object.setId(resultSet.getObject("ID", Long.class));
|
||||||
object.setNumber(resultSet.getObject("NUMBER", BigDecimal.class));
|
object.setNumber(resultSet.getObject("NUMBER", BigDecimal.class));
|
||||||
object.setDatetime(getInstantFromTimestamp(resultSet,"DATETIME"));
|
object.setDatetime(getInstantFromTimestamp(resultSet, "DATETIME"));
|
||||||
object.setFileName(resultSet.getObject("FILE_NAME", String.class));
|
|
||||||
object.setGenerationTime(getInstantFromTimestamp(resultSet, "GENERATION_TIME"));
|
object.setGenerationTime(getInstantFromTimestamp(resultSet, "GENERATION_TIME"));
|
||||||
object.setGenerationId(resultSet.getObject("GENERATION_ID", Long.class));
|
object.setGenerationId(resultSet.getObject("GENERATION_ID", Long.class));
|
||||||
return object;
|
return object;
|
||||||
|
|
@ -55,7 +54,6 @@ public class SDf08MapStore extends TemplateMapStore<SDf08> {
|
||||||
object.getId(),
|
object.getId(),
|
||||||
object.getNumber(),
|
object.getNumber(),
|
||||||
TimeUtil.fromInstant(object.getDatetime()),
|
TimeUtil.fromInstant(object.getDatetime()),
|
||||||
object.getFileName(),
|
|
||||||
TimeUtil.fromInstant(object.getGenerationTime()),
|
TimeUtil.fromInstant(object.getGenerationTime()),
|
||||||
object.getGenerationId()
|
object.getGenerationId()
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,68 @@
|
||||||
|
package ru.spcex.clearing.imdg.object;
|
||||||
|
|
||||||
|
|
||||||
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import ru.clearing.classes.statics.data.sdf.SDf12;
|
||||||
|
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||||
|
import ru.spcex.clearing.imdg.base.TemplateMapStore;
|
||||||
|
import ru.spcex.clearing.imdg.utils.DbUtilsHelper;
|
||||||
|
import ru.spcex.clearing.imdg.utils.TimeUtil;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class SDf12MapStore extends TemplateMapStore<SDf12> {
|
||||||
|
|
||||||
|
public SDf12MapStore(JdbcTemplate jdbcTemplate) {
|
||||||
|
super(jdbcTemplate);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getMapName() {
|
||||||
|
return IMDGDistributedNames.Map_SDf12;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTableName() {
|
||||||
|
return "S_DF12";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getFields() {
|
||||||
|
return new String[]{
|
||||||
|
"ID", "ACCOUNT", "DEAL", "STATUS", "FILE_NAME", "GENERATION_TIME", "GENERATION_ID"
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SDf12 objectReader(ResultSet resultSet) throws SQLException {
|
||||||
|
SDf12 object = new SDf12();
|
||||||
|
object.setId(resultSet.getObject("ID", Long.class));
|
||||||
|
object.setAccount(resultSet.getObject("ACCOUNT", String.class));
|
||||||
|
object.setDeal(resultSet.getObject("DEAL", String.class));
|
||||||
|
object.setStatus(resultSet.getObject("STATUS", BigDecimal.class));
|
||||||
|
object.setFileName(resultSet.getObject("FILE_NAME", String.class));
|
||||||
|
object.setGenerationTime(getInstantFromTimestamp(resultSet, "GENERATION_TIME"));
|
||||||
|
object.setGenerationId(resultSet.getObject("GENERATION_ID", Long.class));
|
||||||
|
return object;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object[] objectToField(SDf12 object) {
|
||||||
|
Object[] args = new Object[]{
|
||||||
|
object.getId(),
|
||||||
|
object.getAccount(),
|
||||||
|
object.getDeal(),
|
||||||
|
object.getStatus(),
|
||||||
|
object.getFileName(),
|
||||||
|
TimeUtil.fromInstant(object.getGenerationTime()),
|
||||||
|
object.getGenerationId()
|
||||||
|
};
|
||||||
|
return args;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,69 @@
|
||||||
|
package ru.spcex.clearing.imdg.object;
|
||||||
|
|
||||||
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||||
|
import ru.clearing.classes.statics.data.sdf.SDf18;
|
||||||
|
import ru.spcex.clearing.imdg.base.TemplateMapStore;
|
||||||
|
import ru.spcex.clearing.imdg.utils.DbUtilsHelper;
|
||||||
|
import ru.spcex.clearing.imdg.utils.TimeUtil;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class SDf18MapStore extends TemplateMapStore<SDf18> {
|
||||||
|
|
||||||
|
public SDf18MapStore(JdbcTemplate jdbcTemplate) {
|
||||||
|
super(jdbcTemplate);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getMapName() {
|
||||||
|
return IMDGDistributedNames.Map_SDf18;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTableName() {
|
||||||
|
return "S_DF18";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getFields() {
|
||||||
|
return new String[]{
|
||||||
|
"ID", "ACCOUNT", "DEAL", "STATUS", "RESULT", "GENERATION_TIME", "GENERATION_ID", "IN_S_DF12_ID"
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SDf18 objectReader(ResultSet resultSet) throws SQLException {
|
||||||
|
SDf18 object = new SDf18();
|
||||||
|
object.setId(resultSet.getObject("ID", Long.class));
|
||||||
|
object.setAccount(resultSet.getObject("ACCOUNT", String.class));
|
||||||
|
object.setDeal(resultSet.getObject("DEAL", String.class));
|
||||||
|
object.setStatus(resultSet.getObject("STATUS", BigDecimal.class));
|
||||||
|
object.setResult(resultSet.getObject("RESULT", BigDecimal.class));
|
||||||
|
object.setGenerationTime(getInstantFromTimestamp(resultSet, "GENERATION_TIME"));
|
||||||
|
object.setGenerationId(resultSet.getObject("GENERATION_ID", Long.class));
|
||||||
|
object.setInSDf12Id(resultSet.getObject("IN_S_DF12_ID", Long.class));
|
||||||
|
return object;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object[] objectToField(SDf18 object) {
|
||||||
|
Object[] args = new Object[]{
|
||||||
|
object.getId(),
|
||||||
|
object.getAccount(),
|
||||||
|
object.getDeal(),
|
||||||
|
object.getStatus(),
|
||||||
|
object.getResult(),
|
||||||
|
TimeUtil.fromInstant(object.getGenerationTime()),
|
||||||
|
object.getGenerationId(),
|
||||||
|
object.getInSDf12Id()
|
||||||
|
};
|
||||||
|
return args;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,70 @@
|
||||||
|
package ru.spcex.clearing.imdg.object;
|
||||||
|
|
||||||
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import ru.clearing.classes.statics.data.scheduler.SchedulerAllToday;
|
||||||
|
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||||
|
import ru.spcex.clearing.imdg.base.TemplateMapStore;
|
||||||
|
import ru.spcex.clearing.imdg.utils.DbUtilsHelper;
|
||||||
|
import ru.spcex.clearing.imdg.utils.TimeUtil;
|
||||||
|
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class SchedulerAllTodayMapStore extends TemplateMapStore<SchedulerAllToday> {
|
||||||
|
|
||||||
|
public SchedulerAllTodayMapStore(JdbcTemplate jdbcTemplate) {
|
||||||
|
super(jdbcTemplate);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getMapName() {
|
||||||
|
return IMDGDistributedNames.Map_SchedulerAllToday;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTableName() {
|
||||||
|
return "SCHEDULER_ALL_TODAY";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getFields() {
|
||||||
|
return new String[]{
|
||||||
|
"ID", "TASK", "TASK_TIME", "CLEARING_DATE", "MARKET", "TASK_STATUS", "SECURITY_ID", "SOURCE", "ORIG_ID"
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SchedulerAllToday objectReader(ResultSet resultSet) throws SQLException {
|
||||||
|
SchedulerAllToday object = new SchedulerAllToday();
|
||||||
|
object.setId(resultSet.getObject("ID", Long.class));
|
||||||
|
object.setTask(resultSet.getObject("TASK", String.class));
|
||||||
|
object.setTaskTime(getInstantFromTimestamp(resultSet, "TASK_TIME"));
|
||||||
|
object.setClearingDate(getInstantFromTimestamp(resultSet, "CLEARING_DATE"));
|
||||||
|
object.setMarket(resultSet.getObject("MARKET", String.class));
|
||||||
|
object.setTaskStatus(resultSet.getObject("TASK_STATUS", String.class));
|
||||||
|
object.setSecurityId(resultSet.getObject("SECURITY_ID", Long.class));
|
||||||
|
object.setSource(resultSet.getObject("SOURCE", String.class));
|
||||||
|
object.setOrigId(resultSet.getObject("ORIG_ID", Long.class));
|
||||||
|
return object;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object[] objectToField(SchedulerAllToday object) {
|
||||||
|
Object[] args = new Object[]{
|
||||||
|
object.getId(),
|
||||||
|
object.getTask(),
|
||||||
|
TimeUtil.fromInstant(object.getTaskTime()),
|
||||||
|
TimeUtil.fromInstant(object.getClearingDate()),
|
||||||
|
object.getMarket(),
|
||||||
|
object.getTaskStatus(),
|
||||||
|
object.getSecurityId(),
|
||||||
|
object.getSource(),
|
||||||
|
object.getOrigId()
|
||||||
|
};
|
||||||
|
return args;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,60 @@
|
||||||
|
package ru.spcex.clearing.imdg.object;
|
||||||
|
|
||||||
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import ru.clearing.classes.statics.data.user.UserRoleSession;
|
||||||
|
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||||
|
import ru.spcex.clearing.imdg.base.TemplateMapStore;
|
||||||
|
import ru.spcex.clearing.imdg.utils.DbUtilsHelper;
|
||||||
|
import ru.spcex.clearing.imdg.utils.TimeUtil;
|
||||||
|
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class UserRoleSessionMapStore extends TemplateMapStore<UserRoleSession> {
|
||||||
|
|
||||||
|
public UserRoleSessionMapStore(JdbcTemplate jdbcTemplate) {
|
||||||
|
super(jdbcTemplate);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getMapName() {
|
||||||
|
return IMDGDistributedNames.Map_UserRoleSession;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTableName() {
|
||||||
|
return "USER_ROLE_SESSION";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getFields() {
|
||||||
|
return new String[]{
|
||||||
|
"ID", "USER_ID", "USER_ROLE", "COMPANY_ID"
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public UserRoleSession objectReader(ResultSet resultSet) throws SQLException {
|
||||||
|
UserRoleSession object = new UserRoleSession();
|
||||||
|
object.setId(resultSet.getObject("ID", Long.class));
|
||||||
|
object.setUserId(resultSet.getObject("USER_ID", Long.class));
|
||||||
|
object.setUserRole(resultSet.getObject("USER_ROLE", String.class));
|
||||||
|
object.setCompanyId(resultSet.getObject("COMPANY_ID", Long.class));
|
||||||
|
return object;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object[] objectToField(UserRoleSession object) {
|
||||||
|
Object[] args = new Object[]{
|
||||||
|
object.getId(),
|
||||||
|
object.getUserId(),
|
||||||
|
object.getUserRole(),
|
||||||
|
object.getCompanyId()
|
||||||
|
};
|
||||||
|
return args;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,60 @@
|
||||||
|
package ru.spcex.clearing.imdg.object;
|
||||||
|
|
||||||
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import ru.clearing.classes.statics.data.user.UserSettings;
|
||||||
|
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||||
|
import ru.spcex.clearing.imdg.base.TemplateMapStore;
|
||||||
|
import ru.spcex.clearing.imdg.utils.DbUtilsHelper;
|
||||||
|
import ru.spcex.clearing.imdg.utils.TimeUtil;
|
||||||
|
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class UserSettingsMapStore extends TemplateMapStore<UserSettings> {
|
||||||
|
|
||||||
|
public UserSettingsMapStore(JdbcTemplate jdbcTemplate) {
|
||||||
|
super(jdbcTemplate);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getMapName() {
|
||||||
|
return IMDGDistributedNames.Map_UserSettings;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTableName() {
|
||||||
|
return "USER_SETTINGS";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getFields() {
|
||||||
|
return new String[]{
|
||||||
|
"ID", "USER_ID", "VERSION", "JSON"
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public UserSettings objectReader(ResultSet resultSet) throws SQLException {
|
||||||
|
UserSettings object = new UserSettings();
|
||||||
|
object.setId(resultSet.getObject("ID", Long.class));
|
||||||
|
object.setUserId(resultSet.getObject("USER_ID", Long.class));
|
||||||
|
object.setVersion(resultSet.getObject("VERSION", String.class));
|
||||||
|
object.setJson(resultSet.getObject("JSON", String.class));
|
||||||
|
return object;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object[] objectToField(UserSettings object) {
|
||||||
|
Object[] args = new Object[]{
|
||||||
|
object.getId(),
|
||||||
|
object.getUserId(),
|
||||||
|
object.getVersion(),
|
||||||
|
object.getJson()
|
||||||
|
};
|
||||||
|
return args;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -31,6 +31,18 @@ public final class IMDGDistributedNames {
|
||||||
public static final String Map_RelationHistory = "Map_RelationHistory";
|
public static final String Map_RelationHistory = "Map_RelationHistory";
|
||||||
public static final String Map_ErrorText = "Map_ErrorText";
|
public static final String Map_ErrorText = "Map_ErrorText";
|
||||||
public static final String Map_Statement = "Map_Statement";
|
public static final String Map_Statement = "Map_Statement";
|
||||||
|
public static final String Map_MarketAccess = "Map_MarketAccess";
|
||||||
|
public static final String Map_UserConnect = "Map_UserConnect";
|
||||||
|
public static final String Map_UserConnectHistory = "Map_UserConnectHistory";
|
||||||
|
public static final String Map_User = "Map_User";
|
||||||
|
public static final String Map_UserHistory = "Map_UserHistory";
|
||||||
|
public static final String Map_TaskRunner = "Map_TaskRunner";
|
||||||
|
public static final String Map_SchedulerAllToday = "Map_SchedulerAllToday";
|
||||||
|
public static final String Map_Scheduler = "Map_Scheduler";
|
||||||
|
public static final String Map_TradingCalendar = "Map_TradingCalendar";
|
||||||
|
public static final String Map_Timetable = "Map_Timetable";
|
||||||
|
public static final String Map_InDocumentJournal = "Map_InDocumentJournal";
|
||||||
|
public static final String Map_OutDocumentJournal = "Map_OutDocumentJournal";
|
||||||
public static final String Map_SDf16 = "Map_SDf16";
|
public static final String Map_SDf16 = "Map_SDf16";
|
||||||
public static final String Map_RequestDf18 = "Map_RequestDf18";
|
public static final String Map_RequestDf18 = "Map_RequestDf18";
|
||||||
public static final String Map_RequestDf03 = "Map_RequestDf03";
|
public static final String Map_RequestDf03 = "Map_RequestDf03";
|
||||||
|
|
@ -38,7 +50,8 @@ public final class IMDGDistributedNames {
|
||||||
public static final String Map_SDf08 = "Map_SDf08";
|
public static final String Map_SDf08 = "Map_SDf08";
|
||||||
public static final String Map_SDf02 = "Map_SDf02";
|
public static final String Map_SDf02 = "Map_SDf02";
|
||||||
public static final String Map_SDf01 = "Map_SDf01";
|
public static final String Map_SDf01 = "Map_SDf01";
|
||||||
public static final String Map_ClearingUser = "Map_ClearingUser";
|
public static final String Map_SDf12 = "Map_SDf12";
|
||||||
|
public static final String Map_SDf18 = "Map_SDf18";
|
||||||
|
|
||||||
// public static final String Map_InterestStatusDictionary = "Map_InterestStatusDictionary"; future
|
// public static final String Map_InterestStatusDictionary = "Map_InterestStatusDictionary"; future
|
||||||
public static final String Map_AllowedDictionary = "Map_AllowedDictionary";
|
public static final String Map_AllowedDictionary = "Map_AllowedDictionary";
|
||||||
|
|
@ -75,6 +88,14 @@ public final class IMDGDistributedNames {
|
||||||
public static final String Map_TermTypeDictionary = "Map_TermTypeDictionary";
|
public static final String Map_TermTypeDictionary = "Map_TermTypeDictionary";
|
||||||
public static final String Map_CourierTypeDictionary = "Map_CourierTypeDictionary";
|
public static final String Map_CourierTypeDictionary = "Map_CourierTypeDictionary";
|
||||||
public static final String Map_ChargeDirectionDictionary = "Map_ChargeDirectionDictionary";
|
public static final String Map_ChargeDirectionDictionary = "Map_ChargeDirectionDictionary";
|
||||||
|
public static final String Map_TaskDictionary = "Map_TaskDictionary";
|
||||||
|
public static final String Map_TaskStatusDictionary = "Map_TaskStatusDictionary";
|
||||||
|
public static final String Map_TradingStatusDictionary = "Map_TradingStatusDictionary";
|
||||||
|
public static final String Map_SourceDictionary = "Map_SourceDictionary";
|
||||||
|
public static final String Map_ConnectionStateDictionary = "Map_ConnectionStateDictionary";
|
||||||
|
public static final String Map_UserRoleDictionary = "Map_UserRoleDictionary";
|
||||||
|
public static final String Map_UserSettings = "Map_UserSettings";
|
||||||
|
public static final String Map_UserRoleSession = "Map_UserRoleSession";
|
||||||
|
|
||||||
public static final String Map_KeyRate = "Map_KeyRate";
|
public static final String Map_KeyRate = "Map_KeyRate";
|
||||||
public static final String Map_MoneyMarketSecurity = "Map_MoneyMarketSecurity";
|
public static final String Map_MoneyMarketSecurity = "Map_MoneyMarketSecurity";
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue