|
@@ -7,6 +7,7 @@ import com.persagy.adm.diagram.core.model.template.DiagramTemplate;
|
|
|
import com.persagy.adm.diagram.frame.BdtpRequest;
|
|
|
import com.persagy.dmp.common.model.response.CommonResult;
|
|
|
import com.persagy.dmp.common.utils.ResultHelper;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Qualifier;
|
|
|
import org.springframework.web.bind.annotation.CrossOrigin;
|
|
@@ -39,6 +40,7 @@ public class DiagramController {
|
|
|
* @param diagram 请求参数
|
|
|
* @return 系统图列表
|
|
|
*/
|
|
|
+ @ApiOperation("系统图列表接口")
|
|
|
@PostMapping("/getDiagrams")
|
|
|
public CommonResult<List<Diagram>> getDiagrams(@RequestBody Diagram diagram) {
|
|
|
BdtpRequest current = BdtpRequest.getCurrent();
|
|
@@ -57,6 +59,7 @@ public class DiagramController {
|
|
|
* @param diagram 系统图对象信息
|
|
|
* @return 是否成功
|
|
|
*/
|
|
|
+ @ApiOperation("新增系统图")
|
|
|
@PostMapping("/newDiagram")
|
|
|
public CommonResult<Diagram> newDiagram(@RequestBody Diagram diagram) {
|
|
|
return ResultHelper.single(dataStrategy.saveDiagram(diagram));
|
|
@@ -68,6 +71,7 @@ public class DiagramController {
|
|
|
* @param diagramId 系统图id
|
|
|
* @return 是否成功
|
|
|
*/
|
|
|
+ @ApiOperation("删除系统图")
|
|
|
@GetMapping("/deleteDiagram")
|
|
|
public CommonResult<Boolean> deleteDiagram(String diagramId) {
|
|
|
return ResultHelper.single(dataStrategy.deleteDiagram(diagramId));
|
|
@@ -79,16 +83,18 @@ public class DiagramController {
|
|
|
* @param diagramId 系统图id
|
|
|
* @return 系统图对象信息
|
|
|
*/
|
|
|
+ @ApiOperation("根据系统图id获取系统图信息")
|
|
|
@GetMapping("/getDiagram")
|
|
|
public CommonResult<Diagram> getDiagram(String diagramId) {
|
|
|
return ResultHelper.single(dataStrategy.getDiagram(diagramId));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 系统图实例查询
|
|
|
+ * 系统实例查询
|
|
|
*
|
|
|
* @return 系统实例
|
|
|
*/
|
|
|
+ @ApiOperation("系统实例查询")
|
|
|
@PostMapping("/system/instance")
|
|
|
public CommonResult<List<ObjectNode>> loadSystemInstance() {
|
|
|
BdtpRequest current = BdtpRequest.getCurrent();
|
|
@@ -102,6 +108,7 @@ public class DiagramController {
|
|
|
*
|
|
|
* @return 列表
|
|
|
*/
|
|
|
+ @ApiOperation("项目下的专业 -> 系统 ->系统实例 的树状结构数据")
|
|
|
@PostMapping("/major/system/instance")
|
|
|
public CommonResult<List<ObjectNode>> loadMajorSystemInstance() {
|
|
|
return ResultHelper.multi(dataStrategy.loadMajorSystemInstance());
|
|
@@ -113,6 +120,7 @@ public class DiagramController {
|
|
|
* @param diagram diagram.getSystem() 参数
|
|
|
* @return 列表
|
|
|
*/
|
|
|
+ @ApiOperation("据系统类获取系统类型下的模板列表")
|
|
|
@PostMapping("/systemType/template")
|
|
|
public CommonResult<List<ObjectNode>> loadSystemTypeTemplate(@RequestBody Diagram diagram) {
|
|
|
return ResultHelper.multi(dataStrategy.loadSystemTypeTemplate(diagram));
|
|
@@ -124,6 +132,7 @@ public class DiagramController {
|
|
|
* @param diagramType 系统图类型
|
|
|
* @return 模板列表
|
|
|
*/
|
|
|
+ @ApiOperation("根据系统图类型获取模板列表")
|
|
|
@GetMapping("/getTemplates/ByType")
|
|
|
public CommonResult<List<DiagramTemplate>> getTemplatesByType(String diagramType) {
|
|
|
return ResultHelper.multi(dataStrategy.getTemplates(diagramType));
|
|
@@ -135,6 +144,7 @@ public class DiagramController {
|
|
|
* @param templateId 模板id
|
|
|
* @return 模板信息
|
|
|
*/
|
|
|
+ @ApiOperation("根据模板id获取系统模板信息")
|
|
|
@GetMapping("/getTemplate/ById")
|
|
|
public CommonResult<DiagramTemplate> getTemplateById(String templateId) {
|
|
|
return ResultHelper.single(dataStrategy.getTemplate(templateId));
|
|
@@ -145,6 +155,7 @@ public class DiagramController {
|
|
|
*
|
|
|
* @return 模板列表
|
|
|
*/
|
|
|
+ @ApiOperation("获取所有的系统模板")
|
|
|
@GetMapping("/getTemplates")
|
|
|
public CommonResult<List<DiagramTemplate>> getTemplates() {
|
|
|
return ResultHelper.multi(dataStrategy.getTemplates());
|