| | |
| | | import com.zy.acs.conveyor.common.web.BaseController; |
| | | import com.zy.acs.conveyor.controller.requestParam.StationRequestParam; |
| | | import com.zy.acs.conveyor.controller.responseParam.StationResponseParam; |
| | | import com.zy.acs.conveyor.core.DevpThread; |
| | | import com.zy.acs.conveyor.core.cache.SlaveConnection; |
| | | import com.zy.acs.conveyor.core.enums.SlaveType; |
| | | import com.zy.acs.conveyor.core.model.protocol.StaProtocol; |
| | | import com.zy.acs.conveyor.core.model.StaProtocol; |
| | | import com.zy.acs.conveyor.core.properties.SlaveProperties; |
| | | import com.zy.acs.conveyor.core.service.StationService; |
| | | import com.zy.acs.framework.common.Cools; |
| | | import com.zy.acs.framework.common.R; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | @Autowired |
| | | private SlaveProperties slaveProperties; |
| | | |
| | | |
| | | @Autowired |
| | | private StationService stationService; |
| | | |
| | | |
| | | /** |
| | | * 站点查询 |
| | | */ |
| | |
| | | public R query(@RequestBody StationRequestParam param) { |
| | | log.info("站点查询:{}", param); |
| | | List<String> staNos = param.getStaNos(); |
| | | DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, param.getDevpId()); |
| | | Map<Integer, StaProtocol> station = stationService.getStationMap(param.getDevpId()); |
| | | List<StationResponseParam> list = new ArrayList<>(); |
| | | Map<Integer, StaProtocol> station = devpThread.getStation(); |
| | | if (Cools.isEmpty(staNos)) { |
| | | for (Map.Entry<Integer, StaProtocol> entry : station.entrySet()) { |
| | | staNos.add(entry.getKey() + ""); |