From 54b61daf58037385cb8d46404b12a95786c7c8f3 Mon Sep 17 00:00:00 2001
From: czt <czt18638530771@163.com>
Date: 星期五, 28 六月 2024 19:55:06 +0800
Subject: [PATCH] 上海省平台协议-增加数据相符性接口

---
 src/main/java/com/fzzy/otherview/sh2023/pr/SHApi2103PR.java |   25 ++++++++++++++-----------
 1 files changed, 14 insertions(+), 11 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..6fd38c7 100644
--- a/src/main/java/com/fzzy/otherview/sh2023/pr/SHApi2103PR.java
+++ b/src/main/java/com/fzzy/otherview/sh2023/pr/SHApi2103PR.java
@@ -130,7 +130,7 @@
         infoData.setUpdateTime(new Date());
         infoData.setDataId(data.getHwdm());
         infoData.setData(JSON.toJSONString(data));
-        infoData.setCzbz(Constant.CZBZ_I);
+        infoData.setCzbz(data.getCzbz());
         infoData.setRemarks("澶囨敞淇℃伅");
 
         apiInfoDataRep.save(infoData);
@@ -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