| | |
| | | package com.fzzy.push.impl; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.fzzy.api.Constant; |
| | | import com.fzzy.api.data.ApiParam; |
| | |
| | | import com.fzzy.api.service.ApiRemoteService; |
| | | import com.fzzy.api.view.repository.ApiInfoDataRep; |
| | | import com.fzzy.push.sh2023.SH2023Constant; |
| | | import com.fzzy.push.sh2023.dto.SH2023Api1115; |
| | | import com.fzzy.push.sh2023.dto.SH2023Api1311; |
| | | import com.fzzy.push.sh2023.dto.SH2023Api2103; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | |
| | | /*==========上海市平台定制接口==========*/ |
| | | /** |
| | | * 1311 视频监控接口--上海市平台 |
| | | */ |
| | | public void pushData1115(ApiRemoteService apiRemoteService, ApiParam param) { |
| | | // 获取 视频监控接口数据 |
| | | List<ApiInfoData> items = apiInfoDataRep.getDataByInteId(SH2023Constant.SH_2023_API_CODE_1115); |
| | | |
| | | if (null == items || items.isEmpty()) { |
| | | log.error("-----上海市平台2023版:未获取到数据相符性,不推送-----"); |
| | | return; |
| | | } |
| | | param.setInteCategory(Constant.API_CATEGORY_11); |
| | | param.setInteId(SH2023Constant.SH_2023_API_CODE_1115); |
| | | |
| | | SH2023Api1115 shApi1115; |
| | | ResponseDto responseDto; |
| | | for (ApiInfoData infoData : items) { |
| | | shApi1115 = JSONObject.parseObject(infoData.getData(), SH2023Api1115.class); |
| | | shApi1115.setZhgxsj(infoData.getUpdateTime()); |
| | | |
| | | param.setBizId(infoData.getDataId()); |
| | | responseDto = apiRemoteService.pushData(param, shApi1115); |
| | | if (responseDto.getSuccess() == 0) { |
| | | if (Constant.CZBZ_I.equals(infoData.getCzbz())) { |
| | | infoData.setCzbz(Constant.CZBZ_U); |
| | | shApi1115.setCzbz(Constant.CZBZ_U); |
| | | infoData.setData(JSON.toJSONString(shApi1115)); |
| | | apiInfoDataRep.save(infoData); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | /** |
| | | * 2101 检斤单--上海市平台 |
| | | */ |
| | | public void pushData2101(ApiRemoteService apiRemoteService, ApiParam param) { |