| | |
| | | import com.fzzy.api.service.ApiRemoteService; |
| | | import com.fzzy.api.view.repository.*; |
| | | import com.fzzy.push.gd2022.dto.Gd2022Api1023; |
| | | import com.fzzy.push.gd2023.dto.Gd2023Api1023; |
| | | import com.fzzy.push.sh2023.SH2023Constant; |
| | | import com.fzzy.push.sh2023.dto.SH2023Api1115; |
| | | import com.fzzy.push.sh2023.dto.SH2023Api1311; |
| | |
| | | public class ComPushService90 { |
| | | @Autowired |
| | | private ApiInfoDataRep apiInfoDataRep; |
| | | @Autowired |
| | | private Api9201Rep api9201Rep; |
| | | @Autowired |
| | | private Api9109Rep api9109Rep; |
| | | @Autowired |
| | |
| | | * 9101 数据相符性接口--上海市平台 |
| | | */ |
| | | public void pushData9101(ApiRemoteService apiRemoteService, ApiParam param) { |
| | | // 获取 视频监控接口数据 |
| | | // 获取 数据相符性接口数据 |
| | | List<ApiInfoData> items = apiInfoDataRep.getDataByInteId(Constant.API_CODE_9101); |
| | | |
| | | if (null == items || items.isEmpty()) { |
| | |
| | | */ |
| | | public void pushData9201(ApiRemoteService apiRemoteService, ApiParam param) { |
| | | //获取熏蒸备案信息 |
| | | List<ApiInfoData> items = apiInfoDataRep.getDataByInteId(Constant.API_CODE_9201); |
| | | // List<ApiInfoData> items = apiInfoDataRep.getDataByInteId(Constant.API_CODE_9201); |
| | | List<Api9201> items = api9201Rep.findPushDataByTime(param.getKqdm(), param.getStart(), param.getEnd()); |
| | | |
| | | if (null == items || items.isEmpty()) { |
| | | log.error("-----广东省平台2022版:未获取到熏蒸备案信息,不推送-----"); |
| | | log.error("-----广东省平台2023版:未获取到熏蒸备案信息,不推送-----"); |
| | | return; |
| | | } |
| | | param.setInteCategory(Constant.API_CATEGORY_90); |
| | | param.setInteId(Constant.API_CODE_9201); |
| | | |
| | | Gd2022Api1023 gd2022Api1023; |
| | | ResponseDto responseDto; |
| | | for (ApiInfoData infoData : items) { |
| | | gd2022Api1023 = JSONObject.parseObject(infoData.getData(), Gd2022Api1023.class); |
| | | gd2022Api1023.setZhgxsj(infoData.getUpdateTime()); |
| | | |
| | | param.setBizId(infoData.getDataId()); |
| | | responseDto = apiRemoteService.pushData(param, gd2022Api1023); |
| | | for (Api9201 api9201 : items) { |
| | | responseDto = apiRemoteService.pushData(param, api9201); |
| | | if (responseDto.getSuccess() == 0) { |
| | | if (Constant.CZBZ_I.equals(infoData.getCzbz())) { |
| | | infoData.setCzbz(Constant.CZBZ_U); |
| | | gd2022Api1023.setCzbz(Constant.CZBZ_U); |
| | | infoData.setData(JSON.toJSONString(gd2022Api1023)); |
| | | apiInfoDataRep.save(infoData); |
| | | if (Constant.CZBZ_I.equals(api9201.getCzbz())) { |
| | | api9201.setCzbz(Constant.CZBZ_U); |
| | | api9201Rep.save(api9201); |
| | | } |
| | | } |
| | | } |