From caf2599a9869244ded811018811c37a2aabac3fc Mon Sep 17 00:00:00 2001 From: vince <757871790@qq.com> Date: 星期三, 08 一月 2025 11:29:05 +0800 Subject: [PATCH] 优化测温协议 --- src/main/java/com/fzzy/otherview/sh2023/pr/SHApi2103PR.java | 23 +++++++++++++---------- 1 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/fzzy/otherview/sh2023/pr/SHApi2103PR.java b/src/main/java/com/fzzy/otherview/sh2023/pr/SHApi2103PR.java index 5b6c37e..a539e34 100644 --- a/src/main/java/com/fzzy/otherview/sh2023/pr/SHApi2103PR.java +++ b/src/main/java/com/fzzy/otherview/sh2023/pr/SHApi2103PR.java @@ -182,17 +182,20 @@ for (SH2023Api2103 data : items) { responseDto = apiService.pushData(param, apiConf, data); if (responseDto.getSuccess() == 0) { - infoData = new ApiInfoData(); - infoData.setId(data.getHwdm()); - infoData.setKqdm(data.getHwdm().substring(0, 21)); - infoData.setInteType("21"); - infoData.setInteId(SH2023Constant.SH_2023_API_CODE_2103); - infoData.setUpdateTime(new Date()); - infoData.setDataId(data.getHwdm()); + if (Constant.CZBZ_I.equals(data.getCzbz())) { + infoData = new ApiInfoData(); + infoData.setId(data.getHwdm()); + infoData.setKqdm(data.getHwdm().substring(0, 21)); + infoData.setInteType("21"); + infoData.setInteId(SH2023Constant.SH_2023_API_CODE_2103); + infoData.setUpdateTime(new Date()); + infoData.setDataId(data.getHwdm()); - infoData.setCzbz(Constant.CZBZ_U); - infoData.setData(JSON.toJSONString(data)); - apiInfoDataRep.save(infoData); + infoData.setCzbz(Constant.CZBZ_U); + data.setCzbz(Constant.CZBZ_U); + infoData.setData(JSON.toJSONString(data)); + apiInfoDataRep.save(infoData); + } } result += responseDto.toString(); } -- Gitblit v1.9.3