Compare commits

..

No commits in common. "c4a121464b3b3e744412f5038ab274bec2422354" and "ab9e30b755ad842f730ea07be1d8abbf5c97cf7b" have entirely different histories.

2 changed files with 10 additions and 21 deletions

View File

@ -10,8 +10,6 @@ import io.renren.common.constant.Constant;
import io.renren.common.domain.Tsingtao_xhaProperties; import io.renren.common.domain.Tsingtao_xhaProperties;
import io.renren.common.utils.Result; import io.renren.common.utils.Result;
import io.renren.modules.processForm.service.TAbilityApplicationService; import io.renren.modules.processForm.service.TAbilityApplicationService;
import io.renren.modules.resource.dataResource.domain.TsingtaoDataResourceService;
import io.renren.modules.resource.dto.GetDataResourceListDto;
import io.renren.modules.resource.service.ResourceService; import io.renren.modules.resource.service.ResourceService;
import io.renren.modules.resourceBrowse.service.ResourceBrowseService; import io.renren.modules.resourceBrowse.service.ResourceBrowseService;
import io.renren.modules.sys.dto.SysDeptDTO; import io.renren.modules.sys.dto.SysDeptDTO;
@ -64,8 +62,6 @@ public class CensusControllerV2 {
private JdbcTemplate jdbcTemplate; private JdbcTemplate jdbcTemplate;
@Autowired @Autowired
private Tsingtao_xhaProperties tsingtao_xhaProperties; private Tsingtao_xhaProperties tsingtao_xhaProperties;
@Autowired
private TsingtaoDataResourceService tsingtaoDataResourceService;
@Value("${census.type}") @Value("${census.type}")
private String[] censusTypes; // 需要进行统计的资源类型 private String[] censusTypes; // 需要进行统计的资源类型
@ -430,20 +426,15 @@ public class CensusControllerV2 {
} }
break; break;
case TSINGTAO: { // TODO 青岛大数据局 case TSINGTAO: { // TODO 青岛大数据局
GetDataResourceListDto getDataResourceListDto = new GetDataResourceListDto();
getDataResourceListDto.setPageNum(1);
getDataResourceListDto.setPageSize(5);
JSONObject dataResource = (JSONObject) tsingtaoDataResourceService.getDataResource(getDataResourceListDto);
JSONObject data = dataResource.getJSONObject("data");
result.add(new HashMap<String, Object>() { result.add(new HashMap<String, Object>() {
{ {
put("amount", data.get("rows")); put("amount", 0L);
put("type", "总数据量"); put("type", "总数据量");
} }
}); });
result.add(new HashMap<String, Object>() { result.add(new HashMap<String, Object>() {
{ {
put("amount", 0L); put("amount", 0l);
put("type", "总申请次数"); put("type", "总申请次数");
} }
}); });
@ -455,7 +446,7 @@ public class CensusControllerV2 {
}); });
result.add(new HashMap<String, Object>() { result.add(new HashMap<String, Object>() {
{ {
put("resourceTop5", data.get("data")); put("resourceTop5", new ArrayList<>());
} }
}); });
} }
@ -472,10 +463,10 @@ public class CensusControllerV2 {
total = jsonObject.getJSONObject("data").getLongValue("total"); total = jsonObject.getJSONObject("data").getLongValue("total");
} }
} else { } else {
logger.error("青岛西海岸获取失败"); logger.error("包头获取失败");
} }
} catch (Exception exception) { } catch (Exception exception) {
logger.error("青岛西海岸失败", exception); logger.error("包头失败", exception);
} }
return total; return total;
}).thenAccept(sum -> { }).thenAccept(sum -> {
@ -519,10 +510,10 @@ public class CensusControllerV2 {
} }
} else { } else {
logger.error("青岛西海岸获取失败"); logger.error("包头获取失败");
} }
} catch (Exception exception) { } catch (Exception exception) {
logger.error("青岛西海岸失败", exception); logger.error("包头失败", exception);
} }
}); });
} }

View File

@ -1,18 +1,20 @@
package io.renren.modules.resource.dataResource.domain; package io.renren.modules.resource.dataResource.domain;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import io.renren.common.utils.Result;
import io.renren.common.utils.SpringContextUtils; import io.renren.common.utils.SpringContextUtils;
import io.renren.modules.resource.dataResource.AbstractDataResourceService; import io.renren.modules.resource.dataResource.AbstractDataResourceService;
import io.renren.modules.resource.dto.GetDataResourceListDto; import io.renren.modules.resource.dto.GetDataResourceListDto;
import io.swagger.annotations.ApiParam;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.http.HttpEntity; import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders; import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate; import org.springframework.web.client.RestTemplate;
import java.nio.charset.Charset; import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -21,7 +23,6 @@ import java.util.stream.Collectors;
/** /**
* 青岛市局数据资源 * 青岛市局数据资源
*/ */
@Component
public class TsingtaoDataResourceService extends AbstractDataResourceService { public class TsingtaoDataResourceService extends AbstractDataResourceService {
private static final Logger logger = LoggerFactory.getLogger(TsingtaoDataResourceService.class); private static final Logger logger = LoggerFactory.getLogger(TsingtaoDataResourceService.class);
@ -53,9 +54,6 @@ public class TsingtaoDataResourceService extends AbstractDataResourceService {
" <soap:Body><ZWCJ_mainPort xmlns=\"http://tempuri.org/\">\n" + " <soap:Body><ZWCJ_mainPort xmlns=\"http://tempuri.org/\">\n" +
String.format("<pagenum>%d</pagenum>\n <pagesize>%d</pagesize>\n",page, size) + String.format("<pagenum>%d</pagenum>\n <pagesize>%d</pagesize>\n",page, size) +
String.format("<pxcol>%s</pxcol>\n <order>%s</order>\n",pxcol, order); String.format("<pxcol>%s</pxcol>\n <order>%s</order>\n",pxcol, order);
// if (bmname != null){
// parame = parame + String.format("<bmname>%s</bmname>",bmname);
// }
if (zyname != null) { if (zyname != null) {
parame = parame + String.format("<zyname>%s</zyname>",zyname); parame = parame + String.format("<zyname>%s</zyname>",zyname);
} }