From 87c294b80b2ef656ac08a0a3f970cc535c83e15b Mon Sep 17 00:00:00 2001
From: YYC <1833023622@qq.com>
Date: 星期一, 29 一月 2024 00:12:32 +0800
Subject: [PATCH] 仲恺
---
src/main/java/com/fzzy/push/sh2023/SH2023PushService12.java | 286 ++++++++++++++++++++++++++++++++------------------------
1 files changed, 164 insertions(+), 122 deletions(-)
diff --git a/src/main/java/com/fzzy/push/sh2023/SH2023PushService12.java b/src/main/java/com/fzzy/push/sh2023/SH2023PushService12.java
index ecd3ff4..2ada2b2 100644
--- a/src/main/java/com/fzzy/push/sh2023/SH2023PushService12.java
+++ b/src/main/java/com/fzzy/push/sh2023/SH2023PushService12.java
@@ -9,9 +9,8 @@
import com.fzzy.api.service.ApiRemoteService;
import com.fzzy.api.service.PushService11;
import com.fzzy.api.view.repository.*;
-import com.fzzy.otherview.sh2023.dto.ShApi2101;
-import com.fzzy.push.sh2023.dto.SH2023Api1401;
import com.fzzy.push.sh2023.dto.SH2023Api2101;
+import com.fzzy.push.sh2023.dto.SH2023Api2104;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@@ -68,31 +67,30 @@
public void pushData(ApiParam param) {
log.info("------->>>>绮璐攢 鎺ュ彛妯″潡涓婃姤寮�濮�");
- //鎺ㄩ�佸悎鍚屼俊鎭�
- this.pushData1201(apiRemoteService, param);
- //绮鍏ュ簱淇℃伅
- this.pushData1202(apiRemoteService, param);
- //绮鍏ュ簱妫�楠屼俊鎭�
- this.pushData1203(apiRemoteService, param);
- //绮鍏ュ簱缁撶畻淇℃伅
- this.pushData1204(apiRemoteService, param);
- //绮鍑哄簱淇℃伅
- this.pushData1205(apiRemoteService, param);
- //绮鍑哄簱缁撶畻淇℃伅
- this.pushData1206(apiRemoteService, param);
- //鍊掍粨鍊掑嚭
- this.pushData1207(apiRemoteService, param);
- //绮搴撳瓨
- this.pushData1208(apiRemoteService, param);
- //鎹熸孩鍗�
- this.pushData1209(apiRemoteService, param);
- //绮鎬ц川杞彉鍗�
- this.pushData1210(apiRemoteService, param);
- //璐﹂潰搴撳瓨
- this.pushData1211(apiRemoteService, param);
- //瀹㈡埛淇℃伅
- this.pushData1212(apiRemoteService, param);
-
+// //鎺ㄩ�佸悎鍚屼俊鎭�
+// this.pushData1201(apiRemoteService, param);
+// //绮鍏ュ簱淇℃伅
+// this.pushData1202(apiRemoteService, param);
+// //绮鍏ュ簱妫�楠屼俊鎭�
+// this.pushData1203(apiRemoteService, param);
+// //绮鍏ュ簱缁撶畻淇℃伅
+// this.pushData1204(apiRemoteService, param);
+// //绮鍑哄簱淇℃伅
+// this.pushData1205(apiRemoteService, param);
+// //绮鍑哄簱缁撶畻淇℃伅
+// this.pushData1206(apiRemoteService, param);
+// //鍊掍粨鍊掑嚭
+// this.pushData1207(apiRemoteService, param);
+// //绮搴撳瓨
+// this.pushData1208(apiRemoteService, param);
+// //鎹熸孩鍗�
+// this.pushData1209(apiRemoteService, param);
+// //绮鎬ц川杞彉鍗�
+// this.pushData1210(apiRemoteService, param);
+// //璐﹂潰搴撳瓨
+// this.pushData1211(apiRemoteService, param);
+// //瀹㈡埛淇℃伅
+// this.pushData1212(apiRemoteService, param);
log.info("------->>>>绮璐攢 鎺ュ彛妯″潡涓婃姤缁撴潫");
}
@@ -108,16 +106,16 @@
log.error("-----涓婃捣甯傚钩鍙�2023鐗堬細鏈幏鍙栧埌鍚堝悓淇℃伅锛屼笉鎺ㄩ��-----");
return;
}
+ param.setInteCategory(Constant.API_CATEGORY_12);
param.setInteId(SH2023Constant.SH_2023_API_CODE_1201);
- //鎺ㄩ�侊紝鏁版嵁涓洪泦鍚堝舰寮�
- ResponseDto responseDto = apiRemoteService.pushData(param, list);
- if (responseDto.getSuccess() == 0) {
- //鎺ㄩ�佹垚鍔燂紝鏇存柊鏁版嵁涓婁紶鐘舵��
- for (Api1201 data : list) {
- if (Constant.CZBZ_I.equals(data.getCzbz())) {
+ ResponseDto responseDto;
+ for (Api1201 data : list) {
+ param.setBizId(data.getBizId());
+ responseDto = apiRemoteService.pushData(param, data);
+ if (responseDto.getSuccess() == 0) {
+ if (Constant.CZBZ_I.equals(data.getCzbz())) {
data.setCzbz(Constant.CZBZ_U);
- //鏇存柊鐘舵��
api1201Rep.save(data);
}
}
@@ -135,14 +133,15 @@
log.error("-----涓婃捣甯傚钩鍙�2023鐗堬細鏈幏鍙栧埌绮鍏ュ簱淇℃伅锛屼笉鎺ㄩ��-----");
return;
}
+ param.setInteCategory(Constant.API_CATEGORY_12);
param.setInteId(SH2023Constant.SH_2023_API_CODE_1202);
- //鎺ㄩ�侊紝鏁版嵁涓洪泦鍚堝舰寮�
- ResponseDto responseDto = apiRemoteService.pushData(param, list);
- if (responseDto.getSuccess() == 0) {
- //鎺ㄩ�佹垚鍔燂紝鏇存柊鏁版嵁涓婁紶鐘舵��
- for (Api1202 data : list) {
- if (Constant.CZBZ_I.equals(data.getCzbz())) {
+ ResponseDto responseDto;
+ for (Api1202 data : list) {
+ param.setBizId(data.getBizId());
+ responseDto = apiRemoteService.pushData(param, data);
+ if (responseDto.getSuccess() == 0) {
+ if (Constant.CZBZ_I.equals(data.getCzbz())) {
data.setCzbz(Constant.CZBZ_U);
//鏇存柊鐘舵��
api1202Rep.save(data);
@@ -162,14 +161,15 @@
log.error("-----涓婃捣甯傚钩鍙�2023鐗堬細鏈幏鍙栧埌绮鍏ュ簱妫�楠屼俊鎭紝涓嶆帹閫�-----");
return;
}
+ param.setInteCategory(Constant.API_CATEGORY_12);
param.setInteId(SH2023Constant.SH_2023_API_CODE_1203);
- //鎺ㄩ�侊紝鏁版嵁涓洪泦鍚堝舰寮�
- ResponseDto responseDto = apiRemoteService.pushData(param, list);
- if (responseDto.getSuccess() == 0) {
- //鎺ㄩ�佹垚鍔燂紝鏇存柊鏁版嵁涓婁紶鐘舵��
- for (Api1203 data : list) {
- if (Constant.CZBZ_I.equals(data.getCzbz())) {
+ ResponseDto responseDto;
+ for (Api1203 data : list) {
+ param.setBizId(data.getBizId());
+ responseDto = apiRemoteService.pushData(param, data);
+ if (responseDto.getSuccess() == 0) {
+ if (Constant.CZBZ_I.equals(data.getCzbz())) {
data.setCzbz(Constant.CZBZ_U);
//鏇存柊鐘舵��
api1203Rep.save(data);
@@ -190,21 +190,21 @@
log.error("-----涓婃捣甯傚钩鍙�2023鐗堬細鏈幏鍙栧埌绮鍏ュ簱缁撶畻淇℃伅锛屼笉鎺ㄩ��-----");
return;
}
+ param.setInteCategory(Constant.API_CATEGORY_12);
param.setInteId(SH2023Constant.SH_2023_API_CODE_1204);
- //鎺ㄩ�侊紝鏁版嵁涓洪泦鍚堝舰寮�
- ResponseDto responseDto = apiRemoteService.pushData(param, list);
- if (responseDto.getSuccess() == 0) {
- //鎺ㄩ�佹垚鍔燂紝鏇存柊鏁版嵁涓婁紶鐘舵��
- for (Api1204 data : list) {
- if (Constant.CZBZ_I.equals(data.getCzbz())) {
+ ResponseDto responseDto;
+ for (Api1204 data : list) {
+ param.setBizId(data.getBizId());
+ responseDto = apiRemoteService.pushData(param, data);
+ if (responseDto.getSuccess() == 0) {
+ if (Constant.CZBZ_I.equals(data.getCzbz())) {
data.setCzbz(Constant.CZBZ_U);
//鏇存柊鐘舵��
api1204Rep.save(data);
}
}
}
-
}
/**
@@ -218,14 +218,15 @@
log.error("-----涓婃捣甯傚钩鍙�2023鐗堬細鏈幏鍙栧埌绮鍑哄簱淇℃伅锛屼笉鎺ㄩ��-----");
return;
}
+ param.setInteCategory(Constant.API_CATEGORY_12);
param.setInteId(SH2023Constant.SH_2023_API_CODE_1205);
- //鎺ㄩ�侊紝鏁版嵁涓洪泦鍚堝舰寮�
- ResponseDto responseDto = apiRemoteService.pushData(param, list);
- if (responseDto.getSuccess() == 0) {
- //鎺ㄩ�佹垚鍔燂紝鏇存柊鏁版嵁涓婁紶鐘舵��
- for (Api1205 data : list) {
- if (Constant.CZBZ_I.equals(data.getCzbz())) {
+ ResponseDto responseDto;
+ for (Api1205 data : list) {
+ param.setBizId(data.getBizId());
+ responseDto = apiRemoteService.pushData(param, data);
+ if (responseDto.getSuccess() == 0) {
+ if (Constant.CZBZ_I.equals(data.getCzbz())) {
data.setCzbz(Constant.CZBZ_U);
//鏇存柊鐘舵��
api1205Rep.save(data);
@@ -245,12 +246,13 @@
log.error("-----涓婃捣甯傚钩鍙�2023鐗堬細鏈幏鍙栧埌绮鍑哄簱缁撶畻淇℃伅锛屼笉鎺ㄩ��-----");
return;
}
+ param.setInteCategory(Constant.API_CATEGORY_12);
param.setInteId(SH2023Constant.SH_2023_API_CODE_1206);
- //鎺ㄩ�侊紝鏁版嵁涓洪泦鍚堝舰寮�
- ResponseDto responseDto = apiRemoteService.pushData(param, list);
- if (responseDto.getSuccess() == 0) {
- //鎺ㄩ�佹垚鍔燂紝鏇存柊鏁版嵁涓婁紶鐘舵��
- for (Api1206 data : list) {
+ ResponseDto responseDto;
+ for (Api1206 data : list) {
+ param.setBizId(data.getBizId());
+ responseDto = apiRemoteService.pushData(param, data);
+ if (responseDto.getSuccess() == 0) {
if (Constant.CZBZ_I.equals(data.getCzbz())) {
data.setCzbz(Constant.CZBZ_U);
@@ -259,7 +261,6 @@
}
}
}
-
}
/**
@@ -273,21 +274,21 @@
log.error("-----涓婃捣甯傚钩鍙�2023鐗堬細鏈幏鍙栧埌鍊掍粨淇℃伅锛屼笉鎺ㄩ��-----");
return;
}
+ param.setInteCategory(Constant.API_CATEGORY_12);
param.setInteId(SH2023Constant.SH_2023_API_CODE_1207);
- //鎺ㄩ�侊紝鏁版嵁涓洪泦鍚堝舰寮�
- ResponseDto responseDto = apiRemoteService.pushData(param, list);
- if (responseDto.getSuccess() == 0) {
- //鎺ㄩ�佹垚鍔燂紝鏇存柊鏁版嵁涓婁紶鐘舵��
- for (Api1207 data : list) {
- if (Constant.CZBZ_I.equals(data.getCzbz())) {
+ ResponseDto responseDto;
+ for (Api1207 data : list) {
+ param.setBizId(data.getBizId());
+ responseDto = apiRemoteService.pushData(param, data);
+ if (responseDto.getSuccess() == 0) {
+ if (Constant.CZBZ_I.equals(data.getCzbz())) {
data.setCzbz(Constant.CZBZ_U);
//鏇存柊鐘舵��
api1207Rep.save(data);
}
}
}
-
}
/**
@@ -301,12 +302,14 @@
log.error("-----涓婃捣甯傚钩鍙�2023鐗堬細鏈幏鍙栧埌绮搴撳瓨淇℃伅锛屼笉鎺ㄩ��-----");
return;
}
+ param.setInteCategory(Constant.API_CATEGORY_12);
param.setInteId(SH2023Constant.SH_2023_API_CODE_1208);
- //鎺ㄩ�侊紝鏁版嵁涓洪泦鍚堝舰寮�
- ResponseDto responseDto = apiRemoteService.pushData(param, list);
- if (responseDto.getSuccess() == 0) {
- //鎺ㄩ�佹垚鍔燂紝鏇存柊鏁版嵁涓婁紶鐘舵��
- for (Api1208 data : list) {
+
+ ResponseDto responseDto;
+ for (Api1208 data : list) {
+ param.setBizId(data.getBizId());
+ responseDto = apiRemoteService.pushData(param, data);
+ if (responseDto.getSuccess() == 0) {
if (Constant.CZBZ_I.equals(data.getCzbz())) {
data.setCzbz(Constant.CZBZ_U);
@@ -315,7 +318,6 @@
}
}
}
-
}
/**
@@ -329,12 +331,14 @@
log.error("-----涓婃捣甯傚钩鍙�2023鐗堬細鏈幏鍙栧埌绮搴撳瓨淇℃伅锛屼笉鎺ㄩ��-----");
return;
}
+ param.setInteCategory(Constant.API_CATEGORY_12);
param.setInteId(SH2023Constant.SH_2023_API_CODE_1209);
- //鎺ㄩ�侊紝鏁版嵁涓洪泦鍚堝舰寮�
- ResponseDto responseDto = apiRemoteService.pushData(param, list);
- if (responseDto.getSuccess() == 0) {
- //鎺ㄩ�佹垚鍔燂紝鏇存柊鏁版嵁涓婁紶鐘舵��
- for (Api1209 data : list) {
+
+ ResponseDto responseDto;
+ for (Api1209 data : list) {
+ param.setBizId(data.getBizId());
+ responseDto = apiRemoteService.pushData(param, data);
+ if (responseDto.getSuccess() == 0) {
if (Constant.CZBZ_I.equals(data.getCzbz())) {
data.setCzbz(Constant.CZBZ_U);
@@ -343,8 +347,6 @@
}
}
}
-
-
}
/**
@@ -358,14 +360,15 @@
log.error("-----涓婃捣甯傚钩鍙�2023鐗堬細鏈幏鍙栧埌绮搴撳瓨淇℃伅锛屼笉鎺ㄩ��-----");
return;
}
+ param.setInteCategory(Constant.API_CATEGORY_12);
param.setInteId(SH2023Constant.SH_2023_API_CODE_1210);
- //鎺ㄩ�侊紝鏁版嵁涓洪泦鍚堝舰寮�
- ResponseDto responseDto = apiRemoteService.pushData(param, list);
- if (responseDto.getSuccess() == 0) {
- //鎺ㄩ�佹垚鍔燂紝鏇存柊鏁版嵁涓婁紶鐘舵��
- for (Api1210 data : list) {
- if (Constant.CZBZ_I.equals(data.getCzbz())) {
+ ResponseDto responseDto;
+ for (Api1210 data : list) {
+ param.setBizId(data.getBizId());
+ responseDto = apiRemoteService.pushData(param, data);
+ if (responseDto.getSuccess() == 0) {
+ if (Constant.CZBZ_I.equals(data.getCzbz())) {
data.setCzbz(Constant.CZBZ_U);
//鏇存柊鐘舵��
api1210Rep.save(data);
@@ -379,7 +382,29 @@
*/
public void pushData1211(ApiRemoteService apiRemoteService, ApiParam param) {
//TODO
+ //绮鎬ц川杞彉鍗�
+ List<Api1211> list = api1211Rep.findPushDataByTime(param.getKqdm(), param.getStart(), param.getEnd());
+ if (null == list || list.isEmpty()) {
+ log.error("-----涓婃捣甯傚钩鍙�2023鐗堬細鏈幏鍙栧埌绮搴撳瓨淇℃伅锛屼笉鎺ㄩ��-----");
+ return;
+ }
+ param.setInteCategory(Constant.API_CATEGORY_12);
+ param.setInteId(SH2023Constant.SH_2023_API_CODE_1210);
+
+ ResponseDto responseDto;
+ for (Api1211 data : list) {
+ param.setBizId(data.getBizId());
+ responseDto = apiRemoteService.pushData(param, data);
+ if (responseDto.getSuccess() == 0) {
+ if (Constant.CZBZ_I.equals(data.getCzbz())) {
+
+ data.setCzbz(Constant.CZBZ_U);
+ //鏇存柊鐘舵��
+ api1211Rep.save(data);
+ }
+ }
+ }
}
/**
@@ -393,14 +418,15 @@
log.error("-----涓婃捣甯傚钩鍙�2023鐗堬細鏈幏鍙栧埌瀹㈡埛淇℃伅锛屼笉鎺ㄩ��-----");
return;
}
+ param.setInteCategory(Constant.API_CATEGORY_12);
param.setInteId(SH2023Constant.SH_2023_API_CODE_1212);
- //鎺ㄩ�侊紝鏁版嵁涓洪泦鍚堝舰寮�
- ResponseDto responseDto = apiRemoteService.pushData(param, list);
- if (responseDto.getSuccess() == 0) {
- //鎺ㄩ�佹垚鍔燂紝鏇存柊鏁版嵁涓婁紶鐘舵��
- for (Api1212 data : list) {
- if (Constant.CZBZ_I.equals(data.getCzbz())) {
+ ResponseDto responseDto;
+ for (Api1212 data : list) {
+ param.setBizId(data.getBizId());
+ responseDto = apiRemoteService.pushData(param, data);
+ if (responseDto.getSuccess() == 0) {
+ if (Constant.CZBZ_I.equals(data.getCzbz())) {
data.setCzbz(Constant.CZBZ_U);
//鏇存柊鐘舵��
api1212Rep.save(data);
@@ -413,31 +439,27 @@
* 2101 妫�鏂ゅ崟
*/
public void pushData2101(ApiRemoteService apiRemoteService, ApiParam param) {
-
//鑾峰彇 妫�鏂ゅ崟淇℃伅
- List<ApiInfoData> items = apiInfoDataRep.getDataByInteId(SH2023Constant.SH_2023_API_CODE_2101);
-
- SH2023Api2101 shApi2101;
- List<SH2023Api2101> list = new ArrayList<>();
-
- param.setInteId(SH2023Constant.SH_2023_API_CODE_2101);
- for (ApiInfoData infoData : items) {
- shApi2101 = JSONObject.parseObject(infoData.getData(), SH2023Api2101.class);
- shApi2101.setCzbz(infoData.getCzbz());
- shApi2101.setZhgxsj(infoData.getUpdateTime());
- list.add(shApi2101);
- }
- ResponseDto responseDto = apiRemoteService.pushData(param, list);
- if (responseDto.getSuccess() == 0) {
- //鎺ㄩ�佹垚鍔燂紝鏇存柊鏁版嵁涓婁紶鐘舵��
- for (ApiInfoData data : items) {
- if (Constant.CZBZ_I.equals(data.getCzbz())) {
-
- data.setCzbz(Constant.CZBZ_U);
- apiInfoDataRep.save(data);
- }
- }
- }
+// List<ApiInfoData> items = apiInfoDataRep.getDataByInteId(SH2023Constant.SH_2023_API_CODE_2101);
+//
+// param.setInteCategory(Constant.API_CATEGORY_12);
+// param.setInteId(SH2023Constant.SH_2023_API_CODE_2101);
+//
+// ResponseDto responseDto;
+// SH2023Api2101 shApi2101;
+// for (ApiInfoData infoData : items) {
+// shApi2101 = JSONObject.parseObject(infoData.getData(), SH2023Api2101.class);
+// shApi2101.setCzbz(infoData.getCzbz());
+// shApi2101.setZhgxsj(infoData.getUpdateTime());
+// param.setBizId(infoData.getDataId());
+// responseDto = apiRemoteService.pushData(param, shApi2101);
+// if (responseDto.getSuccess() == 0) {
+// if (Constant.CZBZ_I.equals(infoData.getCzbz())) {
+// infoData.setCzbz(Constant.CZBZ_U);
+// apiInfoDataRep.save(infoData);
+// }
+// }
+// }
}
/**
@@ -452,7 +474,27 @@
* 2104 甯傚偍椹宠繍鍗�
*/
public void pushData2104(ApiRemoteService apiRemoteService, ApiParam param) {
- //TODO
+ //鑾峰彇 妫�鏂ゅ崟淇℃伅
+// List<ApiInfoData> items = apiInfoDataRep.getDataByInteId(SH2023Constant.SH_2023_API_CODE_2104);
+// param.setInteCategory(Constant.API_CATEGORY_12);
+// param.setInteId(SH2023Constant.SH_2023_API_CODE_2104);
+//
+// ResponseDto responseDto;
+// SH2023Api2104 shApi2104;
+// for (ApiInfoData infoData : items) {
+// shApi2104 = JSONObject.parseObject(infoData.getData(), SH2023Api2104.class);
+// shApi2104.setCzbz(infoData.getCzbz());
+// shApi2104.setZhgxsj(infoData.getUpdateTime());
+//
+// param.setBizId(infoData.getDataId());
+// responseDto = apiRemoteService.pushData(param, shApi2104);
+// if (responseDto.getSuccess() == 0) {
+// if (Constant.CZBZ_I.equals(infoData.getCzbz())) {
+// infoData.setCzbz(Constant.CZBZ_U);
+// apiInfoDataRep.save(infoData);
+// }
+// }
+// }
}
}
--
Gitblit v1.9.3