26-03-13-14:36:火力规则简单实现

This commit is contained in:
MHW
2026-03-13 14:36:31 +08:00
parent 8b3fe9b548
commit 99c100f2ac
31 changed files with 997 additions and 4 deletions

View File

@@ -0,0 +1,56 @@
package com.solution.web.controller.rule;
import com.solution.common.core.controller.BaseController;
import com.solution.common.core.domain.AjaxResult;
import com.solution.rule.domain.FireRuleExecuteDTO;
import com.solution.rule.service.RuleService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@Api("火力规则")
@RestController
@RequestMapping("/api/system/firerule")
public class RuleController extends BaseController {
@Autowired
private RuleService ruleService;
/**
* 开始执行规则匹配
* @param fireRuleExecuteDTO 敌方参数
* @return
*/
@PostMapping("/start")
@ApiOperation("开始执行规则匹配")
public AjaxResult execute(@RequestBody FireRuleExecuteDTO fireRuleExecuteDTO){
return success(ruleService.execute(fireRuleExecuteDTO));
}
/**
* 获取所有武器平台和组件
* @return
*/
@GetMapping("/weapon")
@ApiOperation("获取所有武器平台和组件")
public AjaxResult getPlatformComponentNames(){
return success(ruleService.getPlatformComponentNames());
}
/**
* 获取通信组件的所有平台和组件
* @param scenarioId
* @return
*/
@GetMapping("/comm")
@ApiOperation("获取通信组件的所有平台和组件")
public AjaxResult getCommPlatformComponentNames(Integer scenarioId){
return success(ruleService.getCommPlatformComponentNames(scenarioId));
}
}

View File

@@ -6,9 +6,11 @@ spring:
druid:
# 主库数据源
master:
url: jdbc:mysql://192.168.166.71:3306/behaviortreedb?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
# url: jdbc:mysql://192.168.166.71:3306/behaviortreedb?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
url: jdbc:mysql://localhost:3306/autosolution_db?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root
password: 123456
# password: 123456
password: 1234
# 从库数据源
slave:
# 从数据源开关/默认关闭

View File

@@ -67,13 +67,15 @@ spring:
# redis 配置
redis:
# 地址
host: 192.168.166.71
# host: 192.168.166.71
host: 127.0.0.1
# 端口默认为6379
port: 6379
# 数据库索引
database: 0
# 密码
password:
# password:
password: 123456
# 连接超时时间
timeout: 10s
lettuce:
@@ -104,6 +106,8 @@ mybatis:
mapperLocations: classpath*:mapper/**/*Mapper.xml
# 加载全局的配置文件
configLocation: classpath:mybatis/mybatis-config.xml
configuration:
map-underscore-to-camel-case: true
# PageHelper分页插件
pagehelper: