市局数据资源对接修改
This commit is contained in:
parent
c5f8697a43
commit
bf5628d97f
|
@ -409,10 +409,9 @@ public class CensusControllerV2 {
|
||||||
TsingtaoDataResourceService tsingtaoDataResourceService = new TsingtaoDataResourceService();
|
TsingtaoDataResourceService tsingtaoDataResourceService = new TsingtaoDataResourceService();
|
||||||
GetDataResourceListDto getDataResourceListDto = new GetDataResourceListDto().setPageNum(1).setPageSize(5);
|
GetDataResourceListDto getDataResourceListDto = new GetDataResourceListDto().setPageNum(1).setPageSize(5);
|
||||||
HashMap dataResource = (HashMap) tsingtaoDataResourceService.getDataResource(getDataResourceListDto);
|
HashMap dataResource = (HashMap) tsingtaoDataResourceService.getDataResource(getDataResourceListDto);
|
||||||
JSONObject data = JSON.parseObject(JSON.toJSONString(dataResource.get("data")));
|
|
||||||
result.add(new HashMap<String, Object>() {
|
result.add(new HashMap<String, Object>() {
|
||||||
{
|
{
|
||||||
put("amount", data.get("rows"));
|
put("amount", dataResource.get("rows"));
|
||||||
put("type", "总数据量");
|
put("type", "总数据量");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -430,8 +429,7 @@ public class CensusControllerV2 {
|
||||||
});
|
});
|
||||||
result.add(new HashMap<String, Object>() {
|
result.add(new HashMap<String, Object>() {
|
||||||
{
|
{
|
||||||
String ja = data.getString("data");
|
List<Map> lists = (List<Map>) dataResource.get("data");
|
||||||
List<Map> lists = JSON.parseArray(ja, Map.class);
|
|
||||||
ArrayList<Map> list = new ArrayList<>();
|
ArrayList<Map> list = new ArrayList<>();
|
||||||
lists.forEach(item -> {
|
lists.forEach(item -> {
|
||||||
list.add(new HashMap<String, Object>() {{
|
list.add(new HashMap<String, Object>() {{
|
||||||
|
@ -468,7 +466,6 @@ public class CensusControllerV2 {
|
||||||
logger.error("青岛西海岸失败", exception);
|
logger.error("青岛西海岸失败", exception);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
OkHttpClient client1 = new OkHttpClient();
|
OkHttpClient client1 = new OkHttpClient();
|
||||||
Request request1 = new Request.Builder().url(tsingtao_xhaProperties.getResourceapplyinfo()).build();
|
Request request1 = new Request.Builder().url(tsingtao_xhaProperties.getResourceapplyinfo()).build();
|
||||||
try (Response response = client1.newCall(request1).execute()) {
|
try (Response response = client1.newCall(request1).execute()) {
|
||||||
|
|
Loading…
Reference in New Issue