Compare commits

..

11 Commits

Author SHA1 Message Date
577bc3e1c0 feat(behaviour): 添加行为树模块功能实现
- 添加节点参数的保存、更新和删除操作支持
2026-02-06 16:16:05 +08:00
7c5c5d89ee Merge branch 'master' of http://101.43.238.71:3000/zouju/auto-solution into dev 2026-02-05 17:22:35 +08:00
cd18e2a71d style(excel): 优化Excel注解中的字符串格式
- 移除Nodetemplate类中节点类型的双引号显示
- 移除Templateparameterdef类中数据类型的双引号显示
- 统一Excel导出时的字符串格式规范
2026-02-05 17:21:54 +08:00
06426bcb31 feat(behaviour): 添加行为树系统核心功能模块
- 创建行为树主对象实体类Behaviortree,包含ID、名称、描述、创建时间、更新时间、英文名和XML内容字段
- 实现行为树控制器BehaviortreeController,提供增删改查和导出功能接口
- 开发行为树数据访问层,包括Mapper接口和MyBatis XML映射文件
- 构建行为树服务层接口及实现类,封装业务逻辑处理
- 添加节点连接、节点参数、节点模板、模板参数定义和行为树实例节点等相关实体和服务接口
- 实现节点连接管理功能,支持父子节点关系建立和执行顺序配置
- 提供完整的CRUD操作和权限控制,集成Excel导出功能
2026-02-05 17:19:07 +08:00
zouju
000f8d4bc5 新增规则模块 新增规则模块CRUD 2026-02-05 17:12:53 +08:00
ba5913a50b Merge branch 'master' of http://101.43.238.71:3000/zouju/auto-solution into dev 2026-02-05 16:58:43 +08:00
zouju
c8a889815d 初始化项目 2026-02-05 16:58:12 +08:00
19024e8486 Merge branch 'master' of http://101.43.238.71:3000/zouju/auto-solution into dev 2026-02-05 16:22:12 +08:00
zouju
0bf9a5da94 初始化项目 2026-02-05 16:09:53 +08:00
c90dfd8ccb Merge branch 'master' of http://101.43.238.71:3000/zouju/auto-solution into dev 2026-02-05 16:02:37 +08:00
zouju
4363155c50 初始化项目 2026-02-05 11:49:18 +08:00
347 changed files with 29640 additions and 2 deletions

View File

@@ -61,6 +61,15 @@
<artifactId>solution-generator</artifactId>
</dependency>
<dependency>
<groupId>com.solution</groupId>
<artifactId>solution-behaviour</artifactId>
</dependency>
<dependency>
<groupId>com.solution</groupId>
<artifactId>solution-algo</artifactId>
</dependency>
</dependencies>
<build>

View File

@@ -14,6 +14,16 @@ public class SolutionApplication
{
public static void main(String[] args) {
SpringApplication.run(SolutionApplication.class, args);
System.out.println("(♥◠‿◠)ノ゙ 方案自动化生成启动成功 ლ(´ڡ`ლ)゙ \n" +
" .-------. ____ __ \n" +
" | _ _ \\ \\ \\ / / \n" +
" | ( ' ) | \\ _. / ' \n" +
" |(_ o _) / _( )_ .' \n" +
" | (_,_).' __ ___(_ o _)' \n" +
" | |\\ \\ | || |(_,_)' \n" +
" | | \\ `' /| `-' / \n" +
" | | \\ / \\ / \n" +
" ''-' `'-' `-..-' ");
System.out.println("方案自动化生成启动成功");
}
}

View File

@@ -0,0 +1,104 @@
package com.solution.web.controller.algo;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.solution.common.annotation.Log;
import com.solution.common.core.controller.BaseController;
import com.solution.common.core.domain.AjaxResult;
import com.solution.common.enums.BusinessType;
import com.solution.algo.domain.SysAlgoConfig;
import com.solution.algo.service.ISysAlgoConfigService;
import com.solution.common.utils.poi.ExcelUtil;
import com.solution.common.core.page.TableDataInfo;
/**
* 动态规则配置Controller
*
* @author zouju
* @date 2026-02-05
*/
@RestController
@RequestMapping("/algo/algo")
public class SysAlgoConfigController extends BaseController
{
@Autowired
private ISysAlgoConfigService sysAlgoConfigService;
/**
* 查询动态规则配置列表
*/
@PreAuthorize("@ss.hasPermi('algo:algo:list')")
@GetMapping("/list")
public TableDataInfo list(SysAlgoConfig sysAlgoConfig)
{
startPage();
List<SysAlgoConfig> list = sysAlgoConfigService.selectSysAlgoConfigList(sysAlgoConfig);
return getDataTable(list);
}
/**
* 导出动态规则配置列表
*/
@PreAuthorize("@ss.hasPermi('algo:algo:export')")
@Log(title = "动态规则配置", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SysAlgoConfig sysAlgoConfig)
{
List<SysAlgoConfig> list = sysAlgoConfigService.selectSysAlgoConfigList(sysAlgoConfig);
ExcelUtil<SysAlgoConfig> util = new ExcelUtil<SysAlgoConfig>(SysAlgoConfig.class);
util.exportExcel(response, list, "动态规则配置数据");
}
/**
* 获取动态规则配置详细信息
*/
@PreAuthorize("@ss.hasPermi('algo:algo:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(sysAlgoConfigService.selectSysAlgoConfigById(id));
}
/**
* 新增动态规则配置
*/
@PreAuthorize("@ss.hasPermi('algo:algo:add')")
@Log(title = "动态规则配置", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SysAlgoConfig sysAlgoConfig)
{
return toAjax(sysAlgoConfigService.insertSysAlgoConfig(sysAlgoConfig));
}
/**
* 修改动态规则配置
*/
@PreAuthorize("@ss.hasPermi('algo:algo:edit')")
@Log(title = "动态规则配置", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SysAlgoConfig sysAlgoConfig)
{
return toAjax(sysAlgoConfigService.updateSysAlgoConfig(sysAlgoConfig));
}
/**
* 删除动态规则配置
*/
@PreAuthorize("@ss.hasPermi('algo:algo:remove')")
@Log(title = "动态规则配置", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(sysAlgoConfigService.deleteSysAlgoConfigByIds(ids));
}
}

View File

@@ -0,0 +1,113 @@
package com.solution.web.controller.behaviour;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.solution.common.annotation.Log;
import com.solution.common.core.controller.BaseController;
import com.solution.common.core.domain.AjaxResult;
import com.solution.common.enums.BusinessType;
import com.solution.system.domain.Behaviortree;
import com.solution.system.service.IBehaviortreeService;
import com.solution.common.utils.poi.ExcelUtil;
import com.solution.common.core.page.TableDataInfo;
/**
* 行为树主Controller
*
* @author ruoyi
* @date 2026-02-05
*/
@Api("行为树管理")
@RestController
@RequestMapping("/system/behaviortree")
public class BehaviortreeController extends BaseController
{
@Autowired
private IBehaviortreeService behaviortreeService;
/**
* 查询行为树主列表
*/
@ApiOperation("获取行为树列表")
@PreAuthorize("@ss.hasPermi('system:behaviortree:list')")
@GetMapping("/list")
public TableDataInfo list(Behaviortree behaviortree)
{
startPage();
List<Behaviortree> list = behaviortreeService.selectBehaviortreeList(behaviortree);
return getDataTable(list);
}
/**
* 导出行为树主列表
*/
@PreAuthorize("@ss.hasPermi('system:behaviortree:export')")
@Log(title = "行为树主", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, Behaviortree behaviortree)
{
List<Behaviortree> list = behaviortreeService.selectBehaviortreeList(behaviortree);
ExcelUtil<Behaviortree> util = new ExcelUtil<Behaviortree>(Behaviortree.class);
util.exportExcel(response, list, "行为树主数据");
}
/**
* 获取行为树主详细信息
*/
@ApiOperation("获取行为树详情")
@PreAuthorize("@ss.hasPermi('system:behaviortree:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(behaviortreeService.selectBehaviortreeById(id));
}
/**
* 新增行为树主
*/
@ApiOperation("新增行为树主")
@PreAuthorize("@ss.hasPermi('system:behaviortree:add')")
@Log(title = "行为树主", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody Behaviortree behaviortree)
{
return toAjax(behaviortreeService.insertBehaviortree(behaviortree));
}
/**
* 修改行为树主
*/
@ApiOperation("修改行为树主")
@PreAuthorize("@ss.hasPermi('system:behaviortree:edit')")
@Log(title = "行为树主", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody Behaviortree behaviortree)
{
return toAjax(behaviortreeService.updateBehaviortree(behaviortree));
}
/**
* 删除行为树主
*/
@ApiOperation("删除行为树主")
@PreAuthorize("@ss.hasPermi('system:behaviortree:remove')")
@Log(title = "行为树主", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(behaviortreeService.deleteBehaviortreeByIds(ids));
}
}

View File

@@ -0,0 +1,111 @@
package com.solution.web.controller.behaviour;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.solution.system.domain.Nodeconnection;
import com.solution.system.service.INodeconnectionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.solution.common.annotation.Log;
import com.solution.common.core.controller.BaseController;
import com.solution.common.core.domain.AjaxResult;
import com.solution.common.enums.BusinessType;
import com.solution.common.utils.poi.ExcelUtil;
import com.solution.common.core.page.TableDataInfo;
/**
* 节点连接Controller
*
* @author ruoyi
* @date 2026-02-05
*/
@Api("节点连接管理")
@RestController
@RequestMapping("/system/nodeconnection")
public class NodeconnectionController extends BaseController
{
@Autowired
private INodeconnectionService nodeconnectionService;
/**
* 查询节点连接列表
*/
@PreAuthorize("@ss.hasPermi('system:nodeconnection:list')")
@GetMapping("/list")
public TableDataInfo list(Nodeconnection nodeconnection)
{
startPage();
List<Nodeconnection> list = nodeconnectionService.selectNodeconnectionList(nodeconnection);
return getDataTable(list);
}
/**
* 导出节点连接列表
*/
@PreAuthorize("@ss.hasPermi('system:nodeconnection:export')")
@Log(title = "节点连接", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, Nodeconnection nodeconnection)
{
List<Nodeconnection> list = nodeconnectionService.selectNodeconnectionList(nodeconnection);
ExcelUtil<Nodeconnection> util = new ExcelUtil<Nodeconnection>(Nodeconnection.class);
util.exportExcel(response, list, "节点连接数据");
}
/**
* 获取节点连接详细信息
*/
@ApiOperation("获取节点连接详细信息")
@PreAuthorize("@ss.hasPermi('system:nodeconnection:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(nodeconnectionService.selectNodeconnectionById(id));
}
/**
* 新增节点连接
*/
@ApiOperation("新增节点连接")
@PreAuthorize("@ss.hasPermi('system:nodeconnection:add')")
@Log(title = "节点连接", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody Nodeconnection nodeconnection)
{
return toAjax(nodeconnectionService.insertNodeconnection(nodeconnection));
}
/**
* 修改节点连接
*/
@PreAuthorize("@ss.hasPermi('system:nodeconnection:edit')")
@Log(title = "节点连接", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody Nodeconnection nodeconnection)
{
return toAjax(nodeconnectionService.updateNodeconnection(nodeconnection));
}
/**
* 删除节点连接
*/
@ApiOperation("删除节点连接")
@PreAuthorize("@ss.hasPermi('system:nodeconnection:remove')")
@Log(title = "节点连接", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(nodeconnectionService.deleteNodeconnectionByIds(ids));
}
}

View File

@@ -0,0 +1,111 @@
package com.solution.web.controller.behaviour;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.solution.common.annotation.Log;
import com.solution.common.core.controller.BaseController;
import com.solution.common.core.domain.AjaxResult;
import com.solution.common.enums.BusinessType;
import com.solution.system.domain.Nodeparameter;
import com.solution.system.service.INodeparameterService;
import com.solution.common.utils.poi.ExcelUtil;
import com.solution.common.core.page.TableDataInfo;
/**
* 节点参数Controller
*
* @author ruoyi
* @date 2026-02-05
*/
@Api("节点参数管理")
@RestController
@RequestMapping("/system/nodeparameter")
public class NodeparameterController extends BaseController
{
@Autowired
private INodeparameterService nodeparameterService;
/**
* 查询节点参数列表
*/
@PreAuthorize("@ss.hasPermi('system:nodeparameter:list')")
@GetMapping("/list")
public TableDataInfo list(Nodeparameter nodeparameter)
{
startPage();
List<Nodeparameter> list = nodeparameterService.selectNodeparameterList(nodeparameter);
return getDataTable(list);
}
/**
* 导出节点参数列表
*/
@PreAuthorize("@ss.hasPermi('system:nodeparameter:export')")
@Log(title = "节点参数", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, Nodeparameter nodeparameter)
{
List<Nodeparameter> list = nodeparameterService.selectNodeparameterList(nodeparameter);
ExcelUtil<Nodeparameter> util = new ExcelUtil<Nodeparameter>(Nodeparameter.class);
util.exportExcel(response, list, "节点参数数据");
}
/**
* 获取节点参数详细信息
*/
@PreAuthorize("@ss.hasPermi('system:nodeparameter:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(nodeparameterService.selectNodeparameterById(id));
}
/**
* 新增节点参数
*/
@ApiOperation("新增节点参数")
@PreAuthorize("@ss.hasPermi('system:nodeparameter:add')")
@Log(title = "节点参数", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody Nodeparameter nodeparameter)
{
return toAjax(nodeparameterService.insertNodeparameter(nodeparameter));
}
/**
* 修改节点参数
*/
@ApiOperation("修改节点参数")
@PreAuthorize("@ss.hasPermi('system:nodeparameter:edit')")
@Log(title = "节点参数", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody Nodeparameter nodeparameter)
{
return toAjax(nodeparameterService.updateNodeparameter(nodeparameter));
}
/**
* 删除节点参数
*/
@ApiOperation("删除节点参数")
@PreAuthorize("@ss.hasPermi('system:nodeparameter:remove')")
@Log(title = "节点参数", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(nodeparameterService.deleteNodeparameterByIds(ids));
}
}

View File

@@ -0,0 +1,139 @@
package com.solution.web.controller.behaviour;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import javax.servlet.http.HttpServletResponse;
import com.solution.common.core.domain.R;
import com.solution.web.controller.behaviour.vo.NodetemplateDTO;
import com.solution.web.controller.behaviour.vo.NodetemplateVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.solution.common.annotation.Log;
import com.solution.common.core.controller.BaseController;
import com.solution.common.core.domain.AjaxResult;
import com.solution.common.enums.BusinessType;
import com.solution.system.domain.Nodetemplate;
import com.solution.system.service.INodetemplateService;
import com.solution.common.utils.poi.ExcelUtil;
import com.solution.common.core.page.TableDataInfo;
/**
* 节点模板Controller
*
* @author ruoyi
* @date 2026-02-05
*/
@Api("节点模板管理")
@RestController
@RequestMapping("/system/nodetemplate")
public class NodetemplateController extends BaseController {
@Autowired
private INodetemplateService nodetemplateService;
/**
* 查询节点模板列表
*/
@PreAuthorize("@ss.hasPermi('system:nodetemplate:list')")
@GetMapping("/list")
public TableDataInfo list(Nodetemplate nodetemplate) {
startPage();
List<Nodetemplate> list = nodetemplateService.selectNodetemplateList(nodetemplate);
return getDataTable(list);
}
@ApiOperation("节点模板列表")
@PreAuthorize("@ss.hasPermi('system:nodetemplate:list')")
@GetMapping("/listAll")
public R<List<NodetemplateVO>> listAll() {
Nodetemplate nodetemplate = new Nodetemplate();
List<Nodetemplate> list = nodetemplateService.selectNodetemplateList(nodetemplate);
if (CollectionUtils.isEmpty(list)) {
return R.ok(null);
}
Map<String, List<NodetemplateDTO>> groupedByTemplateType = list.stream()
.map(template -> {
NodetemplateDTO dto = new NodetemplateDTO();
dto.setId(template.getId());
dto.setName(template.getName());
dto.setDescription(template.getDescription());
dto.setEnglishName(template.getEnglishName());
dto.setLogicHandler(template.getLogicHandler());
return dto;
})
.collect(Collectors.groupingBy(NodetemplateDTO::getTempleteType));
List<NodetemplateVO> vos = new ArrayList<>();
groupedByTemplateType.forEach((key, value) -> {
// 处理逻辑
NodetemplateVO vo = new NodetemplateVO();
vo.setTempleteType(key);
vo.setDtoList(value);
vos.add(vo);
});
return R.ok(vos);
}
/**
* 导出节点模板列表
*/
@PreAuthorize("@ss.hasPermi('system:nodetemplate:export')")
@Log(title = "节点模板", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, Nodetemplate nodetemplate) {
List<Nodetemplate> list = nodetemplateService.selectNodetemplateList(nodetemplate);
ExcelUtil<Nodetemplate> util = new ExcelUtil<Nodetemplate>(Nodetemplate.class);
util.exportExcel(response, list, "节点模板数据");
}
/**
* 获取节点模板详细信息
*/
@PreAuthorize("@ss.hasPermi('system:nodetemplate:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) {
return success(nodetemplateService.selectNodetemplateById(id));
}
/**
* 新增节点模板
*/
@PreAuthorize("@ss.hasPermi('system:nodetemplate:add')")
@Log(title = "节点模板", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody Nodetemplate nodetemplate) {
return toAjax(nodetemplateService.insertNodetemplate(nodetemplate));
}
/**
* 修改节点模板
*/
@PreAuthorize("@ss.hasPermi('system:nodetemplate:edit')")
@Log(title = "节点模板", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody Nodetemplate nodetemplate) {
return toAjax(nodetemplateService.updateNodetemplate(nodetemplate));
}
/**
* 删除节点模板
*/
@PreAuthorize("@ss.hasPermi('system:nodetemplate:remove')")
@Log(title = "节点模板", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(nodetemplateService.deleteNodetemplateByIds(ids));
}
}

