优化上海接口-手动上传时根据协议区分数据是否为集合形式
| | |
| | | import com.bstek.dorado.annotation.DataResolver; |
| | | import com.bstek.dorado.annotation.Expose; |
| | | import com.fzzy.api.data.ApiParam; |
| | | import com.fzzy.api.data.PushProtocol; |
| | | import com.fzzy.api.entity.Api1101; |
| | | import com.fzzy.api.entity.ApiConfs; |
| | | import com.fzzy.api.service.ApiCommonService; |
| | | import com.fzzy.api.service.ApiPushManager; |
| | |
| | | */ |
| | | @Expose |
| | | public String pushData(List<Api1102> items) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | |
| | | //获取配置 |
| | | String kqdm = items.get(0).getKqdm(); |
| | | ApiConfs apiConf = apiCommonService.getConf(kqdm); |
| | | |
| | | if (null == apiConf) return "系统没有获取到当前库区配置信息,执行失败"; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1102); |
| | | |
| | | //获取实现接口 |
| | | ApiRemoteService apiRemoteService = apiPushManager.getApiRemoteService(param.getPushProtocol()); |
| | | ApiRemoteService apiRemoteService = apiPushManager.getApiRemoteService(apiConf.getPushProtocol()); |
| | | if (null == apiRemoteService) return "系统没有当前推送协议配置,执行失败"; |
| | | |
| | | //根据省份协议,判断是集合形式上报还是单条json上报,上海2023集合形式上报 |
| | | if (PushProtocol.SB_SH_2023.getCode().equals(apiConf.getPushProtocol())) { |
| | | return pushDataList(items, apiRemoteService, apiConf); |
| | | } |
| | | return pushDataSingle(items, apiRemoteService, apiConf); |
| | | } |
| | | |
| | | /** |
| | | * 单条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataSingle(List<Api1102> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1102); |
| | | Api1102 d; |
| | | for (Api1102 data : items) { |
| | | d = new Api1102(); |
| | |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 多条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataList(List<Api1102> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1102); |
| | | |
| | | //推送,数据为集合形式 |
| | | ResponseDto responseDto = apiRemoteService.pushData(param, apiConf, items); |
| | | if (responseDto.getSuccess() == 0) { |
| | | //推送成功,更新数据上传状态 |
| | | for (Api1102 data : items) { |
| | | if (Constant.CZBZ_I.equals(data.getCzbz())) { |
| | | //更新状态 |
| | | api1102Rep.updateStatus(data.getKqdm(), Constant.CZBZ_U); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | return responseDto.toString(); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.bstek.dorado.annotation.DataResolver; |
| | | import com.bstek.dorado.annotation.Expose; |
| | | import com.fzzy.api.data.ApiParam; |
| | | import com.fzzy.api.data.PushProtocol; |
| | | import com.fzzy.api.entity.Api1103; |
| | | import com.fzzy.api.entity.ApiConfs; |
| | | import com.fzzy.api.service.ApiCommonService; |
| | |
| | | |
| | | /** |
| | | * 仓房信息 |
| | | * |
| | | * @author he |
| | | */ |
| | | @Component |
| | | public class Api1103PR { |
| | | |
| | | @Autowired |
| | | private Api1103Rep api1103Rep; |
| | | @Autowired |
| | | private Api1103Rep api1103Rep; |
| | | |
| | | @Autowired |
| | | private ApiCommonService apiCommonService; |
| | | @Autowired |
| | | private ApiCommonService apiCommonService; |
| | | |
| | | @Autowired |
| | | private ApiPushManager apiPushManager; |
| | | @Autowired |
| | | private ApiPushManager apiPushManager; |
| | | |
| | | /** |
| | | * api1103PR#listAll |
| | | * |
| | | * @return |
| | | */ |
| | | @DataProvider |
| | | public List<Api1103> listAll() { |
| | | return api1103Rep.findAll(); |
| | | } |
| | | /** |
| | | * api1103PR#listAll |
| | | * |
| | | * @return |
| | | */ |
| | | @DataProvider |
| | | public List<Api1103> listAll() { |
| | | return api1103Rep.findAll(); |
| | | } |
| | | |
| | | /** |
| | | * api1103PR#updateSave |
| | | * |
| | | * @param entity |
| | | */ |
| | | @DataResolver |
| | | public void updateSave(Api1103 entity) { |
| | | /** |
| | | * api1103PR#updateSave |
| | | * |
| | | * @param entity |
| | | */ |
| | | @DataResolver |
| | | public void updateSave(Api1103 entity) { |
| | | |
| | | // 手动将doradoEntity对象转换为标准Bean对象 |
| | | Api1103 data = new Api1103(); |
| | | BeanUtils.copyProperties(entity, data); |
| | | data.setCfdm(data.getCfdm().trim()); |
| | | api1103Rep.save(data); |
| | | // 手动将doradoEntity对象转换为标准Bean对象 |
| | | Api1103 data = new Api1103(); |
| | | BeanUtils.copyProperties(entity, data); |
| | | data.setCfdm(data.getCfdm().trim()); |
| | | api1103Rep.save(data); |
| | | |
| | | //刷新缓存 |
| | | apiCommonService.flushApi1103Cache(listAll()); |
| | | } |
| | | //刷新缓存 |
| | | apiCommonService.flushApi1103Cache(listAll()); |
| | | } |
| | | |
| | | /** |
| | | * api1103PR#delData |
| | | * |
| | | * @param data |
| | | */ |
| | | @Expose |
| | | public String delData(Api1103 data) { |
| | | /** |
| | | * api1103PR#delData |
| | | * |
| | | * @param data |
| | | */ |
| | | @Expose |
| | | public String delData(Api1103 data) { |
| | | |
| | | api1103Rep.deleteById(data.getCfdm()); |
| | | api1103Rep.deleteById(data.getCfdm()); |
| | | |
| | | return null; |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * 更新删除标记 api1103PR#delUpdate |
| | | * |
| | | * @param entity |
| | | */ |
| | | @Expose |
| | | public String delUpdate(Api1103 entity) { |
| | | /** |
| | | * 更新删除标记 api1103PR#delUpdate |
| | | * |
| | | * @param entity |
| | | */ |
| | | @Expose |
| | | public String delUpdate(Api1103 entity) { |
| | | |
| | | entity.setCzbz(Constant.CZBZ_D); |
| | | entity.setCzbz(Constant.CZBZ_D); |
| | | |
| | | Api1103 data = new Api1103(); |
| | | BeanUtils.copyProperties(entity, data); |
| | | Api1103 data = new Api1103(); |
| | | BeanUtils.copyProperties(entity, data); |
| | | |
| | | api1103Rep.save(data); |
| | | return null; |
| | | } |
| | | api1103Rep.save(data); |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * api1103PR#pushData |
| | | * |
| | | * @param items |
| | | */ |
| | | @Expose |
| | | public String pushData(List<Api1103> items) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | /** |
| | | * api1103PR#pushData |
| | | * |
| | | * @param items |
| | | */ |
| | | @Expose |
| | | public String pushData(List<Api1103> items) { |
| | | |
| | | //获取配置 |
| | | String kqdm = items.get(0).getKqdm(); |
| | | ApiConfs apiConf = apiCommonService.getConf(kqdm); |
| | | //获取配置 |
| | | String kqdm = items.get(0).getKqdm(); |
| | | ApiConfs apiConf = apiCommonService.getConf(kqdm); |
| | | |
| | | if (null == apiConf) return "系统没有获取到当前库区配置信息,执行失败"; |
| | | if (null == apiConf) return "系统没有获取到当前库区配置信息,执行失败"; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1103); |
| | | //获取实现接口 |
| | | ApiRemoteService apiRemoteService = apiPushManager.getApiRemoteService(apiConf.getPushProtocol()); |
| | | if (null == apiRemoteService) return "系统没有当前推送协议配置,执行失败"; |
| | | |
| | | //获取实现接口 |
| | | ApiRemoteService apiRemoteService = apiPushManager.getApiRemoteService(param.getPushProtocol()); |
| | | if (null == apiRemoteService) return "系统没有当前推送协议配置,执行失败"; |
| | | if (PushProtocol.SB_SH_2023.getCode().equals(apiConf.getPushProtocol())) { |
| | | return pushDataList(items, apiRemoteService, apiConf); |
| | | } |
| | | return pushDataSingle(items, apiRemoteService, apiConf); |
| | | } |
| | | |
| | | Api1103 d; |
| | | for (Api1103 data : items) { |
| | | d = new Api1103(); |
| | | BeanUtils.copyProperties(data, d); |
| | | param.setBizId(data.getBizId()); |
| | | responseDto = apiRemoteService.pushData(param, apiConf, d); |
| | | /** |
| | | * 单条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataSingle(List<Api1103> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | |
| | | result += responseDto.toString(); |
| | | if (responseDto.getSuccess() == 0) { |
| | | if (Constant.CZBZ_I.equals(d.getCzbz())) { |
| | | api1103Rep.updateStatus(data.getCfdm(), Constant.CZBZ_U); |
| | | } |
| | | } |
| | | } |
| | | return result; |
| | | } |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1103); |
| | | Api1103 d; |
| | | for (Api1103 data : items) { |
| | | d = new Api1103(); |
| | | BeanUtils.copyProperties(data, d); |
| | | param.setBizId(data.getBizId()); |
| | | responseDto = apiRemoteService.pushData(param, apiConf, d); |
| | | |
| | | result += responseDto.toString(); |
| | | if (responseDto.getSuccess() == 0) { |
| | | if (Constant.CZBZ_I.equals(d.getCzbz())) { |
| | | api1103Rep.updateStatus(data.getCfdm(), Constant.CZBZ_U); |
| | | } |
| | | } |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 多条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataList(List<Api1103> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1102); |
| | | |
| | | //推送,数据为集合形式 |
| | | ResponseDto responseDto = apiRemoteService.pushData(param, apiConf, items); |
| | | if (responseDto.getSuccess() == 0) { |
| | | //推送成功,更新数据上传状态 |
| | | for (Api1103 data : items) { |
| | | if (Constant.CZBZ_I.equals(data.getCzbz())) { |
| | | //更新状态 |
| | | api1103Rep.updateStatus(data.getCfdm(), Constant.CZBZ_U); |
| | | } |
| | | } |
| | | } |
| | | return responseDto.toString(); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import com.bstek.dorado.annotation.DataResolver; |
| | | import com.bstek.dorado.annotation.Expose; |
| | | import com.fzzy.api.data.ApiParam; |
| | | import com.fzzy.api.data.PushProtocol; |
| | | import com.fzzy.api.entity.ApiConfs; |
| | | import com.fzzy.api.service.ApiCommonService; |
| | | import com.fzzy.api.service.ApiPushManager; |
| | |
| | | */ |
| | | @Expose |
| | | public String pushData(List<Api1104> items) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | |
| | | //获取配置 |
| | | String kqdm = items.get(0).getKqdm(); |
| | |
| | | |
| | | if (null == apiConf) return "系统没有获取到当前库区配置信息,执行失败"; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1104); |
| | | |
| | | //获取实现接口 |
| | | ApiRemoteService apiRemoteService = apiPushManager.getApiRemoteService(param.getPushProtocol()); |
| | | ApiRemoteService apiRemoteService = apiPushManager.getApiRemoteService(apiConf.getPushProtocol()); |
| | | if (null == apiRemoteService) return "系统没有当前推送协议配置,执行失败"; |
| | | |
| | | if (PushProtocol.SB_SH_2023.getCode().equals(apiConf.getPushProtocol())) { |
| | | return pushDataList(items, apiRemoteService, apiConf); |
| | | } |
| | | return pushDataSingle(items, apiRemoteService, apiConf); |
| | | } |
| | | |
| | | /** |
| | | * 单条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataSingle(List<Api1104> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1104); |
| | | Api1104 d; |
| | | for (Api1104 data : items) { |
| | | d = new Api1104(); |
| | |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 多条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataList(List<Api1104> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1104); |
| | | |
| | | //推送,数据为集合形式 |
| | | ResponseDto responseDto = apiRemoteService.pushData(param, apiConf, items); |
| | | if (responseDto.getSuccess() == 0) { |
| | | //推送成功,更新数据上传状态 |
| | | for (Api1104 data : items) { |
| | | if (Constant.CZBZ_I.equals(data.getCzbz())) { |
| | | //更新状态 |
| | | api1104Rep.updateStatus(data.getAjdh(), Constant.CZBZ_U); |
| | | } |
| | | } |
| | | } |
| | | return responseDto.toString(); |
| | | } |
| | | } |
| | |
| | | import com.bstek.dorado.annotation.DataResolver; |
| | | import com.bstek.dorado.annotation.Expose; |
| | | import com.fzzy.api.data.ApiParam; |
| | | import com.fzzy.api.data.PushProtocol; |
| | | import com.fzzy.api.entity.ApiConfs; |
| | | import com.fzzy.api.service.ApiPushManager; |
| | | import com.fzzy.api.service.ApiRemoteService; |
| | |
| | | */ |
| | | @Expose |
| | | public String pushData(List<Api1105> items) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | |
| | | //获取配置 |
| | | String kqdm = items.get(0).getKqdm(); |
| | |
| | | |
| | | if (null == apiConf) return "系统没有获取到当前库区配置信息,执行失败"; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1105); |
| | | |
| | | //获取实现接口 |
| | | ApiRemoteService apiRemoteService = apiPushManager.getApiRemoteService(param.getPushProtocol()); |
| | | ApiRemoteService apiRemoteService = apiPushManager.getApiRemoteService(apiConf.getPushProtocol()); |
| | | if (null == apiRemoteService) return "系统没有当前推送协议配置,执行失败"; |
| | | |
| | | if (PushProtocol.SB_SH_2023.getCode().equals(apiConf.getPushProtocol())){ |
| | | return pushDataList(items,apiRemoteService,apiConf); |
| | | } |
| | | return pushDataSingle(items,apiRemoteService,apiConf); |
| | | } |
| | | |
| | | /** |
| | | * 单条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataSingle(List<Api1105> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1105); |
| | | Api1105 d; |
| | | for (Api1105 data : items) { |
| | | d = new Api1105(); |
| | |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 多条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataList(List<Api1105> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1105); |
| | | |
| | | //推送,数据为集合形式 |
| | | ResponseDto responseDto = apiRemoteService.pushData(param, apiConf, items); |
| | | if (responseDto.getSuccess() == 0) { |
| | | //推送成功,更新数据上传状态 |
| | | for (Api1105 data : items) { |
| | | if (Constant.CZBZ_I.equals(data.getCzbz())) { |
| | | //更新状态 |
| | | api1105Rep.updateStatus(data.getHwdm(), Constant.CZBZ_U); |
| | | } |
| | | } |
| | | } |
| | | return responseDto.toString(); |
| | | } |
| | | } |
| | |
| | | import com.bstek.dorado.annotation.DataResolver; |
| | | import com.bstek.dorado.annotation.Expose; |
| | | import com.fzzy.api.data.ApiParam; |
| | | import com.fzzy.api.data.PushProtocol; |
| | | import com.fzzy.api.entity.ApiConfs; |
| | | import com.fzzy.api.service.ApiCommonService; |
| | | import com.fzzy.api.service.ApiPushManager; |
| | |
| | | */ |
| | | @Expose |
| | | public String pushData(List<Api1106> items) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | Api1106 d; |
| | | |
| | | //获取配置 |
| | | String kqdm = items.get(0).getKqdm(); |
| | |
| | | |
| | | if (null == apiConf) return "系统没有获取到当前库区配置信息,执行失败"; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1106); |
| | | |
| | | //获取实现接口 |
| | | ApiRemoteService apiRemoteService = apiPushManager.getApiRemoteService(param.getPushProtocol()); |
| | | ApiRemoteService apiRemoteService = apiPushManager.getApiRemoteService(apiConf.getPushProtocol()); |
| | | if (null == apiRemoteService) return "系统没有当前推送协议配置,执行失败"; |
| | | |
| | | |
| | | if (PushProtocol.SB_SH_2023.getCode().equals(apiConf.getPushProtocol())){ |
| | | return pushDataList(items,apiRemoteService,apiConf); |
| | | } |
| | | return pushDataSingle(items,apiRemoteService,apiConf); |
| | | } |
| | | |
| | | /** |
| | | * 单条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataSingle(List<Api1106> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1106); |
| | | Api1106 d; |
| | | for (Api1106 data : items) { |
| | | d = new Api1106(); |
| | | BeanUtils.copyProperties(data, d); |
| | |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 多条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataList(List<Api1106> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1106); |
| | | |
| | | //推送,数据为集合形式 |
| | | ResponseDto responseDto = apiRemoteService.pushData(param, apiConf, items); |
| | | if (responseDto.getSuccess() == 0) { |
| | | //推送成功,更新数据上传状态 |
| | | for (Api1106 data : items) { |
| | | if (Constant.CZBZ_I.equals(data.getCzbz())) { |
| | | //更新状态 |
| | | api1106Rep.updateStatus(data.getKqdm(), Constant.CZBZ_U); |
| | | } |
| | | } |
| | | } |
| | | return responseDto.toString(); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.bstek.dorado.annotation.DataResolver; |
| | | import com.bstek.dorado.annotation.Expose; |
| | | import com.fzzy.api.data.ApiParam; |
| | | import com.fzzy.api.data.PushProtocol; |
| | | import com.fzzy.api.entity.ApiConfs; |
| | | import com.fzzy.api.service.ApiCommonService; |
| | | import com.fzzy.api.service.ApiPushManager; |
| | |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * |
| | | * 更新删除标记 api1107PR#delUpdate |
| | | * |
| | | * @param entity |
| | |
| | | */ |
| | | @Expose |
| | | public String pushData(List<Api1107> items) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | Api1107 d; |
| | | |
| | | //获取配置 |
| | | String kqdm = items.get(0).getKqdm(); |
| | | ApiConfs apiConf = apiCommonService.getConf(kqdm); |
| | | |
| | | if (null == apiConf) return "系统没有获取到当前库区配置信息,执行失败"; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1107); |
| | | |
| | | //获取实现接口 |
| | | ApiRemoteService apiRemoteService = apiPushManager.getApiRemoteService(param.getPushProtocol()); |
| | | ApiRemoteService apiRemoteService = apiPushManager.getApiRemoteService(apiConf.getPushProtocol()); |
| | | if (null == apiRemoteService) return "系统没有当前推送协议配置,执行失败"; |
| | | |
| | | if (PushProtocol.SB_SH_2023.getCode().equals(apiConf.getPushProtocol())){ |
| | | return pushDataList(items,apiRemoteService,apiConf); |
| | | } |
| | | return pushDataSingle(items,apiRemoteService,apiConf); |
| | | } |
| | | |
| | | /** |
| | | * 单条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataSingle(List<Api1107> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1107); |
| | | Api1107 d; |
| | | for (Api1107 data : items) { |
| | | d = new Api1107(); |
| | | BeanUtils.copyProperties(data, d); |
| | |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 多条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataList(List<Api1107> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1107); |
| | | |
| | | //推送,数据为集合形式 |
| | | ResponseDto responseDto = apiRemoteService.pushData(param, apiConf, items); |
| | | if (responseDto.getSuccess() == 0) { |
| | | //推送成功,更新数据上传状态 |
| | | for (Api1107 data : items) { |
| | | if (Constant.CZBZ_I.equals(data.getCzbz())) { |
| | | //更新状态 |
| | | api1107Rep.updateStatus(data.getBizId(), Constant.CZBZ_U); |
| | | } |
| | | } |
| | | } |
| | | return responseDto.toString(); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.bstek.dorado.annotation.DataResolver; |
| | | import com.bstek.dorado.annotation.Expose; |
| | | import com.fzzy.api.data.ApiParam; |
| | | import com.fzzy.api.data.PushProtocol; |
| | | import com.fzzy.api.entity.ApiConfs; |
| | | import com.fzzy.api.service.ApiCommonService; |
| | | import com.fzzy.api.service.ApiPushManager; |
| | |
| | | */ |
| | | @Expose |
| | | public String pushData(List<Api1108> items) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | Api1108 d; |
| | | |
| | | //获取配置 |
| | | String kqdm = items.get(0).getKqdm(); |
| | | ApiConfs apiConf = apiCommonService.getConf(kqdm); |
| | | |
| | | if (null == apiConf) return "系统没有获取到当前库区配置信息,执行失败"; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1108); |
| | | |
| | | //获取实现接口 |
| | | ApiRemoteService apiRemoteService = apiPushManager.getApiRemoteService(param.getPushProtocol()); |
| | | ApiRemoteService apiRemoteService = apiPushManager.getApiRemoteService(apiConf.getPushProtocol()); |
| | | if (null == apiRemoteService) return "系统没有当前推送协议配置,执行失败"; |
| | | |
| | | if (PushProtocol.SB_SH_2023.getCode().equals(apiConf.getPushProtocol())){ |
| | | return pushDataList(items,apiRemoteService,apiConf); |
| | | } |
| | | return pushDataSingle(items,apiRemoteService,apiConf); |
| | | } |
| | | |
| | | /** |
| | | * 单条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataSingle(List<Api1108> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1108); |
| | | Api1108 d; |
| | | for (Api1108 data : items) { |
| | | d = new Api1108(); |
| | | BeanUtils.copyProperties(data, d); |
| | |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 多条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataList(List<Api1108> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1108); |
| | | |
| | | //推送,数据为集合形式 |
| | | ResponseDto responseDto = apiRemoteService.pushData(param, apiConf, items); |
| | | if (responseDto.getSuccess() == 0) { |
| | | //推送成功,更新数据上传状态 |
| | | for (Api1108 data : items) { |
| | | if (Constant.CZBZ_I.equals(data.getCzbz())) { |
| | | //更新状态 |
| | | api1108Rep.updateStatus(data.getKqdm(), Constant.CZBZ_U); |
| | | } |
| | | } |
| | | } |
| | | return responseDto.toString(); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.bstek.dorado.annotation.Expose; |
| | | import com.bstek.dorado.data.provider.Page; |
| | | import com.fzzy.api.data.ApiParam; |
| | | import com.fzzy.api.data.PushProtocol; |
| | | import com.fzzy.api.service.ApiCommonService; |
| | | import com.fzzy.api.service.ApiPushManager; |
| | | import com.fzzy.api.service.ApiRemoteService; |
| | |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * |
| | | * 更新删除标记 api1109PR#delUpdate |
| | | * |
| | | * @param entity |
| | |
| | | */ |
| | | @Expose |
| | | public String pushData(List<Api1109> items) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | Api1109 d; |
| | | |
| | | //获取配置 |
| | | String kqdm = items.get(0).getKqdm(); |
| | | ApiConfs apiConf = apiCommonService.getConf(kqdm); |
| | | |
| | | if (null == apiConf) return "系统没有获取到当前库区配置信息,执行失败"; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1109); |
| | | |
| | | //获取实现接口 |
| | | ApiRemoteService apiRemoteService = apiPushManager.getApiRemoteService(param.getPushProtocol()); |
| | | ApiRemoteService apiRemoteService = apiPushManager.getApiRemoteService(apiConf.getPushProtocol()); |
| | | if (null == apiRemoteService) return "系统没有当前推送协议配置,执行失败"; |
| | | |
| | | if (PushProtocol.SB_SH_2023.getCode().equals(apiConf.getPushProtocol())){ |
| | | return pushDataList(items,apiRemoteService,apiConf); |
| | | } |
| | | return pushDataSingle(items,apiRemoteService,apiConf); |
| | | } |
| | | |
| | | /** |
| | | * 单条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataSingle(List<Api1109> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1109); |
| | | Api1109 d; |
| | | for (Api1109 data : items) { |
| | | d = new Api1109(); |
| | | BeanUtils.copyProperties(data, d); |
| | |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 多条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataList(List<Api1109> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1109); |
| | | |
| | | //推送,数据为集合形式 |
| | | ResponseDto responseDto = apiRemoteService.pushData(param, apiConf, items); |
| | | if (responseDto.getSuccess() == 0) { |
| | | //推送成功,更新数据上传状态 |
| | | for (Api1109 data : items) { |
| | | if (Constant.CZBZ_I.equals(data.getCzbz())) { |
| | | //更新状态 |
| | | api1109Rep.updateStatus(data.getId(), Constant.CZBZ_U); |
| | | } |
| | | } |
| | | } |
| | | return responseDto.toString(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * imgFile 图片本地存储路径 |
| | |
| | | import com.bstek.dorado.annotation.DataResolver; |
| | | import com.bstek.dorado.annotation.Expose; |
| | | import com.fzzy.api.data.ApiParam; |
| | | import com.fzzy.api.data.PushProtocol; |
| | | import com.fzzy.api.entity.ApiConfs; |
| | | import com.fzzy.api.service.ApiCommonService; |
| | | import com.fzzy.api.service.ApiPushManager; |
| | |
| | | */ |
| | | @Expose |
| | | public String pushData(List<Api1110> items) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | Api1110 d; |
| | | |
| | | //获取配置 |
| | | String kqdm = items.get(0).getKqdm(); |
| | | ApiConfs apiConf = apiCommonService.getConf(kqdm); |
| | | |
| | | if (null == apiConf) return "系统没有获取到当前库区配置信息,执行失败"; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1110); |
| | | |
| | | //获取实现接口 |
| | | ApiRemoteService apiRemoteService = apiPushManager.getApiRemoteService(param.getPushProtocol()); |
| | | ApiRemoteService apiRemoteService = apiPushManager.getApiRemoteService(apiConf.getPushProtocol()); |
| | | if (null == apiRemoteService) return "系统没有当前推送协议配置,执行失败"; |
| | | |
| | | if (PushProtocol.SB_SH_2023.getCode().equals(apiConf.getPushProtocol())){ |
| | | return pushDataList(items,apiRemoteService,apiConf); |
| | | } |
| | | return pushDataSingle(items,apiRemoteService,apiConf); |
| | | } |
| | | |
| | | /** |
| | | * 单条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataSingle(List<Api1110> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1110); |
| | | Api1110 d; |
| | | for (Api1110 data : items) { |
| | | d = new Api1110(); |
| | | BeanUtils.copyProperties(data, d); |
| | |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 多条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataList(List<Api1110> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1110); |
| | | |
| | | //推送,数据为集合形式 |
| | | ResponseDto responseDto = apiRemoteService.pushData(param, apiConf, items); |
| | | if (responseDto.getSuccess() == 0) { |
| | | //推送成功,更新数据上传状态 |
| | | for (Api1110 data : items) { |
| | | if (Constant.CZBZ_I.equals(data.getCzbz())) { |
| | | //更新状态 |
| | | api1110Rep.updateStatus(data.getHwdm(), Constant.CZBZ_U); |
| | | } |
| | | } |
| | | } |
| | | return responseDto.toString(); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.bstek.dorado.annotation.DataResolver; |
| | | import com.bstek.dorado.annotation.Expose; |
| | | import com.fzzy.api.data.ApiParam; |
| | | import com.fzzy.api.data.PushProtocol; |
| | | import com.fzzy.api.entity.ApiConfs; |
| | | import com.fzzy.api.service.ApiCommonService; |
| | | import com.fzzy.api.service.ApiPushManager; |
| | |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * |
| | | * 更新删除标记 api1111PR#delUpdate |
| | | * |
| | | * @param entity |
| | |
| | | */ |
| | | @Expose |
| | | public String pushData(List<Api1111> items) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | Api1111 d; |
| | | |
| | | //获取配置 |
| | | String kqdm = items.get(0).getKqdm(); |
| | | ApiConfs apiConf = apiCommonService.getConf(kqdm); |
| | | |
| | | if (null == apiConf) return "系统没有获取到当前库区配置信息,执行失败"; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1111); |
| | | |
| | | //获取实现接口 |
| | | ApiRemoteService apiRemoteService = apiPushManager.getApiRemoteService(param.getPushProtocol()); |
| | | ApiRemoteService apiRemoteService = apiPushManager.getApiRemoteService(apiConf.getPushProtocol()); |
| | | if (null == apiRemoteService) return "系统没有当前推送协议配置,执行失败"; |
| | | |
| | | if (PushProtocol.SB_SH_2023.getCode().equals(apiConf.getPushProtocol())){ |
| | | return pushDataList(items,apiRemoteService,apiConf); |
| | | } |
| | | return pushDataSingle(items,apiRemoteService,apiConf); |
| | | } |
| | | |
| | | /** |
| | | * 单条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataSingle(List<Api1111> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1111); |
| | | Api1111 d; |
| | | for (Api1111 data : items) { |
| | | d = new Api1111(); |
| | | BeanUtils.copyProperties(data, d); |
| | |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 多条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataList(List<Api1111> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1111); |
| | | |
| | | //推送,数据为集合形式 |
| | | ResponseDto responseDto = apiRemoteService.pushData(param, apiConf, items); |
| | | if (responseDto.getSuccess() == 0) { |
| | | //推送成功,更新数据上传状态 |
| | | for (Api1111 data : items) { |
| | | if (Constant.CZBZ_I.equals(data.getCzbz())) { |
| | | //更新状态 |
| | | api1111Rep.updateStatus(data.getSpjksbid(), Constant.CZBZ_U); |
| | | } |
| | | } |
| | | } |
| | | return responseDto.toString(); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.bstek.dorado.annotation.DataResolver; |
| | | import com.bstek.dorado.annotation.Expose; |
| | | import com.fzzy.api.data.ApiParam; |
| | | import com.fzzy.api.data.PushProtocol; |
| | | import com.fzzy.api.entity.ApiConfs; |
| | | import com.fzzy.api.service.ApiCommonService; |
| | | import com.fzzy.api.service.ApiPushManager; |
| | |
| | | */ |
| | | @Expose |
| | | public String pushData(List<Api1112> items) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | Api1112 d; |
| | | |
| | | //获取配置 |
| | | String kqdm = items.get(0).getKqdm(); |
| | | ApiConfs apiConf = apiCommonService.getConf(kqdm); |
| | | |
| | | if (null == apiConf) return "系统没有获取到当前库区配置信息,执行失败"; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1112); |
| | | |
| | | //获取实现接口 |
| | | ApiRemoteService apiRemoteService = apiPushManager.getApiRemoteService(param.getPushProtocol()); |
| | | ApiRemoteService apiRemoteService = apiPushManager.getApiRemoteService(apiConf.getPushProtocol()); |
| | | if (null == apiRemoteService) return "系统没有当前推送协议配置,执行失败"; |
| | | |
| | | if (PushProtocol.SB_SH_2023.getCode().equals(apiConf.getPushProtocol())){ |
| | | return pushDataList(items,apiRemoteService,apiConf); |
| | | } |
| | | return pushDataSingle(items,apiRemoteService,apiConf); |
| | | } |
| | | |
| | | /** |
| | | * 单条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataSingle(List<Api1112> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1112); |
| | | Api1112 d; |
| | | for (Api1112 data : items) { |
| | | d = new Api1112(); |
| | | BeanUtils.copyProperties(data, d); |
| | |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 多条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataList(List<Api1112> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1112); |
| | | |
| | | //推送,数据为集合形式 |
| | | ResponseDto responseDto = apiRemoteService.pushData(param, apiConf, items); |
| | | if (responseDto.getSuccess() == 0) { |
| | | //推送成功,更新数据上传状态 |
| | | for (Api1112 data : items) { |
| | | if (Constant.CZBZ_I.equals(data.getCzbz())) { |
| | | //更新状态 |
| | | api1112Rep.updateStatus(data.getSfzhm(), Constant.CZBZ_U); |
| | | } |
| | | } |
| | | } |
| | | return responseDto.toString(); |
| | | } |
| | | } |
| | |
| | | import com.bstek.dorado.annotation.DataResolver; |
| | | import com.bstek.dorado.annotation.Expose; |
| | | import com.fzzy.api.data.ApiParam; |
| | | import com.fzzy.api.data.PushProtocol; |
| | | import com.fzzy.api.entity.ApiConfs; |
| | | import com.fzzy.api.service.ApiCommonService; |
| | | import com.fzzy.api.service.ApiPushManager; |
| | |
| | | |
| | | /** |
| | | * 企业信用信息 |
| | | * |
| | | * @author he |
| | | */ |
| | | @Component |
| | | public class Api1113PR { |
| | | |
| | | @Autowired |
| | | private Api1113Rep api1113Rep; |
| | | @Autowired |
| | | private Api1113Rep api1113Rep; |
| | | |
| | | @Autowired |
| | | private ApiCommonService apiCommonService; |
| | | @Autowired |
| | | private ApiCommonService apiCommonService; |
| | | |
| | | @Autowired |
| | | private ApiPushManager apiPushManager; |
| | | @Autowired |
| | | private ApiPushManager apiPushManager; |
| | | |
| | | /** |
| | | * api1113PR#listAll |
| | | * |
| | | * @return |
| | | */ |
| | | @DataProvider |
| | | public List<Api1113> listAll() { |
| | | return api1113Rep.findAll(); |
| | | } |
| | | /** |
| | | * api1113PR#listAll |
| | | * |
| | | * @return |
| | | */ |
| | | @DataProvider |
| | | public List<Api1113> listAll() { |
| | | return api1113Rep.findAll(); |
| | | } |
| | | |
| | | /** |
| | | * api1113PR#updateSave |
| | | * |
| | | * @param entity |
| | | */ |
| | | @DataResolver |
| | | public void updateSave(Api1113 entity) { |
| | | /** |
| | | * api1113PR#updateSave |
| | | * |
| | | * @param entity |
| | | */ |
| | | @DataResolver |
| | | public void updateSave(Api1113 entity) { |
| | | |
| | | // 手动将doradoEntity对象转换为标准Bean对象 |
| | | Api1113 data = new Api1113(); |
| | | BeanUtils.copyProperties(entity, data); |
| | | // 手动将doradoEntity对象转换为标准Bean对象 |
| | | Api1113 data = new Api1113(); |
| | | BeanUtils.copyProperties(entity, data); |
| | | |
| | | api1113Rep.save(data); |
| | | } |
| | | api1113Rep.save(data); |
| | | } |
| | | |
| | | /** |
| | | * api1113PR#delData |
| | | * |
| | | * @param data |
| | | */ |
| | | @Expose |
| | | public String delData(Api1113 data) { |
| | | /** |
| | | * api1113PR#delData |
| | | * |
| | | * @param data |
| | | */ |
| | | @Expose |
| | | public String delData(Api1113 data) { |
| | | |
| | | api1113Rep.deleteById(data.getDwdm()); |
| | | api1113Rep.deleteById(data.getDwdm()); |
| | | |
| | | return null; |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * 更新删除标记 api1113PR#delUpdate |
| | | * |
| | | * @param entity |
| | | */ |
| | | @Expose |
| | | public String delUpdate(Api1113 entity) { |
| | | /** |
| | | * 更新删除标记 api1113PR#delUpdate |
| | | * |
| | | * @param entity |
| | | */ |
| | | @Expose |
| | | public String delUpdate(Api1113 entity) { |
| | | |
| | | entity.setCzbz(Constant.CZBZ_D); |
| | | entity.setCzbz(Constant.CZBZ_D); |
| | | |
| | | Api1113 data = new Api1113(); |
| | | BeanUtils.copyProperties(entity, data); |
| | | Api1113 data = new Api1113(); |
| | | BeanUtils.copyProperties(entity, data); |
| | | |
| | | api1113Rep.save(data); |
| | | return null; |
| | | } |
| | | api1113Rep.save(data); |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * api1113PR#pushData |
| | | * |
| | | * @param items |
| | | */ |
| | | @Expose |
| | | public String pushData(List<Api1113> items) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | Api1113 d; |
| | | //获取配置 |
| | | String kqdm = items.get(0).getKqdm(); |
| | | ApiConfs apiConf = apiCommonService.getConf(kqdm); |
| | | /** |
| | | * api1113PR#pushData |
| | | * |
| | | * @param items |
| | | */ |
| | | @Expose |
| | | public String pushData(List<Api1113> items) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | Api1113 d; |
| | | //获取配置 |
| | | String kqdm = items.get(0).getKqdm(); |
| | | ApiConfs apiConf = apiCommonService.getConf(kqdm); |
| | | |
| | | if (null == apiConf) return "系统没有获取到当前库区配置信息,执行失败"; |
| | | if (null == apiConf) return "系统没有获取到当前库区配置信息,执行失败"; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1113); |
| | | //获取实现接口 |
| | | ApiRemoteService apiRemoteService = apiPushManager.getApiRemoteService(apiConf.getPushProtocol()); |
| | | if (null == apiRemoteService) return "系统没有当前推送协议配置,执行失败"; |
| | | if (PushProtocol.SB_SH_2023.getCode().equals(apiConf.getPushProtocol())) { |
| | | return pushDataList(items, apiRemoteService, apiConf); |
| | | } |
| | | return pushDataSingle(items, apiRemoteService, apiConf); |
| | | } |
| | | |
| | | //获取实现接口 |
| | | ApiRemoteService apiRemoteService = apiPushManager.getApiRemoteService(param.getPushProtocol()); |
| | | if (null == apiRemoteService) return "系统没有当前推送协议配置,执行失败"; |
| | | /** |
| | | * 单条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataSingle(List<Api1113> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | |
| | | for (Api1113 data : items) { |
| | | d = new Api1113(); |
| | | BeanUtils.copyProperties(data, d); |
| | | param.setBizId(data.getBizId()); |
| | | responseDto = apiRemoteService.pushData(param, apiConf, d); |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1113); |
| | | Api1113 d; |
| | | for (Api1113 data : items) { |
| | | d = new Api1113(); |
| | | BeanUtils.copyProperties(data, d); |
| | | param.setBizId(data.getBizId()); |
| | | responseDto = apiRemoteService.pushData(param, apiConf, d); |
| | | |
| | | result += responseDto.toString(); |
| | | if (responseDto.getSuccess() == 0) { |
| | | if (Constant.CZBZ_I.equals(d.getCzbz())) { |
| | | api1113Rep.updateStatus(data.getKqdm(), Constant.CZBZ_U); |
| | | } |
| | | } |
| | | } |
| | | return result; |
| | | } |
| | | result += responseDto.toString(); |
| | | if (responseDto.getSuccess() == 0) { |
| | | if (Constant.CZBZ_I.equals(d.getCzbz())) { |
| | | api1113Rep.updateStatus(data.getKqdm(), Constant.CZBZ_U); |
| | | } |
| | | } |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 多条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataList(List<Api1113> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1113); |
| | | |
| | | //推送,数据为集合形式 |
| | | ResponseDto responseDto = apiRemoteService.pushData(param, apiConf, items); |
| | | if (responseDto.getSuccess() == 0) { |
| | | //推送成功,更新数据上传状态 |
| | | for (Api1113 data : items) { |
| | | if (Constant.CZBZ_I.equals(data.getCzbz())) { |
| | | //更新状态 |
| | | api1113Rep.updateStatus(data.getKqdm(), Constant.CZBZ_U); |
| | | } |
| | | } |
| | | } |
| | | return responseDto.toString(); |
| | | } |
| | | } |
| | |
| | | import com.bstek.dorado.annotation.DataResolver; |
| | | import com.bstek.dorado.annotation.Expose; |
| | | import com.bstek.dorado.data.provider.Page; |
| | | import com.fzzy.api.data.PushProtocol; |
| | | import com.fzzy.api.entity.Api1201; |
| | | import com.fzzy.api.entity.ApiConfs; |
| | | import com.fzzy.api.service.ApiCommonService; |
| | | import com.fzzy.api.service.ApiPushManager; |
| | |
| | | |
| | | if (null == apiConf) return "系统没有获取到当前库区配置信息,执行失败"; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1201); |
| | | |
| | | |
| | | //获取实现接口 |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(param.getPushProtocol()); |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(apiConf.getPushProtocol()); |
| | | if (null == apiService) return "系统没有当前推送协议配置,执行失败"; |
| | | |
| | | if (PushProtocol.SB_SH_2023.getCode().equals(apiConf.getPushProtocol())){ |
| | | return pushDataList(items,apiService,apiConf); |
| | | } |
| | | return pushDataSingle(items,apiService,apiConf); |
| | | } |
| | | |
| | | /** |
| | | * 单条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataSingle(List<Api1201> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_12, Constant.API_CODE_1201); |
| | | Api1201 d; |
| | | for (Api1201 data : items) { |
| | | d = new Api1201(); |
| | | BeanUtils.copyProperties(data, d); |
| | | responseDto = apiService.pushData(param, apiConf, d); |
| | | param.setBizId(data.getBizId()); |
| | | responseDto = apiRemoteService.pushData(param, apiConf, d); |
| | | |
| | | result += responseDto.toString(); |
| | | if (responseDto.getSuccess() == 0) { |
| | | if ("i".equals(d.getCzbz())) { |
| | | apiRepository.updateStatus(d.getHth(), Constant.CZBZ_U); |
| | | if (Constant.CZBZ_I.equals(d.getCzbz())) { |
| | | apiRepository.updateStatus(data.getHth(), Constant.CZBZ_U); |
| | | } |
| | | } |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 多条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataList(List<Api1201> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_12, Constant.API_CODE_1201); |
| | | |
| | | //推送,数据为集合形式 |
| | | ResponseDto responseDto = apiRemoteService.pushData(param, apiConf, items); |
| | | if (responseDto.getSuccess() == 0) { |
| | | //推送成功,更新数据上传状态 |
| | | for (Api1201 data : items) { |
| | | if (Constant.CZBZ_I.equals(data.getCzbz())) { |
| | | //更新状态 |
| | | apiRepository.updateStatus(data.getHth(), Constant.CZBZ_U); |
| | | } |
| | | } |
| | | } |
| | | return responseDto.toString(); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.bstek.dorado.annotation.DataResolver; |
| | | import com.bstek.dorado.annotation.Expose; |
| | | import com.bstek.dorado.data.provider.Page; |
| | | import com.fzzy.api.data.PushProtocol; |
| | | import com.fzzy.api.entity.ApiConfs; |
| | | import com.fzzy.api.service.ApiCommonService; |
| | | import com.fzzy.api.service.ApiPushManager; |
| | |
| | | */ |
| | | @Expose |
| | | public String pushData(List<Api1202> items) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | Api1202 d; |
| | | String kqdm = items.get(0).getKqdm(); |
| | | ApiConfs apiConf = apiCommonService.getConf(kqdm); |
| | | |
| | | if (null == apiConf) return "系统没有获取到当前库区配置信息,执行失败"; |
| | | String kqdm = items.get(0).getKqdm(); |
| | | ApiConfs apiConf = apiCommonService.getConf(kqdm); |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1202); |
| | | if (null == apiConf) return "系统没有获取到当前库区配置信息,执行失败"; |
| | | |
| | | //获取实现接口 |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(apiConf.getPushProtocol()); |
| | | if (null == apiService) return "系统没有当前推送协议配置,执行失败"; |
| | | |
| | | //获取实现接口 |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(param.getPushProtocol()); |
| | | if (null == apiService) return "系统没有当前推送协议配置,执行失败"; |
| | | if (PushProtocol.SB_SH_2023.getCode().equals(apiConf.getPushProtocol())) { |
| | | return pushDataList(items, apiService, apiConf); |
| | | } |
| | | return pushDataSingle(items, apiService, apiConf); |
| | | } |
| | | |
| | | for (Api1202 data : items) { |
| | | d = new Api1202(); |
| | | BeanUtils.copyProperties(data, d); |
| | | responseDto = apiService.pushData(param, apiConf, d); |
| | | result += responseDto.toString(); |
| | | if (responseDto.getSuccess() == 0) { |
| | | //todo 代表上传成功 ,后期需要保存日志 |
| | | if ("i".equals(d.getCzbz())) { |
| | | apiRepository.updateStatus(d.getRkywdh(), Constant.CZBZ_U); |
| | | } |
| | | /** |
| | | * 单条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataSingle(List<Api1202> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_12, Constant.API_CODE_1202); |
| | | Api1202 d; |
| | | for (Api1202 data : items) { |
| | | d = new Api1202(); |
| | | BeanUtils.copyProperties(data, d); |
| | | responseDto = apiRemoteService.pushData(param, apiConf, d); |
| | | result += responseDto.toString(); |
| | | if (responseDto.getSuccess() == 0) { |
| | | //todo 代表上传成功 ,后期需要保存日志 |
| | | if ("i".equals(d.getCzbz())) { |
| | | apiRepository.updateStatus(d.getRkywdh(), Constant.CZBZ_U); |
| | | } |
| | | } |
| | | return result; |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 多条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataList(List<Api1202> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_12, Constant.API_CODE_1202); |
| | | |
| | | //推送,数据为集合形式 |
| | | ResponseDto responseDto = apiRemoteService.pushData(param, apiConf, items); |
| | | if (responseDto.getSuccess() == 0) { |
| | | //推送成功,更新数据上传状态 |
| | | for (Api1202 data : items) { |
| | | if (Constant.CZBZ_I.equals(data.getCzbz())) { |
| | | //更新状态 |
| | | apiRepository.updateStatus(data.getRkywdh(), Constant.CZBZ_U); |
| | | } |
| | | } |
| | | } |
| | | return responseDto.toString(); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.bstek.dorado.annotation.DataResolver; |
| | | import com.bstek.dorado.annotation.Expose; |
| | | import com.bstek.dorado.data.provider.Page; |
| | | import com.fzzy.api.data.PushProtocol; |
| | | import com.fzzy.api.entity.Api1203; |
| | | import com.fzzy.api.entity.ApiConfs; |
| | | import com.fzzy.api.service.ApiCommonService; |
| | | import com.fzzy.api.service.ApiPushManager; |
| | |
| | | */ |
| | | @Expose |
| | | public String pushData(List<Api1203> items) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | Api1203 d; |
| | | |
| | | String kqdm = items.get(0).getKqdm(); |
| | | ApiConfs apiConf = apiCommonService.getConf(kqdm); |
| | | |
| | | if (null == apiConf) return "系统没有获取到当前库区配置信息,执行失败"; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1203); |
| | | |
| | | |
| | | //获取实现接口 |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(param.getPushProtocol()); |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(apiConf.getPushProtocol()); |
| | | if (null == apiService) return "系统没有当前推送协议配置,执行失败"; |
| | | |
| | | if (PushProtocol.SB_SH_2023.getCode().equals(apiConf.getPushProtocol())) { |
| | | return pushDataList(items, apiService, apiConf); |
| | | } |
| | | return pushDataSingle(items, apiService, apiConf); |
| | | } |
| | | |
| | | /** |
| | | * 单条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataSingle(List<Api1203> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_12, Constant.API_CODE_1203); |
| | | Api1203 d; |
| | | for (Api1203 data : items) { |
| | | d = new Api1203(); |
| | | BeanUtils.copyProperties(data, d); |
| | | responseDto = apiService.pushData(param, apiConf, d); |
| | | responseDto = apiRemoteService.pushData(param, apiConf, d); |
| | | result += responseDto.toString(); |
| | | if (responseDto.getSuccess() == 0) { |
| | | //todo 代表上传成功 ,后期需要保存日志 |
| | |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 多条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataList(List<Api1203> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_12, Constant.API_CODE_1203); |
| | | |
| | | //推送,数据为集合形式 |
| | | ResponseDto responseDto = apiRemoteService.pushData(param, apiConf, items); |
| | | if (responseDto.getSuccess() == 0) { |
| | | //推送成功,更新数据上传状态 |
| | | for (Api1203 data : items) { |
| | | if (Constant.CZBZ_I.equals(data.getCzbz())) { |
| | | //更新状态 |
| | | apiRepository.updateStatus(data.getRkywdh(), Constant.CZBZ_U); |
| | | } |
| | | } |
| | | } |
| | | return responseDto.toString(); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import com.bstek.dorado.annotation.DataResolver; |
| | | import com.bstek.dorado.annotation.Expose; |
| | | import com.bstek.dorado.data.provider.Page; |
| | | import com.fzzy.api.data.PushProtocol; |
| | | import com.fzzy.api.entity.Api1204; |
| | | import com.fzzy.api.entity.Api1204; |
| | | import com.fzzy.api.entity.ApiConfs; |
| | | import com.fzzy.api.service.ApiCommonService; |
| | |
| | | |
| | | if (null == apiConf) return "系统没有获取到当前库区配置信息,执行失败"; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1204); |
| | | |
| | | |
| | | //获取实现接口 |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(param.getPushProtocol()); |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(apiConf.getPushProtocol()); |
| | | if (null == apiService) return "系统没有当前推送协议配置,执行失败"; |
| | | |
| | | if (PushProtocol.SB_SH_2023.getCode().equals(apiConf.getPushProtocol())) { |
| | | return pushDataList(items, apiService, apiConf); |
| | | } |
| | | return pushDataSingle(items, apiService, apiConf); |
| | | } |
| | | /** |
| | | * 单条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataSingle(List<Api1204> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_12, Constant.API_CODE_1204); |
| | | Api1204 d; |
| | | for (Api1204 data : items) { |
| | | d = new Api1204(); |
| | | BeanUtils.copyProperties(data, d); |
| | | responseDto = apiService.pushData(param, apiConf, d); |
| | | responseDto = apiRemoteService.pushData(param, apiConf, d); |
| | | result += responseDto.toString(); |
| | | if (responseDto.getSuccess() == 0) { |
| | | //todo 代表上传成功 ,后期需要保存日志 |
| | |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 多条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataList(List<Api1204> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_12, Constant.API_CODE_1204); |
| | | |
| | | //推送,数据为集合形式 |
| | | ResponseDto responseDto = apiRemoteService.pushData(param, apiConf, items); |
| | | if (responseDto.getSuccess() == 0) { |
| | | //推送成功,更新数据上传状态 |
| | | for (Api1204 data : items) { |
| | | if (Constant.CZBZ_I.equals(data.getCzbz())) { |
| | | //更新状态 |
| | | apiRepository.updateStatus(data.getRkjsdh(), Constant.CZBZ_U); |
| | | } |
| | | } |
| | | } |
| | | return responseDto.toString(); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.bstek.dorado.annotation.DataResolver; |
| | | import com.bstek.dorado.annotation.Expose; |
| | | import com.bstek.dorado.data.provider.Page; |
| | | import com.fzzy.api.entity.Api1205; |
| | | import com.fzzy.api.data.PushProtocol; |
| | | import com.fzzy.api.entity.ApiConfs; |
| | | import com.fzzy.api.service.ApiCommonService; |
| | | import com.fzzy.api.service.ApiPushManager; |
| | |
| | | */ |
| | | @Expose |
| | | public String pushData(List<Api1205> items) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | Api1205 d; |
| | | |
| | | String kqdm = items.get(0).getKqdm(); |
| | | ApiConfs apiConf = apiCommonService.getConf(kqdm); |
| | | |
| | | if (null == apiConf) return "系统没有获取到当前库区配置信息,执行失败"; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1205); |
| | | |
| | | |
| | | //获取实现接口 |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(param.getPushProtocol()); |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(apiConf.getPushProtocol()); |
| | | if (null == apiService) return "系统没有当前推送协议配置,执行失败"; |
| | | |
| | | if (PushProtocol.SB_SH_2023.getCode().equals(apiConf.getPushProtocol())) { |
| | | return pushDataList(items, apiService, apiConf); |
| | | } |
| | | return pushDataSingle(items, apiService, apiConf); |
| | | } |
| | | |
| | | /** |
| | | * 单条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataSingle(List<Api1205> items, ApiRemoteService apiService, ApiConfs apiConf) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_12, Constant.API_CODE_1205); |
| | | Api1205 d; |
| | | for (Api1205 data : items) { |
| | | d = new Api1205(); |
| | | BeanUtils.copyProperties(data, d); |
| | |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 多条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataList(List<Api1205> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_12, Constant.API_CODE_1205); |
| | | |
| | | //推送,数据为集合形式 |
| | | ResponseDto responseDto = apiRemoteService.pushData(param, apiConf, items); |
| | | if (responseDto.getSuccess() == 0) { |
| | | //推送成功,更新数据上传状态 |
| | | for (Api1205 data : items) { |
| | | if (Constant.CZBZ_I.equals(data.getCzbz())) { |
| | | //更新状态 |
| | | apiRepository.updateStatus(data.getCkywdh(), Constant.CZBZ_U); |
| | | } |
| | | } |
| | | } |
| | | return responseDto.toString(); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.bstek.dorado.annotation.DataResolver; |
| | | import com.bstek.dorado.annotation.Expose; |
| | | import com.bstek.dorado.data.provider.Page; |
| | | import com.fzzy.api.entity.Api1206; |
| | | import com.fzzy.api.data.PushProtocol; |
| | | import com.fzzy.api.entity.ApiConfs; |
| | | import com.fzzy.api.service.ApiCommonService; |
| | | import com.fzzy.api.service.ApiPushManager; |
| | |
| | | */ |
| | | @Expose |
| | | public String pushData(List<Api1206> items) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | Api1206 d; |
| | | String kqdm = items.get(0).getKqdm(); |
| | | ApiConfs apiConf = apiCommonService.getConf(kqdm); |
| | | |
| | | if (null == apiConf) return "系统没有获取到当前库区配置信息,执行失败"; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1206); |
| | | |
| | | |
| | | //获取实现接口 |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(param.getPushProtocol()); |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(apiConf.getPushProtocol()); |
| | | if (null == apiService) return "系统没有当前推送协议配置,执行失败"; |
| | | |
| | | if (PushProtocol.SB_SH_2023.getCode().equals(apiConf.getPushProtocol())) { |
| | | return pushDataList(items, apiService, apiConf); |
| | | } |
| | | return pushDataSingle(items, apiService, apiConf); |
| | | } |
| | | |
| | | /** |
| | | * 单条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataSingle(List<Api1206> items, ApiRemoteService apiService, ApiConfs apiConf) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_12, Constant.API_CODE_1206); |
| | | Api1206 d; |
| | | for (Api1206 data : items) { |
| | | d = new Api1206(); |
| | | BeanUtils.copyProperties(data, d); |
| | |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 多条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataList(List<Api1206> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_12, Constant.API_CODE_1206); |
| | | |
| | | //推送,数据为集合形式 |
| | | ResponseDto responseDto = apiRemoteService.pushData(param, apiConf, items); |
| | | if (responseDto.getSuccess() == 0) { |
| | | //推送成功,更新数据上传状态 |
| | | for (Api1206 data : items) { |
| | | if (Constant.CZBZ_I.equals(data.getCzbz())) { |
| | | //更新状态 |
| | | apiRepository.updateStatus(data.getCkjsdh(), Constant.CZBZ_U); |
| | | } |
| | | } |
| | | } |
| | | return responseDto.toString(); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.bstek.dorado.annotation.DataResolver; |
| | | import com.bstek.dorado.annotation.Expose; |
| | | import com.bstek.dorado.data.provider.Page; |
| | | import com.fzzy.api.data.PushProtocol; |
| | | import com.fzzy.api.entity.Api1207; |
| | | import com.fzzy.api.entity.Api1207; |
| | | import com.fzzy.api.entity.ApiConfs; |
| | | import com.fzzy.api.service.ApiCommonService; |
| | |
| | | */ |
| | | @Expose |
| | | public String pushData(List<Api1207> items) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | Api1207 d; |
| | | |
| | | String kqdm = items.get(0).getKqdm(); |
| | | ApiConfs apiConf = apiCommonService.getConf(kqdm); |
| | | |
| | | if (null == apiConf) return "系统没有获取到当前库区配置信息,执行失败"; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1207); |
| | | |
| | | |
| | | //获取实现接口 |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(param.getPushProtocol()); |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(apiConf.getPushProtocol()); |
| | | if (null == apiService) return "系统没有当前推送协议配置,执行失败"; |
| | | |
| | | if (PushProtocol.SB_SH_2023.getCode().equals(apiConf.getPushProtocol())) { |
| | | return pushDataList(items, apiService, apiConf); |
| | | } |
| | | return pushDataSingle(items, apiService, apiConf); |
| | | } |
| | | |
| | | /** |
| | | * 单条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataSingle(List<Api1207> items, ApiRemoteService apiService, ApiConfs apiConf) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_12, Constant.API_CODE_1207); |
| | | Api1207 d; |
| | | for (Api1207 data : items) { |
| | | d = new Api1207(); |
| | | BeanUtils.copyProperties(data, d); |
| | |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 多条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataList(List<Api1207> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_12, Constant.API_CODE_1207); |
| | | |
| | | //推送,数据为集合形式 |
| | | ResponseDto responseDto = apiRemoteService.pushData(param, apiConf, items); |
| | | if (responseDto.getSuccess() == 0) { |
| | | //推送成功,更新数据上传状态 |
| | | for (Api1207 data : items) { |
| | | if (Constant.CZBZ_I.equals(data.getCzbz())) { |
| | | //更新状态 |
| | | apiRepository.updateStatus(data.getDcdh(), Constant.CZBZ_U); |
| | | } |
| | | } |
| | | } |
| | | return responseDto.toString(); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.bstek.dorado.annotation.DataResolver; |
| | | import com.bstek.dorado.annotation.Expose; |
| | | import com.bstek.dorado.data.provider.Page; |
| | | import com.fzzy.api.entity.Api1208; |
| | | import com.fzzy.api.data.PushProtocol; |
| | | import com.fzzy.api.entity.ApiConfs; |
| | | import com.fzzy.api.service.ApiCommonService; |
| | | import com.fzzy.api.service.ApiPushManager; |
| | |
| | | */ |
| | | @Expose |
| | | public String pushData(List<Api1208> items) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | Api1208 d; |
| | | |
| | | String kqdm = items.get(0).getKqdm(); |
| | | ApiConfs apiConf = apiCommonService.getConf(kqdm); |
| | | |
| | | if (null == apiConf) return "系统没有获取到当前库区配置信息,执行失败"; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1208); |
| | | |
| | | |
| | | //获取实现接口 |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(param.getPushProtocol()); |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(apiConf.getPushProtocol()); |
| | | if (null == apiService) return "系统没有当前推送协议配置,执行失败"; |
| | | |
| | | if (PushProtocol.SB_SH_2023.getCode().equals(apiConf.getPushProtocol())) { |
| | | return pushDataList(items, apiService, apiConf); |
| | | } |
| | | return pushDataSingle(items, apiService, apiConf); |
| | | } |
| | | |
| | | /** |
| | | * 单条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataSingle(List<Api1208> items, ApiRemoteService apiService, ApiConfs apiConf) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_12, Constant.API_CODE_1208); |
| | | Api1208 d; |
| | | for (Api1208 data : items) { |
| | | d = new Api1208(); |
| | | BeanUtils.copyProperties(data, d); |
| | |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 多条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataList(List<Api1208> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_12, Constant.API_CODE_1208); |
| | | |
| | | //推送,数据为集合形式 |
| | | ResponseDto responseDto = apiRemoteService.pushData(param, apiConf, items); |
| | | if (responseDto.getSuccess() == 0) { |
| | | //推送成功,更新数据上传状态 |
| | | for (Api1208 data : items) { |
| | | if (Constant.CZBZ_I.equals(data.getCzbz())) { |
| | | //更新状态 |
| | | apiRepository.updateStatus(data.getId(), Constant.CZBZ_U); |
| | | } |
| | | } |
| | | } |
| | | return responseDto.toString(); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.bstek.dorado.annotation.DataResolver; |
| | | import com.bstek.dorado.annotation.Expose; |
| | | import com.bstek.dorado.data.provider.Page; |
| | | import com.fzzy.api.entity.Api1209; |
| | | import com.fzzy.api.data.PushProtocol; |
| | | import com.fzzy.api.entity.ApiConfs; |
| | | import com.fzzy.api.service.ApiCommonService; |
| | | import com.fzzy.api.service.ApiPushManager; |
| | |
| | | */ |
| | | @Expose |
| | | public String pushData(List<Api1209> items) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | Api1209 d; |
| | | |
| | | String kqdm = items.get(0).getKqdm(); |
| | | ApiConfs apiConf = apiCommonService.getConf(kqdm); |
| | | |
| | | if (null == apiConf) return "系统没有获取到当前库区配置信息,执行失败"; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1209); |
| | | |
| | | |
| | | //获取实现接口 |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(param.getPushProtocol()); |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(apiConf.getPushProtocol()); |
| | | if (null == apiService) return "系统没有当前推送协议配置,执行失败"; |
| | | |
| | | if (PushProtocol.SB_SH_2023.getCode().equals(apiConf.getPushProtocol())) { |
| | | return pushDataList(items, apiService, apiConf); |
| | | } |
| | | return pushDataSingle(items, apiService, apiConf); |
| | | } |
| | | |
| | | /** |
| | | * 单条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataSingle(List<Api1209> items, ApiRemoteService apiService, ApiConfs apiConf) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_12, Constant.API_CODE_1209); |
| | | Api1209 d; |
| | | for (Api1209 data : items) { |
| | | d = new Api1209(); |
| | | BeanUtils.copyProperties(data, d); |
| | |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 多条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataList(List<Api1209> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_12, Constant.API_CODE_1209); |
| | | |
| | | //推送,数据为集合形式 |
| | | ResponseDto responseDto = apiRemoteService.pushData(param, apiConf, items); |
| | | if (responseDto.getSuccess() == 0) { |
| | | //推送成功,更新数据上传状态 |
| | | for (Api1209 data : items) { |
| | | if (Constant.CZBZ_I.equals(data.getCzbz())) { |
| | | //更新状态 |
| | | apiRepository.updateStatus(data.getSydh(), Constant.CZBZ_U); |
| | | } |
| | | } |
| | | } |
| | | return responseDto.toString(); |
| | | } |
| | | } |
| | |
| | | import com.bstek.dorado.annotation.DataResolver; |
| | | import com.bstek.dorado.annotation.Expose; |
| | | import com.bstek.dorado.data.provider.Page; |
| | | import com.fzzy.api.entity.Api1210; |
| | | import com.fzzy.api.data.PushProtocol; |
| | | import com.fzzy.api.entity.ApiConfs; |
| | | import com.fzzy.api.service.ApiCommonService; |
| | | import com.fzzy.api.service.ApiPushManager; |
| | |
| | | */ |
| | | @Expose |
| | | public String pushData(List<Api1210> items) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | Api1210 d; |
| | | |
| | | String kqdm = items.get(0).getKqdm(); |
| | | ApiConfs apiConf = apiCommonService.getConf(kqdm); |
| | | |
| | | if (null == apiConf) return "系统没有获取到当前库区配置信息,执行失败"; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1210); |
| | | |
| | | |
| | | //获取实现接口 |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(param.getPushProtocol()); |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(apiConf.getPushProtocol()); |
| | | if (null == apiService) return "系统没有当前推送协议配置,执行失败"; |
| | | |
| | | if (PushProtocol.SB_SH_2023.getCode().equals(apiConf.getPushProtocol())) { |
| | | return pushDataList(items, apiService, apiConf); |
| | | } |
| | | return pushDataSingle(items, apiService, apiConf); |
| | | } |
| | | |
| | | /** |
| | | * 单条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataSingle(List<Api1210> items, ApiRemoteService apiService, ApiConfs apiConf) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_12, Constant.API_CODE_1210); |
| | | Api1210 d; |
| | | for (Api1210 data : items) { |
| | | d = new Api1210(); |
| | | BeanUtils.copyProperties(data, d); |
| | |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 多条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataList(List<Api1210> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_12, Constant.API_CODE_1210); |
| | | |
| | | //推送,数据为集合形式 |
| | | ResponseDto responseDto = apiRemoteService.pushData(param, apiConf, items); |
| | | if (responseDto.getSuccess() == 0) { |
| | | //推送成功,更新数据上传状态 |
| | | for (Api1210 data : items) { |
| | | if (Constant.CZBZ_I.equals(data.getCzbz())) { |
| | | //更新状态 |
| | | apiRepository.updateStatus(data.getLsxzzbdh(), Constant.CZBZ_U); |
| | | } |
| | | } |
| | | } |
| | | return responseDto.toString(); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.bstek.dorado.annotation.DataResolver; |
| | | import com.bstek.dorado.annotation.Expose; |
| | | import com.bstek.dorado.data.provider.Page; |
| | | import com.fzzy.api.data.PushProtocol; |
| | | import com.fzzy.api.entity.Api1211; |
| | | import com.fzzy.api.entity.ApiConfs; |
| | | import com.fzzy.api.service.ApiCommonService; |
| | |
| | | */ |
| | | @Expose |
| | | public String pushData(List<Api1211> items) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | Api1211 d; |
| | | |
| | | String kqdm = items.get(0).getKqdm(); |
| | | ApiConfs apiConf = apiCommonService.getConf(kqdm); |
| | | |
| | | if (null == apiConf) return "系统没有获取到当前库区配置信息,执行失败"; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1211); |
| | | |
| | | |
| | | //获取实现接口 |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(param.getPushProtocol()); |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(apiConf.getPushProtocol()); |
| | | if (null == apiService) return "系统没有当前推送协议配置,执行失败"; |
| | | |
| | | if (PushProtocol.SB_SH_2023.getCode().equals(apiConf.getPushProtocol())) { |
| | | return pushDataList(items, apiService, apiConf); |
| | | } |
| | | return pushDataSingle(items, apiService, apiConf); |
| | | } |
| | | |
| | | /** |
| | | * 单条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataSingle(List<Api1211> items, ApiRemoteService apiService, ApiConfs apiConf) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_12, Constant.API_CODE_1211); |
| | | Api1211 d; |
| | | for (Api1211 data : items) { |
| | | d = new Api1211(); |
| | | BeanUtils.copyProperties(data, d); |
| | |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 多条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataList(List<Api1211> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_12, Constant.API_CODE_1211); |
| | | |
| | | //推送,数据为集合形式 |
| | | ResponseDto responseDto = apiRemoteService.pushData(param, apiConf, items); |
| | | if (responseDto.getSuccess() == 0) { |
| | | //推送成功,更新数据上传状态 |
| | | for (Api1211 data : items) { |
| | | if (Constant.CZBZ_I.equals(data.getCzbz())) { |
| | | //更新状态 |
| | | apiRepository.updateStatus(data.getId(), Constant.CZBZ_U); |
| | | } |
| | | } |
| | | } |
| | | return responseDto.toString(); |
| | | } |
| | | } |
| | |
| | | import com.bstek.dorado.annotation.DataResolver; |
| | | import com.bstek.dorado.annotation.Expose; |
| | | import com.bstek.dorado.data.provider.Page; |
| | | import com.fzzy.api.entity.Api1212; |
| | | import com.fzzy.api.data.PushProtocol; |
| | | import com.fzzy.api.entity.ApiConfs; |
| | | import com.fzzy.api.service.ApiCommonService; |
| | | import com.fzzy.api.service.ApiPushManager; |
| | |
| | | */ |
| | | @Expose |
| | | public String pushData(List<Api1212> items) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | Api1212 d; |
| | | |
| | | String kqdm = items.get(0).getKqdm(); |
| | | ApiConfs apiConf = apiCommonService.getConf(kqdm); |
| | | |
| | | if (null == apiConf) return "系统没有获取到当前库区配置信息,执行失败"; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1212); |
| | | |
| | | |
| | | //获取实现接口 |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(param.getPushProtocol()); |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(apiConf.getPushProtocol()); |
| | | if (null == apiService) return "系统没有当前推送协议配置,执行失败"; |
| | | |
| | | if (PushProtocol.SB_SH_2023.getCode().equals(apiConf.getPushProtocol())) { |
| | | return pushDataList(items, apiService, apiConf); |
| | | } |
| | | return pushDataSingle(items, apiService, apiConf); |
| | | } |
| | | |
| | | /** |
| | | * 单条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataSingle(List<Api1212> items, ApiRemoteService apiService, ApiConfs apiConf) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_12, Constant.API_CODE_1212); |
| | | Api1212 d; |
| | | for (Api1212 data : items) { |
| | | d = new Api1212(); |
| | | BeanUtils.copyProperties(data, d); |
| | |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 多条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataList(List<Api1212> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_12, Constant.API_CODE_1212); |
| | | |
| | | //推送,数据为集合形式 |
| | | ResponseDto responseDto = apiRemoteService.pushData(param, apiConf, items); |
| | | if (responseDto.getSuccess() == 0) { |
| | | //推送成功,更新数据上传状态 |
| | | for (Api1212 data : items) { |
| | | if (Constant.CZBZ_I.equals(data.getCzbz())) { |
| | | //更新状态 |
| | | apiRepository.updateStatus(data.getId(), Constant.CZBZ_U); |
| | | } |
| | | } |
| | | } |
| | | return responseDto.toString(); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.bstek.dorado.annotation.DataResolver; |
| | | import com.bstek.dorado.annotation.Expose; |
| | | import com.bstek.dorado.data.provider.Page; |
| | | import com.fzzy.api.entity.Api1301; |
| | | import com.fzzy.api.data.PushProtocol; |
| | | import com.fzzy.api.entity.ApiConfs; |
| | | import com.fzzy.api.service.ApiCommonService; |
| | | import com.fzzy.api.service.ApiPushManager; |
| | |
| | | |
| | | /** |
| | | * 安全管理数据 |
| | | * |
| | | * @author chen |
| | | */ |
| | | @Slf4j |
| | |
| | | } |
| | | |
| | | if (StringUtils.isNotBlank(param.getCzbz())) { |
| | | Predicate predicate2 = cb.equal(root.get("czbz"),param.getCzbz()); |
| | | Predicate predicate2 = cb.equal(root.get("czbz"), param.getCzbz()); |
| | | predicates.add(predicate2); |
| | | } |
| | | if (null != param.getStart()) { |
| | |
| | | Api1301 data = new Api1301(); |
| | | BeanUtils.copyProperties(entity, data); |
| | | |
| | | if(StringUtils.isEmpty(data.getId())){ |
| | | if (StringUtils.isEmpty(data.getId())) { |
| | | data.setId(ContextUtil.getUUID()); |
| | | } |
| | | api1301Rep.save(data); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * api1301PR#delData |
| | | * |
| | | * @param data |
| | | */ |
| | | @Expose |
| | | public String delData(Api1301 data) { |
| | | /** |
| | | * api1301PR#delData |
| | | * |
| | | * @param data |
| | | */ |
| | | @Expose |
| | | public String delData(Api1301 data) { |
| | | |
| | | api1301Rep.deleteById(data.getId()); |
| | | api1301Rep.deleteById(data.getId()); |
| | | |
| | | return null; |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * 更新删除标记 api1301PR#delUpdate |
| | | * |
| | | * @param entity |
| | | */ |
| | | @Expose |
| | | public String delUpdate(Api1301 entity) { |
| | | /** |
| | | * 更新删除标记 api1301PR#delUpdate |
| | | * |
| | | * @param entity |
| | | */ |
| | | @Expose |
| | | public String delUpdate(Api1301 entity) { |
| | | |
| | | entity.setCzbz(Constant.CZBZ_D); |
| | | entity.setCzbz(Constant.CZBZ_D); |
| | | |
| | | Api1301 data = new Api1301(); |
| | | BeanUtils.copyProperties(entity, data); |
| | | Api1301 data = new Api1301(); |
| | | BeanUtils.copyProperties(entity, data); |
| | | |
| | | api1301Rep.save(data); |
| | | api1301Rep.save(data); |
| | | |
| | | return null; |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * api1301PR#pushData |
| | |
| | | */ |
| | | @Expose |
| | | public String pushData(List<Api1301> items) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | Api1301 d; |
| | | |
| | | String kqdm = items.get(0).getKqdm(); |
| | | ApiConfs apiConf = apiCommonService.getConf(kqdm); |
| | | |
| | | if (null == apiConf) return "系统没有获取到当前库区配置信息,执行失败"; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1301); |
| | | |
| | | |
| | | //获取实现接口 |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(param.getPushProtocol()); |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(apiConf.getPushProtocol()); |
| | | if (null == apiService) return "系统没有当前推送协议配置,执行失败"; |
| | | |
| | | if (PushProtocol.SB_SH_2023.getCode().equals(apiConf.getPushProtocol())) { |
| | | return pushDataList(items, apiService, apiConf); |
| | | } |
| | | return pushDataSingle(items, apiService, apiConf); |
| | | } |
| | | |
| | | /** |
| | | * 单条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataSingle(List<Api1301> items, ApiRemoteService apiService, ApiConfs apiConf) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_13, Constant.API_CODE_1301); |
| | | Api1301 d; |
| | | for (Api1301 data : items) { |
| | | d = new Api1301(); |
| | | BeanUtils.copyProperties(data, d); |
| | |
| | | result += responseDto.toString(); |
| | | if (responseDto.getSuccess() == 0) { |
| | | //todo 代表上传成功 ,后期需要保存日志 |
| | | if("i".equals(d.getCzbz())){ |
| | | if ("i".equals(d.getCzbz())) { |
| | | d.setCzbz("u"); |
| | | api1301Rep.save(d); |
| | | } |
| | |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 多条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataList(List<Api1301> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_13, Constant.API_CODE_1301); |
| | | |
| | | //推送,数据为集合形式 |
| | | ResponseDto responseDto = apiRemoteService.pushData(param, apiConf, items); |
| | | if (responseDto.getSuccess() == 0) { |
| | | //推送成功,更新数据上传状态 |
| | | for (Api1301 data : items) { |
| | | if (Constant.CZBZ_I.equals(data.getCzbz())) { |
| | | //更新状态 |
| | | data.setCzbz(Constant.CZBZ_U); |
| | | api1301Rep.save(data); |
| | | } |
| | | } |
| | | } |
| | | return responseDto.toString(); |
| | | } |
| | | } |
| | |
| | | import com.bstek.dorado.annotation.DataResolver; |
| | | import com.bstek.dorado.annotation.Expose; |
| | | import com.bstek.dorado.data.provider.Page; |
| | | import com.fzzy.api.entity.Api1302; |
| | | import com.fzzy.api.data.PushProtocol; |
| | | import com.fzzy.api.entity.ApiConfs; |
| | | import com.fzzy.api.service.ApiCommonService; |
| | | import com.fzzy.api.service.ApiPushManager; |
| | |
| | | */ |
| | | @Expose |
| | | public String pushData(List<Api1302> items) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | Api1302 d; |
| | | |
| | | String kqdm = items.get(0).getKqdm(); |
| | | ApiConfs apiConf = apiCommonService.getConf(kqdm); |
| | | |
| | | if (null == apiConf) return "系统没有获取到当前库区配置信息,执行失败"; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1302); |
| | | |
| | | |
| | | //获取实现接口 |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(param.getPushProtocol()); |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(apiConf.getPushProtocol()); |
| | | if (null == apiService) return "系统没有当前推送协议配置,执行失败"; |
| | | |
| | | if (PushProtocol.SB_SH_2023.getCode().equals(apiConf.getPushProtocol())) { |
| | | return pushDataList(items, apiService, apiConf); |
| | | } |
| | | return pushDataSingle(items, apiService, apiConf); |
| | | } |
| | | |
| | | /** |
| | | * 单条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataSingle(List<Api1302> items, ApiRemoteService apiService, ApiConfs apiConf) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_13, Constant.API_CODE_1302); |
| | | Api1302 d; |
| | | for (Api1302 data : items) { |
| | | d = new Api1302(); |
| | | BeanUtils.copyProperties(data, d); |
| | |
| | | result += responseDto.toString(); |
| | | if (responseDto.getSuccess() == 0) { |
| | | //todo 代表上传成功 ,后期需要保存日志 |
| | | if("i".equals(d.getCzbz())){ |
| | | if ("i".equals(d.getCzbz())) { |
| | | d.setCzbz("u"); |
| | | apiRepository.save(d); |
| | | } |
| | |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 多条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataList(List<Api1302> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_13, Constant.API_CODE_1302); |
| | | |
| | | //推送,数据为集合形式 |
| | | ResponseDto responseDto = apiRemoteService.pushData(param, apiConf, items); |
| | | if (responseDto.getSuccess() == 0) { |
| | | //推送成功,更新数据上传状态 |
| | | for (Api1302 data : items) { |
| | | if (Constant.CZBZ_I.equals(data.getCzbz())) { |
| | | //更新状态 |
| | | data.setCzbz(Constant.CZBZ_U); |
| | | apiRepository.save(data); |
| | | } |
| | | } |
| | | } |
| | | return responseDto.toString(); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.bstek.dorado.annotation.DataResolver; |
| | | import com.bstek.dorado.annotation.Expose; |
| | | import com.bstek.dorado.data.provider.Page; |
| | | import com.fzzy.api.entity.Api1303; |
| | | import com.fzzy.api.data.PushProtocol; |
| | | import com.fzzy.api.entity.ApiConfs; |
| | | import com.fzzy.api.service.ApiCommonService; |
| | | import com.fzzy.api.service.ApiPushManager; |
| | |
| | | */ |
| | | @Expose |
| | | public String pushData(List<Api1303> items) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | Api1303 d; |
| | | |
| | | String kqdm = items.get(0).getKqdm(); |
| | | ApiConfs apiConf = apiCommonService.getConf(kqdm); |
| | | |
| | | if (null == apiConf) return "系统没有获取到当前库区配置信息,执行失败"; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1303); |
| | | |
| | | |
| | | //获取实现接口 |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(param.getPushProtocol()); |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(apiConf.getPushProtocol()); |
| | | if (null == apiService) return "系统没有当前推送协议配置,执行失败"; |
| | | |
| | | if (PushProtocol.SB_SH_2023.getCode().equals(apiConf.getPushProtocol())) { |
| | | return pushDataList(items, apiService, apiConf); |
| | | } |
| | | return pushDataSingle(items, apiService, apiConf); |
| | | } |
| | | |
| | | /** |
| | | * 单条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataSingle(List<Api1303> items, ApiRemoteService apiService, ApiConfs apiConf) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_13, Constant.API_CODE_1303); |
| | | Api1303 d; |
| | | |
| | | for (Api1303 data : items) { |
| | | d = new Api1303(); |
| | |
| | | } |
| | | } |
| | | return result; |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 多条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataList(List<Api1303> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_13, Constant.API_CODE_1303); |
| | | |
| | | //推送,数据为集合形式 |
| | | ResponseDto responseDto = apiRemoteService.pushData(param, apiConf, items); |
| | | if (responseDto.getSuccess() == 0) { |
| | | //推送成功,更新数据上传状态 |
| | | for (Api1303 data : items) { |
| | | if (Constant.CZBZ_I.equals(data.getCzbz())) { |
| | | //更新状态 |
| | | data.setCzbz(Constant.CZBZ_U); |
| | | api1303Rep.save(data); |
| | | } |
| | | } |
| | | } |
| | | return responseDto.toString(); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.bstek.dorado.annotation.DataResolver; |
| | | import com.bstek.dorado.annotation.Expose; |
| | | import com.bstek.dorado.data.provider.Page; |
| | | import com.fzzy.api.entity.Api1304; |
| | | import com.fzzy.api.data.PushProtocol; |
| | | import com.fzzy.api.entity.ApiConfs; |
| | | import com.fzzy.api.service.ApiCommonService; |
| | | import com.fzzy.api.service.ApiPushManager; |
| | |
| | | */ |
| | | @Expose |
| | | public String pushData(List<Api1304> items) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | Api1304 d; |
| | | |
| | | String kqdm = items.get(0).getKqdm(); |
| | | ApiConfs apiConf = apiCommonService.getConf(kqdm); |
| | | |
| | | if (null == apiConf) return "系统没有获取到当前库区配置信息,执行失败"; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1304); |
| | | |
| | | |
| | | //获取实现接口 |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(param.getPushProtocol()); |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(apiConf.getPushProtocol()); |
| | | if (null == apiService) return "系统没有当前推送协议配置,执行失败"; |
| | | if (PushProtocol.SB_SH_2023.getCode().equals(apiConf.getPushProtocol())) { |
| | | return pushDataList(items, apiService, apiConf); |
| | | } |
| | | return pushDataSingle(items, apiService, apiConf); |
| | | } |
| | | |
| | | /** |
| | | * 单条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataSingle(List<Api1304> items, ApiRemoteService apiService, ApiConfs apiConf) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_13, Constant.API_CODE_1304); |
| | | Api1304 d; |
| | | for (Api1304 data : items) { |
| | | d = new Api1304(); |
| | | BeanUtils.copyProperties(data, d); |
| | |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 多条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataList(List<Api1304> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_13, Constant.API_CODE_1304); |
| | | |
| | | //推送,数据为集合形式 |
| | | ResponseDto responseDto = apiRemoteService.pushData(param, apiConf, items); |
| | | if (responseDto.getSuccess() == 0) { |
| | | //推送成功,更新数据上传状态 |
| | | for (Api1304 data : items) { |
| | | if (Constant.CZBZ_I.equals(data.getCzbz())) { |
| | | //更新状态 |
| | | data.setCzbz(Constant.CZBZ_U); |
| | | api1304Rep.save(data); |
| | | } |
| | | } |
| | | } |
| | | return responseDto.toString(); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.bstek.dorado.annotation.DataResolver; |
| | | import com.bstek.dorado.annotation.Expose; |
| | | import com.bstek.dorado.data.provider.Page; |
| | | import com.fzzy.api.entity.Api1305; |
| | | import com.fzzy.api.data.PushProtocol; |
| | | import com.fzzy.api.entity.ApiConfs; |
| | | import com.fzzy.api.service.ApiCommonService; |
| | | import com.fzzy.api.service.ApiPushManager; |
| | |
| | | */ |
| | | @Expose |
| | | public String pushData(List<Api1305> items) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | Api1305 d; |
| | | |
| | | String kqdm = items.get(0).getKqdm(); |
| | | ApiConfs apiConf = apiCommonService.getConf(kqdm); |
| | | |
| | | if (null == apiConf) return "系统没有获取到当前库区配置信息,执行失败"; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1305); |
| | | |
| | | |
| | | //获取实现接口 |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(param.getPushProtocol()); |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(apiConf.getPushProtocol()); |
| | | if (null == apiService) return "系统没有当前推送协议配置,执行失败"; |
| | | |
| | | if (PushProtocol.SB_SH_2023.getCode().equals(apiConf.getPushProtocol())) { |
| | | return pushDataList(items, apiService, apiConf); |
| | | } |
| | | return pushDataSingle(items, apiService, apiConf); |
| | | } |
| | | |
| | | /** |
| | | * 单条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataSingle(List<Api1305> items, ApiRemoteService apiService, ApiConfs apiConf) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_13, Constant.API_CODE_1305); |
| | | Api1305 d; |
| | | for (Api1305 data : items) { |
| | | d = new Api1305(); |
| | | BeanUtils.copyProperties(data, d); |
| | |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 多条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataList(List<Api1305> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_13, Constant.API_CODE_1305); |
| | | |
| | | //推送,数据为集合形式 |
| | | ResponseDto responseDto = apiRemoteService.pushData(param, apiConf, items); |
| | | if (responseDto.getSuccess() == 0) { |
| | | //推送成功,更新数据上传状态 |
| | | for (Api1305 data : items) { |
| | | if (Constant.CZBZ_I.equals(data.getCzbz())) { |
| | | //更新状态 |
| | | data.setCzbz(Constant.CZBZ_U); |
| | | api1305Rep.save(data); |
| | | } |
| | | } |
| | | } |
| | | return responseDto.toString(); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.bstek.dorado.annotation.DataResolver; |
| | | import com.bstek.dorado.annotation.Expose; |
| | | import com.bstek.dorado.data.provider.Page; |
| | | import com.fzzy.api.entity.Api1306; |
| | | import com.fzzy.api.data.PushProtocol; |
| | | import com.fzzy.api.entity.ApiConfs; |
| | | import com.fzzy.api.service.ApiCommonService; |
| | | import com.fzzy.api.service.ApiPushManager; |
| | |
| | | */ |
| | | @Expose |
| | | public String pushData(List<Api1306> items) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | Api1306 d; |
| | | |
| | | String kqdm = items.get(0).getKqdm(); |
| | | ApiConfs apiConf = apiCommonService.getConf(kqdm); |
| | | |
| | | if (null == apiConf) return "系统没有获取到当前库区配置信息,执行失败"; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1306); |
| | | |
| | | |
| | | //获取实现接口 |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(param.getPushProtocol()); |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(apiConf.getPushProtocol()); |
| | | if (null == apiService) return "系统没有当前推送协议配置,执行失败"; |
| | | |
| | | if (PushProtocol.SB_SH_2023.getCode().equals(apiConf.getPushProtocol())) { |
| | | return pushDataList(items, apiService, apiConf); |
| | | } |
| | | return pushDataSingle(items, apiService, apiConf); |
| | | } |
| | | |
| | | /** |
| | | * 单条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataSingle(List<Api1306> items, ApiRemoteService apiService, ApiConfs apiConf) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_13, Constant.API_CODE_1306); |
| | | Api1306 d; |
| | | for (Api1306 data : items) { |
| | | d = new Api1306(); |
| | | BeanUtils.copyProperties(data, d); |
| | |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 多条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataList(List<Api1306> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_13, Constant.API_CODE_1306); |
| | | |
| | | //推送,数据为集合形式 |
| | | ResponseDto responseDto = apiRemoteService.pushData(param, apiConf, items); |
| | | if (responseDto.getSuccess() == 0) { |
| | | //推送成功,更新数据上传状态 |
| | | for (Api1306 data : items) { |
| | | if (Constant.CZBZ_I.equals(data.getCzbz())) { |
| | | //更新状态 |
| | | data.setCzbz(Constant.CZBZ_U); |
| | | api1306Rep.save(data); |
| | | } |
| | | } |
| | | } |
| | | return responseDto.toString(); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.bstek.dorado.annotation.DataResolver; |
| | | import com.bstek.dorado.annotation.Expose; |
| | | import com.bstek.dorado.data.provider.Page; |
| | | import com.fzzy.api.entity.Api1307; |
| | | import com.fzzy.api.data.PushProtocol; |
| | | import com.fzzy.api.entity.ApiConfs; |
| | | import com.fzzy.api.service.ApiCommonService; |
| | | import com.fzzy.api.service.ApiPushManager; |
| | |
| | | */ |
| | | @Expose |
| | | public String pushData(List<Api1307> items) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | Api1307 d; |
| | | |
| | | String kqdm = items.get(0).getKqdm(); |
| | | ApiConfs apiConf = apiCommonService.getConf(kqdm); |
| | | |
| | | if (null == apiConf) return "系统没有获取到当前库区配置信息,执行失败"; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1307); |
| | | |
| | | |
| | | //获取实现接口 |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(param.getPushProtocol()); |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(apiConf.getPushProtocol()); |
| | | if (null == apiService) return "系统没有当前推送协议配置,执行失败"; |
| | | if (PushProtocol.SB_SH_2023.getCode().equals(apiConf.getPushProtocol())) { |
| | | return pushDataList(items, apiService, apiConf); |
| | | } |
| | | return pushDataSingle(items, apiService, apiConf); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 单条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataSingle(List<Api1307> items, ApiRemoteService apiService, ApiConfs apiConf) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_13, Constant.API_CODE_1307); |
| | | Api1307 d; |
| | | for (Api1307 data : items) { |
| | | d = new Api1307(); |
| | | BeanUtils.copyProperties(data, d); |
| | |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 多条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataList(List<Api1307> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_13, Constant.API_CODE_1307); |
| | | |
| | | //推送,数据为集合形式 |
| | | ResponseDto responseDto = apiRemoteService.pushData(param, apiConf, items); |
| | | if (responseDto.getSuccess() == 0) { |
| | | //推送成功,更新数据上传状态 |
| | | for (Api1307 data : items) { |
| | | if (Constant.CZBZ_I.equals(data.getCzbz())) { |
| | | //更新状态 |
| | | data.setCzbz(Constant.CZBZ_U); |
| | | api1307Rep.save(data); |
| | | } |
| | | } |
| | | } |
| | | return responseDto.toString(); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.bstek.dorado.annotation.DataResolver; |
| | | import com.bstek.dorado.annotation.Expose; |
| | | import com.bstek.dorado.data.provider.Page; |
| | | import com.fzzy.api.entity.Api1308; |
| | | import com.fzzy.api.data.PushProtocol; |
| | | import com.fzzy.api.entity.ApiConfs; |
| | | import com.fzzy.api.service.ApiCommonService; |
| | | import com.fzzy.api.service.ApiPushManager; |
| | |
| | | */ |
| | | @Expose |
| | | public String pushData(List<Api1308> items) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | Api1308 d; |
| | | |
| | | String kqdm = items.get(0).getKqdm(); |
| | | ApiConfs apiConf = apiCommonService.getConf(kqdm); |
| | | |
| | | if (null == apiConf) return "系统没有获取到当前库区配置信息,执行失败"; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1308); |
| | | |
| | | |
| | | //获取实现接口 |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(param.getPushProtocol()); |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(apiConf.getPushProtocol()); |
| | | if (null == apiService) return "系统没有当前推送协议配置,执行失败"; |
| | | if (PushProtocol.SB_SH_2023.getCode().equals(apiConf.getPushProtocol())) { |
| | | return pushDataList(items, apiService, apiConf); |
| | | } |
| | | return pushDataSingle(items, apiService, apiConf); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 单条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataSingle(List<Api1308> items, ApiRemoteService apiService, ApiConfs apiConf) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_13, Constant.API_CODE_1308); |
| | | Api1308 d; |
| | | for (Api1308 data : items) { |
| | | d = new Api1308(); |
| | | BeanUtils.copyProperties(data, d); |
| | |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 多条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataList(List<Api1308> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_13, Constant.API_CODE_1308); |
| | | |
| | | //推送,数据为集合形式 |
| | | ResponseDto responseDto = apiRemoteService.pushData(param, apiConf, items); |
| | | if (responseDto.getSuccess() == 0) { |
| | | //推送成功,更新数据上传状态 |
| | | for (Api1308 data : items) { |
| | | if (Constant.CZBZ_I.equals(data.getCzbz())) { |
| | | //更新状态 |
| | | data.setCzbz(Constant.CZBZ_U); |
| | | api1308Rep.save(data); |
| | | } |
| | | } |
| | | } |
| | | return responseDto.toString(); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.bstek.dorado.annotation.DataResolver; |
| | | import com.bstek.dorado.annotation.Expose; |
| | | import com.bstek.dorado.data.provider.Page; |
| | | import com.fzzy.api.data.PushProtocol; |
| | | import com.fzzy.api.entity.Api1309; |
| | | import com.fzzy.api.entity.ApiConfs; |
| | | import com.fzzy.api.service.ApiCommonService; |
| | |
| | | */ |
| | | @Expose |
| | | public String pushData(List<Api1309> items) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | Api1309 d; |
| | | |
| | | String kqdm = items.get(0).getKqdm(); |
| | | ApiConfs apiConf = apiCommonService.getConf(kqdm); |
| | | |
| | | if (null == apiConf) return "系统没有获取到当前库区配置信息,执行失败"; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1309); |
| | | |
| | | |
| | | //获取实现接口 |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(param.getPushProtocol()); |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(apiConf.getPushProtocol()); |
| | | if (null == apiService) return "系统没有当前推送协议配置,执行失败"; |
| | | if (PushProtocol.SB_SH_2023.getCode().equals(apiConf.getPushProtocol())) { |
| | | return pushDataList(items, apiService, apiConf); |
| | | } |
| | | return pushDataSingle(items, apiService, apiConf); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 单条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataSingle(List<Api1309> items, ApiRemoteService apiService, ApiConfs apiConf) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_13, Constant.API_CODE_1309); |
| | | Api1309 d; |
| | | for (Api1309 data : items) { |
| | | d = new Api1309(); |
| | | BeanUtils.copyProperties(data, d); |
| | |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 多条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataList(List<Api1309> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_13, Constant.API_CODE_1309); |
| | | |
| | | //推送,数据为集合形式 |
| | | ResponseDto responseDto = apiRemoteService.pushData(param, apiConf, items); |
| | | if (responseDto.getSuccess() == 0) { |
| | | //推送成功,更新数据上传状态 |
| | | for (Api1309 data : items) { |
| | | if (Constant.CZBZ_I.equals(data.getCzbz())) { |
| | | //更新状态 |
| | | data.setCzbz(Constant.CZBZ_U); |
| | | api1309Rep.save(data); |
| | | } |
| | | } |
| | | } |
| | | return responseDto.toString(); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.bstek.dorado.annotation.DataResolver; |
| | | import com.bstek.dorado.annotation.Expose; |
| | | import com.bstek.dorado.data.provider.Page; |
| | | import com.fzzy.api.entity.Api1310; |
| | | import com.fzzy.api.data.PushProtocol; |
| | | import com.fzzy.api.entity.ApiConfs; |
| | | import com.fzzy.api.service.ApiCommonService; |
| | | import com.fzzy.api.service.ApiPushManager; |
| | |
| | | */ |
| | | @Expose |
| | | public String pushData(List<Api1310> items) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | Api1310 d; |
| | | |
| | | String kqdm = items.get(0).getKqdm(); |
| | | ApiConfs apiConf = apiCommonService.getConf(kqdm); |
| | | |
| | | if (null == apiConf) return "系统没有获取到当前库区配置信息,执行失败"; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1310); |
| | | |
| | | |
| | | //获取实现接口 |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(param.getPushProtocol()); |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(apiConf.getPushProtocol()); |
| | | if (null == apiService) return "系统没有当前推送协议配置,执行失败"; |
| | | |
| | | if (PushProtocol.SB_SH_2023.getCode().equals(apiConf.getPushProtocol())) { |
| | | return pushDataList(items, apiService, apiConf); |
| | | } |
| | | return pushDataSingle(items, apiService, apiConf); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 单条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataSingle(List<Api1310> items, ApiRemoteService apiService, ApiConfs apiConf) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_13, Constant.API_CODE_1310); |
| | | Api1310 d; |
| | | for (Api1310 data : items) { |
| | | d = new Api1310(); |
| | | BeanUtils.copyProperties(data, d); |
| | |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 多条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataList(List<Api1310> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_13, Constant.API_CODE_1310); |
| | | |
| | | //推送,数据为集合形式 |
| | | ResponseDto responseDto = apiRemoteService.pushData(param, apiConf, items); |
| | | if (responseDto.getSuccess() == 0) { |
| | | //推送成功,更新数据上传状态 |
| | | for (Api1310 data : items) { |
| | | if (Constant.CZBZ_I.equals(data.getCzbz())) { |
| | | //更新状态 |
| | | data.setCzbz(Constant.CZBZ_U); |
| | | api1310Rep.save(data); |
| | | } |
| | | } |
| | | } |
| | | return responseDto.toString(); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.bstek.dorado.annotation.DataResolver; |
| | | import com.bstek.dorado.annotation.Expose; |
| | | import com.bstek.dorado.data.provider.Page; |
| | | import com.fzzy.api.data.PushProtocol; |
| | | import com.fzzy.api.entity.Api1401; |
| | | import com.fzzy.api.entity.ApiConfs; |
| | | import com.fzzy.api.service.ApiCommonService; |
| | |
| | | */ |
| | | @Expose |
| | | public String pushData(List<Api1401> items) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | Api1401 d; |
| | | |
| | | String kqdm = items.get(0).getKqdm(); |
| | | ApiConfs apiConf = apiCommonService.getConf(kqdm); |
| | | |
| | | if (null == apiConf) return "系统没有获取到当前库区配置信息,执行失败"; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1401); |
| | | |
| | | |
| | | //获取实现接口 |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(param.getPushProtocol()); |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(apiConf.getPushProtocol()); |
| | | if (null == apiService) return "系统没有当前推送协议配置,执行失败"; |
| | | if (PushProtocol.SB_SH_2023.getCode().equals(apiConf.getPushProtocol())) { |
| | | return pushDataList(items, apiService, apiConf); |
| | | } |
| | | return pushDataSingle(items, apiService, apiConf); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 单条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataSingle(List<Api1401> items, ApiRemoteService apiService, ApiConfs apiConf) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_14, Constant.API_CODE_1401); |
| | | Api1401 d; |
| | | for (Api1401 data : items) { |
| | | d = new Api1401(); |
| | | BeanUtils.copyProperties(data, d); |
| | |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 多条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataList(List<Api1401> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_14, Constant.API_CODE_1401); |
| | | |
| | | //推送,数据为集合形式 |
| | | ResponseDto responseDto = apiRemoteService.pushData(param, apiConf, items); |
| | | if (responseDto.getSuccess() == 0) { |
| | | //推送成功,更新数据上传状态 |
| | | for (Api1401 data : items) { |
| | | if (Constant.CZBZ_I.equals(data.getCzbz())) { |
| | | //更新状态 |
| | | data.setCzbz(Constant.CZBZ_U); |
| | | api1401Rep.save(data); |
| | | } |
| | | } |
| | | } |
| | | return responseDto.toString(); |
| | | } |
| | | } |
| | |
| | | import com.bstek.dorado.annotation.DataResolver; |
| | | import com.bstek.dorado.annotation.Expose; |
| | | import com.bstek.dorado.data.provider.Page; |
| | | import com.fzzy.api.entity.Api1402; |
| | | import com.fzzy.api.data.PushProtocol; |
| | | import com.fzzy.api.entity.ApiConfs; |
| | | import com.fzzy.api.service.ApiCommonService; |
| | | import com.fzzy.api.service.ApiPushManager; |
| | |
| | | */ |
| | | @Expose |
| | | public String pushData(List<Api1402> items) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | Api1402 d; |
| | | |
| | | String kqdm = items.get(0).getKqdm(); |
| | | ApiConfs apiConf = apiCommonService.getConf(kqdm); |
| | | |
| | | if (null == apiConf) return "系统没有获取到当前库区配置信息,执行失败"; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1402); |
| | | |
| | | |
| | | //获取实现接口 |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(param.getPushProtocol()); |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(apiConf.getPushProtocol()); |
| | | if (null == apiService) return "系统没有当前推送协议配置,执行失败"; |
| | | |
| | | if (PushProtocol.SB_SH_2023.getCode().equals(apiConf.getPushProtocol())) { |
| | | return pushDataList(items, apiService, apiConf); |
| | | } |
| | | return pushDataSingle(items, apiService, apiConf); |
| | | } |
| | | |
| | | /** |
| | | * 单条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataSingle(List<Api1402> items, ApiRemoteService apiService, ApiConfs apiConf) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_14, Constant.API_CODE_1402); |
| | | Api1402 d; |
| | | for (Api1402 data : items) { |
| | | d = new Api1402(); |
| | | BeanUtils.copyProperties(data, d); |
| | |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 多条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataList(List<Api1402> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_14, Constant.API_CODE_1402); |
| | | |
| | | //推送,数据为集合形式 |
| | | ResponseDto responseDto = apiRemoteService.pushData(param, apiConf, items); |
| | | if (responseDto.getSuccess() == 0) { |
| | | //推送成功,更新数据上传状态 |
| | | for (Api1402 data : items) { |
| | | if (Constant.CZBZ_I.equals(data.getCzbz())) { |
| | | //更新状态 |
| | | data.setCzbz(Constant.CZBZ_U); |
| | | api1402Rep.save(data); |
| | | } |
| | | } |
| | | } |
| | | return responseDto.toString(); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.bstek.dorado.annotation.DataResolver; |
| | | import com.bstek.dorado.annotation.Expose; |
| | | import com.bstek.dorado.data.provider.Page; |
| | | import com.fzzy.api.data.PushProtocol; |
| | | import com.fzzy.api.entity.Api1403; |
| | | import com.fzzy.api.entity.ApiConfs; |
| | | import com.fzzy.api.service.ApiCommonService; |
| | |
| | | //获取实现接口 |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(param.getPushProtocol()); |
| | | if (null == apiService) return "系统没有当前推送协议配置,执行失败"; |
| | | if (PushProtocol.SB_SH_2023.getCode().equals(apiConf.getPushProtocol())) { |
| | | return pushDataList(items, apiService, apiConf); |
| | | } |
| | | return pushDataSingle(items, apiService, apiConf); |
| | | } |
| | | |
| | | /** |
| | | * 单条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataSingle(List<Api1403> items, ApiRemoteService apiService, ApiConfs apiConf) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_14, Constant.API_CODE_1403); |
| | | Api1403 d; |
| | | for (Api1403 data : items) { |
| | | d = new Api1403(); |
| | | BeanUtils.copyProperties(data, d); |
| | |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 多条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataList(List<Api1403> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_14, Constant.API_CODE_1403); |
| | | |
| | | //推送,数据为集合形式 |
| | | ResponseDto responseDto = apiRemoteService.pushData(param, apiConf, items); |
| | | if (responseDto.getSuccess() == 0) { |
| | | //推送成功,更新数据上传状态 |
| | | for (Api1403 data : items) { |
| | | if (Constant.CZBZ_I.equals(data.getCzbz())) { |
| | | //更新状态 |
| | | data.setCzbz(Constant.CZBZ_U); |
| | | api1403Rep.save(data); |
| | | } |
| | | } |
| | | } |
| | | return responseDto.toString(); |
| | | } |
| | | } |
| | |
| | | import com.bstek.dorado.annotation.DataResolver; |
| | | import com.bstek.dorado.annotation.Expose; |
| | | import com.bstek.dorado.data.provider.Page; |
| | | import com.fzzy.api.data.PushProtocol; |
| | | import com.fzzy.api.entity.Api1404; |
| | | import com.fzzy.api.entity.ApiConfs; |
| | | import com.fzzy.api.service.ApiCommonService; |
| | |
| | | */ |
| | | @Expose |
| | | public String pushData(List<Api1404> items) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | Api1404 d; |
| | | |
| | | String kqdm = items.get(0).getKqdm(); |
| | | ApiConfs apiConf = apiCommonService.getConf(kqdm); |
| | | |
| | | if (null == apiConf) return "系统没有获取到当前库区配置信息,执行失败"; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1404); |
| | | |
| | | |
| | | //获取实现接口 |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(param.getPushProtocol()); |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(apiConf.getPushProtocol()); |
| | | if (null == apiService) return "系统没有当前推送协议配置,执行失败"; |
| | | if (PushProtocol.SB_SH_2023.getCode().equals(apiConf.getPushProtocol())) { |
| | | return pushDataList(items, apiService, apiConf); |
| | | } |
| | | return pushDataSingle(items, apiService, apiConf); |
| | | } |
| | | /** |
| | | * 单条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataSingle(List<Api1404> items, ApiRemoteService apiService, ApiConfs apiConf) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_14, Constant.API_CODE_1404); |
| | | Api1404 d; |
| | | for (Api1404 data : items) { |
| | | d = new Api1404(); |
| | | BeanUtils.copyProperties(data, d); |
| | |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 多条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataList(List<Api1404> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_14, Constant.API_CODE_1404); |
| | | |
| | | //推送,数据为集合形式 |
| | | ResponseDto responseDto = apiRemoteService.pushData(param, apiConf, items); |
| | | if (responseDto.getSuccess() == 0) { |
| | | //推送成功,更新数据上传状态 |
| | | for (Api1404 data : items) { |
| | | if (Constant.CZBZ_I.equals(data.getCzbz())) { |
| | | //更新状态 |
| | | data.setCzbz(Constant.CZBZ_U); |
| | | api1404Rep.save(data); |
| | | } |
| | | } |
| | | } |
| | | return responseDto.toString(); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.bstek.dorado.annotation.DataResolver; |
| | | import com.bstek.dorado.annotation.Expose; |
| | | import com.bstek.dorado.data.provider.Page; |
| | | import com.fzzy.api.data.PushProtocol; |
| | | import com.fzzy.api.entity.Api1405; |
| | | import com.fzzy.api.entity.ApiConfs; |
| | | import com.fzzy.api.service.ApiCommonService; |
| | |
| | | */ |
| | | @Expose |
| | | public String pushData(List<Api1405> items) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | Api1405 d; |
| | | |
| | | String kqdm = items.get(0).getKqdm(); |
| | | ApiConfs apiConf = apiCommonService.getConf(kqdm); |
| | | |
| | | if (null == apiConf) return "系统没有获取到当前库区配置信息,执行失败"; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1405); |
| | | |
| | | |
| | | //获取实现接口 |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(param.getPushProtocol()); |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(apiConf.getPushProtocol()); |
| | | if (null == apiService) return "系统没有当前推送协议配置,执行失败"; |
| | | |
| | | if (PushProtocol.SB_SH_2023.getCode().equals(apiConf.getPushProtocol())) { |
| | | return pushDataList(items, apiService, apiConf); |
| | | } |
| | | return pushDataSingle(items, apiService, apiConf); |
| | | } |
| | | |
| | | /** |
| | | * 单条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataSingle(List<Api1405> items, ApiRemoteService apiService, ApiConfs apiConf) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_14, Constant.API_CODE_1405); |
| | | Api1405 d; |
| | | for (Api1405 data : items) { |
| | | d = new Api1405(); |
| | | BeanUtils.copyProperties(data, d); |
| | |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 多条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataList(List<Api1405> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_14, Constant.API_CODE_1405); |
| | | |
| | | //推送,数据为集合形式 |
| | | ResponseDto responseDto = apiRemoteService.pushData(param, apiConf, items); |
| | | if (responseDto.getSuccess() == 0) { |
| | | //推送成功,更新数据上传状态 |
| | | for (Api1405 data : items) { |
| | | if (Constant.CZBZ_I.equals(data.getCzbz())) { |
| | | //更新状态 |
| | | data.setCzbz(Constant.CZBZ_U); |
| | | api1405Rep.save(data); |
| | | } |
| | | } |
| | | } |
| | | return responseDto.toString(); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.bstek.dorado.annotation.DataResolver; |
| | | import com.bstek.dorado.annotation.Expose; |
| | | import com.fzzy.api.data.ApiParam; |
| | | import com.fzzy.api.data.PushProtocol; |
| | | import com.fzzy.api.entity.Api1501; |
| | | import com.fzzy.api.entity.ApiConfs; |
| | | import com.fzzy.api.service.ApiCommonService; |
| | |
| | | */ |
| | | @Expose |
| | | public String pushData(List<Api1501> items) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | Api1501 d; |
| | | |
| | | String kqdm = items.get(0).getKqdm(); |
| | | ApiConfs apiConf = apiCommonService.getConf(kqdm); |
| | | |
| | | if (null == apiConf) return "系统没有获取到当前库区配置信息,执行失败"; |
| | | |
| | | //获取实现接口 |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(apiConf.getPushProtocol()); |
| | | if (null == apiService) return "系统没有当前推送协议配置,执行失败"; |
| | | if (PushProtocol.SB_SH_2023.getCode().equals(apiConf.getPushProtocol())) { |
| | | return pushDataList(items, apiService, apiConf); |
| | | } |
| | | return pushDataSingle(items, apiService, apiConf); |
| | | } |
| | | |
| | | /** |
| | | * 单条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataSingle(List<Api1501> items, ApiRemoteService apiService, ApiConfs apiConf) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1501); |
| | | |
| | | |
| | | //获取实现接口 |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(param.getPushProtocol()); |
| | | if (null == apiService) return "系统没有当前推送协议配置,执行失败"; |
| | | |
| | | Api1501 d; |
| | | for (Api1501 data : items) { |
| | | d = new Api1501(); |
| | | BeanUtils.copyProperties(data, d); |
| | |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 多条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataList(List<Api1501> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1501); |
| | | |
| | | //推送,数据为集合形式 |
| | | ResponseDto responseDto = apiRemoteService.pushData(param, apiConf, items); |
| | | if (responseDto.getSuccess() == 0) { |
| | | //推送成功,更新数据上传状态 |
| | | for (Api1501 data : items) { |
| | | if (Constant.CZBZ_I.equals(data.getCzbz())) { |
| | | //更新状态 |
| | | data.setCzbz(Constant.CZBZ_U); |
| | | api1501Rep.save(data); |
| | | } |
| | | } |
| | | } |
| | | return responseDto.toString(); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.bstek.dorado.annotation.DataResolver; |
| | | import com.bstek.dorado.annotation.Expose; |
| | | import com.fzzy.api.data.ApiParam; |
| | | import com.fzzy.api.entity.Api1502; |
| | | import com.fzzy.api.entity.ApiConfs; |
| | | import com.fzzy.api.data.PushProtocol; |
| | | import com.fzzy.api.entity.*; |
| | | import com.fzzy.api.service.ApiCommonService; |
| | | import com.fzzy.api.service.ApiPushManager; |
| | | import com.fzzy.api.service.ApiRemoteService; |
| | |
| | | import com.fzzy.api.Constant; |
| | | import com.fzzy.api.dto.ResponseDto; |
| | | import com.fzzy.api.entity.Api1502; |
| | | import com.fzzy.api.entity.ApiParent; |
| | | import com.fzzy.api.view.repository.Api1502Rep; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | */ |
| | | @Expose |
| | | public String pushData(List<Api1502> items) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | Api1502 d; |
| | | |
| | | String kqdm = items.get(0).getKqdm(); |
| | | ApiConfs apiConf = apiCommonService.getConf(kqdm); |
| | | |
| | | if (null == apiConf) return "系统没有获取到当前库区配置信息,执行失败"; |
| | | |
| | | //获取实现接口 |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(apiConf.getPushProtocol()); |
| | | if (null == apiService) return "系统没有当前推送协议配置,执行失败"; |
| | | if (PushProtocol.SB_SH_2023.getCode().equals(apiConf.getPushProtocol())) { |
| | | return pushDataList(items, apiService, apiConf); |
| | | } |
| | | return pushDataSingle(items, apiService, apiConf); |
| | | } |
| | | |
| | | /** |
| | | * 单条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataSingle(List<Api1502> items, ApiRemoteService apiService, ApiConfs apiConf) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1502); |
| | | |
| | | |
| | | //获取实现接口 |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(param.getPushProtocol()); |
| | | if (null == apiService) return "系统没有当前推送协议配置,执行失败"; |
| | | |
| | | Api1502 d; |
| | | for (Api1502 data : items) { |
| | | d = new Api1502(); |
| | | BeanUtils.copyProperties(data, d); |
| | |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 多条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataList(List<Api1502> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1502); |
| | | |
| | | //推送,数据为集合形式 |
| | | ResponseDto responseDto = apiRemoteService.pushData(param, apiConf, items); |
| | | if (responseDto.getSuccess() == 0) { |
| | | //推送成功,更新数据上传状态 |
| | | for (Api1502 data : items) { |
| | | if (Constant.CZBZ_I.equals(data.getCzbz())) { |
| | | //更新状态 |
| | | data.setCzbz(Constant.CZBZ_U); |
| | | api1502Rep.save(data); |
| | | } |
| | | } |
| | | } |
| | | return responseDto.toString(); |
| | | } |
| | | } |
| | |
| | | import com.bstek.dorado.annotation.DataResolver; |
| | | import com.bstek.dorado.annotation.Expose; |
| | | import com.fzzy.api.data.ApiParam; |
| | | import com.fzzy.api.entity.Api1503; |
| | | import com.fzzy.api.data.PushProtocol; |
| | | import com.fzzy.api.entity.ApiConfs; |
| | | import com.fzzy.api.service.ApiCommonService; |
| | | import com.fzzy.api.service.ApiPushManager; |
| | |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * |
| | | * 更新删除标记 api1503PR#delUpdate |
| | | * |
| | | * @param entity |
| | |
| | | */ |
| | | @Expose |
| | | public String pushData(List<Api1503> items) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | Api1503 d; |
| | | |
| | | String kqdm = items.get(0).getKqdm(); |
| | | ApiConfs apiConf = apiCommonService.getConf(kqdm); |
| | | |
| | | if (null == apiConf) return "系统没有获取到当前库区配置信息,执行失败"; |
| | | |
| | | //获取实现接口 |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(apiConf.getPushProtocol()); |
| | | if (null == apiService) return "系统没有当前推送协议配置,执行失败"; |
| | | if (PushProtocol.SB_SH_2023.getCode().equals(apiConf.getPushProtocol())) { |
| | | return pushDataList(items, apiService, apiConf); |
| | | } |
| | | return pushDataSingle(items, apiService, apiConf); |
| | | } |
| | | |
| | | /** |
| | | * 单条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataSingle(List<Api1503> items, ApiRemoteService apiService, ApiConfs apiConf) { |
| | | ResponseDto responseDto; |
| | | String result = ""; |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1503); |
| | | |
| | | |
| | | //获取实现接口 |
| | | ApiRemoteService apiService = apiPushManager.getApiRemoteService(param.getPushProtocol()); |
| | | if (null == apiService) return "系统没有当前推送协议配置,执行失败"; |
| | | |
| | | Api1503 d; |
| | | for (Api1503 data : items) { |
| | | d = new Api1503(); |
| | | BeanUtils.copyProperties(data, d); |
| | |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 多条数据json推送 |
| | | * |
| | | * @param items |
| | | * @param apiRemoteService |
| | | * @param apiConf |
| | | * @return |
| | | */ |
| | | private String pushDataList(List<Api1503> items, ApiRemoteService apiRemoteService, ApiConfs apiConf) { |
| | | |
| | | //封装参数 |
| | | ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_11, Constant.API_CODE_1503); |
| | | |
| | | //推送,数据为集合形式 |
| | | ResponseDto responseDto = apiRemoteService.pushData(param, apiConf, items); |
| | | if (responseDto.getSuccess() == 0) { |
| | | //推送成功,更新数据上传状态 |
| | | for (Api1503 data : items) { |
| | | if (Constant.CZBZ_I.equals(data.getCzbz())) { |
| | | //更新状态 |
| | | data.setCzbz(Constant.CZBZ_U); |
| | | api1503Rep.save(data); |
| | | } |
| | | } |
| | | } |
| | | return responseDto.toString(); |
| | | } |
| | | } |
| | |
| | | import org.springframework.data.jpa.repository.Query; |
| | | import org.springframework.data.repository.query.Param; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface Api1111Rep extends JpaRepository<Api1111, String> { |
| | | |
| | | /** |
| | | * 查询所有的监控点位信息 |
| | | * |
| | | * @param kqdm |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 根据表单主键更新操作标志状态 |
| | | * |
| | | * @param id |
| | | * @param czbz |
| | | * @return |
| | | */ |
| | | @Transactional |
| | | @Modifying |
| | | @Query("update Api1111 set czbz=:czbz where id=:id ") |
| | | @Query("update Api1111 set czbz=:czbz where spjksbid=:id ") |
| | | int updateStatus(@Param("id") String id, @Param("czbz") String czbz); |
| | | |
| | | /** |
| | | * 根据监控点位id获取监控信息 |
| | | * |
| | | * @param spjksbid |
| | | * @return |
| | | */ |