From 93e01fa050330ead95041ed11cc85e9765c19fc1 Mon Sep 17 00:00:00 2001 From: vince <757871790@qq.com> Date: 星期四, 09 十一月 2023 12:06:52 +0800 Subject: [PATCH] 手动测试 --- src/main/java/com/fzzy/gateway/hx2023/service/HxGatewaySyncGrainImpl.java | 18 ++++++++++++++++-- 1 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/fzzy/gateway/hx2023/service/HxGatewaySyncGrainImpl.java b/src/main/java/com/fzzy/gateway/hx2023/service/HxGatewaySyncGrainImpl.java index 11cc0e9..d6f948e 100644 --- a/src/main/java/com/fzzy/gateway/hx2023/service/HxGatewaySyncGrainImpl.java +++ b/src/main/java/com/fzzy/gateway/hx2023/service/HxGatewaySyncGrainImpl.java @@ -13,6 +13,7 @@ import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang.StringUtils; import org.springframework.stereotype.Component; +import org.springframework.stereotype.Service; import java.util.ArrayList; import java.util.List; @@ -22,7 +23,7 @@ */ @Slf4j @Data -@Component +@Service public class HxGatewaySyncGrainImpl implements GatewaySyncGranService { @@ -135,7 +136,6 @@ //鏍瑰彿 cableNum = (i / cableZ) + 1; - temperature.add(new GrainTemp(cableNum + "", z + "", curTemp + "", position + "")); } @@ -143,6 +143,20 @@ grain.setOutPut(outPut); + //姘旇薄淇℃伅 + GrainWeather weatherStation = new GrainWeather(); + weatherStation.setMessageId(ScConstant.getMessageId()); + weatherStation.setId(device.getDeviceId()); + weatherStation.setAirPressure(weather.getPressure()); + weatherStation.setHumidity(weather.getHumidity()); + weatherStation.setPm(weather.getAir_pm25()); + weatherStation.setRadiation("0"); + weatherStation.setRainfallAmount(weather.getWea()); + weatherStation.setTemperature(weather.getTem()); + weatherStation.setWindDirection(weather.getWin()); + weatherStation.setWindPower(weather.getWin_meter()); + weatherStation.setWindSpeed(weather.getWin_speed()); + grain.setWeatherStation(weatherStation); BaseResp resp = new BaseResp(); resp.setData(JSONObject.toJSONString(grain)); -- Gitblit v1.9.3