| | |
| | | package com.zy.core; |
| | | |
| | | import com.zy.common.utils.News; |
| | | import com.zy.utils.News; |
| | | import com.zy.core.cache.MessageQueue; |
| | | import com.zy.core.cache.SlaveConnection; |
| | | import com.zy.core.enums.SlaveType; |
| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Async; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.PostConstruct; |
| | |
| | | MessageQueue.init(SlaveType.Led, led); |
| | | } |
| | | // 初始化磅称mq |
| | | for (Slave scale : slaveProperties.getScale()) { |
| | | MessageQueue.init(SlaveType.Scale, scale); |
| | | } |
| | | // for (Slave scale : slaveProperties.getScale()) { |
| | | // MessageQueue.init(SlaveType.Scale, scale); |
| | | // } |
| | | // 初始化台车mq |
| | | for (Slave car : slaveProperties.getCar()) { |
| | | MessageQueue.init(SlaveType.Car, car); |
| | | } |
| | | // for (Slave car : slaveProperties.getCar()) { |
| | | // MessageQueue.init(SlaveType.Car, car); |
| | | // } |
| | | } |
| | | |
| | | private void initThread(){ |