| | |
| | | |
| | | //获取请求信息 |
| | | BaseReqData reqData = ProtocolUtils.getSyncReq(response.getHouseId()); |
| | | |
| | | log.info("--粮情封装解析,获取到请求命令参数----"); |
| | | if (null == reqData) { |
| | | log.error("--粮情封装解析,未获取到请求相关参数----"); |
| | | return; |
| | | } |
| | | |
| | | ProtocolUtils.delSyncReq(response.getHouseId()); |
| | | log.info(reqData.toString()); |
| | | |
| | | int cableZ = Integer.valueOf(response.getLay()); |
| | | int cableY = Integer.valueOf(response.getRow()); |
| | |
| | | } |
| | | |
| | | //数据优化 |
| | | if (curTemp > 35) { |
| | | if (curTemp > 40) { |
| | | curTemp = response.getTAvg(); |
| | | } |
| | | |
| | |
| | | weatherStation.setId(device.getDeviceId()); |
| | | } |
| | | weatherStation.setAirPressure(weather.getPressure()); |
| | | weatherStation.setHumidity(weather.getHumidity()); |
| | | weatherStation.setHumidity(weather.getHumidity().replaceAll("%","")); |
| | | weatherStation.setPm(weather.getAir_pm25()); |
| | | weatherStation.setRadiation("0"); |
| | | weatherStation.setRainfallAmount(weather.getWea()); |