地图草稿添加岔心 应答器;
点赞数据推送修db改
This commit is contained in:
parent
02078eb039
commit
8f4d4cd9ea
@ -599,6 +599,11 @@ public interface BusinessConsts {
|
|||||||
* 道岔计轴区段
|
* 道岔计轴区段
|
||||||
*/
|
*/
|
||||||
String Type04 = "04";
|
String Type04 = "04";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 岔心
|
||||||
|
*/
|
||||||
|
String Type05 = "05";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -287,6 +287,7 @@ public class DraftMapService implements IDraftMapService {
|
|||||||
List<MapSectionNewVO> sectionList = graphDataNewVO.getSectionList();
|
List<MapSectionNewVO> sectionList = graphDataNewVO.getSectionList();
|
||||||
for (MapSectionNewVO section : sectionList) {
|
for (MapSectionNewVO section : sectionList) {
|
||||||
if (Objects.equals(section.getType(), BusinessConsts.Section.SectionType.Type04) ||
|
if (Objects.equals(section.getType(), BusinessConsts.Section.SectionType.Type04) ||
|
||||||
|
Objects.equals(section.getType(), BusinessConsts.Section.SectionType.Type05) ||
|
||||||
(!section.isReentryTrack() && !section.isTransferTrack())) {
|
(!section.isReentryTrack() && !section.isTransferTrack())) {
|
||||||
section.setReentryTrack(false);
|
section.setReentryTrack(false);
|
||||||
section.setReentryTrackName(null);
|
section.setReentryTrackName(null);
|
||||||
@ -295,7 +296,8 @@ public class DraftMapService implements IDraftMapService {
|
|||||||
section.setDestinationCodePoint(null);
|
section.setDestinationCodePoint(null);
|
||||||
}
|
}
|
||||||
if (Objects.equals(section.getType(), BusinessConsts.Section.SectionType.Type01) ||
|
if (Objects.equals(section.getType(), BusinessConsts.Section.SectionType.Type01) ||
|
||||||
Objects.equals(section.getType(), BusinessConsts.Section.SectionType.Type04)) {
|
Objects.equals(section.getType(), BusinessConsts.Section.SectionType.Type04) ||
|
||||||
|
Objects.equals(section.getType(), BusinessConsts.Section.SectionType.Type05)) {
|
||||||
section.setParentCode(null);
|
section.setParentCode(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -35,10 +35,8 @@ public class CompetitionUserLikeManager extends CustomCommandLineRunner {
|
|||||||
*/
|
*/
|
||||||
private final Map<String, ConcurrentHashMap<Long, CopyOnWriteArraySet<Long>>> userLikesMap = new HashMap<>();
|
private final Map<String, ConcurrentHashMap<Long, CopyOnWriteArraySet<Long>>> userLikesMap = new HashMap<>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute() {
|
public void run(String... args) throws Exception {
|
||||||
log.debug("点赞数据pull任务启动");
|
log.debug("点赞数据pull任务启动");
|
||||||
super.executeContinuously(() -> {
|
super.executeContinuously(() -> {
|
||||||
List<RaceQuestionMocksLikes> likes = mocksLikesDAO.selectByExampleWithBLOBs(null);
|
List<RaceQuestionMocksLikes> likes = mocksLikesDAO.selectByExampleWithBLOBs(null);
|
||||||
@ -56,7 +54,7 @@ public class CompetitionUserLikeManager extends CustomCommandLineRunner {
|
|||||||
@Scheduled(fixedRate = 1 * 60 * 1000)
|
@Scheduled(fixedRate = 1 * 60 * 1000)
|
||||||
public void save() {
|
public void save() {
|
||||||
if (super.storable()){
|
if (super.storable()){
|
||||||
log.debug("push点赞数据,旧剩余推送次数{}",super.remainTimes);
|
log.debug("push点赞数据");
|
||||||
List<RaceQuestionMocksLikes> list = new ArrayList<>();
|
List<RaceQuestionMocksLikes> list = new ArrayList<>();
|
||||||
userLikesMap.forEach((p, map) -> {
|
userLikesMap.forEach((p, map) -> {
|
||||||
map.forEach((id, ids) -> {
|
map.forEach((id, ids) -> {
|
||||||
@ -109,4 +107,6 @@ public class CompetitionUserLikeManager extends CustomCommandLineRunner {
|
|||||||
vo.setUserLikes(userLikes);
|
vo.setUserLikes(userLikes);
|
||||||
return vo;
|
return vo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -14,15 +14,8 @@ public abstract class CustomCommandLineRunner implements CommandLineRunner {
|
|||||||
|
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
private volatile boolean available = false;
|
private boolean available = false;
|
||||||
protected final AtomicBoolean change = new AtomicBoolean(false);
|
protected final AtomicBoolean change = new AtomicBoolean(false);
|
||||||
protected byte remainTimes = 100;
|
|
||||||
@Override
|
|
||||||
public void run(String... args) throws Exception {
|
|
||||||
execute();
|
|
||||||
}
|
|
||||||
|
|
||||||
public abstract void execute();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 连续间断执行
|
* 连续间断执行
|
||||||
@ -66,17 +59,6 @@ public abstract class CustomCommandLineRunner implements CommandLineRunner {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected boolean storable() {
|
protected boolean storable() {
|
||||||
if (available) {
|
return available && change.getAndSet(false);
|
||||||
if (change.getAndSet(false)) {
|
|
||||||
remainTimes = 100;
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
if (remainTimes != 0) {
|
|
||||||
remainTimes--;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -55,6 +55,8 @@ public abstract class MapElement {
|
|||||||
DIRECTION_ROD,
|
DIRECTION_ROD,
|
||||||
/** 接触网 */
|
/** 接触网 */
|
||||||
CATENARY,
|
CATENARY,
|
||||||
|
/**应答器*/
|
||||||
|
RESPONDER
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 设备唯一编号 */
|
/** 设备唯一编号 */
|
||||||
|
@ -0,0 +1,43 @@
|
|||||||
|
package club.joylink.rtss.simulation.cbtc.data.map;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 区段
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
public class Responder extends MapNamedElement {
|
||||||
|
|
||||||
|
public Responder(String code, String name) {
|
||||||
|
super(code, name, DeviceType.RESPONDER);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// ------------------固有属性/关联关系---------------------
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属设备集中站
|
||||||
|
*/
|
||||||
|
private Station deviceStation;
|
||||||
|
|
||||||
|
|
||||||
|
// ------------------状态属性---------------------
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void reset() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public enum ResponderType {
|
||||||
|
/** 固定应答器*/
|
||||||
|
FB,
|
||||||
|
/** 可变应答器*/
|
||||||
|
VB,
|
||||||
|
/**填充应答器*/
|
||||||
|
IB
|
||||||
|
}
|
||||||
|
}
|
@ -154,6 +154,9 @@ public class MapGraphDataNewVO {
|
|||||||
@ApiModelProperty(value = "方向杆")
|
@ApiModelProperty(value = "方向杆")
|
||||||
private List<MapDirectionRodVO> directionRodList;
|
private List<MapDirectionRodVO> directionRodList;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "应答器")
|
||||||
|
private List<MapResponderVO> responderList;
|
||||||
|
|
||||||
public MapGraphDataNewVO() {
|
public MapGraphDataNewVO() {
|
||||||
this.bigScreenConfig = new BigScreenConfig();
|
this.bigScreenConfig = new BigScreenConfig();
|
||||||
this.generateConfig = new MapCiGenerateConfig();
|
this.generateConfig = new MapCiGenerateConfig();
|
||||||
@ -186,6 +189,7 @@ public class MapGraphDataNewVO {
|
|||||||
this.splitStationList = new ArrayList<>();
|
this.splitStationList = new ArrayList<>();
|
||||||
this.arrowList = new ArrayList<>();
|
this.arrowList = new ArrayList<>();
|
||||||
this.directionRodList = new ArrayList<>();
|
this.directionRodList = new ArrayList<>();
|
||||||
|
this.responderList = new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static MapGraphDataNewVO parse(String graphData) {
|
public static MapGraphDataNewVO parse(String graphData) {
|
||||||
|
@ -0,0 +1,61 @@
|
|||||||
|
package club.joylink.rtss.vo.client.map.newmap;
|
||||||
|
|
||||||
|
import club.joylink.rtss.simulation.cbtc.data.map.Responder;
|
||||||
|
import club.joylink.rtss.vo.client.Point;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
@ApiModel(value="应答器草稿数据")
|
||||||
|
@NoArgsConstructor
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@EqualsAndHashCode
|
||||||
|
public class MapResponderVO {
|
||||||
|
|
||||||
|
/**编码*/
|
||||||
|
@NotBlank(message="编码不能为空")
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
/**名称*/
|
||||||
|
@NotNull(message="名称不能为Null")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/** 类型*/
|
||||||
|
@ApiModelProperty(value = "区段类型")
|
||||||
|
@NotNull(message="区段类型不能为Null")
|
||||||
|
private Responder.ResponderType type;
|
||||||
|
|
||||||
|
/**区段偏移*/
|
||||||
|
private float offset;
|
||||||
|
|
||||||
|
/** 坐标*/
|
||||||
|
@NotNull(message="坐标不能为Null")
|
||||||
|
private Point position;
|
||||||
|
|
||||||
|
/**应答器旋转*/
|
||||||
|
@ApiModelProperty(value = "应答器旋转")
|
||||||
|
@NotNull(message="应答器旋转角度不能为Null")
|
||||||
|
private Integer rotate;
|
||||||
|
|
||||||
|
/**文字偏移*/
|
||||||
|
@NotNull(message="文字偏移坐标不能为Null")
|
||||||
|
private Point textOffset;
|
||||||
|
/**文字旋转*/
|
||||||
|
@NotNull(message="文字旋转不能为Null")
|
||||||
|
private Integer textRotate;
|
||||||
|
|
||||||
|
/**关联集中站 编号*/
|
||||||
|
@NotNull(message="关联集中站不能为Null")
|
||||||
|
private String stationCode;
|
||||||
|
|
||||||
|
/**关联区段 编号*/
|
||||||
|
@NotNull(message="关联区段不能为Null")
|
||||||
|
private String sectionCode;
|
||||||
|
}
|
@ -149,7 +149,7 @@ public class MapSectionNewVO {
|
|||||||
private String parentCode;
|
private String parentCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 区段类型:物理区段01/逻辑区段02/道岔物理区段03/道岔计轴区段04
|
* 区段类型:物理区段01/逻辑区段02/道岔物理区段03/道岔计轴区段04/岔心05
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "区段类型")
|
@ApiModelProperty(value = "区段类型")
|
||||||
@NotNull(message="区段类型不能为Null")
|
@NotNull(message="区段类型不能为Null")
|
||||||
@ -171,6 +171,11 @@ public class MapSectionNewVO {
|
|||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "道岔计轴区段关联道岔区段列表")
|
@ApiModelProperty(value = "道岔计轴区段关联道岔区段列表")
|
||||||
List<String> relevanceSectionList;
|
List<String> relevanceSectionList;
|
||||||
|
/**
|
||||||
|
* 岔心关联道岔区段列表
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "岔心关联道岔区段列表")
|
||||||
|
List<String> relateSectionList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否站台轨
|
* 是否站台轨
|
||||||
|
Loading…
Reference in New Issue
Block a user