Merge remote-tracking branch 'origin/master'

This commit is contained in:
wangliwen 2022-06-24 15:55:53 +08:00
commit d41c642108
3 changed files with 21 additions and 6 deletions

View File

@ -69,7 +69,8 @@ public class CensusControllerV2 {
private String[] censusTypes; // 需要进行统计的资源类型
@GetMapping(value = "/whole_amount")
@ApiOperation("平台概览")
@ApiOperation("能力云图-平台概览")
@LogOperation("能力云图-平台概览")
public Result<List<Map<String, Object>>> wholeAmount() {
List<Map<String, Object>> result = new CopyOnWriteArrayList<>();
@ -406,9 +407,7 @@ public class CensusControllerV2 {
break;
case TSINGTAO: { // TODO 青岛大数据局
TsingtaoDataResourceService tsingtaoDataResourceService = new TsingtaoDataResourceService();
GetDataResourceListDto getDataResourceListDto = new GetDataResourceListDto();
getDataResourceListDto.setPageNum(1);
getDataResourceListDto.setPageSize(5);
GetDataResourceListDto getDataResourceListDto = new GetDataResourceListDto().setPageNum(1).setPageSize(5);
HashMap dataResource = (HashMap) tsingtaoDataResourceService.getDataResource(getDataResourceListDto);
JSONObject data = JSON.parseObject(JSON.toJSONString(dataResource.get("data")));
result.add(new HashMap<String, Object>() {
@ -431,7 +430,16 @@ public class CensusControllerV2 {
});
result.add(new HashMap<String, Object>() {
{
put("resourceTop5", data.get("data"));
String ja = data.getString("data");
List<Map> lists = JSON.parseArray(ja, Map.class);
ArrayList<Map> list = new ArrayList<>();
lists.forEach(item -> {
list.add(new HashMap<String, Object>(){{
put("服务名称", item.get("zyname"));
put("申请次数", item.get("syqk"));
}});
});
put("resourceTop5", list);
}
});
}

View File

@ -130,7 +130,8 @@ public class ResourceController {
}
@GetMapping("/{id}")
@ApiOperation("信息")
@ApiOperation("查询能力资源详细信息")
@LogOperation("查询能力资源详细信息")
public Result<ResourceDTO> get(@PathVariable("id") Long id) {
ResourceDTO data = resourceService.get(id);
return new Result<ResourceDTO>().ok(data);
@ -276,6 +277,7 @@ public class ResourceController {
@GetMapping("ZywMessage")
@ApiOperation("资源转发")
@LogOperation("资源转发")
public Result ZywMessage() {
String url = "http://15.72.158.81/zyjk/ZywMessage.asmx";
String parame = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +
@ -303,6 +305,7 @@ public class ResourceController {
@GetMapping("ZywMessage/list")
@ApiOperation("资源列表转发")
@LogOperation("资源列表转发")
public Result ZywMessageList(@ApiParam("页数") Integer page,
@ApiParam("页大小") Integer size,
@ApiParam("排序字段fbrq发布日期syqk申请数量") String pxcol,
@ -355,6 +358,7 @@ public class ResourceController {
@GetMapping("qdyjjWeather")
@ApiOperation("青岛应急局-查询青岛市地区天气信息")
@LogOperation("青岛应急局-查询青岛市地区天气信息")
public Result qdyjjWeather(String cityName) {
String loginUrl = "http://" + ipAndPort + "/service-oauth/login";
String weatherUrl = "http://" + ipAndPort + "/service-map/qxWeather/getTodayWeatherInfo";
@ -384,6 +388,7 @@ public class ResourceController {
@GetMapping("knowledgeBase")
@ApiOperation("对接知识库数据")
@LogOperation("对接知识库数据")
public Result<String> knowledgeBase() {
resourceService.KnowledgeBase();
return new Result().ok("任务开启成功!");

View File

@ -1,11 +1,13 @@
package io.renren.modules.resource.dto;
import lombok.Data;
import lombok.experimental.Accessors;
/**
* 数据资源查询参数对象
*/
@Data
@Accessors(chain=true)
public class GetDataResourceListDto {
//名称模糊查询