From 4a61e5d538ef0b3b03f34d87d4a7c32fa18d9c5b Mon Sep 17 00:00:00 2001 From: CZT <czt18638530771@163.com> Date: 星期六, 02 三月 2024 18:56:38 +0800 Subject: [PATCH] 解决广东省协议下数据定时同步及上报不执行问题2 --- src/main/java/com/fzzy/push/impl/ComPushService11.java | 292 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 290 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..e810868 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,268 @@ public class ComPushService11 { @Autowired + private Api1101Rep api1101Rep; + @Autowired + private Api1102Rep api1102Rep; + @Autowired + private Api1103Rep api1103Rep; + @Autowired + private Api1104Rep api1104Rep; + @Autowired + private Api1105Rep api1105Rep; + @Autowired + private Api1106Rep api1106Rep; + @Autowired + private Api1107Rep api1107Rep; + @Autowired + private Api1108Rep api1108Rep; + @Autowired + private Api1109Rep api1109Rep; + @Autowired + private Api1110Rep api1110Rep; + @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); + } + } + } + } + + /** + * 1103 浠撴埧淇℃伅 + */ + public void pushData1103(ApiRemoteService apiRemoteService, ApiParam param) { + + List<Api1103> items = api1103Rep.findPushData(param.getKqdm()); + if (null == items || items.isEmpty()) { + return; + } + + param.setInteCategory(Constant.API_CATEGORY_11); + param.setInteId(Constant.API_CODE_1103); + + ResponseDto responseDto; + for (Api1103 data : items) { + param.setBizId(data.getBizId()); + responseDto = apiRemoteService.pushData(param, data); + + if (responseDto.getSuccess() == 0) { + if (Constant.CZBZ_I.equals(data.getCzbz())) { + data.setCzbz("u"); + api1103Rep.save(data); + } + } + } + } + + /** + * 1104 寤掗棿淇℃伅 + */ + public void pushData1104(ApiRemoteService apiRemoteService, ApiParam param) { + + List<Api1104> items = api1104Rep.findPushData(param.getKqdm()); + if (null == items || items.isEmpty()) { + return; + } + + param.setInteCategory(Constant.API_CATEGORY_11); + param.setInteId(Constant.API_CODE_1104); + + ResponseDto responseDto; + for (Api1104 data : items) { + param.setBizId(data.getBizId()); + responseDto = apiRemoteService.pushData(param, data); + + if (responseDto.getSuccess() == 0) { + if (Constant.CZBZ_I.equals(data.getCzbz())) { + data.setCzbz("u"); + api1104Rep.save(data); + } + } + } + } + + /** + * 1105 璐т綅淇℃伅 + */ + public void pushData1105(ApiRemoteService apiRemoteService, ApiParam param) { + + List<Api1105> items = api1105Rep.findPushData(param.getKqdm()); + if (null == items || items.isEmpty()) { + return; + } + + param.setInteCategory(Constant.API_CATEGORY_11); + param.setInteId(Constant.API_CODE_1105); + + ResponseDto responseDto; + for (Api1105 data : items) { + param.setBizId(data.getBizId()); + responseDto = apiRemoteService.pushData(param, data); + + if (responseDto.getSuccess() == 0) { + if (Constant.CZBZ_I.equals(data.getCzbz())) { + data.setCzbz("u"); + api1105Rep.save(data); + } + } + } + } + + /** + * 1106 娌圭綈淇℃伅 + */ + public void pushData1106(ApiRemoteService apiRemoteService, ApiParam param) { + + List<Api1106> items = api1106Rep.findPushData(param.getKqdm()); + if (null == items || items.isEmpty()) { + return; + } + + param.setInteCategory(Constant.API_CATEGORY_11); + param.setInteId(Constant.API_CODE_1106); + + ResponseDto responseDto; + for (Api1106 data : items) { + param.setBizId(data.getBizId()); + responseDto = apiRemoteService.pushData(param, data); + + if (responseDto.getSuccess() == 0) { + if (Constant.CZBZ_I.equals(data.getCzbz())) { + data.setCzbz("u"); + api1106Rep.save(data); + } + } + } + } + + /** + * 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); + } + } + } + } + + /** + * 1108 鑽墏淇℃伅 + */ + public void pushData1108(ApiRemoteService apiRemoteService, ApiParam param) { + + List<Api1108> items = api1108Rep.findPushData(param.getKqdm()); + if (null == items || items.isEmpty()) { + return; + } + + param.setInteCategory(Constant.API_CATEGORY_11); + param.setInteId(Constant.API_CODE_1108); + + ResponseDto responseDto; + for (Api1108 data : items) { + param.setBizId(data.getBizId()); + responseDto = apiRemoteService.pushData(param, data); + + if (responseDto.getSuccess() == 0) { + if (Constant.CZBZ_I.equals(data.getCzbz())) { + data.setCzbz("u"); + api1108Rep.save(data); + } + } + } + } + + /** + * 1110 搴撳尯鍥句粨鎴跨偣浣嶄俊鎭� + */ + public void pushData1110(ApiRemoteService apiRemoteService, ApiParam param) { + + List<Api1110> items = api1110Rep.findPushData(param.getKqdm()); + if (null == items || items.isEmpty()) { + return; + } + + param.setInteCategory(Constant.API_CATEGORY_11); + param.setInteId(Constant.API_CODE_1110); + + ResponseDto responseDto; + for (Api1110 data : items) { + param.setBizId(data.getBizId()); + responseDto = apiRemoteService.pushData(param, data); + + if (responseDto.getSuccess() == 0) { + if (Constant.CZBZ_I.equals(data.getCzbz())) { + data.setCzbz("u"); + api1110Rep.save(data); + } + } + } + } /** * 1111 搴撳尯鍥捐棰戠洃鎺ц澶囩偣浣嶆爣娉� @@ -47,4 +308,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