| | |
| | | @ResponseBody |
| | | @PostMapping("/station/query") |
| | | public R query(@RequestBody StationRequestParam param) { |
| | | log.info("站点查询:{}", param); |
| | | //log.info("站点查询:{}", param); |
| | | List<String> staNos = param.getStaNos(); |
| | | Map<Integer, StaProtocol> station = stationService.getStationMap(param.getDevpId()); |
| | | List<StationResponseParam> list = new ArrayList<>(); |
| | |
| | | stationResponseParam = new StationResponseParam(); |
| | | stationResponseParam.setStaNo(staNo); |
| | | stationResponseParam.setOccupied(staProtocol.isLoading()); |
| | | stationResponseParam.setInEnable((staProtocol.isInEnable() && staProtocol.getWorkNo() == 0 ? true : false)); |
| | | stationResponseParam.setOutEnable((staProtocol.isOutEnable() ? true : false)); |
| | | stationResponseParam.setInEnable(staProtocol.getAllowPut()); |
| | | stationResponseParam.setOutEnable(staProtocol.getAllowTake()); |
| | | stationResponseParam.setOnline(staProtocol.isAutoing()); |
| | | list.add(stationResponseParam); |
| | | } |
| | | log.info("站点查询:{}", list); |
| | | //log.info("站点查询:{}", list); |
| | | return R.ok(list); |
| | | } |
| | | |