Compare commits

...

3 Commits

Author SHA1 Message Date
tiger_zhou
e93171e958 调整列车区段没有值得问题
All checks were successful
CI / Docker-Build (push) Successful in 5m14s
2024-08-16 18:59:18 +08:00
4cd80bbec5 [bug]成都工业实体信号机黄灯、绿灯控制逻辑不对 2024-07-29 13:43:06 +08:00
8125e32d7e [bug]成都工业实体信号机黄灯、绿灯控制逻辑不对 2024-07-18 16:45:00 +08:00
2 changed files with 216 additions and 213 deletions

View File

@ -21,6 +21,7 @@ import club.joylink.rtss.vo.client.WebSocketMessageType;
import club.joylink.rtss.vo.client.factory.SocketMessageFactory;
import club.joylink.rtss.websocket.StompMessageService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;
@ -102,9 +103,9 @@ public class ATSMessageCollectAndDispatcher {
TrainStatus trainStatus = repository.findStatusByCode(train.getGroupNumber(), TrainStatus.class);
if (Objects.isNull(trainStatus)) {
// if(simulation.getBuildParams().getProdType() == MapPrdTypeEnum.YJDDZH){
if(Objects.equals(simulation.getProject(),MapPrdTypeEnum.YJDDZH.name())){
if (Objects.equals(simulation.getProject(), MapPrdTypeEnum.YJDDZH.name())) {
trainStatus = new YJDDZHTrainStatus(train);
}else{
} else {
trainStatus = new TrainStatus(train);
}
repository.addDeviceInfo(trainStatus);
@ -112,10 +113,11 @@ public class ATSMessageCollectAndDispatcher {
} else {
DeviceStatusVO statusVO;
// if(simulation.getBuildParams().getProdType() == MapPrdTypeEnum.YJDDZH){
if(Objects.equals(simulation.getProject(),MapPrdTypeEnum.YJDDZH.name())){
if (Objects.equals(simulation.getProject(), MapPrdTypeEnum.YJDDZH.name())) {
statusVO = new YJDDZHTrainStatusVO(train);
}else{
statusVO = new TrainStatusVO(train);
} else {
// statusVO = new TrainStatusVO(train);
statusVO = new TrainStatusVO(trainStatus);
}
if (trainStatus.compareAndChange(train, statusVO)) {
totalList.add(statusVO);

View File

@ -64,7 +64,7 @@ public class CgySignalServiceImpl implements RealDeviceService {
plcGatewayService.writeSingleCoil(baseAddr, configVO.getW_zxj(), true, channel);
break;
case Y:
plcGatewayService.writeSingleCoil(baseAddr, configVO.getW_ddj(), false, channel);
plcGatewayService.writeSingleCoil(baseAddr, configVO.getW_ddj(), true, channel);
plcGatewayService.writeSingleCoil(baseAddr, configVO.getW_lxj(), true, channel);
plcGatewayService.writeSingleCoil(baseAddr, configVO.getW_yxj(), false, channel);
plcGatewayService.writeSingleCoil(baseAddr, configVO.getW_zxj(), false, channel);
@ -139,7 +139,8 @@ public class CgySignalServiceImpl implements RealDeviceService {
break;
case G:
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_ddj(), w_ddj,
false, channel);
false,
channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_lxj(), w_lxj, true,
channel);
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_yxj(), w_yxj,