|
@@ -1,8 +1,11 @@
|
|
|
package com.steerinfo.inPlantNavigation.controller;
|
|
|
|
|
|
+import com.steerinfo.dil.util.ColumnDataUtil;
|
|
|
+import com.steerinfo.dil.util.PageListAdd;
|
|
|
import com.steerinfo.framework.controller.BaseRESTfulController;
|
|
|
import com.steerinfo.framework.controller.RESTfulResult;
|
|
|
|
|
|
+import com.steerinfo.framework.service.pagehelper.PageHelper;
|
|
|
import com.steerinfo.inPlantNavigation.exception.VertexAngEdgeException;
|
|
|
import com.steerinfo.inPlantNavigation.model.IPMMSVertex;
|
|
|
import com.steerinfo.inPlantNavigation.model.IPMMSVertexEdge;
|
|
@@ -15,10 +18,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.io.IOException;
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.Collections;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
+import java.util.*;
|
|
|
|
|
|
/**
|
|
|
* MapVertex RESTful接口:
|
|
@@ -43,6 +44,9 @@ public class MapVertexController extends BaseRESTfulController {
|
|
|
@Autowired
|
|
|
IMapVertexEdgeService mapVertexEdgeService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ ColumnDataUtil columnDataUtil;
|
|
|
+
|
|
|
@ApiOperation(value="导入顶点数据,开发用")
|
|
|
@GetMapping(value = "/importVertex")
|
|
|
public RESTfulResult importVertex() throws IOException {
|
|
@@ -87,4 +91,46 @@ public class MapVertexController extends BaseRESTfulController {
|
|
|
public RESTfulResult findSelections(){
|
|
|
return success(mapVertexService.findSelections());
|
|
|
}
|
|
|
+
|
|
|
+ @PostMapping("/getMapVertex")
|
|
|
+ public RESTfulResult getMapVertex(@RequestBody Map<String,Object> map,
|
|
|
+ @RequestParam(required = false,defaultValue = "527",name = "apiId")Integer apiId,
|
|
|
+ @RequestParam(required = false,defaultValue = "1",name = "pageNum")Integer pageNum,
|
|
|
+ @RequestParam(required = false,defaultValue = "20",name = "pageSize")Integer pageSize){
|
|
|
+ PageHelper.startPage(pageNum, pageSize);
|
|
|
+ List<Map<String,Object>> list= mapVertexService.getMapVertex(map);
|
|
|
+ PageListAdd pageList = columnDataUtil.tableColumnData(apiId, list,list);
|
|
|
+ return success(pageList);
|
|
|
+ }
|
|
|
+
|
|
|
+ @PostMapping("/getMapEdge")
|
|
|
+ public RESTfulResult getMapEdge(@RequestBody Map<String,Object> map,
|
|
|
+ @RequestParam(required = false,defaultValue = "528",name = "apiId")Integer apiId,
|
|
|
+ @RequestParam(required = false,defaultValue = "1",name = "pageNum")Integer pageNum,
|
|
|
+ @RequestParam(required = false,defaultValue = "20",name = "pageSize")Integer pageSize){
|
|
|
+ PageHelper.startPage(pageNum, pageSize);
|
|
|
+ List<Map<String,Object>> list= mapVertexService.getMapEdge(map);
|
|
|
+ PageListAdd pageList = columnDataUtil.tableColumnData(apiId, list,list);
|
|
|
+ return success(pageList);
|
|
|
+ }
|
|
|
+
|
|
|
+ @PostMapping("/addMapVertex")
|
|
|
+ public RESTfulResult addMapVertex(@RequestBody Map<String,Object> map){;
|
|
|
+ return success(mapVertexService.addMapVertex(map));
|
|
|
+ }
|
|
|
+
|
|
|
+ @PostMapping("/addMapEdge")
|
|
|
+ public RESTfulResult addMapEdge(@RequestBody Map<String,Object> map){;
|
|
|
+ return success(mapVertexService.addMapEdge(map));
|
|
|
+ }
|
|
|
+
|
|
|
+ @PostMapping("/delMapVertex")
|
|
|
+ public RESTfulResult delMapVertex(@RequestBody Map<String,Object> map){;
|
|
|
+ return success(mapVertexService.delMapVertex(map));
|
|
|
+ }
|
|
|
+
|
|
|
+ @PostMapping("/delMapEdge")
|
|
|
+ public RESTfulResult delMapEdge(@RequestBody Map<String,Object> map){;
|
|
|
+ return success(mapVertexService.delMapEdge(map));
|
|
|
+ }
|
|
|
}
|