View File

@@ -0,0 +1,104 @@
package com.solution.web.controller.behaviour;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.solution.common.annotation.Log;
import com.solution.common.core.controller.BaseController;
import com.solution.common.core.domain.AjaxResult;
import com.solution.common.enums.BusinessType;
import com.solution.system.domain.Templateparameterdef;
import com.solution.system.service.ITemplateparameterdefService;
import com.solution.common.utils.poi.ExcelUtil;
import com.solution.common.core.page.TableDataInfo;
/**
* 模板参数定义Controller
*
* @author ruoyi
* @date 2026-02-05
*/
@RestController
@RequestMapping("/system/templateparameterdef")
public class TemplateparameterdefController extends BaseController
{
@Autowired
private ITemplateparameterdefService templateparameterdefService;
/**
* 查询模板参数定义列表
*/
@PreAuthorize("@ss.hasPermi('system:templateparameterdef:list')")
@GetMapping("/list")
public TableDataInfo list(Templateparameterdef templateparameterdef)
{
startPage();
List<Templateparameterdef> list = templateparameterdefService.selectTemplateparameterdefList(templateparameterdef);
return getDataTable(list);
}
/**
* 导出模板参数定义列表
*/
@PreAuthorize("@ss.hasPermi('system:templateparameterdef:export')")
@Log(title = "模板参数定义", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, Templateparameterdef templateparameterdef)
{
List<Templateparameterdef> list = templateparameterdefService.selectTemplateparameterdefList(templateparameterdef);
ExcelUtil<Templateparameterdef> util = new ExcelUtil<Templateparameterdef>(Templateparameterdef.class);
util.exportExcel(response, list, "模板参数定义数据");
}
/**
* 获取模板参数定义详细信息
*/
@PreAuthorize("@ss.hasPermi('system:templateparameterdef:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(templateparameterdefService.selectTemplateparameterdefById(id));
}
/**
* 新增模板参数定义
*/
@PreAuthorize("@ss.hasPermi('system:templateparameterdef:add')")
@Log(title = "模板参数定义", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody Templateparameterdef templateparameterdef)
{
return toAjax(templateparameterdefService.insertTemplateparameterdef(templateparameterdef));
}
/**
* 修改模板参数定义
*/
@PreAuthorize("@ss.hasPermi('system:templateparameterdef:edit')")
@Log(title = "模板参数定义", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody Templateparameterdef templateparameterdef)
{
return toAjax(templateparameterdefService.updateTemplateparameterdef(templateparameterdef));
}
/**
* 删除模板参数定义
*/
@PreAuthorize("@ss.hasPermi('system:templateparameterdef:remove')")
@Log(title = "模板参数定义", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(templateparameterdefService.deleteTemplateparameterdefByIds(ids));
}
}

View File

@@ -0,0 +1,205 @@
package com.solution.web.controller.behaviour;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors;
import javax.servlet.http.HttpServletResponse;
import com.solution.common.core.domain.R;
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.NodeparameterVO;
import com.solution.web.controller.behaviour.vo.NodetemplateVO;
import com.solution.web.controller.behaviour.vo.TreenodeinstanceVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.BeanUtils;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.solution.common.annotation.Log;
import com.solution.common.core.controller.BaseController;
import com.solution.common.core.domain.AjaxResult;
import com.solution.common.enums.BusinessType;
import com.solution.system.domain.Treenodeinstance;
import com.solution.system.service.ITreenodeinstanceService;
import com.solution.common.utils.poi.ExcelUtil;
import com.solution.common.core.page.TableDataInfo;
/**
* 行为树实例节点Controller
*
* @author ruoyi
* @date 2026-02-05
*/
@Api("行为树实例节点管理")
@RestController
@RequestMapping("/system/treenodeinstance")
public class TreenodeinstanceController extends BaseController {
@Autowired
private ITreenodeinstanceService treenodeinstanceService;
@Autowired
private INodeparameterService nodeparameterService;
@Autowired
private ITemplateparameterdefService templateparameterdefService;
/**
* 查询行为树实例节点列表
*/
@PreAuthorize("@ss.hasPermi('system:treenodeinstance:list')")
@GetMapping("/list")
public TableDataInfo list(Treenodeinstance treenodeinstance) {
startPage();
List<Treenodeinstance> list = treenodeinstanceService.selectTreenodeinstanceList(treenodeinstance);
return getDataTable(list);
}
/**
* 导出行为树实例节点列表
*/
@PreAuthorize("@ss.hasPermi('system:treenodeinstance:export')")
@Log(title = "行为树实例节点", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, Treenodeinstance treenodeinstance) {
List<Treenodeinstance> list = treenodeinstanceService.selectTreenodeinstanceList(treenodeinstance);
ExcelUtil<Treenodeinstance> util = new ExcelUtil<Treenodeinstance>(Treenodeinstance.class);
util.exportExcel(response, list, "行为树实例节点数据");
}
/**
* 获取行为树实例节点详细信息
*/
@PreAuthorize("@ss.hasPermi('system:treenodeinstance:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) {
return success(treenodeinstanceService.selectTreenodeinstanceById(id));
}
@ApiOperation("行为树实例节点详情展示")
@PreAuthorize("@ss.hasPermi('system:treenodeinstance:query')")
@GetMapping(value = "/getInfo")
public R<TreenodeinstanceVO> getInfoParams(@PathVariable("id") Long id) {
TreenodeinstanceVO treenodeinstanceVO = new TreenodeinstanceVO();
Treenodeinstance treenodeinstance = treenodeinstanceService.selectTreenodeinstanceById(id);
BeanUtils.copyProperties(treenodeinstance, treenodeinstanceVO);
Templateparameterdef templateparameterdef = new Templateparameterdef();
templateparameterdef.setTemplateId(treenodeinstance.getTemplateId());
List<Templateparameterdef> templateparameterdefs = templateparameterdefService.selectTemplateparameterdefList(templateparameterdef);
if (CollectionUtils.isEmpty(templateparameterdefs)) {
return R.ok(treenodeinstanceVO);
}
List<NodeparameterVO> nodeparameterVOList = new ArrayList<>();
treenodeinstanceVO.setNodeparameterVOList(nodeparameterVOList);
Nodeparameter nodeparameter = new Nodeparameter();
nodeparameter.setNodeInstanceId(id);
List<Nodeparameter> nodeparameters = nodeparameterService.selectNodeparameterList(nodeparameter);
Map<Long, Nodeparameter> nodeParameterMap = new HashMap<>();
if (!CollectionUtils.isEmpty(nodeparameters)) {
nodeParameterMap.putAll(nodeparameters.stream()
.collect(Collectors.toMap(
Nodeparameter::getParamDefId,
Function.identity(), (existing, replacement) -> existing
)));
}
templateparameterdefs.forEach(t -> {
NodeparameterVO vo = new NodeparameterVO();
vo.setDescription(t.getDescription());
vo.setParamKey(t.getParamKey());
vo.setDataType(t.getDataType());
vo.setDefaultValue(t.getDefaultValue());
vo.setParamDefId(t.getId());
vo.setNodeInstanceId(id);
if (nodeParameterMap.containsKey(t.getId())) {
Nodeparameter nodeparameter1 = nodeParameterMap.get(t.getId());
vo.setId(nodeparameter1.getId());
vo.setValue(nodeparameter1.getValue());
}
nodeparameterVOList.add(vo);
});
return R.ok(treenodeinstanceVO);
}
@ApiOperation("行为树实例节点保存或者跟新")
@PreAuthorize("@ss.hasPermi('system:treenodeinstance:add')")
@Log(title = "行为树实例节点", businessType = BusinessType.INSERT)
@PostMapping("/saveOrUpdate")
public R<Integer> saveOrUpdate(@RequestBody Treenodeinstance treenodeinstance) {
if (null == treenodeinstance.getId()) {
//新增
Templateparameterdef templateparameterdef = new Templateparameterdef();
templateparameterdef.setTemplateId(treenodeinstance.getTemplateId());
List<Templateparameterdef> templateparameterdefs = templateparameterdefService.selectTemplateparameterdefList(templateparameterdef);
if (CollectionUtils.isEmpty(templateparameterdefs)) {
return R.ok(treenodeinstanceService.insertTreenodeinstance(treenodeinstance));
}
templateparameterdefs.forEach(t -> {
Nodeparameter nodeparameter = new Nodeparameter();
nodeparameter.setNodeInstanceId(treenodeinstance.getId());
nodeparameter.setParamDefId(t.getId());
nodeparameter.setValue(t.getDefaultValue());
nodeparameterService.insertNodeparameter(nodeparameter);
});
}
return R.ok(treenodeinstanceService.updateTreenodeinstance(treenodeinstance));
}
/**
* 新增行为树实例节点
*/
@PreAuthorize("@ss.hasPermi('system:treenodeinstance:add')")
@Log(title = "行为树实例节点", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody Treenodeinstance treenodeinstance) {
return toAjax(treenodeinstanceService.insertTreenodeinstance(treenodeinstance));
}
/**
* 修改行为树实例节点
*/
@PreAuthorize("@ss.hasPermi('system:treenodeinstance:edit')")
@Log(title = "行为树实例节点", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody Treenodeinstance treenodeinstance) {
return toAjax(treenodeinstanceService.updateTreenodeinstance(treenodeinstance));
}
/**
* 删除行为树实例节点
*/
@ApiOperation("删除行为树实例节点")
@PreAuthorize("@ss.hasPermi('system:treenodeinstance:remove')")
@Log(title = "行为树实例节点", businessType = BusinessType.DELETE)
@DeleteMapping("/{id}")
public R<Integer> remove(@PathVariable Long id) {
Nodeparameter nodeparameter = new Nodeparameter();
nodeparameter.setNodeInstanceId(id);
List<Nodeparameter> nodeparameters = nodeparameterService.selectNodeparameterList(nodeparameter);
if (!CollectionUtils.isEmpty(nodeparameters)) {
List<Long> ids = nodeparameters.stream()
.map(Nodeparameter::getId)
.collect(Collectors.toList());
Long[] idsArray = ids.toArray(new Long[0]);
nodeparameterService.deleteNodeparameterByIds(idsArray);
}
return R.ok(treenodeinstanceService.deleteTreenodeinstanceById(id));
}
}

View File

@@ -0,0 +1,52 @@
package com.solution.web.controller.behaviour.vo;
import io.swagger.annotations.ApiModelProperty;
public class BehaviortreeVO {
private Long id;
/** 行为树名称 */
@ApiModelProperty(name = "行为树名称")
private String name;
/** 行为树描述 */
@ApiModelProperty(name = "行为树描述")
private String description;
@ApiModelProperty(name = "英文名称")
private String englishName;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getEnglishName() {
return englishName;
}
public void setEnglishName(String englishName) {
this.englishName = englishName;
}
}

View File

