From da0dfffe0c57ed3ca0c66b24a68ccc64da0873c9 Mon Sep 17 00:00:00 2001
From: CZT <czt18638530771@163.com>
Date: 星期四, 19 十月 2023 20:19:51 +0800
Subject: [PATCH] 调整上海接口-船运时调整每车为一条数据

---
 src/main/java/com/fzzy/otherview/sh2023/pr/SHApi2103PR.java |   20 +++++++-------------
 1 files changed, 7 insertions(+), 13 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 ccb10da..5b6c37e 100644
--- a/src/main/java/com/fzzy/otherview/sh2023/pr/SHApi2103PR.java
+++ b/src/main/java/com/fzzy/otherview/sh2023/pr/SHApi2103PR.java
@@ -158,7 +158,7 @@
 
     @Expose
     public String pushData(List<SH2023Api2103> items) {
-        ResponseDto responseDto;
+
         String result = "";
 
         String kqdm = items.get(0).getHwdm().substring(0, 21);
@@ -169,7 +169,7 @@
         }
 
         //灏佽鍙傛暟
-        ApiParam param = new ApiParam(apiConf, "21", SH2023Constant.SH_2023_API_CODE_2103);
+        ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_13, SH2023Constant.SH_2023_API_CODE_2103);
 
         //鑾峰彇瀹炵幇鎺ュ彛
         ApiRemoteService apiService = apiPushManager.getApiRemoteService(param.getPushProtocol());
@@ -177,14 +177,11 @@
             return "绯荤粺娌℃湁褰撳墠鎺ㄩ�佸崗璁厤缃紝鎵ц澶辫触";
         }
 
-        //鎺ㄩ�侊紝鏁版嵁涓洪泦鍚堝舰寮�
-        responseDto = apiService.pushData(param, apiConf, items);
-        if (responseDto.getSuccess() == 0) {
-            //鎺ㄩ�佹垚鍔燂紝鏇存柊鏁版嵁涓婁紶鐘舵��
-
-            ApiInfoData infoData;
-            for (SH2023Api2103 data : items) {
-
+        ResponseDto responseDto;
+        ApiInfoData infoData;
+        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));
@@ -195,13 +192,10 @@
 
                 infoData.setCzbz(Constant.CZBZ_U);
                 infoData.setData(JSON.toJSONString(data));
-
                 apiInfoDataRep.save(infoData);
-
             }
             result += responseDto.toString();
         }
         return result;
     }
-
 }

--
Gitblit v1.9.3