修改调度命令反序列化问题

This commit is contained in:
joylink_zhangsai 2022-06-30 15:19:42 +08:00
parent 155401847b
commit c369b355fd
2 changed files with 23 additions and 1 deletions

View File

@ -27,6 +27,11 @@ public class RailDispatchCommand {
*/ */
private String title; private String title;
/**
* 正文
*/
private String content;
/** /**
* 命令号 * 命令号
*/ */
@ -79,11 +84,15 @@ public class RailDispatchCommand {
*/ */
private Map<SimulationMember, ReceiveInfo> receiveInfoMap; private Map<SimulationMember, ReceiveInfo> receiveInfoMap;
/**
* 全部受令人都已签收
*/
private boolean allSigned; private boolean allSigned;
public RailDispatchCommand(RailDispatchCommandVO vo) { public RailDispatchCommand(RailDispatchCommandVO vo) {
this.id = vo.getId(); this.id = vo.getId();
this.title = vo.getTitle(); this.title = vo.getTitle();
this.content = vo.getContent();
this.number = vo.getNumber(); this.number = vo.getNumber();
this.sendTime = vo.getSendTime(); this.sendTime = vo.getSendTime();
this.companyOfSender = vo.getCompanyOfSender(); this.companyOfSender = vo.getCompanyOfSender();

View File

@ -2,6 +2,7 @@ package club.joylink.rtss.simulation.cbtc.CTC.data.vo;
import club.joylink.rtss.simulation.cbtc.CTC.data.RailDispatchCommand; import club.joylink.rtss.simulation.cbtc.CTC.data.RailDispatchCommand;
import club.joylink.rtss.util.JsonUtils; import club.joylink.rtss.util.JsonUtils;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Getter; import lombok.Getter;
@ -29,6 +30,11 @@ public class RailDispatchCommandVO {
*/ */
private String title; private String title;
/**
* 正文
*/
private String content;
/** /**
* 命令号 * 命令号
*/ */
@ -38,6 +44,7 @@ public class RailDispatchCommandVO {
* 发令时间 * 发令时间
*/ */
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime sendTime; private LocalDateTime sendTime;
/** /**
@ -54,6 +61,7 @@ public class RailDispatchCommandVO {
* 授权时间 * 授权时间
*/ */
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime authorizationTime; private LocalDateTime authorizationTime;
/** /**
@ -65,6 +73,7 @@ public class RailDispatchCommandVO {
* 定稿时间 * 定稿时间
*/ */
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime finalizationTime; private LocalDateTime finalizationTime;
/** /**
@ -83,10 +92,13 @@ public class RailDispatchCommandVO {
private Set<String> receiverIds; private Set<String> receiverIds;
/** /**
* 受令人仿真成员调用接口时不给该字段赋值 * 受令人的签收信息仿真成员调用接口时不给该字段赋值
*/ */
private Map<String, ReceiveInfoVO> receiverInfos; private Map<String, ReceiveInfoVO> receiverInfos;
/**
* 调度命令类型正常调度命令
*/
private RailDispatchCommand.Type type; private RailDispatchCommand.Type type;
/** /**
@ -106,6 +118,7 @@ public class RailDispatchCommandVO {
public RailDispatchCommandVO(RailDispatchCommand command) { public RailDispatchCommandVO(RailDispatchCommand command) {
this.id = command.getId(); this.id = command.getId();
this.title = command.getTitle(); this.title = command.getTitle();
this.content = command.getContent();
this.number = command.getNumber(); this.number = command.getNumber();
this.sendTime = command.getSendTime(); this.sendTime = command.getSendTime();
this.senderId = command.getSenderId(); this.senderId = command.getSenderId();