@@ -0,0 +1,100 @@
package com.solution.web.controller.behaviour.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@ApiModel(value = "NodeparameterVO", description = "节点参数vo")
public class NodeparameterVO {
private Long id;
/** 关联到哪个节点实例 (外键: TreeInstanceNode.id) */
@ApiModelProperty("节点实例id")
private Long nodeInstanceId;
/** 关联到哪个参数定义 (外键: TemplateParameterDef.id) */
@ApiModelProperty("模板参数定义表id")
private Long paramDefId;
/** 节点实例设置的具体参数值 (覆盖模板默认值) */
@ApiModelProperty("节点实例设置的具体参数值 (覆盖模板默认值)")
private String value;
@ApiModelProperty("参数键名, 例如: target_name, speed")
private String paramKey;
/** 参数数据类型, 例如: "float", "int", "string", "bool" */
@ApiModelProperty("参数数据类型, 例如: float, int, string, bool")
private String dataType;
/** 默认值 */
@ApiModelProperty("默认值")
private String defaultValue;
@ApiModelProperty("参数名称描述")
private String description;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getNodeInstanceId() {
return nodeInstanceId;
}
public void setNodeInstanceId(Long nodeInstanceId) {
this.nodeInstanceId = nodeInstanceId;
}
public Long getParamDefId() {
return paramDefId;
}
public void setParamDefId(Long paramDefId) {
this.paramDefId = paramDefId;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public String getParamKey() {
return paramKey;
}
public void setParamKey(String paramKey) {
this.paramKey = paramKey;
}
public String getDataType() {
return dataType;
}
public void setDataType(String dataType) {
this.dataType = dataType;
}
public String getDefaultValue() {
return defaultValue;
}
public void setDefaultValue(String defaultValue) {
this.defaultValue = defaultValue;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
}

View File

@@ -0,0 +1,75 @@
package com.solution.web.controller.behaviour.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@ApiModel(value = "NodetemplateDTO", description = "节点模板dto")
public class NodetemplateDTO {
private Long id;
/** 模板名称, 例如: "MoveToTarget", "IsTargetVisible" */
@ApiModelProperty("模板名称, 例如: MoveToTarget, IsTargetVisible")
private String name;
/** 对应的逻辑执行代码/脚本/函数名 */
@ApiModelProperty("对应的逻辑执行代码/脚本/函数名")
private String logicHandler;
/** 模板描述 */
@ApiModelProperty("模板描述")
private String description;
/** afsim 中转换的节点名 */
@ApiModelProperty("afsim 中转换的节点名")
private String englishName;
private String templeteType;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getLogicHandler() {
return logicHandler;
}
public void setLogicHandler(String logicHandler) {
this.logicHandler = logicHandler;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getEnglishName() {
return englishName;
}
public void setEnglishName(String englishName) {
this.englishName = englishName;
}
public String getTempleteType() {
return templeteType;
}
public void setTempleteType(String templeteType) {
this.templeteType = templeteType;
}
}

View File

@@ -0,0 +1,32 @@
package com.solution.web.controller.behaviour.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.List;
@ApiModel(value = "NodetemplateVO", description = "节点模板vo")
public class NodetemplateVO {
/** 模版类型节点模版或者条件判断例如“node”precondition“ */
@ApiModelProperty("模版类型节点模版或者条件判断例如“node”precondition“")
private String templeteType;
@ApiModelProperty("节点模板数据")
private List<NodetemplateDTO> dtoList;
public String getTempleteType() {
return templeteType;
}
public void setTempleteType(String templeteType) {
this.templeteType = templeteType;
}
public List<NodetemplateDTO> getDtoList() {
return dtoList;
}
public void setDtoList(List<NodetemplateDTO> dtoList) {
this.dtoList = dtoList;
}
}

View File

@@ -0,0 +1,87 @@
package com.solution.web.controller.behaviour.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.List;
@ApiModel(value = "TreenodeinstanceVO", description = "节点vo")
public class TreenodeinstanceVO {
private Long id;
@ApiModelProperty("行为树id")
private Long treeId;
/** 引用哪个节点模板 (外键: NodeTemplate.id) */
@ApiModelProperty("节点模板id")
private Long templateId;
/** 节点的显示名称 (可能与模板名称不同, 用于区分实例) */
@ApiModelProperty("节点的显示名称")
private String instanceName;
/** 判断当前节点是否为根节点,默认情况下是非根节点 */
@ApiModelProperty("判断当前节点是否为根节点,默认情况下是非根节点")
private Long isRoot;
@ApiModelProperty("节点介绍")
private String desciption;
@ApiModelProperty("节点变量结合")
private List<NodeparameterVO> nodeparameterVOList;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getTreeId() {
return treeId;
}
public void setTreeId(Long treeId) {
this.treeId = treeId;
}
public Long getTemplateId() {
return templateId;
}
public void setTemplateId(Long templateId) {
this.templateId = templateId;
}
public String getInstanceName() {
return instanceName;
}
public void setInstanceName(String instanceName) {
this.instanceName = instanceName;
}
public Long getIsRoot() {
return isRoot;
}
public void setIsRoot(Long isRoot) {
this.isRoot = isRoot;
}
public String getDesciption() {
return desciption;
}
public void setDesciption(String desciption) {
this.desciption = desciption;
}
public List<NodeparameterVO> getNodeparameterVOList() {
return nodeparameterVOList;
}
public void setNodeparameterVOList(List<NodeparameterVO> nodeparameterVOList) {
this.nodeparameterVOList = nodeparameterVOList;
}
}

View File

@@ -113,7 +113,7 @@ public class SwaggerConfig
// 用ApiInfoBuilder进行定制
return new ApiInfoBuilder()
// 设置标题
.title("标题:若依管理系统_接口文档")
.title("标题:自动化管理系统_接口文档")
// 描述
.description("描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...")
// 作者信息

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>solution</artifactId>
<groupId>com.solution</groupId>
<version>3.9.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>solution-algo</artifactId>
<description>
algo模块
</description>
<dependencies>
<!-- 通用工具-->
<dependency>
<groupId>com.solution</groupId>
<artifactId>solution-common</artifactId>
</dependency>
</dependencies>
</project>

View File

@@ -0,0 +1,176 @@
package com.solution.algo.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.solution.common.annotation.Excel;
import com.solution.common.core.domain.BaseEntity;
/**
* 动态规则配置对象 sys_algo_config
*
* @author zouju
* @date 2026-02-05
*/
public class SysAlgoConfig extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键ID */
private Long id;
/** 算法唯一标识(Type),用于接口路由 */
@Excel(name = "算法唯一标识(Type),用于接口路由")
private String algoType;
/** 算法名称,后台展示用 */
@Excel(name = "算法名称,后台展示用")
private String algoName;
/** 执行引擎类型: GROOVY, PYTHON, JS, LUA等 */
@Excel(name = "执行引擎类型: GROOVY, PYTHON, JS, LUA等")
private String engineType;
/** 参数定义模型(JSON Schema),用于自动校验入参 */
@Excel(name = "参数定义模型(JSON Schema),用于自动校验入参")
private String inputSchema;
/** 算法脚本代码或规则表达式 */
@Excel(name = "算法脚本代码或规则表达式")
private String scriptContent;
/** 算法描述 */
@Excel(name = "算法描述")
private String description;
/** 状态: 1-启用, 0-禁用 */
@Excel(name = "状态: 1-启用, 0-禁用")
private Long status;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date createdAt;
/** 更新时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date updatedAt;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setAlgoType(String algoType)
{
this.algoType = algoType;
}
public String getAlgoType()
{
return algoType;
}
public void setAlgoName(String algoName)
{
this.algoName = algoName;
}
public String getAlgoName()
{
return algoName;
}
public void setEngineType(String engineType)
{
this.engineType = engineType;
}
public String getEngineType()
{
return engineType;
}
public void setInputSchema(String inputSchema)
{
this.inputSchema = inputSchema;
}
public String getInputSchema()
{
return inputSchema;
}
public void setScriptContent(String scriptContent)
{
this.scriptContent = scriptContent;
}
public String getScriptContent()
{
return scriptContent;
}
public void setDescription(String description)
{
this.description = description;
}
public String getDescription()
{
return description;
}
public void setStatus(Long status)
{
this.status = status;
}
public Long getStatus()
{
return status;
}
public void setCreatedAt(Date createdAt)
{
this.createdAt = createdAt;
}
public Date getCreatedAt()
{
return createdAt;
}
public void setUpdatedAt(Date updatedAt)
{
this.updatedAt = updatedAt;
}
public Date getUpdatedAt()
{
return updatedAt;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("algoType", getAlgoType())
.append("algoName", getAlgoName())
.append("engineType", getEngineType())
.append("inputSchema", getInputSchema())
.append("scriptContent", getScriptContent())
.append("description", getDescription())
.append("status", getStatus())
.append("createdAt", getCreatedAt())
.append("updatedAt", getUpdatedAt())
.toString();
}
}

View File

@@ -0,0 +1,61 @@
package com.solution.algo.mapper;
import java.util.List;
import com.solution.algo.domain.SysAlgoConfig;
/**
* 动态规则配置Mapper接口
*
* @author zouju
* @date 2026-02-05
*/
public interface SysAlgoConfigMapper
{
/**
* 查询动态规则配置
*
* @param id 动态规则配置主键
* @return 动态规则配置
*/
public SysAlgoConfig selectSysAlgoConfigById(Long id);
/**
* 查询动态规则配置列表
*
* @param sysAlgoConfig 动态规则配置
* @return 动态规则配置集合
*/
public List<SysAlgoConfig> selectSysAlgoConfigList(SysAlgoConfig sysAlgoConfig);
/**
* 新增动态规则配置
*
* @param sysAlgoConfig 动态规则配置
* @return 结果
*/
public int insertSysAlgoConfig(SysAlgoConfig sysAlgoConfig);
/**
* 修改动态规则配置
*
* @param sysAlgoConfig 动态规则配置
* @return 结果
*/
public int updateSysAlgoConfig(SysAlgoConfig sysAlgoConfig);
/**
* 删除动态规则配置
*
* @param id 动态规则配置主键
* @return 结果
*/
public int deleteSysAlgoConfigById(Long id);
/**
* 批量删除动态规则配置
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSysAlgoConfigByIds(Long[] ids);
}

View File

@@ -0,0 +1,61 @@
package com.solution.algo.service;
import java.util.List;
import com.solution.algo.domain.SysAlgoConfig;
/**
* 动态规则配置Service接口
*
* @author zouju
* @date 2026-02-05
*/
public interface ISysAlgoConfigService
{
/**
* 查询动态规则配置
*
* @param id 动态规则配置主键
* @return 动态规则配置
*/
public SysAlgoConfig selectSysAlgoConfigById(Long id);
/**
* 查询动态规则配置列表
*
* @param sysAlgoConfig 动态规则配置
* @return 动态规则配置集合
*/
public List<SysAlgoConfig> selectSysAlgoConfigList(SysAlgoConfig sysAlgoConfig);
/**
* 新增动态规则配置
*
* @param sysAlgoConfig 动态规则配置
* @return 结果
*/
public int insertSysAlgoConfig(SysAlgoConfig sysAlgoConfig);
/**
* 修改动态规则配置
*
* @param sysAlgoConfig 动态规则配置
* @return 结果
*/
public int updateSysAlgoConfig(SysAlgoConfig sysAlgoConfig);
/**
* 批量删除动态规则配置
*
* @param ids 需要删除的动态规则配置主键集合
* @return 结果
*/
public int deleteSysAlgoConfigByIds(Long[] ids);
/**
* 删除动态规则配置信息
*
* @param id 动态规则配置主键
* @return 结果
*/
public int deleteSysAlgoConfigById(Long id);
}

View File

@@ -0,0 +1,93 @@
package com.solution.algo.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.solution.algo.mapper.SysAlgoConfigMapper;
import com.solution.algo.domain.SysAlgoConfig;
import com.solution.algo.service.ISysAlgoConfigService;
/**
* 动态规则配置Service业务层处理
*
* @author zouju
* @date 2026-02-05
*/
@Service
public class SysAlgoConfigServiceImpl implements ISysAlgoConfigService
{
@Autowired
private SysAlgoConfigMapper sysAlgoConfigMapper;
/**
* 查询动态规则配置
*
* @param id 动态规则配置主键
* @return 动态规则配置
*/
@Override
public SysAlgoConfig selectSysAlgoConfigById(Long id)
{
return sysAlgoConfigMapper.selectSysAlgoConfigById(id);
}
/**
* 查询动态规则配置列表
*
* @param sysAlgoConfig 动态规则配置
* @return 动态规则配置
*/
@Override
public List<SysAlgoConfig> selectSysAlgoConfigList(SysAlgoConfig sysAlgoConfig)
{
return sysAlgoConfigMapper.selectSysAlgoConfigList(sysAlgoConfig);
}
/**
* 新增动态规则配置
*
* @param sysAlgoConfig 动态规则配置
* @return 结果
*/
@Override
public int insertSysAlgoConfig(SysAlgoConfig sysAlgoConfig)
{
return sysAlgoConfigMapper.insertSysAlgoConfig(sysAlgoConfig);
}
/**
* 修改动态规则配置
*
* @param sysAlgoConfig 动态规则配置
* @return 结果
*/
@Override
public int updateSysAlgoConfig(SysAlgoConfig sysAlgoConfig)
{
return sysAlgoConfigMapper.updateSysAlgoConfig(sysAlgoConfig);
}
/**
* 批量删除动态规则配置
*
* @param ids 需要删除的动态规则配置主键
* @return 结果
*/
@Override
public int deleteSysAlgoConfigByIds(Long[] ids)
{
return sysAlgoConfigMapper.deleteSysAlgoConfigByIds(ids);
}
/**
* 删除动态规则配置信息
*
* @param id 动态规则配置主键
* @return 结果
*/
@Override
public int deleteSysAlgoConfigById(Long id)
{
return sysAlgoConfigMapper.deleteSysAlgoConfigById(id);
}
}

View File

@@ -0,0 +1,96 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.solution.algo.mapper.SysAlgoConfigMapper">
<resultMap type="SysAlgoConfig" id="SysAlgoConfigResult">
<result property="id" column="id" />
<result property="algoType" column="algo_type" />
<result property="algoName" column="algo_name" />
<result property="engineType" column="engine_type" />
<result property="inputSchema" column="input_schema" />
<result property="scriptContent" column="script_content" />
<result property="description" column="description" />
<result property="status" column="status" />
<result property="createdAt" column="created_at" />
<result property="updatedAt" column="updated_at" />
</resultMap>
<sql id="selectSysAlgoConfigVo">
select id, algo_type, algo_name, engine_type, input_schema, script_content, description, status, created_at, updated_at from sys_algo_config
</sql>
<select id="selectSysAlgoConfigList" parameterType="SysAlgoConfig" resultMap="SysAlgoConfigResult">
<include refid="selectSysAlgoConfigVo"/>
<where>
<if test="algoType != null and algoType != ''"> and algo_type = #{algoType}</if>
<if test="algoName != null and algoName != ''"> and algo_name like concat('%', #{algoName}, '%')</if>
<if test="engineType != null and engineType != ''"> and engine_type = #{engineType}</if>
<if test="inputSchema != null and inputSchema != ''"> and input_schema = #{inputSchema}</if>
<if test="scriptContent != null and scriptContent != ''"> and script_content = #{scriptContent}</if>
<if test="description != null and description != ''"> and description = #{description}</if>
<if test="status != null "> and status = #{status}</if>
<if test="createdAt != null "> and created_at = #{createdAt}</if>
<if test="updatedAt != null "> and updated_at = #{updatedAt}</if>
</where>
</select>
<select id="selectSysAlgoConfigById" parameterType="Long" resultMap="SysAlgoConfigResult">
<include refid="selectSysAlgoConfigVo"/>
where id = #{id}
</select>
<insert id="insertSysAlgoConfig" parameterType="SysAlgoConfig" useGeneratedKeys="true" keyProperty="id">
insert into sys_algo_config
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="algoType != null and algoType != ''">algo_type,</if>
<if test="algoName != null and algoName != ''">algo_name,</if>
<if test="engineType != null and engineType != ''">engine_type,</if>
<if test="inputSchema != null">input_schema,</if>
<if test="scriptContent != null">script_content,</if>
<if test="description != null">description,</if>
<if test="status != null">status,</if>
<if test="createdAt != null">created_at,</if>
<if test="updatedAt != null">updated_at,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="algoType != null and algoType != ''">#{algoType},</if>
<if test="algoName != null and algoName != ''">#{algoName},</if>
<if test="engineType != null and engineType != ''">#{engineType},</if>
<if test="inputSchema != null">#{inputSchema},</if>
<if test="scriptContent != null">#{scriptContent},</if>
<if test="description != null">#{description},</if>
<if test="status != null">#{status},</if>
<if test="createdAt != null">#{createdAt},</if>
<if test="updatedAt != null">#{updatedAt},</if>
</trim>
</insert>
<update id="updateSysAlgoConfig" parameterType="SysAlgoConfig">
update sys_algo_config
<trim prefix="SET" suffixOverrides=",">
<if test="algoType != null and algoType != ''">algo_type = #{algoType},</if>
<if test="algoName != null and algoName != ''">algo_name = #{algoName},</if>
<if test="engineType != null and engineType != ''">engine_type = #{engineType},</if>
<if test="inputSchema != null">input_schema = #{inputSchema},</if>
<if test="scriptContent != null">script_content = #{scriptContent},</if>
<if test="description != null">description = #{description},</if>
<if test="status != null">status = #{status},</if>
<if test="createdAt != null">created_at = #{createdAt},</if>
<if test="updatedAt != null">updated_at = #{updatedAt},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteSysAlgoConfigById" parameterType="Long">
delete from sys_algo_config where id = #{id}
</delete>
<delete id="deleteSysAlgoConfigByIds" parameterType="String">
delete from sys_algo_config where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>solution</artifactId>
<groupId>com.solution</groupId>
<version>3.9.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>solution-behaviour</artifactId>
<description>
behaviour模块
</description>
<dependencies>
<!-- 通用工具-->
<dependency>
<groupId>com.solution</groupId>
<artifactId>solution-common</artifactId>
</dependency>
</dependencies>
</project>

View File

@@ -0,0 +1,131 @@
package com.solution.system.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.solution.common.annotation.Excel;
import com.solution.common.core.domain.BaseEntity;
/**
* 行为树主对象 behaviortree
*
* @author ruoyi
* @date 2026-02-05
*/
public class Behaviortree extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 行为树ID (主键) */
private Long id;
/** 行为树名称 */
@Excel(name = "行为树名称")
private String name;
/** 行为树描述 */
@Excel(name = "行为树描述")
private String description;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date createdAt;
/** 最后更新时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "最后更新时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date updatedAt;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String englishName;
/** 储存行为树的节点关系图 */
@Excel(name = "储存行为树的节点关系图")
private String xmlContent;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setName(String name)
{
this.name = name;
}
public String getName()
{
return name;
}
public void setDescription(String description)
{
this.description = description;
}
public String getDescription()
{
return description;
}
public void setCreatedAt(Date createdAt)
{
this.createdAt = createdAt;
}
public Date getCreatedAt()
{
return createdAt;
}
public void setUpdatedAt(Date updatedAt)
{
this.updatedAt = updatedAt;
}
public Date getUpdatedAt()
{
return updatedAt;
}
public void setEnglishName(String englishName)
{
this.englishName = englishName;
}
public String getEnglishName()
{
return englishName;
}
public void setXmlContent(String xmlContent)
{
this.xmlContent = xmlContent;
}
public String getXmlContent()
{
return xmlContent;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("name", getName())
.append("description", getDescription())
.append("createdAt", getCreatedAt())
.append("updatedAt", getUpdatedAt())
.append("englishName", getEnglishName())
.append("xmlContent", getXmlContent())
.toString();
}
}

View File

@@ -0,0 +1,82 @@
package com.solution.system.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.solution.common.annotation.Excel;
import com.solution.common.core.domain.BaseEntity;
/**
* 节点连接对象 nodeconnection
*
* @author ruoyi
* @date 2026-02-05
*/
public class Nodeconnection extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 连接ID (主键) */
private Long id;
/** 父节点 (外键: TreeInstanceNode.id) */
@Excel(name = "父节点 (外键: TreeInstanceNode.id)")
private Long parentNodeId;
/** 子节点 (外键: TreeInstanceNode.id) */
@Excel(name = "子节点 (外键: TreeInstanceNode.id)")
private Long childNodeId;
/** 子节点在父节点下的执行顺序 (对于 Sequence/Selector 等很重要) */
@Excel(name = "子节点在父节点下的执行顺序 (对于 Sequence/Selector 等很重要)")
private Long orderIndex;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setParentNodeId(Long parentNodeId)
{
this.parentNodeId = parentNodeId;
}
public Long getParentNodeId()
{
return parentNodeId;
}
public void setChildNodeId(Long childNodeId)
{
this.childNodeId = childNodeId;
}
public Long getChildNodeId()
{
return childNodeId;
}
public void setOrderIndex(Long orderIndex)
{
this.orderIndex = orderIndex;
}
public Long getOrderIndex()
{
return orderIndex;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("parentNodeId", getParentNodeId())
.append("childNodeId", getChildNodeId())
.append("orderIndex", getOrderIndex())
.toString();
}
}

View File

@@ -0,0 +1,82 @@
package com.solution.system.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.solution.common.annotation.Excel;
import com.solution.common.core.domain.BaseEntity;
/**
* 节点参数对象 nodeparameter
*
* @author ruoyi
* @date 2026-02-05
*/
public class Nodeparameter extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 节点参数ID (主键) */
private Long id;
/** 关联到哪个节点实例 (外键: TreeInstanceNode.id) */
@Excel(name = "关联到哪个节点实例 (外键: TreeInstanceNode.id)")
private Long nodeInstanceId;
/** 关联到哪个参数定义 (外键: TemplateParameterDef.id) */
@Excel(name = "关联到哪个参数定义 (外键: TemplateParameterDef.id)")
private Long paramDefId;
/** 节点实例设置的具体参数值 (覆盖模板默认值) */
@Excel(name = "节点实例设置的具体参数值 (覆盖模板默认值)")
private String value;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setNodeInstanceId(Long nodeInstanceId)
{
this.nodeInstanceId = nodeInstanceId;
}
public Long getNodeInstanceId()
{
return nodeInstanceId;
}
public void setParamDefId(Long paramDefId)
{
this.paramDefId = paramDefId;
}
public Long getParamDefId()
{
return paramDefId;
}
public void setValue(String value)
{
this.value = value;
}
public String getValue()
{
return value;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("nodeInstanceId", getNodeInstanceId())
.append("paramDefId", getParamDefId())
.append("value", getValue())
.toString();
}
}

View File

@@ -0,0 +1,127 @@
package com.solution.system.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.solution.common.annotation.Excel;
import com.solution.common.core.domain.BaseEntity;
/**
* 节点模板对象 nodetemplate
*
* @author ruoyi
* @date 2026-02-05
*/
public class Nodetemplate extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 节点模板ID (主键) */
private Long id;
/** 节点类型: "Selector", "Sequence", "Action", "Condition", "Decorator" 等 */
@Excel(name = "节点类型: Selector, Sequence, Action, Condition, Decorator等")
private String type;
/** 模板名称, 例如: "MoveToTarget", "IsTargetVisible" */
@Excel(name = "模板名称, 例如: MoveToTarget, IsTargetVisible")
private String name;
/** 对应的逻辑执行代码/脚本/函数名 */
@Excel(name = "对应的逻辑执行代码/脚本/函数名")
private String logicHandler;
/** 模板描述 */
@Excel(name = "模板描述")
private String description;
/** afsim 中转换的节点名 */
@Excel(name = "afsim 中转换的节点名")
private String englishName;
/** 模版类型节点模版或者条件判断例如“node”precondition“ */
@Excel(name = "模版类型节点模版或者条件判断例如“node”precondition“")
private String templeteType;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setType(String type)
{
this.type = type;
}
public String getType()
{
return type;
}
public void setName(String name)
{
this.name = name;
}
public String getName()
{
return name;
}
public void setLogicHandler(String logicHandler)
{
this.logicHandler = logicHandler;
}
public String getLogicHandler()
{
return logicHandler;
}
public void setDescription(String description)
{
this.description = description;
}
public String getDescription()
{
return description;
}
public void setEnglishName(String englishName)
{
this.englishName = englishName;
}
public String getEnglishName()
{
return englishName;
}
public void setTempleteType(String templeteType)
{
this.templeteType = templeteType;
}
public String getTempleteType()
{
return templeteType;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("type", getType())
.append("name", getName())
.append("logicHandler", getLogicHandler())
.append("description", getDescription())
.append("englishName", getEnglishName())
.append("templeteType", getTempleteType())
.toString();
}
}

View File

@@ -0,0 +1,127 @@
package com.solution.system.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.solution.common.annotation.Excel;
import com.solution.common.core.domain.BaseEntity;
/**
* 模板参数定义对象 templateparameterdef
*
* @author ruoyi
* @date 2026-02-05
*/
public class Templateparameterdef extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 参数定义ID (主键) */
private Long id;
/** 关联到哪个节点模板 (外键: NodeTemplate.id) */
@Excel(name = "关联到哪个节点模板 (外键: NodeTemplate.id)")
private Long templateId;
/** 参数键名, 例如: "target_name", "speed" */
@Excel(name = "参数键名, 例如: target_name, speed")
private String paramKey;
/** 参数数据类型, 例如: "float", "int", "string", "bool" */
@Excel(name = "参数数据类型, 例如: float, int, string, bool")
private String dataType;
/** 默认值 */
@Excel(name = "默认值")
private String defaultValue;
/** 参数描述 */
@Excel(name = "参数描述")
private String description;
/** 判断参数模版是节点的参数模版还是条件的参数模版 */
@Excel(name = "判断参数模版是节点的参数模版还是条件的参数模版")
private String templateType;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setTemplateId(Long templateId)
{
this.templateId = templateId;
}
public Long getTemplateId()
{
return templateId;
}
public void setParamKey(String paramKey)
{
this.paramKey = paramKey;
}
public String getParamKey()
{
return paramKey;
}
public void setDataType(String dataType)
{
this.dataType = dataType;
}
public String getDataType()
{
return dataType;
}
public void setDefaultValue(String defaultValue)
{
this.defaultValue = defaultValue;
}
public String getDefaultValue()
{
return defaultValue;
}
public void setDescription(String description)
{
this.description = description;
}
public String getDescription()
{
return description;
}
public void setTemplateType(String templateType)
{
this.templateType = templateType;
}
public String getTemplateType()
{
return templateType;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("templateId", getTemplateId())
.append("paramKey", getParamKey())
.append("dataType", getDataType())
.append("defaultValue", getDefaultValue())
.append("description", getDescription())
.append("templateType", getTemplateType())
.toString();
}
}

