From 14605ba25b4d950df29ac7a44bf65ccc3472ffff Mon Sep 17 00:00:00 2001 From: YYC <1833023622@qq.com> Date: 星期日, 28 九月 2025 11:30:02 +0800 Subject: [PATCH] 仓房外湿 --- src/main/java/com/fzzy/async/fzzy40/impl/Fzzy40Sync1302.java | 29 ++++++++++++++++++++--------- 1 files changed, 20 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/fzzy/async/fzzy40/impl/Fzzy40Sync1302.java b/src/main/java/com/fzzy/async/fzzy40/impl/Fzzy40Sync1302.java index b093d1d..242fcb7 100644 --- a/src/main/java/com/fzzy/async/fzzy40/impl/Fzzy40Sync1302.java +++ b/src/main/java/com/fzzy/async/fzzy40/impl/Fzzy40Sync1302.java @@ -61,13 +61,12 @@ apiLog.setId(ContextUtil.getUUID()); try { List<Fz40Grain> list = fzzySync1302Rep.findByReceiveDate(start, end); - log.info(DateUtils.format("yyyy-MM-dd HH:mm:ss", start)); - log.info(DateUtils.format("yyyy-MM-dd HH:mm:ss", end)); + if (null == list || list.isEmpty()) { log.info("1302---鍚屾鏁版嵁锛氭病鏈夋煡璇㈠埌闇�瑕佸悓姝ョ殑鏁版嵁"); return; } - log.info(JSONObject.toJSONString(list)); + Date syncTime = new Date(); Api1302 api1302; Api1105 api1105; @@ -87,14 +86,14 @@ api1302.setCfww(fz40Grain.getTempOut() == null ? 0.00 : fz40Grain.getTempOut()); if (null == fz40Grain.getHumidityOut() || fz40Grain.getHumidityOut() < 0) { - api1302.setCfws(-1); + api1302.setCfws(0); } else { api1302.setCfws(fz40Grain.getHumidityOut()); } api1302.setCfnw(fz40Grain.getTempIn() == null ? 0.00 : fz40Grain.getTempIn()); if (null == fz40Grain.getHumidityIn() || fz40Grain.getHumidityIn() < 0) { - api1302.setCfns(-1); + api1302.setCfns(0); } else { api1302.setCfns(fz40Grain.getHumidityIn()); } @@ -185,7 +184,10 @@ } } } - return result.substring(1); + if(result.length() > 0){ + result = result.substring(1); + } + return result; } /** @@ -216,7 +218,10 @@ } } - return result.substring(1); + if(result.length() > 0){ + result = result.substring(1); + } + return result; } /** @@ -239,7 +244,10 @@ } } } - return result.substring(1); + if(result.length() > 0){ + result = result.substring(1); + } + return result; } /** @@ -270,6 +278,9 @@ } } - return result.substring(1); + if(result.length() > 0){ + result = result.substring(1); + } + return result; } } -- Gitblit v1.9.3