CZT
2023-10-19 da0dfffe0c57ed3ca0c66b24a68ccc64da0873c9
src/main/java/com/fzzy/otherview/sh2023/pr/SHApi2103PR.java
@@ -158,7 +158,7 @@
    @Expose
    public String pushData(List<SH2023Api2103> items) {
        ResponseDto responseDto;
        String result = "";
        String kqdm = items.get(0).getHwdm().substring(0, 21);
@@ -169,7 +169,7 @@
        }
        //封装参数
        ApiParam param = new ApiParam(apiConf, "21", SH2023Constant.SH_2023_API_CODE_2103);
        ApiParam param = new ApiParam(apiConf, Constant.API_CATEGORY_13, SH2023Constant.SH_2023_API_CODE_2103);
        //获取实现接口
        ApiRemoteService apiService = apiPushManager.getApiRemoteService(param.getPushProtocol());
@@ -177,14 +177,11 @@
            return "系统没有当前推送协议配置,执行失败";
        }
        //推送,数据为集合形式
        responseDto = apiService.pushData(param, apiConf, items);
        if (responseDto.getSuccess() == 0) {
            //推送成功,更新数据上传状态
            ApiInfoData infoData;
            for (SH2023Api2103 data : items) {
        ResponseDto responseDto;
        ApiInfoData infoData;
        for (SH2023Api2103 data : items) {
            responseDto = apiService.pushData(param, apiConf, data);
            if (responseDto.getSuccess() == 0) {
                infoData = new ApiInfoData();
                infoData.setId(data.getHwdm());
                infoData.setKqdm(data.getHwdm().substring(0, 21));
@@ -195,13 +192,10 @@
                infoData.setCzbz(Constant.CZBZ_U);
                infoData.setData(JSON.toJSONString(data));
                apiInfoDataRep.save(infoData);
            }
            result += responseDto.toString();
        }
        return result;
    }
}