package com.zy.asrs.wcs.core.map.websocket;
|
|
import com.alibaba.fastjson.JSON;
|
import com.zy.asrs.wcs.core.map.entity.MapWsShuttleVo;
|
import com.zy.asrs.wcs.core.map.entity.MapWsVo;
|
import org.springframework.scheduling.annotation.Scheduled;
|
import org.springframework.stereotype.Component;
|
|
/**
|
* Created by vincent on 4/3/2024
|
*/
|
@Component
|
public class MockScheduler {
|
|
@Scheduled(cron = "0/1 * * * * ? ")
|
public void mock() {
|
MapWsVo wsVo = new MapWsVo();
|
|
// shuttle
|
MapWsShuttleVo shuttleVo = new MapWsShuttleVo();
|
shuttleVo.setShuttleNo("1");
|
shuttleVo.setCurLocNo("1-1-1");
|
wsVo.getShuttleVos().add(shuttleVo);
|
|
MapWebSocket.broadcast(JSON.toJSONString(wsVo));
|
}
|
|
}
|