| | |
| | | import com.fzzy.gateway.api.GatewayRemoteManager; |
| | | import com.fzzy.gateway.entity.GatewayDevice; |
| | | import com.fzzy.gateway.hx2023.ScConstant; |
| | | import com.fzzy.gateway.hx2023.data.KafaGrainData; |
| | | import com.fzzy.gateway.hx2023.data.KafkaGrainDataDetail; |
| | | import com.fzzy.gateway.hx2023.data.KafkaGrainTH; |
| | | import com.fzzy.gateway.hx2023.data.TRHInfo; |
| | | import com.fzzy.gateway.hx2023.data.*; |
| | | import com.fzzy.gateway.service.repository.GatewayDeviceRep; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | int cableNum = 1, position = 0; |
| | | |
| | | String curTemp; |
| | | List<KafkaGrainDataDetail> temperature = new ArrayList<>(); |
| | | List<KafkaGrainDataDetail1> temperature = new ArrayList<>(); |
| | | |
| | | int x = 0, y = 0, z = 0; |
| | | for (int i = 0; i < attr.length; i++) { |
| | |
| | | result.setMinZ(position); |
| | | } |
| | | |
| | | temperature.add(new KafkaGrainDataDetail(cableNum + "", z + "", curTemp, position + "", x, y)); |
| | | temperature.add(new KafkaGrainDataDetail1(cableNum + "", z + "", curTemp, position + "", x, y)); |
| | | } |
| | | |
| | | //粮温信息 |
| | | TRHInfo trhInfo = new TRHInfo(); |
| | | trhInfo.setTemperature(temperature); |
| | | |
| | | JSONObject trhInfo = new JSONObject(); |
| | | // TRHInfo trhInfo = new TRHInfo(); |
| | | trhInfo.put("temperature",temperature); |
| | | |
| | | |
| | | //仓温度信息 |
| | |
| | | List<KafkaGrainTH> temperatureAndhumidity = new ArrayList<>(); |
| | | temperatureAndhumidity.add(grainTH); |
| | | |
| | | trhInfo.setTemperatureAndhumidity(temperatureAndhumidity); |
| | | |
| | | // trhInfo.setTemperatureAndhumidity(temperatureAndhumidity); |
| | | trhInfo.put("temperatureAndhumidity",temperatureAndhumidity); |
| | | |
| | | JSONObject params = new JSONObject(); |
| | | params.put("TRHInfo", trhInfo); |