Compare commits
4 Commits
e23864fa72
...
4f151fae4a
Author | SHA1 | Date | |
---|---|---|---|
|
4f151fae4a | ||
|
e93171e958 | ||
4cd80bbec5 | |||
8125e32d7e |
@ -122,11 +122,13 @@ public class CgyStatsService {
|
|||||||
public void syncUserSimulationUsing(UserSimulationRecordEvent event) {
|
public void syncUserSimulationUsing(UserSimulationRecordEvent event) {
|
||||||
UserSimulationRecord record = event.getRecord();
|
UserSimulationRecord record = event.getRecord();
|
||||||
CgyStatsBO cgyStatsBO = functionStatsMap.get(record.getFunctionId());
|
CgyStatsBO cgyStatsBO = functionStatsMap.get(record.getFunctionId());
|
||||||
|
if (Objects.nonNull(cgyStatsBO)) {
|
||||||
cgyStatsBO.getVisitor().incrementAndGet();
|
cgyStatsBO.getVisitor().incrementAndGet();
|
||||||
cgyStatsBO.getUserSet().add(record.getUserId());
|
cgyStatsBO.getUserSet().add(record.getUserId());
|
||||||
cgyStatsBO.getDuration().addAndGet(record.getDuration());
|
cgyStatsBO.getDuration().addAndGet(record.getDuration());
|
||||||
cgyStatsBO.getChange().set(true);
|
cgyStatsBO.getChange().set(true);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新此App的浏览量数据
|
* 更新此App的浏览量数据
|
||||||
|
@ -21,6 +21,7 @@ import club.joylink.rtss.vo.client.WebSocketMessageType;
|
|||||||
import club.joylink.rtss.vo.client.factory.SocketMessageFactory;
|
import club.joylink.rtss.vo.client.factory.SocketMessageFactory;
|
||||||
import club.joylink.rtss.websocket.StompMessageService;
|
import club.joylink.rtss.websocket.StompMessageService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.ApplicationContext;
|
import org.springframework.context.ApplicationContext;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
@ -115,7 +116,8 @@ public class ATSMessageCollectAndDispatcher {
|
|||||||
if (Objects.equals(simulation.getProject(), MapPrdTypeEnum.YJDDZH.name())) {
|
if (Objects.equals(simulation.getProject(), MapPrdTypeEnum.YJDDZH.name())) {
|
||||||
statusVO = new YJDDZHTrainStatusVO(train);
|
statusVO = new YJDDZHTrainStatusVO(train);
|
||||||
} else {
|
} else {
|
||||||
statusVO = new TrainStatusVO(train);
|
// statusVO = new TrainStatusVO(train);
|
||||||
|
statusVO = new TrainStatusVO(trainStatus);
|
||||||
}
|
}
|
||||||
if (trainStatus.compareAndChange(train, statusVO)) {
|
if (trainStatus.compareAndChange(train, statusVO)) {
|
||||||
totalList.add(statusVO);
|
totalList.add(statusVO);
|
||||||
|
@ -64,7 +64,7 @@ public class CgySignalServiceImpl implements RealDeviceService {
|
|||||||
plcGatewayService.writeSingleCoil(baseAddr, configVO.getW_zxj(), true, channel);
|
plcGatewayService.writeSingleCoil(baseAddr, configVO.getW_zxj(), true, channel);
|
||||||
break;
|
break;
|
||||||
case Y:
|
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_lxj(), true, channel);
|
||||||
plcGatewayService.writeSingleCoil(baseAddr, configVO.getW_yxj(), false, channel);
|
plcGatewayService.writeSingleCoil(baseAddr, configVO.getW_yxj(), false, channel);
|
||||||
plcGatewayService.writeSingleCoil(baseAddr, configVO.getW_zxj(), false, channel);
|
plcGatewayService.writeSingleCoil(baseAddr, configVO.getW_zxj(), false, channel);
|
||||||
@ -139,7 +139,8 @@ public class CgySignalServiceImpl implements RealDeviceService {
|
|||||||
break;
|
break;
|
||||||
case G:
|
case G:
|
||||||
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_ddj(), w_ddj,
|
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_ddj(), w_ddj,
|
||||||
false, channel);
|
false,
|
||||||
|
channel);
|
||||||
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_lxj(), w_lxj, true,
|
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_lxj(), w_lxj, true,
|
||||||
channel);
|
channel);
|
||||||
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_yxj(), w_yxj,
|
plcGatewayService.checkEqualAndWriteSingleCoil(baseAddr, configVO.getW_yxj(), w_yxj,
|
||||||
|
Loading…
Reference in New Issue
Block a user