View File

@@ -0,0 +1,140 @@
package com.solution.system.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.solution.common.annotation.Excel;
import com.solution.common.core.domain.BaseEntity;
/**
* 行为树实例节点对象 treenodeinstance
*
* @author ruoyi
* @date 2026-02-05
*/
public class Treenodeinstance extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 节点实例ID (主键) */
private Long id;
/** 属于哪棵行为树 (外键: BehaviorTree.id) */
@Excel(name = "属于哪棵行为树 (外键: BehaviorTree.id)")
private Long treeId;
/** 引用哪个节点模板 (外键: NodeTemplate.id) */
@Excel(name = "引用哪个节点模板 (外键: NodeTemplate.id)")
private Long templateId;
/** 节点的显示名称 (可能与模板名称不同, 用于区分实例) */
@Excel(name = "节点的显示名称 (可能与模板名称不同, 用于区分实例)")
private String instanceName;
/** 判断当前节点是否为根节点,默认情况下是非根节点 */
@Excel(name = "判断当前节点是否为根节点,默认情况下是非根节点")
private Long isRoot;
/** 节点执行的判断条件对应的模版id */
@Excel(name = "节点执行的判断条件对应的模版id")
private Long preconditionTempleteId;
@Excel(name = "节点介绍")
private String desciption;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String uuid;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setTreeId(Long treeId)
{
this.treeId = treeId;
}
public Long getTreeId()
{
return treeId;
}
public void setTemplateId(Long templateId)
{
this.templateId = templateId;
}
public Long getTemplateId()
{
return templateId;
}
public void setInstanceName(String instanceName)
{
this.instanceName = instanceName;
}
public String getInstanceName()
{
return instanceName;
}
public void setIsRoot(Long isRoot)
{
this.isRoot = isRoot;
}
public Long getIsRoot()
{
return isRoot;
}
public void setPreconditionTempleteId(Long preconditionTempleteId)
{
this.preconditionTempleteId = preconditionTempleteId;
}
public Long getPreconditionTempleteId()
{
return preconditionTempleteId;
}
public void setUuid(String uuid)
{
this.uuid = uuid;
}
public String getUuid()
{
return uuid;
}
public String getDesciption() {
return desciption;
}
public void setDesciption(String desciption) {
this.desciption = desciption;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("treeId", getTreeId())
.append("templateId", getTemplateId())
.append("instanceName", getInstanceName())
.append("isRoot", getIsRoot())
.append("preconditionTempleteId", getPreconditionTempleteId())
.append("uuid", getUuid())
.append("desciption", getDesciption())
.toString();
}
}

View File

