From a1d6638c3dad0a2c42aa3f35b0c080738f69bd9b Mon Sep 17 00:00:00 2001
From: CZT <czt18638530771@163.com>
Date: 星期一, 15 一月 2024 19:05:39 +0800
Subject: [PATCH] 调整上海接口数据实时性

---
 src/main/java/com/fzzy/push/impl/ComPushService11.java |  116 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 114 insertions(+), 2 deletions(-)

diff --git a/src/main/java/com/fzzy/push/impl/ComPushService11.java b/src/main/java/com/fzzy/push/impl/ComPushService11.java
index 78705ed..ffeab90 100644
--- a/src/main/java/com/fzzy/push/impl/ComPushService11.java
+++ b/src/main/java/com/fzzy/push/impl/ComPushService11.java
@@ -3,9 +3,9 @@
 import com.fzzy.api.Constant;
 import com.fzzy.api.data.ApiParam;
 import com.fzzy.api.dto.ResponseDto;
-import com.fzzy.api.entity.Api1111;
+import com.fzzy.api.entity.*;
 import com.fzzy.api.service.ApiRemoteService;
-import com.fzzy.api.view.repository.Api1111Rep;
+import com.fzzy.api.view.repository.*;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -20,7 +20,92 @@
 public class ComPushService11 {
 
     @Autowired
+    private Api1101Rep api1101Rep;
+    @Autowired
+    private Api1102Rep api1102Rep;
+    @Autowired
+    private Api1107Rep api1107Rep;
+    @Autowired
     private Api1111Rep api1111Rep;
+    @Autowired
+    private Api1112Rep api1112Rep;
+    /**
+     * 1101 鍗曚綅淇℃伅
+     */
+    public void pushData1101(ApiRemoteService apiRemoteService, ApiParam param) {
+
+        List<Api1101> items = api1101Rep.findPushData(param.getKqdm());
+        if (null == items || items.isEmpty()) {
+            return;
+        }
+
+        param.setInteCategory(Constant.API_CATEGORY_11);
+        param.setInteId(Constant.API_CODE_1101);
+
+        ResponseDto responseDto;
+        for (Api1101 data : items) {
+            param.setBizId(data.getBizId());
+            responseDto = apiRemoteService.pushData(param, data);
+
+            if (responseDto.getSuccess() == 0) {
+                if (Constant.CZBZ_I.equals(data.getCzbz())) {
+                    api1101Rep.updateStatus(data.getDwdm(), Constant.CZBZ_U);
+                }
+            }
+        }
+    }
+
+    /**
+     * 1102 搴撳尯淇℃伅
+     */
+    public void pushData1102(ApiRemoteService apiRemoteService, ApiParam param) {
+
+        List<Api1102> items = api1102Rep.findPushData(param.getKqdm());
+        if (null == items || items.isEmpty()) {
+            return;
+        }
+
+        param.setInteCategory(Constant.API_CATEGORY_11);
+        param.setInteId(Constant.API_CODE_1102);
+
+        ResponseDto responseDto;
+        for (Api1102 data : items) {
+            param.setBizId(data.getBizId());
+            responseDto = apiRemoteService.pushData(param, data);
+
+            if (responseDto.getSuccess() == 0) {
+                if (Constant.CZBZ_I.equals(data.getCzbz())) {
+                    api1102Rep.updateStatus(data.getDwdm(), Constant.CZBZ_U);
+                }
+            }
+        }
+    }
+
+    /**
+     * 1107 璁惧淇℃伅
+     */
+    public void pushData1107(ApiRemoteService apiRemoteService, ApiParam param) {
+
+        List<Api1107> items = api1107Rep.findPushData(param.getKqdm());
+        if (null == items || items.isEmpty()) {
+            return;
+        }
+
+        param.setInteCategory(Constant.API_CATEGORY_11);
+        param.setInteId(Constant.API_CODE_1107);
+
+        ResponseDto responseDto;
+        for (Api1107 data : items) {
+            param.setBizId(data.getBizId());
+            responseDto = apiRemoteService.pushData(param, data);
+
+            if (responseDto.getSuccess() == 0) {
+                if (Constant.CZBZ_I.equals(data.getCzbz())) {
+                    api1107Rep.updateStatus(data.getDwdm(), Constant.CZBZ_U);
+                }
+            }
+        }
+    }
 
     /**
      * 1111 搴撳尯鍥捐棰戠洃鎺ц澶囩偣浣嶆爣娉�
@@ -47,4 +132,31 @@
             }
         }
     }
+
+    /**
+     * 1112 浜哄憳淇℃伅
+     *
+     */
+    public void pushData1112(ApiRemoteService apiRemoteService, ApiParam param) {
+
+        List<Api1112> items = api1112Rep.findPushData(param.getKqdm());
+        if (null == items || items.isEmpty()) {
+            return;
+        }
+
+        param.setInteCategory(Constant.API_CATEGORY_11);
+        param.setInteId(Constant.API_CODE_1112);
+
+        ResponseDto responseDto;
+        for (Api1112 data : items) {
+            param.setBizId(data.getBizId());
+            responseDto = apiRemoteService.pushData(param, data);
+
+            if (responseDto.getSuccess() == 0) {
+                if (Constant.CZBZ_I.equals(data.getCzbz())) {
+                    api1112Rep.updateStatus(data.getSfzhm(), Constant.CZBZ_U);
+                }
+            }
+        }
+    }
 }

--
Gitblit v1.9.3