From 07ff6686da8e9922a6f5a4f276e69d045e12a044 Mon Sep 17 00:00:00 2001 From: CZT <czt18638530771@163.com> Date: 星期五, 20 十月 2023 15:59:23 +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