| | |
| | | import com.zy.acs.manager.system.service.ConfigService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.PostConstruct; |
| | |
| | | @Autowired |
| | | private AgvDetailService agvDetailService; |
| | | @Autowired |
| | | private AgvModelService agvModelService; |
| | | @Autowired |
| | | private ActionService actionService; |
| | | @Autowired |
| | | private ConfigService configService; |
| | |
| | | this.responseThread = new Thread(() -> { |
| | | while (!Thread.currentThread().isInterrupted()) { |
| | | try { |
| | | Thread.sleep(30); |
| | | Thread.sleep(5); |
| | | |
| | | if (configService.getVal("fakeSign", Boolean.class)) { |
| | | this.responseTheRequest(); |
| | |
| | | for (Agv agv : agvList) { |
| | | |
| | | if (!AGV_PROCESSING_MAP.get(agv.getId())) { |
| | | AGV_PROCESSING_MAP.put(agv.getId(), true); |
| | | List<Action> actionList = actionService.queryLatestGroup(agv.getId(), ActionStsType.ISSUED); |
| | | if (!Cools.isEmpty(actionList)) { |
| | | AGV_PROCESSING_MAP.put(agv.getId(), true); |
| | | executorService.submit(new AgvSimulatorTask( |
| | | agv |
| | | , redis |
| | | , agvDetailService |
| | | , agvModelService |
| | | , actionService |
| | | , codeService |
| | | , mapService |
| | |
| | | , mainService |
| | | , actionList |
| | | )); |
| | | } else { |
| | | AGV_PROCESSING_MAP.put(agv.getId(), false); |
| | | } |
| | | } |
| | | |