@@ -0,0 +1,61 @@
package com.solution.system.mapper;
import java.util.List;
import com.solution.system.domain.Behaviortree;
/**
* 行为树主Mapper接口
*
* @author ruoyi
* @date 2026-02-05
*/
public interface BehaviortreeMapper
{
/**
* 查询行为树主
*
* @param id 行为树主主键
* @return 行为树主
*/
public Behaviortree selectBehaviortreeById(Long id);
/**
* 查询行为树主列表
*
* @param behaviortree 行为树主
* @return 行为树主集合
*/
public List<Behaviortree> selectBehaviortreeList(Behaviortree behaviortree);
/**
* 新增行为树主
*
* @param behaviortree 行为树主
* @return 结果
*/
public int insertBehaviortree(Behaviortree behaviortree);
/**
* 修改行为树主
*
* @param behaviortree 行为树主
* @return 结果
*/
public int updateBehaviortree(Behaviortree behaviortree);
/**
* 删除行为树主
*
* @param id 行为树主主键
* @return 结果
*/
public int deleteBehaviortreeById(Long id);
/**
* 批量删除行为树主
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteBehaviortreeByIds(Long[] ids);
}

View File

@@ -0,0 +1,61 @@
package com.solution.system.mapper;
import java.util.List;
import com.solution.system.domain.Nodeconnection;
/**
* 节点连接Mapper接口
*
* @author ruoyi
* @date 2026-02-05
*/
public interface NodeconnectionMapper
{
/**
* 查询节点连接
*
* @param id 节点连接主键
* @return 节点连接
*/
public Nodeconnection selectNodeconnectionById(Long id);
/**
* 查询节点连接列表
*
* @param nodeconnection 节点连接
* @return 节点连接集合
*/
public List<Nodeconnection> selectNodeconnectionList(Nodeconnection nodeconnection);
/**
* 新增节点连接
*
* @param nodeconnection 节点连接
* @return 结果
*/
public int insertNodeconnection(Nodeconnection nodeconnection);
/**
* 修改节点连接
*
* @param nodeconnection 节点连接
* @return 结果
*/
public int updateNodeconnection(Nodeconnection nodeconnection);
/**
* 删除节点连接
*
* @param id 节点连接主键
* @return 结果
*/
public int deleteNodeconnectionById(Long id);
/**
* 批量删除节点连接
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteNodeconnectionByIds(Long[] ids);
}

View File

@@ -0,0 +1,61 @@
package com.solution.system.mapper;
import java.util.List;
import com.solution.system.domain.Nodeparameter;
/**
* 节点参数Mapper接口
*
* @author ruoyi
* @date 2026-02-05
*/
public interface NodeparameterMapper
{
/**
* 查询节点参数
*
* @param id 节点参数主键
* @return 节点参数
*/
public Nodeparameter selectNodeparameterById(Long id);
/**
* 查询节点参数列表
*
* @param nodeparameter 节点参数
* @return 节点参数集合
*/
public List<Nodeparameter> selectNodeparameterList(Nodeparameter nodeparameter);
/**
* 新增节点参数
*
* @param nodeparameter 节点参数
* @return 结果
*/
public int insertNodeparameter(Nodeparameter nodeparameter);
/**
* 修改节点参数
*
* @param nodeparameter 节点参数
* @return 结果
*/
public int updateNodeparameter(Nodeparameter nodeparameter);
/**
* 删除节点参数
*
* @param id 节点参数主键
* @return 结果
*/
public int deleteNodeparameterById(Long id);
/**
* 批量删除节点参数
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteNodeparameterByIds(Long[] ids);
}

View File

@@ -0,0 +1,61 @@
package com.solution.system.mapper;
import java.util.List;
import com.solution.system.domain.Nodetemplate;
/**
* 节点模板Mapper接口
*
* @author ruoyi
* @date 2026-02-05
*/
public interface NodetemplateMapper
{
/**
* 查询节点模板
*
* @param id 节点模板主键
* @return 节点模板
*/
public Nodetemplate selectNodetemplateById(Long id);
/**
* 查询节点模板列表
*
* @param nodetemplate 节点模板
* @return 节点模板集合
*/
public List<Nodetemplate> selectNodetemplateList(Nodetemplate nodetemplate);
/**
* 新增节点模板
*
* @param nodetemplate 节点模板
* @return 结果
*/
public int insertNodetemplate(Nodetemplate nodetemplate);
/**
* 修改节点模板
*
* @param nodetemplate 节点模板
* @return 结果
*/
public int updateNodetemplate(Nodetemplate nodetemplate);
/**
* 删除节点模板
*
* @param id 节点模板主键
* @return 结果
*/
public int deleteNodetemplateById(Long id);
/**
* 批量删除节点模板
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteNodetemplateByIds(Long[] ids);
}

View File

@@ -0,0 +1,61 @@
package com.solution.system.mapper;
import java.util.List;
import com.solution.system.domain.Templateparameterdef;
/**
* 模板参数定义Mapper接口
*
* @author ruoyi
* @date 2026-02-05
*/
public interface TemplateparameterdefMapper
{
/**
* 查询模板参数定义
*
* @param id 模板参数定义主键
* @return 模板参数定义
*/
public Templateparameterdef selectTemplateparameterdefById(Long id);
/**
* 查询模板参数定义列表
*
* @param templateparameterdef 模板参数定义
* @return 模板参数定义集合
*/
public List<Templateparameterdef> selectTemplateparameterdefList(Templateparameterdef templateparameterdef);
/**
* 新增模板参数定义
*
* @param templateparameterdef 模板参数定义
* @return 结果
*/
public int insertTemplateparameterdef(Templateparameterdef templateparameterdef);
/**
* 修改模板参数定义
*
* @param templateparameterdef 模板参数定义
* @return 结果
*/
public int updateTemplateparameterdef(Templateparameterdef templateparameterdef);
/**
* 删除模板参数定义
*
* @param id 模板参数定义主键
* @return 结果
*/
public int deleteTemplateparameterdefById(Long id);
/**
* 批量删除模板参数定义
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteTemplateparameterdefByIds(Long[] ids);
}

View File

@@ -0,0 +1,61 @@
package com.solution.system.mapper;
import java.util.List;
import com.solution.system.domain.Treenodeinstance;
/**
* 行为树实例节点Mapper接口
*
* @author ruoyi
* @date 2026-02-05
*/
public interface TreenodeinstanceMapper
{
/**
* 查询行为树实例节点
*
* @param id 行为树实例节点主键
* @return 行为树实例节点
*/
public Treenodeinstance selectTreenodeinstanceById(Long id);
/**
* 查询行为树实例节点列表
*
* @param treenodeinstance 行为树实例节点
* @return 行为树实例节点集合
*/
public List<Treenodeinstance> selectTreenodeinstanceList(Treenodeinstance treenodeinstance);
/**
* 新增行为树实例节点
*
* @param treenodeinstance 行为树实例节点
* @return 结果
*/
public int insertTreenodeinstance(Treenodeinstance treenodeinstance);
/**
* 修改行为树实例节点
*
* @param treenodeinstance 行为树实例节点
* @return 结果
*/
public int updateTreenodeinstance(Treenodeinstance treenodeinstance);
/**
* 删除行为树实例节点
*
* @param id 行为树实例节点主键
* @return 结果
*/
public int deleteTreenodeinstanceById(Long id);
/**
* 批量删除行为树实例节点
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteTreenodeinstanceByIds(Long[] ids);
}

View File

@@ -0,0 +1,61 @@
package com.solution.system.service;
import java.util.List;
import com.solution.system.domain.Behaviortree;
/**
* 行为树主Service接口
*
* @author ruoyi
* @date 2026-02-05
*/
public interface IBehaviortreeService
{
/**
* 查询行为树主
*
* @param id 行为树主主键
* @return 行为树主
*/
public Behaviortree selectBehaviortreeById(Long id);
/**
* 查询行为树主列表
*
* @param behaviortree 行为树主
* @return 行为树主集合
*/
public List<Behaviortree> selectBehaviortreeList(Behaviortree behaviortree);
/**
* 新增行为树主
*
* @param behaviortree 行为树主
* @return 结果
*/
public int insertBehaviortree(Behaviortree behaviortree);
/**
* 修改行为树主
*
* @param behaviortree 行为树主
* @return 结果
*/
public int updateBehaviortree(Behaviortree behaviortree);
/**
* 批量删除行为树主
*
* @param ids 需要删除的行为树主主键集合
* @return 结果
*/
public int deleteBehaviortreeByIds(Long[] ids);
/**
* 删除行为树主信息
*
* @param id 行为树主主键
* @return 结果
*/
public int deleteBehaviortreeById(Long id);
}

View File

@@ -0,0 +1,61 @@
package com.solution.system.service;
import java.util.List;
import com.solution.system.domain.Nodeconnection;
/**
* 节点连接Service接口
*
* @author ruoyi
* @date 2026-02-05
*/
public interface INodeconnectionService
{
/**
* 查询节点连接
*
* @param id 节点连接主键
* @return 节点连接
*/
public Nodeconnection selectNodeconnectionById(Long id);
/**
* 查询节点连接列表
*
* @param nodeconnection 节点连接
* @return 节点连接集合
*/
public List<Nodeconnection> selectNodeconnectionList(Nodeconnection nodeconnection);
/**
* 新增节点连接
*
* @param nodeconnection 节点连接
* @return 结果
*/
public int insertNodeconnection(Nodeconnection nodeconnection);
/**
* 修改节点连接
*
* @param nodeconnection 节点连接
* @return 结果
*/
public int updateNodeconnection(Nodeconnection nodeconnection);
/**
* 批量删除节点连接
*
* @param ids 需要删除的节点连接主键集合
* @return 结果
*/
public int deleteNodeconnectionByIds(Long[] ids);
/**
* 删除节点连接信息
*
* @param id 节点连接主键
* @return 结果
*/
public int deleteNodeconnectionById(Long id);
}

View File

@@ -0,0 +1,61 @@
package com.solution.system.service;
import java.util.List;
import com.solution.system.domain.Nodeparameter;
/**
* 节点参数Service接口
*
* @author ruoyi
* @date 2026-02-05
*/
public interface INodeparameterService
{
/**
* 查询节点参数
*
* @param id 节点参数主键
* @return 节点参数
*/
public Nodeparameter selectNodeparameterById(Long id);
/**
* 查询节点参数列表
*
* @param nodeparameter 节点参数
* @return 节点参数集合
*/
public List<Nodeparameter> selectNodeparameterList(Nodeparameter nodeparameter);
/**
* 新增节点参数
*
* @param nodeparameter 节点参数
* @return 结果
*/
public int insertNodeparameter(Nodeparameter nodeparameter);
/**
* 修改节点参数
*
* @param nodeparameter 节点参数
* @return 结果
*/
public int updateNodeparameter(Nodeparameter nodeparameter);
/**
* 批量删除节点参数
*
* @param ids 需要删除的节点参数主键集合
* @return 结果
*/
public int deleteNodeparameterByIds(Long[] ids);
/**
* 删除节点参数信息
*
* @param id 节点参数主键
* @return 结果
*/
public int deleteNodeparameterById(Long id);
}

View File

@@ -0,0 +1,61 @@
package com.solution.system.service;
import java.util.List;
import com.solution.system.domain.Nodetemplate;
/**
* 节点模板Service接口
*
* @author ruoyi
* @date 2026-02-05
*/
public interface INodetemplateService
{
/**
* 查询节点模板
*
* @param id 节点模板主键
* @return 节点模板
*/
public Nodetemplate selectNodetemplateById(Long id);
/**
* 查询节点模板列表
*
* @param nodetemplate 节点模板
* @return 节点模板集合
*/
public List<Nodetemplate> selectNodetemplateList(Nodetemplate nodetemplate);
/**
* 新增节点模板
*
* @param nodetemplate 节点模板
* @return 结果
*/
public int insertNodetemplate(Nodetemplate nodetemplate);
/**
* 修改节点模板
*
* @param nodetemplate 节点模板
* @return 结果
*/
public int updateNodetemplate(Nodetemplate nodetemplate);
/**
* 批量删除节点模板
*
* @param ids 需要删除的节点模板主键集合
* @return 结果
*/
public int deleteNodetemplateByIds(Long[] ids);
/**
* 删除节点模板信息
*
* @param id 节点模板主键
* @return 结果
*/
public int deleteNodetemplateById(Long id);
}

View File

@@ -0,0 +1,61 @@
package com.solution.system.service;
import java.util.List;
import com.solution.system.domain.Templateparameterdef;
/**
* 模板参数定义Service接口
*
* @author ruoyi
* @date 2026-02-05
*/
public interface ITemplateparameterdefService
{
/**
* 查询模板参数定义
*
* @param id 模板参数定义主键
* @return 模板参数定义
*/
public Templateparameterdef selectTemplateparameterdefById(Long id);
/**
* 查询模板参数定义列表
*
* @param templateparameterdef 模板参数定义
* @return 模板参数定义集合
*/
public List<Templateparameterdef> selectTemplateparameterdefList(Templateparameterdef templateparameterdef);
/**
* 新增模板参数定义
*
* @param templateparameterdef 模板参数定义
* @return 结果
*/
public int insertTemplateparameterdef(Templateparameterdef templateparameterdef);
/**
* 修改模板参数定义
*
* @param templateparameterdef 模板参数定义
* @return 结果
*/
public int updateTemplateparameterdef(Templateparameterdef templateparameterdef);
/**
* 批量删除模板参数定义
*
* @param ids 需要删除的模板参数定义主键集合
* @return 结果
*/
public int deleteTemplateparameterdefByIds(Long[] ids);
/**
* 删除模板参数定义信息
*
* @param id 模板参数定义主键
* @return 结果
*/
public int deleteTemplateparameterdefById(Long id);
}

View File

@@ -0,0 +1,61 @@
package com.solution.system.service;
import java.util.List;
import com.solution.system.domain.Treenodeinstance;
/**
* 行为树实例节点Service接口
*
* @author ruoyi
* @date 2026-02-05
*/
public interface ITreenodeinstanceService
{
/**
* 查询行为树实例节点
*
* @param id 行为树实例节点主键
* @return 行为树实例节点
*/
public Treenodeinstance selectTreenodeinstanceById(Long id);
/**
* 查询行为树实例节点列表
*
* @param treenodeinstance 行为树实例节点
* @return 行为树实例节点集合
*/
public List<Treenodeinstance> selectTreenodeinstanceList(Treenodeinstance treenodeinstance);
/**
* 新增行为树实例节点
*
* @param treenodeinstance 行为树实例节点
* @return 结果
*/
public int insertTreenodeinstance(Treenodeinstance treenodeinstance);
/**
* 修改行为树实例节点
*
* @param treenodeinstance 行为树实例节点
* @return 结果
*/
public int updateTreenodeinstance(Treenodeinstance treenodeinstance);
/**
* 批量删除行为树实例节点
*
* @param ids 需要删除的行为树实例节点主键集合
* @return 结果
*/
public int deleteTreenodeinstanceByIds(Long[] ids);
/**
* 删除行为树实例节点信息
*
* @param id 行为树实例节点主键
* @return 结果
*/
public int deleteTreenodeinstanceById(Long id);
}

View File

@@ -0,0 +1,93 @@
package com.solution.system.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.solution.system.mapper.BehaviortreeMapper;
import com.solution.system.domain.Behaviortree;
import com.solution.system.service.IBehaviortreeService;
/**
* 行为树主Service业务层处理
*
* @author ruoyi
* @date 2026-02-05
*/
@Service
public class BehaviortreeServiceImpl implements IBehaviortreeService
{
@Autowired
private BehaviortreeMapper behaviortreeMapper;
/**
* 查询行为树主
*
* @param id 行为树主主键
* @return 行为树主
*/
@Override
public Behaviortree selectBehaviortreeById(Long id)
{
return behaviortreeMapper.selectBehaviortreeById(id);
}
/**
* 查询行为树主列表
*
* @param behaviortree 行为树主
* @return 行为树主
*/
@Override
public List<Behaviortree> selectBehaviortreeList(Behaviortree behaviortree)
{
return behaviortreeMapper.selectBehaviortreeList(behaviortree);
}
/**
* 新增行为树主
*
* @param behaviortree 行为树主
* @return 结果
*/
@Override
public int insertBehaviortree(Behaviortree behaviortree)
{
return behaviortreeMapper.insertBehaviortree(behaviortree);
}
/**
* 修改行为树主
*
* @param behaviortree 行为树主
* @return 结果
*/
@Override
public int updateBehaviortree(Behaviortree behaviortree)
{
return behaviortreeMapper.updateBehaviortree(behaviortree);
}
/**
* 批量删除行为树主
*
* @param ids 需要删除的行为树主主键
* @return 结果
*/
@Override
public int deleteBehaviortreeByIds(Long[] ids)
{
return behaviortreeMapper.deleteBehaviortreeByIds(ids);
}
/**
* 删除行为树主信息
*
* @param id 行为树主主键
* @return 结果
*/
@Override
public int deleteBehaviortreeById(Long id)
{
return behaviortreeMapper.deleteBehaviortreeById(id);
}
}

View File

@@ -0,0 +1,93 @@
package com.solution.system.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.solution.system.mapper.NodeconnectionMapper;
import com.solution.system.domain.Nodeconnection;
import com.solution.system.service.INodeconnectionService;
/**
* 节点连接Service业务层处理
*
* @author ruoyi
* @date 2026-02-05
*/
@Service
public class NodeconnectionServiceImpl implements INodeconnectionService
{
@Autowired
private NodeconnectionMapper nodeconnectionMapper;
/**
* 查询节点连接
*
* @param id 节点连接主键
* @return 节点连接
*/
@Override
public Nodeconnection selectNodeconnectionById(Long id)
{
return nodeconnectionMapper.selectNodeconnectionById(id);
}
/**
* 查询节点连接列表
*
* @param nodeconnection 节点连接
* @return 节点连接
*/
@Override
public List<Nodeconnection> selectNodeconnectionList(Nodeconnection nodeconnection)
{
return nodeconnectionMapper.selectNodeconnectionList(nodeconnection);
}
/**
* 新增节点连接
*
* @param nodeconnection 节点连接
* @return 结果
*/
@Override
public int insertNodeconnection(Nodeconnection nodeconnection)
{
return nodeconnectionMapper.insertNodeconnection(nodeconnection);
}
/**
* 修改节点连接
*
* @param nodeconnection 节点连接
* @return 结果
*/
@Override
public int updateNodeconnection(Nodeconnection nodeconnection)
{
return nodeconnectionMapper.updateNodeconnection(nodeconnection);
}
/**
* 批量删除节点连接
*
* @param ids 需要删除的节点连接主键
* @return 结果
*/
@Override
public int deleteNodeconnectionByIds(Long[] ids)
{
return nodeconnectionMapper.deleteNodeconnectionByIds(ids);
}
/**
* 删除节点连接信息
*
* @param id 节点连接主键
* @return 结果
*/
@Override
public int deleteNodeconnectionById(Long id)
{
return nodeconnectionMapper.deleteNodeconnectionById(id);
}
}

View File

@@ -0,0 +1,93 @@
package com.solution.system.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.solution.system.mapper.NodeparameterMapper;
import com.solution.system.domain.Nodeparameter;
import com.solution.system.service.INodeparameterService;
/**
* 节点参数Service业务层处理
*
* @author ruoyi
* @date 2026-02-05
*/
@Service
public class NodeparameterServiceImpl implements INodeparameterService
{
@Autowired
private NodeparameterMapper nodeparameterMapper;
/**
* 查询节点参数
*
* @param id 节点参数主键
* @return 节点参数
*/
@Override
public Nodeparameter selectNodeparameterById(Long id)
{
return nodeparameterMapper.selectNodeparameterById(id);
}
/**
* 查询节点参数列表
*
* @param nodeparameter 节点参数
* @return 节点参数
*/
@Override
public List<Nodeparameter> selectNodeparameterList(Nodeparameter nodeparameter)
{
return nodeparameterMapper.selectNodeparameterList(nodeparameter);
}
/**
* 新增节点参数
*
* @param nodeparameter 节点参数
* @return 结果
*/
@Override
public int insertNodeparameter(Nodeparameter nodeparameter)
{
return nodeparameterMapper.insertNodeparameter(nodeparameter);
}
/**
* 修改节点参数
*
* @param nodeparameter 节点参数
* @return 结果
*/
@Override
public int updateNodeparameter(Nodeparameter nodeparameter)
{
return nodeparameterMapper.updateNodeparameter(nodeparameter);
}
/**
* 批量删除节点参数
*
* @param ids 需要删除的节点参数主键
* @return 结果
*/
@Override
public int deleteNodeparameterByIds(Long[] ids)
{
return nodeparameterMapper.deleteNodeparameterByIds(ids);
}
/**
* 删除节点参数信息
*
* @param id 节点参数主键
* @return 结果
*/
@Override
public int deleteNodeparameterById(Long id)
{
return nodeparameterMapper.deleteNodeparameterById(id);
}
}

View File

@@ -0,0 +1,93 @@
package com.solution.system.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.solution.system.mapper.NodetemplateMapper;
import com.solution.system.domain.Nodetemplate;
import com.solution.system.service.INodetemplateService;
/**
* 节点模板Service业务层处理
*
* @author ruoyi
* @date 2026-02-05
*/
@Service
public class NodetemplateServiceImpl implements INodetemplateService
{
@Autowired
private NodetemplateMapper nodetemplateMapper;
/**
* 查询节点模板
*
* @param id 节点模板主键
* @return 节点模板
*/
@Override
public Nodetemplate selectNodetemplateById(Long id)
{
return nodetemplateMapper.selectNodetemplateById(id);
}
/**
* 查询节点模板列表
*
* @param nodetemplate 节点模板
* @return 节点模板
*/
@Override
public List<Nodetemplate> selectNodetemplateList(Nodetemplate nodetemplate)
{
return nodetemplateMapper.selectNodetemplateList(nodetemplate);
}
/**
* 新增节点模板
*
* @param nodetemplate 节点模板
* @return 结果
*/
@Override
public int insertNodetemplate(Nodetemplate nodetemplate)
{
return nodetemplateMapper.insertNodetemplate(nodetemplate);
}
/**
* 修改节点模板
*
* @param nodetemplate 节点模板
* @return 结果
*/
@Override
public int updateNodetemplate(Nodetemplate nodetemplate)
{
return nodetemplateMapper.updateNodetemplate(nodetemplate);
}
/**
* 批量删除节点模板
*
* @param ids 需要删除的节点模板主键
* @return 结果
*/
@Override
public int deleteNodetemplateByIds(Long[] ids)
{
return nodetemplateMapper.deleteNodetemplateByIds(ids);
}
/**
* 删除节点模板信息
*
* @param id 节点模板主键
* @return 结果
*/
@Override
public int deleteNodetemplateById(Long id)
{
return nodetemplateMapper.deleteNodetemplateById(id);
}
}

View File

@@ -0,0 +1,93 @@
package com.solution.system.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.solution.system.mapper.TemplateparameterdefMapper;
import com.solution.system.domain.Templateparameterdef;
import com.solution.system.service.ITemplateparameterdefService;
/**
* 模板参数定义Service业务层处理
*
* @author ruoyi
* @date 2026-02-05
*/
@Service
public class TemplateparameterdefServiceImpl implements ITemplateparameterdefService
{
@Autowired
private TemplateparameterdefMapper templateparameterdefMapper;
/**
* 查询模板参数定义
*
* @param id 模板参数定义主键
* @return 模板参数定义
*/
@Override
public Templateparameterdef selectTemplateparameterdefById(Long id)
{
return templateparameterdefMapper.selectTemplateparameterdefById(id);
}
/**
* 查询模板参数定义列表
*
* @param templateparameterdef 模板参数定义
* @return 模板参数定义
*/
@Override
public List<Templateparameterdef> selectTemplateparameterdefList(Templateparameterdef templateparameterdef)
{
return templateparameterdefMapper.selectTemplateparameterdefList(templateparameterdef);
}
/**
* 新增模板参数定义
*
* @param templateparameterdef 模板参数定义
* @return 结果
*/
@Override
public int insertTemplateparameterdef(Templateparameterdef templateparameterdef)
{
return templateparameterdefMapper.insertTemplateparameterdef(templateparameterdef);
}
/**
* 修改模板参数定义
*
* @param templateparameterdef 模板参数定义
* @return 结果
*/
@Override
public int updateTemplateparameterdef(Templateparameterdef templateparameterdef)
{
return templateparameterdefMapper.updateTemplateparameterdef(templateparameterdef);
}
/**
* 批量删除模板参数定义
*
* @param ids 需要删除的模板参数定义主键
* @return 结果
*/
@Override
public int deleteTemplateparameterdefByIds(Long[] ids)
{
return templateparameterdefMapper.deleteTemplateparameterdefByIds(ids);
}
/**
* 删除模板参数定义信息
*
* @param id 模板参数定义主键
* @return 结果
*/
@Override
public int deleteTemplateparameterdefById(Long id)
{
return templateparameterdefMapper.deleteTemplateparameterdefById(id);
}
}

View File

@@ -0,0 +1,93 @@
package com.solution.system.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.solution.system.mapper.TreenodeinstanceMapper;
import com.solution.system.domain.Treenodeinstance;
import com.solution.system.service.ITreenodeinstanceService;
/**
* 行为树实例节点Service业务层处理
*
* @author ruoyi
* @date 2026-02-05
*/
@Service
public class TreenodeinstanceServiceImpl implements ITreenodeinstanceService
{
@Autowired
private TreenodeinstanceMapper treenodeinstanceMapper;
/**
* 查询行为树实例节点
*
* @param id 行为树实例节点主键
* @return 行为树实例节点
*/
@Override
public Treenodeinstance selectTreenodeinstanceById(Long id)
{
return treenodeinstanceMapper.selectTreenodeinstanceById(id);
}
/**
* 查询行为树实例节点列表
*
* @param treenodeinstance 行为树实例节点
* @return 行为树实例节点
*/
@Override
public List<Treenodeinstance> selectTreenodeinstanceList(Treenodeinstance treenodeinstance)
{
return treenodeinstanceMapper.selectTreenodeinstanceList(treenodeinstance);
}
/**
* 新增行为树实例节点
*
* @param treenodeinstance 行为树实例节点
* @return 结果
*/
@Override
public int insertTreenodeinstance(Treenodeinstance treenodeinstance)
{
return treenodeinstanceMapper.insertTreenodeinstance(treenodeinstance);
}
/**
* 修改行为树实例节点
*
* @param treenodeinstance 行为树实例节点
* @return 结果
*/
@Override
public int updateTreenodeinstance(Treenodeinstance treenodeinstance)
{
return treenodeinstanceMapper.updateTreenodeinstance(treenodeinstance);
}
/**
* 批量删除行为树实例节点
*
* @param ids 需要删除的行为树实例节点主键
* @return 结果
*/
@Override
public int deleteTreenodeinstanceByIds(Long[] ids)
{
return treenodeinstanceMapper.deleteTreenodeinstanceByIds(ids);
}
/**
* 删除行为树实例节点信息
*
* @param id 行为树实例节点主键
* @return 结果
*/
@Override
public int deleteTreenodeinstanceById(Long id)
{
return treenodeinstanceMapper.deleteTreenodeinstanceById(id);
}
}

View File

@@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.solution.system.mapper.BehaviortreeMapper">
<resultMap type="Behaviortree" id="BehaviortreeResult">
<result property="id" column="id" />
<result property="name" column="name" />
<result property="description" column="description" />
<result property="createdAt" column="created_at" />
<result property="updatedAt" column="updated_at" />
<result property="englishName" column="english_name" />
<result property="xmlContent" column="xml_content" />
</resultMap>
<sql id="selectBehaviortreeVo">
select id, name, description, created_at, updated_at, english_name, xml_content from behaviortree
</sql>
<select id="selectBehaviortreeList" parameterType="Behaviortree" resultMap="BehaviortreeResult">
<include refid="selectBehaviortreeVo"/>
<where>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="description != null and description != ''"> and description = #{description}</if>
<if test="createdAt != null "> and created_at = #{createdAt}</if>
<if test="updatedAt != null "> and updated_at = #{updatedAt}</if>
<if test="englishName != null and englishName != ''"> and english_name like concat('%', #{englishName}, '%')</if>
<if test="xmlContent != null and xmlContent != ''"> and xml_content = #{xmlContent}</if>
</where>
</select>
<select id="selectBehaviortreeById" parameterType="Long" resultMap="BehaviortreeResult">
<include refid="selectBehaviortreeVo"/>
where id = #{id}
</select>
<insert id="insertBehaviortree" parameterType="Behaviortree" useGeneratedKeys="true" keyProperty="id">
insert into behaviortree
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="name != null and name != ''">name,</if>
<if test="description != null">description,</if>
<if test="createdAt != null">created_at,</if>
<if test="updatedAt != null">updated_at,</if>
<if test="englishName != null and englishName != ''">english_name,</if>
<if test="xmlContent != null">xml_content,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null and name != ''">#{name},</if>
<if test="description != null">#{description},</if>
<if test="createdAt != null">#{createdAt},</if>
<if test="updatedAt != null">#{updatedAt},</if>
<if test="englishName != null and englishName != ''">#{englishName},</if>
<if test="xmlContent != null">#{xmlContent},</if>
</trim>
</insert>
<update id="updateBehaviortree" parameterType="Behaviortree">
update behaviortree
<trim prefix="SET" suffixOverrides=",">
<if test="name != null and name != ''">name = #{name},</if>
<if test="description != null">description = #{description},</if>
<if test="createdAt != null">created_at = #{createdAt},</if>
<if test="updatedAt != null">updated_at = #{updatedAt},</if>
<if test="englishName != null and englishName != ''">english_name = #{englishName},</if>
<if test="xmlContent != null">xml_content = #{xmlContent},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteBehaviortreeById" parameterType="Long">
delete from behaviortree where id = #{id}
</delete>
<delete id="deleteBehaviortreeByIds" parameterType="String">
delete from behaviortree where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.solution.system.mapper.NodeconnectionMapper">
<resultMap type="Nodeconnection" id="NodeconnectionResult">
<result property="id" column="id" />
<result property="parentNodeId" column="parent_node_id" />
<result property="childNodeId" column="child_node_id" />
<result property="orderIndex" column="order_index" />
</resultMap>
<sql id="selectNodeconnectionVo">
select id, parent_node_id, child_node_id, order_index from nodeconnection
</sql>
<select id="selectNodeconnectionList" parameterType="Nodeconnection" resultMap="NodeconnectionResult">
<include refid="selectNodeconnectionVo"/>
<where>
<if test="parentNodeId != null "> and parent_node_id = #{parentNodeId}</if>
<if test="childNodeId != null "> and child_node_id = #{childNodeId}</if>
<if test="orderIndex != null "> and order_index = #{orderIndex}</if>
</where>
</select>
<select id="selectNodeconnectionById" parameterType="Long" resultMap="NodeconnectionResult">
<include refid="selectNodeconnectionVo"/>
where id = #{id}
</select>
<insert id="insertNodeconnection" parameterType="Nodeconnection" useGeneratedKeys="true" keyProperty="id">
insert into nodeconnection
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="parentNodeId != null">parent_node_id,</if>
<if test="childNodeId != null">child_node_id,</if>
<if test="orderIndex != null">order_index,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="parentNodeId != null">#{parentNodeId},</if>
<if test="childNodeId != null">#{childNodeId},</if>
<if test="orderIndex != null">#{orderIndex},</if>
</trim>
</insert>
<update id="updateNodeconnection" parameterType="Nodeconnection">
update nodeconnection
<trim prefix="SET" suffixOverrides=",">
<if test="parentNodeId != null">parent_node_id = #{parentNodeId},</if>
<if test="childNodeId != null">child_node_id = #{childNodeId},</if>
<if test="orderIndex != null">order_index = #{orderIndex},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteNodeconnectionById" parameterType="Long">
delete from nodeconnection where id = #{id}
</delete>
<delete id="deleteNodeconnectionByIds" parameterType="String">
delete from nodeconnection where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.solution.system.mapper.NodeparameterMapper">
<resultMap type="Nodeparameter" id="NodeparameterResult">
<result property="id" column="id" />
<result property="nodeInstanceId" column="node_instance_id" />
<result property="paramDefId" column="param_def_id" />
<result property="value" column="value" />
</resultMap>
<sql id="selectNodeparameterVo">
select id, node_instance_id, param_def_id, value from nodeparameter
</sql>
<select id="selectNodeparameterList" parameterType="Nodeparameter" resultMap="NodeparameterResult">
<include refid="selectNodeparameterVo"/>
<where>
<if test="nodeInstanceId != null "> and node_instance_id = #{nodeInstanceId}</if>
<if test="paramDefId != null "> and param_def_id = #{paramDefId}</if>
<if test="value != null and value != ''"> and value = #{value}</if>
</where>
</select>
<select id="selectNodeparameterById" parameterType="Long" resultMap="NodeparameterResult">
<include refid="selectNodeparameterVo"/>
where id = #{id}
</select>
<insert id="insertNodeparameter" parameterType="Nodeparameter" useGeneratedKeys="true" keyProperty="id">
insert into nodeparameter
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="nodeInstanceId != null">node_instance_id,</if>
<if test="paramDefId != null">param_def_id,</if>
<if test="value != null">value,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="nodeInstanceId != null">#{nodeInstanceId},</if>
<if test="paramDefId != null">#{paramDefId},</if>
<if test="value != null">#{value},</if>
</trim>
</insert>
<update id="updateNodeparameter" parameterType="Nodeparameter">
update nodeparameter
<trim prefix="SET" suffixOverrides=",">
<if test="nodeInstanceId != null">node_instance_id = #{nodeInstanceId},</if>
<if test="paramDefId != null">param_def_id = #{paramDefId},</if>
<if test="value != null">value = #{value},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteNodeparameterById" parameterType="Long">
delete from nodeparameter where id = #{id}
</delete>
<delete id="deleteNodeparameterByIds" parameterType="String">
delete from nodeparameter where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.solution.system.mapper.NodetemplateMapper">
<resultMap type="Nodetemplate" id="NodetemplateResult">
<result property="id" column="id" />
<result property="type" column="type" />
<result property="name" column="name" />
<result property="logicHandler" column="logic_handler" />
<result property="description" column="description" />
<result property="englishName" column="english_name" />
<result property="templeteType" column="templete_type" />
</resultMap>
<sql id="selectNodetemplateVo">
select id, type, name, logic_handler, description, english_name, templete_type from nodetemplate
</sql>
<select id="selectNodetemplateList" parameterType="Nodetemplate" resultMap="NodetemplateResult">
<include refid="selectNodetemplateVo"/>
<where>
<if test="type != null and type != ''"> and type = #{type}</if>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="logicHandler != null and logicHandler != ''"> and logic_handler = #{logicHandler}</if>
<if test="description != null and description != ''"> and description = #{description}</if>
<if test="englishName != null and englishName != ''"> and english_name like concat('%', #{englishName}, '%')</if>
<if test="templeteType != null and templeteType != ''"> and templete_type = #{templeteType}</if>
</where>
</select>
<select id="selectNodetemplateById" parameterType="Long" resultMap="NodetemplateResult">
<include refid="selectNodetemplateVo"/>
where id = #{id}
</select>
<insert id="insertNodetemplate" parameterType="Nodetemplate" useGeneratedKeys="true" keyProperty="id">
insert into nodetemplate
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="type != null and type != ''">type,</if>
<if test="name != null and name != ''">name,</if>
<if test="logicHandler != null">logic_handler,</if>
<if test="description != null">description,</if>
<if test="englishName != null">english_name,</if>
<if test="templeteType != null and templeteType != ''">templete_type,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="type != null and type != ''">#{type},</if>
<if test="name != null and name != ''">#{name},</if>
<if test="logicHandler != null">#{logicHandler},</if>
<if test="description != null">#{description},</if>
<if test="englishName != null">#{englishName},</if>
<if test="templeteType != null and templeteType != ''">#{templeteType},</if>
</trim>
</insert>
<update id="updateNodetemplate" parameterType="Nodetemplate">
update nodetemplate
<trim prefix="SET" suffixOverrides=",">
<if test="type != null and type != ''">type = #{type},</if>
<if test="name != null and name != ''">name = #{name},</if>
<if test="logicHandler != null">logic_handler = #{logicHandler},</if>
<if test="description != null">description = #{description},</if>
<if test="englishName != null">english_name = #{englishName},</if>
<if test="templeteType != null and templeteType != ''">templete_type = #{templeteType},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteNodetemplateById" parameterType="Long">
delete from nodetemplate where id = #{id}
</delete>
<delete id="deleteNodetemplateByIds" parameterType="String">
delete from nodetemplate where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.solution.system.mapper.TemplateparameterdefMapper">
<resultMap type="Templateparameterdef" id="TemplateparameterdefResult">
<result property="id" column="id" />
<result property="templateId" column="template_id" />
<result property="paramKey" column="param_key" />
<result property="dataType" column="data_type" />
<result property="defaultValue" column="default_value" />
<result property="description" column="description" />
<result property="templateType" column="template_type" />
</resultMap>
<sql id="selectTemplateparameterdefVo">
select id, template_id, param_key, data_type, default_value, description, template_type from templateparameterdef
</sql>
<select id="selectTemplateparameterdefList" parameterType="Templateparameterdef" resultMap="TemplateparameterdefResult">
<include refid="selectTemplateparameterdefVo"/>
<where>
<if test="templateId != null "> and template_id = #{templateId}</if>
<if test="paramKey != null and paramKey != ''"> and param_key = #{paramKey}</if>
<if test="dataType != null and dataType != ''"> and data_type = #{dataType}</if>
<if test="defaultValue != null and defaultValue != ''"> and default_value = #{defaultValue}</if>
<if test="description != null and description != ''"> and description = #{description}</if>
<if test="templateType != null and templateType != ''"> and template_type = #{templateType}</if>
</where>
</select>
<select id="selectTemplateparameterdefById" parameterType="Long" resultMap="TemplateparameterdefResult">
<include refid="selectTemplateparameterdefVo"/>
where id = #{id}
</select>
<insert id="insertTemplateparameterdef" parameterType="Templateparameterdef" useGeneratedKeys="true" keyProperty="id">
insert into templateparameterdef
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="templateId != null">template_id,</if>
<if test="paramKey != null and paramKey != ''">param_key,</if>
<if test="dataType != null and dataType != ''">data_type,</if>
<if test="defaultValue != null and defaultValue != ''">default_value,</if>
<if test="description != null">description,</if>
<if test="templateType != null and templateType != ''">template_type,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="templateId != null">#{templateId},</if>
<if test="paramKey != null and paramKey != ''">#{paramKey},</if>
<if test="dataType != null and dataType != ''">#{dataType},</if>
<if test="defaultValue != null and defaultValue != ''">#{defaultValue},</if>
<if test="description != null">#{description},</if>
<if test="templateType != null and templateType != ''">#{templateType},</if>
</trim>
</insert>
<update id="updateTemplateparameterdef" parameterType="Templateparameterdef">
update templateparameterdef
<trim prefix="SET" suffixOverrides=",">
<if test="templateId != null">template_id = #{templateId},</if>
<if test="paramKey != null and paramKey != ''">param_key = #{paramKey},</if>
<if test="dataType != null and dataType != ''">data_type = #{dataType},</if>
<if test="defaultValue != null and defaultValue != ''">default_value = #{defaultValue},</if>
<if test="description != null">description = #{description},</if>
<if test="templateType != null and templateType != ''">template_type = #{templateType},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteTemplateparameterdefById" parameterType="Long">
delete from templateparameterdef where id = #{id}
</delete>
<delete id="deleteTemplateparameterdefByIds" parameterType="String">
delete from templateparameterdef where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.solution.system.mapper.TreenodeinstanceMapper">
<resultMap type="Treenodeinstance" id="TreenodeinstanceResult">
<result property="id" column="id" />
<result property="treeId" column="tree_id" />
<result property="templateId" column="template_id" />
<result property="instanceName" column="instance_name" />
<result property="isRoot" column="is_root" />
<result property="preconditionTempleteId" column="precondition_templete_id" />
<result property="uuid" column="uuid" />
<result property="desciption" column="desciption" />
</resultMap>
<sql id="selectTreenodeinstanceVo">
select id, tree_id, template_id, instance_name, is_root, precondition_templete_id, uuid,desciption from treenodeinstance
</sql>
<select id="selectTreenodeinstanceList" parameterType="Treenodeinstance" resultMap="TreenodeinstanceResult">
<include refid="selectTreenodeinstanceVo"/>
<where>
<if test="treeId != null "> and tree_id = #{treeId}</if>
<if test="templateId != null "> and template_id = #{templateId}</if>
<if test="instanceName != null and instanceName != ''"> and instance_name like concat('%', #{instanceName}, '%')</if>
<if test="isRoot != null "> and is_root = #{isRoot}</if>
<if test="preconditionTempleteId != null "> and precondition_templete_id = #{preconditionTempleteId}</if>
<if test="uuid != null and uuid != ''"> and uuid = #{uuid}</if>
<if test="desciption != null and desciption != ''"> and desciption = #{desciption}</if>
</where>
</select>
<select id="selectTreenodeinstanceById" parameterType="Long" resultMap="TreenodeinstanceResult">
<include refid="selectTreenodeinstanceVo"/>
where id = #{id}
</select>
<insert id="insertTreenodeinstance" parameterType="Treenodeinstance" useGeneratedKeys="true" keyProperty="id">
insert into treenodeinstance
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="treeId != null">tree_id,</if>
<if test="templateId != null">template_id,</if>
<if test="instanceName != null">instance_name,</if>
<if test="isRoot != null">is_root,</if>
<if test="preconditionTempleteId != null">precondition_templete_id,</if>
<if test="uuid != null">uuid,</if>
<if test="desciption != null">desciption,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="treeId != null">#{treeId},</if>
<if test="templateId != null">#{templateId},</if>
<if test="instanceName != null">#{instanceName},</if>
<if test="isRoot != null">#{isRoot},</if>
<if test="preconditionTempleteId != null">#{preconditionTempleteId},</if>
<if test="uuid != null">#{uuid},</if>
<if test="desciption != null">#{desciption},</if>
</trim>
</insert>
<update id="updateTreenodeinstance" parameterType="Treenodeinstance">
update treenodeinstance
<trim prefix="SET" suffixOverrides=",">
<if test="treeId != null">tree_id = #{treeId},</if>
<if test="templateId != null">template_id = #{templateId},</if>
<if test="instanceName != null">instance_name = #{instanceName},</if>
<if test="isRoot != null">is_root = #{isRoot},</if>
<if test="preconditionTempleteId != null">precondition_templete_id = #{preconditionTempleteId},</if>
<if test="uuid != null">uuid = #{uuid},</if>
<if test="desciption != null">desciption = #{desciption},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteTreenodeinstanceById" parameterType="Long">
delete from treenodeinstance where id = #{id}
</delete>
<delete id="deleteTreenodeinstanceByIds" parameterType="String">
delete from treenodeinstance where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

18
pom.xml
View File

@@ -9,7 +9,6 @@
<version>3.9.1</version>
<name>auto-solution</name>
<url>http://www.ruoyi.vip</url>
<description>方案自动化生成</description>
<properties>
@@ -218,11 +217,28 @@
<version>${solution.version}</version>
</dependency>
<!-- 行为树模块-->
<dependency>
<groupId>com.solution</groupId>
<artifactId>solution-behaviour</artifactId>
<version>${solution.version}</version>
</dependency>
<!-- 规则模块-->
<dependency>
<groupId>com.solution</groupId>
<artifactId>solution-algo</artifactId>
<version>${solution.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<modules>
<module>auto-solution-admin</module>
<module>auto-solution-behaviour</module>
<module>auto-solution-algo</module>
<module>auto-solution-framework</module>
<module>auto-solution-system</module>
<module>auto-solution-quartz</module>

22
solution-ui/.editorconfig Normal file
View File

@@ -0,0 +1,22 @@
# 告诉EditorConfig插件这是根文件不用继续往上查找
root = true
# 匹配全部文件
[*]
# 设置字符集
charset = utf-8
# 缩进风格可选space、tab
indent_style = space
# 缩进的空格数
indent_size = 2
# 结尾换行符可选lf、cr、crlf
end_of_line = lf
# 在文件结尾插入新行
insert_final_newline = true
# 删除一行中的前后空格
trim_trailing_whitespace = true
# 匹配md结尾的文件
[*.md]
insert_final_newline = false
trim_trailing_whitespace = false

View File

@@ -0,0 +1,11 @@
# 页面标题
VUE_APP_TITLE = 自动化管理系统
# 开发环境配置
ENV = 'development'
# 自动化管理系统/开发环境
VUE_APP_BASE_API = '/dev-api'
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true

View File

@@ -0,0 +1,8 @@
# 页面标题
VUE_APP_TITLE = 自动化管理系统
# 生产环境配置
ENV = 'production'
# 自动化管理系统/生产环境
VUE_APP_BASE_API = '/prod-api'

12
solution-ui/.env.staging Normal file
View File

@@ -0,0 +1,12 @@
# 页面标题
VUE_APP_TITLE = 自动化管理系统
BABEL_ENV = production
NODE_ENV = production
# 测试环境配置
ENV = 'staging'
# 自动化管理系统/测试环境
VUE_APP_BASE_API = '/stage-api'

23
solution-ui/.gitignore vendored Normal file
View File

@@ -0,0 +1,23 @@
.DS_Store
node_modules/
dist/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
**/*.log
tests/**/coverage/
tests/e2e/reports
selenium-debug.log
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.local
package-lock.json
yarn.lock

30
solution-ui/README.md Normal file
View File

@@ -0,0 +1,30 @@
## 开发
```bash
# 克隆项目
git clone https://gitee.com/y_project/RuoYi-Vue
# 进入项目目录
cd ruoyi-ui
# 安装依赖
npm install
# 建议不要直接使用 cnpm 安装依赖,会有各种诡异的 bug。可以通过如下操作解决 npm 下载速度慢的问题
npm install --registry=https://registry.npmmirror.com
# 启动服务
npm run dev
```
浏览器访问 http://localhost:80
## 发布
```bash
# 构建测试环境
npm run build:stage
# 构建生产环境
npm run build:prod
```

View File

@@ -0,0 +1,13 @@
module.exports = {
presets: [
// https://github.com/vuejs/vue-cli/tree/master/packages/@vue/babel-preset-app
'@vue/cli-plugin-babel/preset'
],
'env': {
'development': {
// babel-plugin-dynamic-import-node plugin only does one thing by converting all import() to require().
// This plugin can significantly increase the speed of hot updates, when you have a large number of pages.
'plugins': ['dynamic-import-node']
}
}
}

12
solution-ui/bin/build.bat Normal file
View File

@@ -0,0 +1,12 @@
@echo off
echo.
echo [<5B><>Ϣ] <20><><EFBFBD><EFBFBD>Web<65><62><EFBFBD>̣<EFBFBD><CCA3><EFBFBD><EFBFBD><EFBFBD>dist<73>ļ<EFBFBD><C4BC><EFBFBD>
echo.
%~d0
cd %~dp0
cd ..
npm run build:prod
pause

View File

@@ -0,0 +1,12 @@
@echo off
echo.
echo [<5B><>Ϣ] <20><>װWeb<65><62><EFBFBD>̣<EFBFBD><CCA3><EFBFBD><EFBFBD><EFBFBD>node_modules<65>ļ<EFBFBD><C4BC><EFBFBD>
echo.
%~d0
cd %~dp0
cd ..
npm install --registry=https://registry.npmmirror.com
pause

View File

@@ -0,0 +1,12 @@
@echo off
echo.
echo [<5B><>Ϣ] ʹ<><CAB9> Vue CLI <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Web <20><><EFBFBD>̡<EFBFBD>
echo.
%~d0
cd %~dp0
cd ..
npm run dev
pause

View File

@@ -0,0 +1,35 @@
const { run } = require('runjs')
const chalk = require('chalk')
const config = require('../vue.config.js')
const rawArgv = process.argv.slice(2)
const args = rawArgv.join(' ')
if (process.env.npm_config_preview || rawArgv.includes('--preview')) {
const report = rawArgv.includes('--report')
run(`vue-cli-service build ${args}`)
const port = 9526
const publicPath = config.publicPath
var connect = require('connect')
var serveStatic = require('serve-static')
const app = connect()
app.use(
publicPath,
serveStatic('./dist', {
index: ['index.html', '/']
})
)
app.listen(port, function () {
console.log(chalk.green(`> Preview at http://localhost:${port}${publicPath}`))
if (report) {
console.log(chalk.green(`> Report at http://localhost:${port}${publicPath}report.html`))
}
})
} else {
run(`vue-cli-service build ${args}`)
}

72
solution-ui/package.json Normal file
View File

@@ -0,0 +1,72 @@
{
"name": "ruoyi",
"version": "3.9.1",
"description": "自动化生成系统",
"author": "自动化",
"license": "MIT",
"scripts": {
"dev": "vue-cli-service serve",
"build:prod": "vue-cli-service build",
"build:stage": "vue-cli-service build --mode staging",
"preview": "node build/index.js --preview"
},
"keywords": [
"vue",
"admin",
"dashboard",
"element-ui",
"boilerplate",
"admin-template",
"management-system"
],
"repository": {
"type": "git",
"url": "https://gitee.com/y_project/RuoYi-Vue.git"
},
"dependencies": {
"@riophae/vue-treeselect": "0.4.0",
"axios": "0.28.1",
"clipboard": "2.0.8",
"core-js": "3.37.1",
"echarts": "5.4.0",
"element-ui": "2.15.14",
"file-saver": "2.0.5",
"fuse.js": "6.4.3",
"highlight.js": "9.18.5",
"js-beautify": "1.13.0",
"js-cookie": "3.0.1",
"jsencrypt": "3.0.0-rc.1",
"nprogress": "0.2.0",
"quill": "2.0.2",
"screenfull": "5.0.2",
"sortablejs": "1.10.2",
"splitpanes": "2.4.1",
"vue": "2.6.12",
"vue-count-to": "1.0.13",
"vue-cropper": "0.5.5",
"vue-router": "3.4.9",
"vuedraggable": "2.24.3",
"vuex": "3.6.0"
},
"devDependencies": {
"@vue/cli-plugin-babel": "4.4.6",
"@vue/cli-service": "4.4.6",
"babel-plugin-dynamic-import-node": "2.3.3",
"chalk": "4.1.0",
"compression-webpack-plugin": "6.1.2",
"connect": "3.6.6",
"sass": "1.32.13",
"sass-loader": "10.1.1",
"script-ext-html-webpack-plugin": "2.1.5",
"svg-sprite-loader": "5.1.1",
"vue-template-compiler": "2.6.12"
},
"engines": {
"node": ">=8.9",
"npm": ">= 3.0.0"
},
"browserslist": [
"> 1%",
"last 2 versions"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,208 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= webpackConfig.name %></title>
<!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]-->
<style>
html,
body,
#app {
height: 100%;
margin: 0px;
padding: 0px;
}
.chromeframe {
margin: 0.2em 0;
background: #ccc;
color: #000;
padding: 0.2em 0;
}
#loader-wrapper {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 999999;
}
#loader {
display: block;
position: relative;
left: 50%;
top: 50%;
width: 150px;
height: 150px;
margin: -75px 0 0 -75px;
border-radius: 50%;
border: 3px solid transparent;
border-top-color: #FFF;
-webkit-animation: spin 2s linear infinite;
-ms-animation: spin 2s linear infinite;
-moz-animation: spin 2s linear infinite;
-o-animation: spin 2s linear infinite;
animation: spin 2s linear infinite;
z-index: 1001;
}
#loader:before {
content: "";
position: absolute;
top: 5px;
left: 5px;
right: 5px;
bottom: 5px;
border-radius: 50%;
border: 3px solid transparent;
border-top-color: #FFF;
-webkit-animation: spin 3s linear infinite;
-moz-animation: spin 3s linear infinite;
-o-animation: spin 3s linear infinite;
-ms-animation: spin 3s linear infinite;
animation: spin 3s linear infinite;
}
#loader:after {
content: "";
position: absolute;
top: 15px;
left: 15px;
right: 15px;
bottom: 15px;
border-radius: 50%;
border: 3px solid transparent;
border-top-color: #FFF;
-moz-animation: spin 1.5s linear infinite;
-o-animation: spin 1.5s linear infinite;
-ms-animation: spin 1.5s linear infinite;
-webkit-animation: spin 1.5s linear infinite;
animation: spin 1.5s linear infinite;
}
@-webkit-keyframes spin {
0% {
-webkit-transform: rotate(0deg);
-ms-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
-ms-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@keyframes spin {
0% {
-webkit-transform: rotate(0deg);
-ms-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
-ms-transform: rotate(360deg);
transform: rotate(360deg);
}
}
#loader-wrapper .loader-section {
position: fixed;
top: 0;
width: 51%;
height: 100%;
background: #7171C6;
z-index: 1000;
-webkit-transform: translateX(0);
-ms-transform: translateX(0);
transform: translateX(0);
}
#loader-wrapper .loader-section.section-left {
left: 0;
}
#loader-wrapper .loader-section.section-right {
right: 0;
}
.loaded #loader-wrapper .loader-section.section-left {
-webkit-transform: translateX(-100%);
-ms-transform: translateX(-100%);
transform: translateX(-100%);
-webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
}
.loaded #loader-wrapper .loader-section.section-right {
-webkit-transform: translateX(100%);
-ms-transform: translateX(100%);
transform: translateX(100%);
-webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
}
.loaded #loader {
opacity: 0;
-webkit-transition: all 0.3s ease-out;
transition: all 0.3s ease-out;
}
.loaded #loader-wrapper {
visibility: hidden;
-webkit-transform: translateY(-100%);
-ms-transform: translateY(-100%);
transform: translateY(-100%);
-webkit-transition: all 0.3s 1s ease-out;
transition: all 0.3s 1s ease-out;
}
.no-js #loader-wrapper {
display: none;
}
.no-js h1 {
color: #222222;
}
#loader-wrapper .load_title {
font-family: 'Open Sans';
color: #FFF;
font-size: 19px;
width: 100%;
text-align: center;
z-index: 9999999999999;
position: absolute;
top: 60%;
opacity: 1;
line-height: 30px;
}
#loader-wrapper .load_title span {
font-weight: normal;
font-style: italic;
font-size: 13px;
color: #FFF;
opacity: 0.5;
}
</style>
</head>
<body>
<div id="app">
<div id="loader-wrapper">
<div id="loader"></div>
<div class="loader-section section-left"></div>
<div class="loader-section section-right"></div>
<div class="load_title">正在加载系统资源,请耐心等待</div>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,2 @@
User-agent: *
Disallow: /

