浏览代码

数据总览

vincent 3 年之前
父节点
当前提交
db4a7b2419

+ 3 - 0
server/src/main/java/edp/davinci/controller/CatalogueController.java

@@ -23,6 +23,9 @@ import javax.servlet.http.HttpServletRequest;
 import javax.validation.Valid;
 import java.util.List;
 
+/**
+ *  数据目录
+ */
 @Api(value = "/catalogue", tags = "check", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
 @ApiResponses(@ApiResponse(code = 404, message = "catalogue not found"))
 @Slf4j

+ 60 - 0
server/src/main/java/edp/davinci/controller/DataScreeningController.java

@@ -0,0 +1,60 @@
+package edp.davinci.controller;
+
+import edp.davinci.common.controller.BaseController;
+import edp.davinci.core.common.Constants;
+import edp.davinci.service.CatalogueService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * 数据总览
+ */
+@Api(value = "/dataScreening", tags = "check", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
+@ApiResponses(@ApiResponse(code = 404, message = "dataScreening not found"))
+@Slf4j
+@RestController
+@RequestMapping(value = Constants.BASE_API_PATH + "/dataScreening", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
+public class DataScreeningController extends BaseController
+{
+    @Autowired
+    private CatalogueService catalogueService;
+
+    @ApiOperation(value = "get dataScreening")
+    @GetMapping
+    public ResponseEntity dataScreening(
+            HttpServletRequest request)
+    {
+
+        Map<String, Object> result = new HashMap<String, Object>();
+        // 数据资源数量
+        int dataSource = 0;
+        result.put("dataSource", dataSource);
+        // 来源部门数量
+        int originDept = 0;
+        result.put("originDept", originDept);
+        // 来源系统数量
+        int originSystem = 0;
+        result.put("originSystem", originSystem);
+        // 近一个月目录增长数量
+        int countCatalogue = 0;
+        result.put("countCatalogue", countCatalogue);
+        // 行业分类饼图
+        // 数据资源来源部门柱状图
+        return ResponseEntity.status(HttpStatus.OK).body(result);
+    }
+
+}

+ 1 - 1
server/src/main/resources/config/application-ext.yml

@@ -18,7 +18,7 @@
 server:
   protocol: http
   address: 127.0.0.1
-  port: ${SERVER_PORT:8081}
+  port: ${SERVER_PORT:8080}
 
   servlet:
     context-path: /