| | |
| | | public void saveData(SH2023Api1311 data) { |
| | | |
| | | ApiInfoData infoData; |
| | | List<ApiInfoData> apiInfoList = apiInfoDataRep.getDataByInteAndData(SH2023Constant.SH_2023_API_CODE_1311, data.getSpjksbid(),data.getKqdm()); |
| | | List<ApiInfoData> apiInfoList = apiInfoDataRep.getDataByInteAndData(SH2023Constant.SH_2023_API_CODE_1311, data.getSpjksbid(), data.getKqdm()); |
| | | if (apiInfoList.size() != 0) { |
| | | infoData = apiInfoList.get(0); |
| | | infoData.setData(JSON.toJSONString(data)); |
| | |
| | | */ |
| | | @Expose |
| | | public void delData(SH2023Api1311 data) { |
| | | List<ApiInfoData> apiInfoList = apiInfoDataRep.getDataByInteAndData(SH2023Constant.SH_2023_API_CODE_1311, data.getSpjksbid(),data.getKqdm()); |
| | | List<ApiInfoData> apiInfoList = apiInfoDataRep.getDataByInteAndData(SH2023Constant.SH_2023_API_CODE_1311, data.getSpjksbid(), data.getKqdm()); |
| | | apiInfoDataRep.deleteById(apiInfoList.get(0).getId()); |
| | | } |
| | | |
| | |
| | | if (null == data) { |
| | | return "无数据执行"; |
| | | } |
| | | List<ApiInfoData> apiInfoList = apiInfoDataRep.getDataByInteAndData(SH2023Constant.SH_2023_API_CODE_1311, data.getSpjksbid(),data.getKqdm()); |
| | | List<ApiInfoData> apiInfoList = apiInfoDataRep.getDataByInteAndData(SH2023Constant.SH_2023_API_CODE_1311, data.getSpjksbid(), data.getKqdm()); |
| | | data.setCzbz(Constant.CZBZ_D); |
| | | apiInfoDataRep.updateStatus(apiInfoList.get(0).getId(), JSON.toJSONString(data), Constant.CZBZ_D); |
| | | return null; |
| | |
| | | |
| | | |
| | | /** |
| | | * sHApi1311PR#delUpdate |
| | | * sHApi1311PR#delUpdate |
| | | */ |
| | | @Expose |
| | | public String pushData(List<SH2023Api1311> items) { |
| | | ResponseDto responseDto; |
| | | |
| | | String result = ""; |
| | | |
| | | String kqdm = items.get(0).getKqdm(); |
| | |
| | | return "系统没有当前推送协议配置,执行失败"; |
| | | } |
| | | |
| | | //推送,数据为集合形式 |
| | | responseDto = apiService.pushData(param, apiConf, items); |
| | | if (responseDto.getSuccess() == 0) { |
| | | //推送成功,更新数据上传状态 |
| | | ApiInfoData infoData; |
| | | for (SH2023Api1311 data : items) { |
| | | ApiInfoData infoData; |
| | | ResponseDto responseDto; |
| | | for (SH2023Api1311 data : items) { |
| | | responseDto = apiService.pushData(param, apiConf, data); |
| | | if (responseDto.getSuccess() == 0) { |
| | | if (Constant.CZBZ_I.equals(data.getCzbz())) { |
| | | //推送成功,更新数据上传状态 |
| | | List<ApiInfoData> apiInfoList = apiInfoDataRep.getDataByInteAndData(SH2023Constant.SH_2023_API_CODE_1311, data.getSpjksbid(),data.getKqdm()); |
| | | List<ApiInfoData> apiInfoList = apiInfoDataRep.getDataByInteAndData(SH2023Constant.SH_2023_API_CODE_1311, data.getSpjksbid(), data.getKqdm()); |
| | | data.setCzbz(Constant.CZBZ_U); |
| | | infoData = apiInfoList.get(0); |
| | | infoData.setUpdateTime(new Date()); |