File diff suppressed because one or more lines are too long

20
solution-ui/src/App.vue Normal file
View File

@@ -0,0 +1,20 @@
<template>
<div id="app">
<router-view />
<theme-picker />
</div>
</template>
<script>
import ThemePicker from "@/components/ThemePicker"
export default {
name: "App",
components: { ThemePicker }
}
</script>
<style scoped>
#app .theme-picker {
display: none;
}
</style>

View File

@@ -0,0 +1,60 @@
import request from '@/utils/request'
// 登录方法
export function login(username, password, code, uuid) {
const data = {
username,
password,
code,
uuid
}
return request({
url: '/login',
headers: {
isToken: false,
repeatSubmit: false
},
method: 'post',
data: data
})
}
// 注册方法
export function register(data) {
return request({
url: '/register',
headers: {
isToken: false
},
method: 'post',
data: data
})
}
// 获取用户详细信息
export function getInfo() {
return request({
url: '/getInfo',
method: 'get'
})
}
// 退出方法
export function logout() {
return request({
url: '/logout',
method: 'post'
})
}
// 获取验证码
export function getCodeImg() {
return request({
url: '/captchaImage',
headers: {
isToken: false
},
method: 'get',
timeout: 20000
})
}

View File

@@ -0,0 +1,9 @@
import request from '@/utils/request'
// 获取路由
export const getRouters = () => {
return request({
url: '/getRouters',
method: 'get'
})
}

