This commit is contained in:
parent
bbc10ca13b
commit
9b0acaeb7a
14 changed files with 135 additions and 66 deletions
|
|
@ -30,6 +30,12 @@ public class PlannerTemplateNewAction implements IAction<PlannerTemplateNewReque
|
|||
@ApiModelProperty(value = "Статус", example = "ACTV")
|
||||
@JsonProperty
|
||||
public String taskStatus;
|
||||
@ApiModelProperty(value = "Компания", example = "123")
|
||||
@JsonProperty
|
||||
public Long companyId;
|
||||
@ApiModelProperty(value = "Инструмент", example = "123")
|
||||
@JsonProperty
|
||||
public Long securityId;
|
||||
|
||||
@Override
|
||||
public PlannerTemplateNewRequest toRequest() {
|
||||
|
|
@ -37,6 +43,8 @@ public class PlannerTemplateNewAction implements IAction<PlannerTemplateNewReque
|
|||
plannerTemplateNewRequest.setTask(task);
|
||||
plannerTemplateNewRequest.setTaskTime(taskTime);
|
||||
plannerTemplateNewRequest.setTaskStatus(taskStatus);
|
||||
plannerTemplateNewRequest.setCompanyId(companyId);
|
||||
plannerTemplateNewRequest.setSecurityId(securityId);
|
||||
return plannerTemplateNewRequest;
|
||||
}
|
||||
|
||||
|
|
@ -84,4 +92,20 @@ public class PlannerTemplateNewAction implements IAction<PlannerTemplateNewReque
|
|||
public void setTaskStatus(String taskStatus) {
|
||||
this.taskStatus = taskStatus;
|
||||
}
|
||||
|
||||
public Long getCompanyId() {
|
||||
return companyId;
|
||||
}
|
||||
|
||||
public void setCompanyId(Long companyId) {
|
||||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
public Long getSecurityId() {
|
||||
return securityId;
|
||||
}
|
||||
|
||||
public void setSecurityId(Long securityId) {
|
||||
this.securityId = securityId;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,6 +34,12 @@ public class PlannerTemplateUpdateAction implements IAction<PlannerTemplateUpdat
|
|||
@ApiModelProperty(value = "Статус", example = "ACTV")
|
||||
@JsonProperty
|
||||
public String taskStatus;
|
||||
@ApiModelProperty(value = "Компания", example = "123")
|
||||
@JsonProperty
|
||||
public Long companyId;
|
||||
@ApiModelProperty(value = "Инструмент", example = "123")
|
||||
@JsonProperty
|
||||
public Long securityId;
|
||||
|
||||
@Override
|
||||
public PlannerTemplateUpdateRequest toRequest() {
|
||||
|
|
@ -42,6 +48,8 @@ public class PlannerTemplateUpdateAction implements IAction<PlannerTemplateUpdat
|
|||
plannerTemplateUpdateRequest.setTask(task);
|
||||
plannerTemplateUpdateRequest.setTaskTime(taskTime);
|
||||
plannerTemplateUpdateRequest.setTaskStatus(taskStatus);
|
||||
plannerTemplateUpdateRequest.setCompanyId(companyId);
|
||||
plannerTemplateUpdateRequest.setSecurityId(securityId);
|
||||
return plannerTemplateUpdateRequest;
|
||||
}
|
||||
|
||||
|
|
@ -101,4 +109,20 @@ public class PlannerTemplateUpdateAction implements IAction<PlannerTemplateUpdat
|
|||
public void setTaskStatus(String taskStatus) {
|
||||
this.taskStatus = taskStatus;
|
||||
}
|
||||
|
||||
public Long getCompanyId() {
|
||||
return companyId;
|
||||
}
|
||||
|
||||
public void setCompanyId(Long companyId) {
|
||||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
public Long getSecurityId() {
|
||||
return securityId;
|
||||
}
|
||||
|
||||
public void setSecurityId(Long securityId) {
|
||||
this.securityId = securityId;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,6 +16,8 @@ public class PlannerTemplate extends BusinessObject {
|
|||
private String task;
|
||||
private LocalTime taskTime;
|
||||
private String taskStatus;
|
||||
private Long companyId;
|
||||
private Long securityId;
|
||||
|
||||
public String getTask() {
|
||||
return task;
|
||||
|
|
@ -41,4 +43,19 @@ public class PlannerTemplate extends BusinessObject {
|
|||
this.taskStatus = value;
|
||||
}
|
||||
|
||||
public Long getCompanyId() {
|
||||
return companyId;
|
||||
}
|
||||
|
||||
public void setCompanyId(Long companyId) {
|
||||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
public Long getSecurityId() {
|
||||
return securityId;
|
||||
}
|
||||
|
||||
public void setSecurityId(Long securityId) {
|
||||
this.securityId = securityId;
|
||||
}
|
||||
}
|
||||
|
|
@ -17,8 +17,8 @@ public class UserConnect extends BusinessObject {
|
|||
private Long userId;
|
||||
private Instant connectionTime;
|
||||
private Instant disconnectionTime;
|
||||
private String serverIP;
|
||||
private String clientIP;
|
||||
private String serverIp;
|
||||
private String clientIp;
|
||||
private String connectionState;
|
||||
private LocalDate clearingDate;
|
||||
private Long errorCode;
|
||||
|
|
@ -48,20 +48,20 @@ public class UserConnect extends BusinessObject {
|
|||
this.disconnectionTime = value;
|
||||
}
|
||||
|
||||
public String getServerIP() {
|
||||
return serverIP;
|
||||
public String getServerIp() {
|
||||
return serverIp;
|
||||
}
|
||||
|
||||
public void setServerIP(String value) {
|
||||
this.serverIP = value;
|
||||
public void setServerIp(String value) {
|
||||
this.serverIp = value;
|
||||
}
|
||||
|
||||
public String getClientIP() {
|
||||
return clientIP;
|
||||
public String getClientIp() {
|
||||
return clientIp;
|
||||
}
|
||||
|
||||
public void setClientIP(String value) {
|
||||
this.clientIP = value;
|
||||
public void setClientIp(String value) {
|
||||
this.clientIp = value;
|
||||
}
|
||||
|
||||
public String getConnectionState() {
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
package ru.clearing.platform.dictionary;
|
||||
|
||||
/**
|
||||
* Справочник статусов возваращения процентов
|
||||
* <p>
|
||||
* Dictionary DB table: INTEREST_STATUS_DICTIONARY
|
||||
**/
|
||||
public class InterestStatusDictionary extends AbstractDictionary {
|
||||
private static final long serialVersionUID = ConstDictionarySerializable.serialVersionUID;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -28,7 +28,7 @@ public class UserConnectHistoryMapStore extends TemplateEventMapStore<UserConnec
|
|||
@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"
|
||||
"USER_CONNECT_ID", "CREATED_AT", "UPDATED_AT", "USER_ID", "CONNECTION_TIME", "DISCONNECTION_TIME", "SERVER_IP", "CLIENT_IP", "CONNECTION_STATE", "CLEARING_DATE", "ERROR_CODE", "ERROR_TEXT"
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -46,8 +46,8 @@ public class UserConnectHistoryMapStore extends TemplateEventMapStore<UserConnec
|
|||
object.getUserId(),
|
||||
TimeUtil.toDateFromInstant(object.getConnectionTime()),
|
||||
TimeUtil.toDateFromInstant(object.getDisconnectionTime()),
|
||||
object.getServerIP(),
|
||||
object.getClientIP(),
|
||||
object.getServerIp(),
|
||||
object.getClientIp(),
|
||||
object.getConnectionState(),
|
||||
TimeUtil.toDateFromLocalDate(object.getClearingDate()),
|
||||
object.getErrorCode(),
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ public class PlannerTemplateMapStore extends TemplateMapStore<PlannerTemplate> {
|
|||
@Override
|
||||
public String[] getFields() {
|
||||
return new String[]{
|
||||
"ID", "CREATED_AT", "UPDATED_AT", "TASK", "TASK_TIME", "TASK_STATUS"
|
||||
"ID", "CREATED_AT", "UPDATED_AT", "TASK", "TASK_TIME", "TASK_STATUS", "COMPANY_ID", "SECURITY_ID"
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -43,6 +43,8 @@ public class PlannerTemplateMapStore extends TemplateMapStore<PlannerTemplate> {
|
|||
object.setTask(resultSet.getObject("TASK", String.class));
|
||||
object.setTaskTime(getLocalTimeFromSqlTime(resultSet, "TASK_TIME"));
|
||||
object.setTaskStatus(resultSet.getObject("TASK_STATUS", String.class));
|
||||
object.setCompanyId(resultSet.getObject("COMPANY_ID", Long.class));
|
||||
object.setSecurityId(resultSet.getObject("SECURITY_ID", Long.class));
|
||||
return object;
|
||||
}
|
||||
|
||||
|
|
@ -54,7 +56,9 @@ public class PlannerTemplateMapStore extends TemplateMapStore<PlannerTemplate> {
|
|||
TimeUtil.toDateFromInstant(object.getUpdated()),
|
||||
object.getTask(),
|
||||
TimeUtil.toDateFromLocalTime(object.getTaskTime()),
|
||||
object.getTaskStatus()
|
||||
object.getTaskStatus(),
|
||||
object.getCompanyId(),
|
||||
object.getSecurityId()
|
||||
};
|
||||
return args;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ public class UserConnectMapStore extends TemplateMapStore<UserConnect> {
|
|||
@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"
|
||||
"ID", "CREATED_AT", "UPDATED_AT", "USER_ID", "CONNECTION_TIME", "DISCONNECTION_TIME", "SERVER_IP", "CLIENT_IP", "CONNECTION_STATE", "CLEARING_DATE", "ERROR_CODE", "ERROR_TEXT"
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -43,8 +43,8 @@ public class UserConnectMapStore extends TemplateMapStore<UserConnect> {
|
|||
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.setServerIp(resultSet.getObject("SERVER_IP", String.class));
|
||||
object.setClientIp(resultSet.getObject("CLIENT_IP", String.class));
|
||||
object.setConnectionState(resultSet.getObject("CONNECTION_STATE", String.class));
|
||||
object.setClearingDate(getLocalDateFromSqlDate(resultSet, "CLEARING_DATE"));
|
||||
object.setErrorCode(resultSet.getObject("ERROR_CODE", Long.class));
|
||||
|
|
@ -61,8 +61,8 @@ public class UserConnectMapStore extends TemplateMapStore<UserConnect> {
|
|||
object.getUserId(),
|
||||
TimeUtil.toDateFromInstant(object.getConnectionTime()),
|
||||
TimeUtil.toDateFromInstant(object.getDisconnectionTime()),
|
||||
object.getServerIP(),
|
||||
object.getClientIP(),
|
||||
object.getServerIp(),
|
||||
object.getClientIp(),
|
||||
object.getConnectionState(),
|
||||
TimeUtil.toDateFromLocalDate(object.getClearingDate()),
|
||||
object.getErrorCode(),
|
||||
|
|
|
|||
|
|
@ -1,31 +0,0 @@
|
|||
package ru.spcex.clearing.imdg.dictionary;
|
||||
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
import ru.clearing.platform.dictionary.InterestStatusDictionary;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import ru.spcex.clearing.imdg.base.DictionaryTMapStore;
|
||||
|
||||
@Component
|
||||
public class InterestStatusDictionaryMapStore extends DictionaryTMapStore<InterestStatusDictionary> {
|
||||
|
||||
public InterestStatusDictionaryMapStore(JdbcTemplate jdbcTemplate) {
|
||||
super(jdbcTemplate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMapName() {
|
||||
return IMDGDistributedNames.Map_InterestStatusDictionary;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTableName() {
|
||||
return "INTEREST_STATUS_DICTIONARY";
|
||||
}
|
||||
|
||||
@Override
|
||||
public InterestStatusDictionary getDictionaryObject() {
|
||||
return new InterestStatusDictionary();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -51,6 +51,8 @@ public class PlannerTemplateService extends QueueConsumer implements Initializin
|
|||
plannerTemplate.setTask(req.getTask());
|
||||
plannerTemplate.setTaskTime(req.getTaskTime());
|
||||
plannerTemplate.setTaskStatus(req.getTaskStatus());
|
||||
plannerTemplate.setCompanyId(req.getCompanyId());
|
||||
plannerTemplate.setSecurityId(req.getSecurityId());
|
||||
plannerTemplateMap.insert(plannerTemplate);
|
||||
log.debug("successfully processed, new id {}", plannerTemplate.getId());
|
||||
}
|
||||
|
|
@ -62,6 +64,8 @@ public class PlannerTemplateService extends QueueConsumer implements Initializin
|
|||
plannerTemplate.setTask(req.getTask());
|
||||
plannerTemplate.setTaskTime(req.getTaskTime());
|
||||
plannerTemplate.setTaskStatus(req.getTaskStatus());
|
||||
plannerTemplate.setCompanyId(req.getCompanyId());
|
||||
plannerTemplate.setSecurityId(req.getSecurityId());
|
||||
plannerTemplateMap.update(plannerTemplate);
|
||||
log.debug("successfully processed, new id {}", plannerTemplate.getId());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -184,8 +184,8 @@ public class UserService extends QueueConsumer implements InitializingBean {
|
|||
userConnect.setUpdated(time);
|
||||
}
|
||||
userConnect.setConnectionTime(time);
|
||||
userConnect.setServerIP(serverIp);
|
||||
userConnect.setClientIP(clientIp);
|
||||
userConnect.setServerIp(serverIp);
|
||||
userConnect.setClientIp(clientIp);
|
||||
userConnect.setConnectionState(ConnectionState.Connected.getKey());
|
||||
userConnect.setClearingDate(LocalDate.now());
|
||||
if (isNew) {
|
||||
|
|
|
|||
|
|
@ -58,7 +58,6 @@ public final class IMDGDistributedNames {
|
|||
public static final String Map_SDf09 = "Map_SDf09";
|
||||
public static final String Map_SDf12 = "Map_SDf12";
|
||||
public static final String Map_SDf18 = "Map_SDf18";
|
||||
public static final String Map_InterestStatusDictionary = "Map_InterestStatusDictionary";
|
||||
public static final String Map_AllowedDictionary = "Map_AllowedDictionary";
|
||||
public static final String Map_ClearingCategoryDictionary = "Map_ClearingMemberCategoryDictionary";
|
||||
public static final String Map_CompanyRoleDictionary = "Map_CompanyRoleDictionary";
|
||||
|
|
|
|||
|
|
@ -18,6 +18,10 @@ public class PlannerTemplateNewRequest {
|
|||
public LocalTime taskTime;
|
||||
@JsonProperty
|
||||
public String taskStatus;
|
||||
@JsonProperty
|
||||
public Long companyId;
|
||||
@JsonProperty
|
||||
public Long securityId;
|
||||
|
||||
public String getTask() {
|
||||
return task;
|
||||
|
|
@ -42,4 +46,20 @@ public class PlannerTemplateNewRequest {
|
|||
public void setTaskStatus(String taskStatus) {
|
||||
this.taskStatus = taskStatus;
|
||||
}
|
||||
|
||||
public Long getCompanyId() {
|
||||
return companyId;
|
||||
}
|
||||
|
||||
public void setCompanyId(Long companyId) {
|
||||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
public Long getSecurityId() {
|
||||
return securityId;
|
||||
}
|
||||
|
||||
public void setSecurityId(Long securityId) {
|
||||
this.securityId = securityId;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,6 +21,10 @@ public class PlannerTemplateUpdateRequest {
|
|||
public LocalTime taskTime;
|
||||
@JsonProperty
|
||||
public String taskStatus;
|
||||
@JsonProperty
|
||||
public Long companyId;
|
||||
@JsonProperty
|
||||
public Long securityId;
|
||||
|
||||
public String getTask() {
|
||||
return task;
|
||||
|
|
@ -53,4 +57,20 @@ public class PlannerTemplateUpdateRequest {
|
|||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getCompanyId() {
|
||||
return companyId;
|
||||
}
|
||||
|
||||
public void setCompanyId(Long companyId) {
|
||||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
public Long getSecurityId() {
|
||||
return securityId;
|
||||
}
|
||||
|
||||
public void setSecurityId(Long securityId) {
|
||||
this.securityId = securityId;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue