UPDATE: fk
This commit is contained in:
@@ -7,6 +7,11 @@ import java.util.stream.Collectors;
|
|||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import com.solution.common.core.domain.R;
|
import com.solution.common.core.domain.R;
|
||||||
|
import com.solution.system.domain.NodeTemplateEntity;
|
||||||
|
import com.solution.system.domain.Nodeparameter;
|
||||||
|
import com.solution.system.domain.Templateparameterdef;
|
||||||
|
import com.solution.system.service.INodeparameterService;
|
||||||
|
import com.solution.system.service.ITemplateparameterdefService;
|
||||||
import com.solution.web.controller.behaviour.vo.NodetemplateDTO;
|
import com.solution.web.controller.behaviour.vo.NodetemplateDTO;
|
||||||
import com.solution.web.controller.behaviour.vo.NodetemplateVO;
|
import com.solution.web.controller.behaviour.vo.NodetemplateVO;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
@@ -45,6 +50,12 @@ public class NodetemplateController extends BaseController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private INodetemplateService nodetemplateService;
|
private INodetemplateService nodetemplateService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private INodeparameterService nodeparameterService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ITemplateparameterdefService templateparameterdefService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询节点模板列表
|
* 查询节点模板列表
|
||||||
*/
|
*/
|
||||||
@@ -56,6 +67,25 @@ public class NodetemplateController extends BaseController {
|
|||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation("节点模板列表")
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:nodetemplate:all')")
|
||||||
|
@GetMapping("/all")
|
||||||
|
public R<List<NodeTemplateEntity>> all() {
|
||||||
|
Nodetemplate nodetemplate = new Nodetemplate();
|
||||||
|
List<Nodetemplate> list = nodetemplateService.selectNodetemplateList(nodetemplate);
|
||||||
|
if (CollectionUtils.isEmpty(list)) {
|
||||||
|
return R.ok(null);
|
||||||
|
}
|
||||||
|
List<NodeTemplateEntity> entities = new ArrayList<>();
|
||||||
|
for (Nodetemplate template : list) {
|
||||||
|
Templateparameterdef def = new Templateparameterdef();
|
||||||
|
def.setTemplateId(template.getId());
|
||||||
|
List<Templateparameterdef> parameters = templateparameterdefService.selectTemplateparameterdefList(def);
|
||||||
|
entities.add(new NodeTemplateEntity(template, parameters));
|
||||||
|
}
|
||||||
|
return R.ok(entities);
|
||||||
|
}
|
||||||
|
|
||||||
@ApiOperation("节点模板列表")
|
@ApiOperation("节点模板列表")
|
||||||
@PreAuthorize("@ss.hasPermi('system:nodetemplate:list')")
|
@PreAuthorize("@ss.hasPermi('system:nodetemplate:list')")
|
||||||
@GetMapping("/listAll")
|
@GetMapping("/listAll")
|
||||||
|
|||||||
@@ -0,0 +1,43 @@
|
|||||||
|
package com.solution.system.domain;
|
||||||
|
/*
|
||||||
|
* This file is part of the kernelstudio package.
|
||||||
|
*
|
||||||
|
* (c) 2014-2026 zlin <admin@kernelstudio.com>
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE file
|
||||||
|
* that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class NodeTemplateEntity extends Nodetemplate {
|
||||||
|
|
||||||
|
private List<Templateparameterdef> parameters = new ArrayList<>();
|
||||||
|
|
||||||
|
public NodeTemplateEntity() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public NodeTemplateEntity(List<Templateparameterdef> parameters) {
|
||||||
|
this.parameters = parameters;
|
||||||
|
}
|
||||||
|
|
||||||
|
public NodeTemplateEntity(NodeTemplateEntity entity) {
|
||||||
|
super(entity);
|
||||||
|
this.parameters = entity.getParameters();
|
||||||
|
}
|
||||||
|
|
||||||
|
public NodeTemplateEntity(Nodetemplate entity, List<Templateparameterdef> parameters) {
|
||||||
|
super(entity);
|
||||||
|
this.parameters = parameters;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Templateparameterdef> getParameters() {
|
||||||
|
return parameters;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setParameters(List<Templateparameterdef> parameters) {
|
||||||
|
this.parameters = parameters;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -42,6 +42,19 @@ public class Nodetemplate extends BaseEntity
|
|||||||
@Excel(name = "模版类型,节点模版或者条件判断,例如“node”,precondition“")
|
@Excel(name = "模版类型,节点模版或者条件判断,例如“node”,precondition“")
|
||||||
private String templeteType;
|
private String templeteType;
|
||||||
|
|
||||||
|
public Nodetemplate() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public Nodetemplate(Nodetemplate template) {
|
||||||
|
this.id = template.id;
|
||||||
|
this.type = template.type;
|
||||||
|
this.name = template.name;
|
||||||
|
this.logicHandler = template.logicHandler;
|
||||||
|
this.description = template.description;
|
||||||
|
this.englishName = template.englishName;
|
||||||
|
this.templeteType = template.templeteType;
|
||||||
|
}
|
||||||
|
|
||||||
public void setId(Long id)
|
public void setId(Long id)
|
||||||
{
|
{
|
||||||
this.id = id;
|
this.id = id;
|
||||||
|
|||||||
Reference in New Issue
Block a user