View File

@@ -0,0 +1,57 @@
import request from '@/utils/request'
// 查询缓存详细
export function getCache() {
return request({
url: '/monitor/cache',
method: 'get'
})
}
// 查询缓存名称列表
export function listCacheName() {
return request({
url: '/monitor/cache/getNames',
method: 'get'
})
}
// 查询缓存键名列表
export function listCacheKey(cacheName) {
return request({
url: '/monitor/cache/getKeys/' + cacheName,
method: 'get'
})
}
// 查询缓存内容
export function getCacheValue(cacheName, cacheKey) {
return request({
url: '/monitor/cache/getValue/' + cacheName + '/' + cacheKey,
method: 'get'
})
}
// 清理指定名称缓存
export function clearCacheName(cacheName) {
return request({
url: '/monitor/cache/clearCacheName/' + cacheName,
method: 'delete'
})
}
// 清理指定键名缓存
export function clearCacheKey(cacheKey) {
return request({
url: '/monitor/cache/clearCacheKey/' + cacheKey,
method: 'delete'
})
}
// 清理全部缓存
export function clearCacheAll() {
return request({
url: '/monitor/cache/clearCacheAll',
method: 'delete'
})
}

View File

@@ -0,0 +1,71 @@
import request from '@/utils/request'
// 查询定时任务调度列表
export function listJob(query) {
return request({
url: '/monitor/job/list',
method: 'get',
params: query
})
}
// 查询定时任务调度详细
export function getJob(jobId) {
return request({
url: '/monitor/job/' + jobId,
method: 'get'
})
}
// 新增定时任务调度
export function addJob(data) {
return request({
url: '/monitor/job',
method: 'post',
data: data
})
}
// 修改定时任务调度
export function updateJob(data) {
return request({
url: '/monitor/job',
method: 'put',
data: data
})
}
// 删除定时任务调度
export function delJob(jobId) {
return request({
url: '/monitor/job/' + jobId,
method: 'delete'
})
}
// 任务状态修改
export function changeJobStatus(jobId, status) {
const data = {
jobId,
status
}
return request({
url: '/monitor/job/changeStatus',
method: 'put',
data: data
})
}
// 定时任务立即执行一次
export function runJob(jobId, jobGroup) {
const data = {
jobId,
jobGroup
}
return request({
url: '/monitor/job/run',
method: 'put',
data: data
})
}

View File

@@ -0,0 +1,26 @@
import request from '@/utils/request'
// 查询调度日志列表
export function listJobLog(query) {
return request({
url: '/monitor/jobLog/list',
method: 'get',
params: query
})
}
// 删除调度日志
export function delJobLog(jobLogId) {
return request({
url: '/monitor/jobLog/' + jobLogId,
method: 'delete'
})
}
// 清空调度日志
export function cleanJobLog() {
return request({
url: '/monitor/jobLog/clean',
method: 'delete'
})
}

View File

@@ -0,0 +1,34 @@
import request from '@/utils/request'
// 查询登录日志列表
export function list(query) {
return request({
url: '/monitor/logininfor/list',
method: 'get',
params: query
})
}
// 删除登录日志
export function delLogininfor(infoId) {
return request({
url: '/monitor/logininfor/' + infoId,
method: 'delete'
})
}
// 解锁用户登录状态
export function unlockLogininfor(userName) {
return request({
url: '/monitor/logininfor/unlock/' + userName,
method: 'get'
})
}
// 清空登录日志
export function cleanLogininfor() {
return request({
url: '/monitor/logininfor/clean',
method: 'delete'
})
}

View File

@@ -0,0 +1,18 @@
import request from '@/utils/request'
// 查询在线用户列表
export function list(query) {
return request({
url: '/monitor/online/list',
method: 'get',
params: query
})
}
// 强退用户
export function forceLogout(tokenId) {
return request({
url: '/monitor/online/' + tokenId,
method: 'delete'
})
}

View File

@@ -0,0 +1,26 @@
import request from '@/utils/request'
// 查询操作日志列表
export function list(query) {
return request({
url: '/monitor/operlog/list',
method: 'get',
params: query
})
}
// 删除操作日志
export function delOperlog(operId) {
return request({
url: '/monitor/operlog/' + operId,
method: 'delete'
})
}
// 清空操作日志
export function cleanOperlog() {
return request({
url: '/monitor/operlog/clean',
method: 'delete'
})
}

View File

@@ -0,0 +1,9 @@
import request from '@/utils/request'
// 获取服务信息
export function getServer() {
return request({
url: '/monitor/server',
method: 'get'
})
}

View File

@@ -0,0 +1,60 @@
import request from '@/utils/request'
// 查询参数列表
export function listConfig(query) {
return request({
url: '/system/config/list',
method: 'get',
params: query
})
}
// 查询参数详细
export function getConfig(configId) {
return request({
url: '/system/config/' + configId,
method: 'get'
})
}
// 根据参数键名查询参数值
export function getConfigKey(configKey) {
return request({
url: '/system/config/configKey/' + configKey,
method: 'get'
})
}
// 新增参数配置
export function addConfig(data) {
return request({
url: '/system/config',
method: 'post',
data: data
})
}
// 修改参数配置
export function updateConfig(data) {
return request({
url: '/system/config',
method: 'put',
data: data
})
}
// 删除参数配置
export function delConfig(configId) {
return request({
url: '/system/config/' + configId,
method: 'delete'
})
}
// 刷新参数缓存
export function refreshCache() {
return request({
url: '/system/config/refreshCache',
method: 'delete'
})
}

View File

@@ -0,0 +1,52 @@
import request from '@/utils/request'
// 查询部门列表
export function listDept(query) {
return request({
url: '/system/dept/list',
method: 'get',
params: query
})
}
// 查询部门列表(排除节点)
export function listDeptExcludeChild(deptId) {
return request({
url: '/system/dept/list/exclude/' + deptId,
method: 'get'
})
}
// 查询部门详细
export function getDept(deptId) {
return request({
url: '/system/dept/' + deptId,
method: 'get'
})
}
// 新增部门
export function addDept(data) {
return request({
url: '/system/dept',
method: 'post',
data: data
})
}
// 修改部门
export function updateDept(data) {
return request({
url: '/system/dept',
method: 'put',
data: data
})
}
// 删除部门
export function delDept(deptId) {
return request({
url: '/system/dept/' + deptId,
method: 'delete'
})
}

View File

@@ -0,0 +1,52 @@
import request from '@/utils/request'
// 查询字典数据列表
export function listData(query) {
return request({
url: '/system/dict/data/list',
method: 'get',
params: query
})
}
// 查询字典数据详细
export function getData(dictCode) {
return request({
url: '/system/dict/data/' + dictCode,
method: 'get'
})
}
// 根据字典类型查询字典数据信息
export function getDicts(dictType) {
return request({
url: '/system/dict/data/type/' + dictType,
method: 'get'
})
}
// 新增字典数据
export function addData(data) {
return request({
url: '/system/dict/data',
method: 'post',
data: data
})
}
// 修改字典数据
export function updateData(data) {
return request({
url: '/system/dict/data',
method: 'put',
data: data
})
}
// 删除字典数据
export function delData(dictCode) {
return request({
url: '/system/dict/data/' + dictCode,
method: 'delete'
})
}

View File

@@ -0,0 +1,60 @@
import request from '@/utils/request'
// 查询字典类型列表
export function listType(query) {
return request({
url: '/system/dict/type/list',
method: 'get',
params: query
})
}
// 查询字典类型详细
export function getType(dictId) {
return request({
url: '/system/dict/type/' + dictId,
method: 'get'
})
}
// 新增字典类型
export function addType(data) {
return request({
url: '/system/dict/type',
method: 'post',
data: data
})
}
// 修改字典类型
export function updateType(data) {
return request({
url: '/system/dict/type',
method: 'put',
data: data
})
}
// 删除字典类型
export function delType(dictId) {
return request({
url: '/system/dict/type/' + dictId,
method: 'delete'
})
}
// 刷新字典缓存
export function refreshCache() {
return request({
url: '/system/dict/type/refreshCache',
method: 'delete'
})
}
// 获取字典选择框列表
export function optionselect() {
return request({
url: '/system/dict/type/optionselect',
method: 'get'
})
}

View File

@@ -0,0 +1,60 @@
import request from '@/utils/request'
// 查询菜单列表
export function listMenu(query) {
return request({
url: '/system/menu/list',
method: 'get',
params: query
})
}
// 查询菜单详细
export function getMenu(menuId) {
return request({
url: '/system/menu/' + menuId,
method: 'get'
})
}
// 查询菜单下拉树结构
export function treeselect() {
return request({
url: '/system/menu/treeselect',
method: 'get'
})
}
// 根据角色ID查询菜单下拉树结构
export function roleMenuTreeselect(roleId) {
return request({
url: '/system/menu/roleMenuTreeselect/' + roleId,
method: 'get'
})
}
// 新增菜单
export function addMenu(data) {
return request({
url: '/system/menu',
method: 'post',
data: data
})
}
// 修改菜单
export function updateMenu(data) {
return request({
url: '/system/menu',
method: 'put',
data: data
})
}
// 删除菜单
export function delMenu(menuId) {
return request({
url: '/system/menu/' + menuId,
method: 'delete'
})
}

View File

@@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询公告列表
export function listNotice(query) {
return request({
url: '/system/notice/list',
method: 'get',
params: query
})
}
// 查询公告详细
export function getNotice(noticeId) {
return request({
url: '/system/notice/' + noticeId,
method: 'get'
})
}
// 新增公告
export function addNotice(data) {
return request({
url: '/system/notice',
method: 'post',
data: data
})
}
// 修改公告
export function updateNotice(data) {
return request({
url: '/system/notice',
method: 'put',
data: data
})
}
// 删除公告
export function delNotice(noticeId) {
return request({
url: '/system/notice/' + noticeId,
method: 'delete'
})
}

View File

