Compare commits
3 Commits
ab9e30b755
...
c4a121464b
Author | SHA1 | Date |
---|---|---|
dinggang | c4a121464b | |
huangweixiong | fd406c9bfd | |
huangweixiong | cf658307a8 |
|
@ -10,6 +10,8 @@ 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;
|
||||||
|
@ -62,6 +64,8 @@ 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; // 需要进行统计的资源类型
|
||||||
|
@ -426,15 +430,20 @@ 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", 0L);
|
put("amount", data.get("rows"));
|
||||||
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", "总申请次数");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -446,7 +455,7 @@ public class CensusControllerV2 {
|
||||||
});
|
});
|
||||||
result.add(new HashMap<String, Object>() {
|
result.add(new HashMap<String, Object>() {
|
||||||
{
|
{
|
||||||
put("resourceTop5", new ArrayList<>());
|
put("resourceTop5", data.get("data"));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -463,10 +472,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 -> {
|
||||||
|
@ -510,10 +519,10 @@ public class CensusControllerV2 {
|
||||||
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
logger.error("包头获取失败");
|
logger.error("青岛西海岸获取失败");
|
||||||
}
|
}
|
||||||
} catch (Exception exception) {
|
} catch (Exception exception) {
|
||||||
logger.error("包头失败", exception);
|
logger.error("青岛西海岸失败", exception);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,20 +1,18 @@
|
||||||
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;
|
||||||
|
@ -23,6 +21,7 @@ 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);
|
||||||
|
@ -54,6 +53,9 @@ 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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue