From 33ad92a73de17e8d72f30632ced04dca5719f76e Mon Sep 17 00:00:00 2001 From: YYC <1833023622@qq.com> Date: 星期二, 22 四月 2025 15:51:55 +0800 Subject: [PATCH] 数据同步调整 --- src/main/java/com/fzzy/async/fzzy40/impl/Fzzy40Sync1302.java | 27 +++++++++++++++++++-------- 1 files changed, 19 insertions(+), 8 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..aa3f93b 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; @@ -94,7 +93,7 @@ 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