@@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询岗位列表
export function listPost(query) {
return request({
url: '/system/post/list',
method: 'get',
params: query
})
}
// 查询岗位详细
export function getPost(postId) {
return request({
url: '/system/post/' + postId,
method: 'get'
})
}
// 新增岗位
export function addPost(data) {
return request({
url: '/system/post',
method: 'post',
data: data
})
}
// 修改岗位
export function updatePost(data) {
return request({
url: '/system/post',
method: 'put',
data: data
})
}
// 删除岗位
export function delPost(postId) {
return request({
url: '/system/post/' + postId,
method: 'delete'
})
}

View File

@@ -0,0 +1,119 @@
import request from '@/utils/request'
// 查询角色列表
export function listRole(query) {
return request({
url: '/system/role/list',
method: 'get',
params: query
})
}
// 查询角色详细
export function getRole(roleId) {
return request({
url: '/system/role/' + roleId,
method: 'get'
})
}
// 新增角色
export function addRole(data) {
return request({
url: '/system/role',
method: 'post',
data: data
})
}
// 修改角色
export function updateRole(data) {
return request({
url: '/system/role',
method: 'put',
data: data
})
}
// 角色数据权限
export function dataScope(data) {
return request({
url: '/system/role/dataScope',
method: 'put',
data: data
})
}
// 角色状态修改
export function changeRoleStatus(roleId, status) {
const data = {
roleId,
status
}
return request({
url: '/system/role/changeStatus',
method: 'put',
data: data
})
}
// 删除角色
export function delRole(roleId) {
return request({
url: '/system/role/' + roleId,
method: 'delete'
})
}
// 查询角色已授权用户列表
export function allocatedUserList(query) {
return request({
url: '/system/role/authUser/allocatedList',
method: 'get',
params: query
})
}
// 查询角色未授权用户列表
export function unallocatedUserList(query) {
return request({
url: '/system/role/authUser/unallocatedList',
method: 'get',
params: query
})
}
// 取消用户授权角色
export function authUserCancel(data) {
return request({
url: '/system/role/authUser/cancel',
method: 'put',
data: data
})
}
// 批量取消用户授权角色
export function authUserCancelAll(data) {
return request({
url: '/system/role/authUser/cancelAll',
method: 'put',
params: data
})
}
// 授权用户选择
export function authUserSelectAll(data) {
return request({
url: '/system/role/authUser/selectAll',
method: 'put',
params: data
})
}
// 根据角色ID查询部门树结构
export function deptTreeSelect(roleId) {
return request({
url: '/system/role/deptTree/' + roleId,
method: 'get'
})
}

View File

@@ -0,0 +1,136 @@
import request from '@/utils/request'
import { parseStrEmpty } from "@/utils/ruoyi";
// 查询用户列表
export function listUser(query) {
return request({
url: '/system/user/list',
method: 'get',
params: query
})
}
// 查询用户详细
export function getUser(userId) {
return request({
url: '/system/user/' + parseStrEmpty(userId),
method: 'get'
})
}
// 新增用户
export function addUser(data) {
return request({
url: '/system/user',
method: 'post',
data: data
})
}
// 修改用户
export function updateUser(data) {
return request({
url: '/system/user',
method: 'put',
data: data
})
}
// 删除用户
export function delUser(userId) {
return request({
url: '/system/user/' + userId,
method: 'delete'
})
}
// 用户密码重置
export function resetUserPwd(userId, password) {
const data = {
userId,
password
}
return request({
url: '/system/user/resetPwd',
method: 'put',
data: data
})
}
// 用户状态修改
export function changeUserStatus(userId, status) {
const data = {
userId,
status
}
return request({
url: '/system/user/changeStatus',
method: 'put',
data: data
})
}
// 查询用户个人信息
export function getUserProfile() {
return request({
url: '/system/user/profile',
method: 'get'
})
}
// 修改用户个人信息
export function updateUserProfile(data) {
return request({
url: '/system/user/profile',
method: 'put',
data: data
})
}
// 用户密码重置
export function updateUserPwd(oldPassword, newPassword) {
const data = {
oldPassword,
newPassword
}
return request({
url: '/system/user/profile/updatePwd',
method: 'put',
data: data
})
}
// 用户头像上传
export function uploadAvatar(data) {
return request({
url: '/system/user/profile/avatar',
method: 'post',
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
data: data
})
}
// 查询授权角色
export function getAuthRole(userId) {
return request({
url: '/system/user/authRole/' + userId,
method: 'get'
})
}
// 保存授权角色
export function updateAuthRole(data) {
return request({
url: '/system/user/authRole',
method: 'put',
params: data
})
}
// 查询部门下拉树结构
export function deptTreeSelect() {
return request({
url: '/system/user/deptTree',
method: 'get'
})
}

View File

@@ -0,0 +1,85 @@
import request from '@/utils/request'
// 查询生成表数据
export function listTable(query) {
return request({
url: '/tool/gen/list',
method: 'get',
params: query
})
}
// 查询db数据库列表
export function listDbTable(query) {
return request({
url: '/tool/gen/db/list',
method: 'get',
params: query
})
}
// 查询表详细信息
export function getGenTable(tableId) {
return request({
url: '/tool/gen/' + tableId,
method: 'get'
})
}
// 修改代码生成信息
export function updateGenTable(data) {
return request({
url: '/tool/gen',
method: 'put',
data: data
})
}
// 导入表
export function importTable(data) {
return request({
url: '/tool/gen/importTable',
method: 'post',
params: data
})
}
// 创建表
export function createTable(data) {
return request({
url: '/tool/gen/createTable',
method: 'post',
params: data
})
}
// 预览生成代码
export function previewTable(tableId) {
return request({
url: '/tool/gen/preview/' + tableId,
method: 'get'
})
}
// 删除表数据
export function delTable(tableId) {
return request({
url: '/tool/gen/' + tableId,
method: 'delete'
})
}
// 生成代码(自定义路径)
export function genCode(tableName) {
return request({
url: '/tool/gen/genCode/' + tableName,
method: 'get'
})
}
// 同步数据库
export function synchDb(tableName) {
return request({
url: '/tool/gen/synchDb/' + tableName,
method: 'get'
})
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@@ -0,0 +1,9 @@
import Vue from 'vue'
import SvgIcon from '@/components/SvgIcon'// svg component
// register globally
Vue.component('svg-icon', SvgIcon)
const req = require.context('./svg', false, /\.svg$/)
const requireAll = requireContext => requireContext.keys().map(requireContext)
requireAll(req)

View File

@@ -0,0 +1 @@
<svg width="128" height="128" xmlns="http://www.w3.org/2000/svg"><path d="M121.718 73.272v9.953c3.957-7.584 6.199-16.05 6.199-24.995C127.917 26.079 99.273 0 63.958 0 28.644 0 0 26.079 0 58.23c0 .403.028.806.028 1.21l22.97-25.953h13.34l-19.76 27.187h6.42V53.77l13.728-19.477v49.361H22.998V73.272H2.158c5.951 20.284 23.608 36.208 45.998 41.399-1.44 3.3-5.618 11.263-12.565 12.674-8.607 1.764 23.358.428 46.163-13.178 17.519-4.611 31.938-15.849 39.77-30.513h-13.506V73.272H85.02V59.464l22.998-25.977h13.008l-19.429 27.187h6.421v-7.433l13.727-19.402v39.433h-.027zm-78.24 2.822a10.516 10.516 0 0 1-.996-4.535V44.548c0-1.613.332-3.124.996-4.535a11.66 11.66 0 0 1 2.713-3.68c1.134-1.032 2.49-1.864 4.04-2.468 1.55-.605 3.21-.908 4.982-.908h11.292c1.77 0 3.431.303 4.981.908 1.522.604 2.85 1.41 3.986 2.418l-12.26 16.303v-2.898a1.96 1.96 0 0 0-.665-1.512c-.443-.403-.996-.604-1.66-.604-.665 0-1.218.201-1.661.604a1.96 1.96 0 0 0-.664 1.512v9.071L44.364 77.606a10.556 10.556 0 0 1-.886-1.512zm35.73-4.535c0 1.613-.332 3.124-.997 4.535a11.66 11.66 0 0 1-2.712 3.68c-1.134 1.032-2.49 1.864-4.04 2.469-1.55.604-3.21.907-4.982.907H55.185c-1.77 0-3.431-.303-4.981-.907-1.55-.605-2.906-1.437-4.041-2.47a12.49 12.49 0 0 1-1.384-1.512l13.727-18.217v6.375c0 .605.222 1.109.665 1.512.442.403.996.604 1.66.604.664 0 1.218-.201 1.66-.604a1.96 1.96 0 0 0 .665-1.512V53.87L75.97 36.838c.913.932 1.66 1.99 2.214 3.175.664 1.41.996 2.922.996 4.535v27.011h.028z"/></svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -0,0 +1 @@
<svg width="128" height="128" xmlns="http://www.w3.org/2000/svg"><path d="M127.88 73.143c0 1.412-.506 2.635-1.518 3.669-1.011 1.033-2.209 1.55-3.592 1.55h-17.887c0 9.296-1.783 17.178-5.35 23.645l16.609 17.044c1.011 1.034 1.517 2.257 1.517 3.67 0 1.412-.506 2.635-1.517 3.668-.958 1.033-2.155 1.55-3.593 1.55-1.438 0-2.635-.517-3.593-1.55l-15.811-16.063a15.49 15.49 0 0 1-1.196 1.06c-.532.434-1.65 1.208-3.353 2.322a50.104 50.104 0 0 1-5.192 2.974c-1.758.87-3.94 1.658-6.546 2.364-2.607.706-5.189 1.06-7.748 1.06V47.044H58.89v73.062c-2.716 0-5.417-.367-8.106-1.102-2.688-.734-5.003-1.631-6.945-2.692a66.769 66.769 0 0 1-5.268-3.179c-1.571-1.057-2.73-1.94-3.476-2.65L33.9 109.34l-14.611 16.877c-1.066 1.14-2.344 1.711-3.833 1.711-1.277 0-2.422-.434-3.434-1.304-1.012-.978-1.557-2.187-1.635-3.627-.079-1.44.333-2.705 1.236-3.794l16.129-18.51c-3.087-6.197-4.63-13.644-4.63-22.342H5.235c-1.383 0-2.58-.517-3.592-1.55S.125 74.545.125 73.132c0-1.412.506-2.635 1.518-3.668 1.012-1.034 2.21-1.55 3.592-1.55h17.887V43.939L9.308 29.833c-1.012-1.033-1.517-2.256-1.517-3.669 0-1.412.505-2.635 1.517-3.668 1.012-1.034 2.21-1.55 3.593-1.55s2.58.516 3.593 1.55l13.813 14.106h67.396l13.814-14.106c1.012-1.034 2.21-1.55 3.592-1.55 1.384 0 2.581.516 3.593 1.55 1.012 1.033 1.518 2.256 1.518 3.668 0 1.413-.506 2.636-1.518 3.67l-13.814 14.105v23.975h17.887c1.383 0 2.58.516 3.593 1.55 1.011 1.033 1.517 2.256 1.517 3.668l-.005.01zM89.552 26.175H38.448c0-7.23 2.489-13.386 7.466-18.469C50.892 2.623 56.92.082 64 .082c7.08 0 13.108 2.541 18.086 7.624 4.977 5.083 7.466 11.24 7.466 18.469z"/></svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1568899741379" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2054" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M960 591.424V368.96c0-0.288 0.16-0.512 0.16-0.768S960 367.68 960 367.424V192a32 32 0 0 0-32-32H96a32 32 0 0 0-32 32v175.424c0 0.288-0.16 0.512-0.16 0.768s0.16 0.48 0.16 0.768v222.464c0 0.288-0.16 0.512-0.16 0.768s0.16 0.48 0.16 0.768V864a32 32 0 0 0 32 32h832a32 32 0 0 0 32-32v-271.04c0-0.288 0.16-0.512 0.16-0.768S960 591.68 960 591.424z m-560-31.232v-160H608v160h-208z m208 64V832h-208v-207.808H608z m-480-224h208v160H128v-160z m544 0h224v160h-224v-160zM896 224v112.192H128V224h768zM128 624.192h208V832H128v-207.808zM672 832v-207.808h224V832h-224z" p-id="2055"></path></svg>

After

Width:  |  Height:  |  Size: 954 B

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1588670460195" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1314" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M230.4 307.712c13.824 0 25.088-11.264 25.088-25.088 0-100.352 81.92-182.272 182.272-182.272s182.272 81.408 182.272 182.272c0 13.824 11.264 25.088 25.088 25.088s25.088-11.264 24.576-25.088c0-127.488-103.936-231.936-231.936-231.936S205.824 154.624 205.824 282.624c-0.512 14.336 10.752 25.088 24.576 25.088z m564.736 234.496c-11.264 0-21.504 2.048-31.232 6.144 0-44.544-40.448-81.92-88.064-81.92-14.848 0-28.16 3.584-39.936 10.24-13.824-28.16-44.544-48.128-78.848-48.128-12.288 0-24.576 2.56-35.328 7.68V284.16c0-45.568-37.888-81.92-84.48-81.92s-84.48 36.864-84.48 81.92v348.672l-69.12-112.64c-18.432-28.16-58.368-36.864-91.136-19.968-26.624 14.336-46.592 47.104-30.208 88.064 3.072 8.192 76.8 205.312 171.52 311.296 0 0 28.16 24.576 43.008 58.88 4.096 9.728 13.312 15.36 22.528 15.36 3.072 0 6.656-0.512 9.728-2.048 12.288-5.12 18.432-19.968 12.8-32.256-19.456-44.544-53.76-74.752-53.76-74.752C281.6 768 209.408 573.44 208.384 570.88c-5.12-12.8-2.56-20.992 7.168-26.112 9.216-4.608 21.504-4.608 26.112 2.56l113.152 184.32c4.096 8.704 12.8 14.336 22.528 14.336 13.824 0 25.088-10.752 25.088-25.088V284.16c0-17.92 15.36-32.256 34.816-32.256s34.816 14.336 34.816 32.256v284.16c0 13.824 10.24 25.088 24.576 25.088 13.824 0 25.088-11.264 25.088-25.088v-57.344c0-17.92 15.36-32.768 34.816-32.768 19.968 0 37.376 15.36 37.376 32.768v95.232c0 7.168 3.072 13.312 7.68 17.92 4.608 4.608 10.752 7.168 17.92 7.168 13.824 0 24.576-11.264 24.576-25.088V547.84c0-18.432 13.824-32.256 32.256-32.256 20.48 0 38.912 15.36 38.912 32.256v95.232c0 13.824 11.264 25.088 25.088 25.088s24.576-11.264 25.088-25.088v-18.944c0-18.944 12.8-32.256 30.72-32.256 18.432 0 22.528 18.944 22.528 31.744 0 1.024-11.776 99.84-50.688 173.056-30.72 58.368-45.056 112.128-51.2 146.944-2.56 13.312 6.656 26.112 19.968 28.672 1.536 0 3.072 0.512 4.608 0.512 11.776 0 22.016-8.192 24.064-20.48 5.632-31.232 18.432-79.36 46.08-132.608 43.52-81.92 55.808-186.88 56.32-193.536-0.512-50.688-29.696-83.968-72.704-83.968z"></path></path></svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1576153230908" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="971" xmlns:xlink="http://www.w3.org/1999/xlink" width="81" height="81"><defs><style type="text/css"></style></defs><path d="M772.87036133 734.06115723c-43.34106445 0-80.00793458 27.93273926-93.76831055 66.57714843H475.90991211c-56.60705567 0-102.66723633-46.06018067-102.66723633-102.66723633V600.82446289h305.859375c13.76037598 38.64440918 50.42724609 66.57714844 93.76831055 66.57714844 55.12390137 0 99.94812012-44.82421875 99.94812012-99.94812012S827.9942627 467.50537109 772.87036133 467.50537109c-43.34106445 0-80.00793458 27.93273926-93.76831055 66.57714844H373.24267578V401.01062011h321.92687989c55.12390137 0 99.94812012-44.82421875 99.94812011-99.94812011V190.07312011C795.11767578 134.94921875 750.29345703 90.125 695.16955567 90.125H251.12963867C196.0057373 90.125 151.18151855 134.94921875 151.18151855 190.07312011V301.0625c0 55.12390137 44.82421875 99.94812012 99.94812012 99.94812012h55.53588867v296.96044921c0 93.35632325 75.97045898 169.32678223 169.32678224 169.32678223h203.19213866c13.76037598 38.64440918 50.42724609 66.57714844 93.76831055 66.57714844 55.12390137 0 99.94812012-44.82421875 99.94812012-99.94812012s-44.90661622-99.86572266-100.03051758-99.86572265z m0-199.89624024c18.37463379 0 33.28857422 14.91394043 33.28857422 33.28857423s-14.91394043 33.28857422-33.28857422 33.28857421-33.28857422-14.91394043-33.28857422-33.28857421 14.91394043-33.28857422 33.28857422-33.28857422zM217.75866699 301.0625V190.07312011c0-18.37463379 14.91394043-33.28857422 33.28857423-33.28857421h444.03991698c18.37463379 0 33.28857422 14.91394043 33.28857422 33.28857422V301.0625c0 18.37463379-14.91394043 33.28857422-33.28857422 33.28857422H251.12963867c-18.37463379 0-33.37097168-14.91394043-33.37097168-33.28857422z m555.11169434 566.23535156c-18.37463379 0-33.28857422-14.91394043-33.28857422-33.28857422 0-18.37463379 14.91394043-33.28857422 33.28857422-33.28857422s33.28857422 14.91394043 33.28857422 33.28857422c0.08239747 18.29223633-14.91394043 33.28857422-33.28857422 33.28857422z" p-id="972"></path></svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@@ -0,0 +1 @@
<svg width="128" height="128" xmlns="http://www.w3.org/2000/svg"><path d="M0 54.857h36.571V128H0V54.857zM91.429 27.43H128V128H91.429V27.429zM45.714 0h36.572v128H45.714V0z"/></svg>

After

Width:  |  Height:  |  Size: 179 B

Some files were not shown because too many files have changed in this diff Show More