| | |
| | | import com.fzzy.api.service.PushService11; |
| | | import com.fzzy.api.view.repository.*; |
| | | 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; |
| | |
| | | */ |
| | | 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.setInteId(SH2023Constant.SH_2023_API_CODE_1210); |
| | | //推送,数据为集合形式 |
| | | ResponseDto responseDto = apiRemoteService.pushData(param, list); |
| | | if (responseDto.getSuccess() == 0) { |
| | | //推送成功,更新数据上传状态 |
| | | for (Api1211 data : list) { |
| | | if (Constant.CZBZ_I.equals(data.getCzbz())) { |
| | | |
| | | data.setCzbz(Constant.CZBZ_U); |
| | | //更新状态 |
| | | api1211Rep.save(data); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | * 2104 市储驳运单 |
| | | */ |
| | | public void pushData2104(ApiRemoteService apiRemoteService, ApiParam param) { |
| | | //TODO |
| | | |
| | | //获取 检斤单信息 |
| | | List<ApiInfoData> items = apiInfoDataRep.getDataByInteId(SH2023Constant.SH_2023_API_CODE_2104); |
| | | |
| | | SH2023Api2104 shApi2104; |
| | | List<SH2023Api2104> list = new ArrayList<>(); |
| | | |
| | | param.setInteId(SH2023Constant.SH_2023_API_CODE_2104); |
| | | for (ApiInfoData infoData : items) { |
| | | shApi2104 = JSONObject.parseObject(infoData.getData(), SH2023Api2104.class); |
| | | shApi2104.setCzbz(infoData.getCzbz()); |
| | | shApi2104.setZhgxsj(infoData.getUpdateTime()); |
| | | list.add(shApi2104); |
| | | } |
| | | 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); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |