From 6969fe5744375e80c1ef784b522137bc022975d2 Mon Sep 17 00:00:00 2001 From: MHW Date: Tue, 14 Apr 2026 16:45:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=80=E6=9C=AF=E8=A6=81=E6=B1=82=EF=BC=9A?= =?UTF-8?q?=E8=A7=84=E5=88=99=E5=B1=95=E7=A4=BA=E8=A1=A8=E6=A0=BC=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/controller/rule/RuleController.java | 51 +++++ .../rule/domain/config/RuleConfig.java | 61 ++++++ .../rule/domain/config/RuleConfigParam.java | 34 ++++ .../rule/domain/config/RuleConfigQuery.java | 28 +++ .../rule/domain/config/RuleDictItem.java | 28 +++ .../rule/mapper/RuleConfigMapper.java | 38 ++++ .../rule/service/IRuleConfigService.java | 22 +++ .../service/impl/RuleConfigServiceImpl.java | 139 ++++++++++++++ .../mapper/rule/RuleConfigMapper.xml | 174 ++++++++++++++++++ .../sql/rule/002_rule_seed_from_drl.sql | 52 +++--- 10 files changed, 600 insertions(+), 27 deletions(-) create mode 100644 auto-solution-rule/src/main/java/com/solution/rule/domain/config/RuleConfig.java create mode 100644 auto-solution-rule/src/main/java/com/solution/rule/domain/config/RuleConfigParam.java create mode 100644 auto-solution-rule/src/main/java/com/solution/rule/domain/config/RuleConfigQuery.java create mode 100644 auto-solution-rule/src/main/java/com/solution/rule/domain/config/RuleDictItem.java create mode 100644 auto-solution-rule/src/main/java/com/solution/rule/mapper/RuleConfigMapper.java create mode 100644 auto-solution-rule/src/main/java/com/solution/rule/service/IRuleConfigService.java create mode 100644 auto-solution-rule/src/main/java/com/solution/rule/service/impl/RuleConfigServiceImpl.java create mode 100644 auto-solution-rule/src/main/resources/mapper/rule/RuleConfigMapper.xml diff --git a/auto-solution-admin/src/main/java/com/solution/web/controller/rule/RuleController.java b/auto-solution-admin/src/main/java/com/solution/web/controller/rule/RuleController.java index a7ef814..f55335a 100644 --- a/auto-solution-admin/src/main/java/com/solution/web/controller/rule/RuleController.java +++ b/auto-solution-admin/src/main/java/com/solution/web/controller/rule/RuleController.java @@ -6,7 +6,10 @@ import com.solution.common.core.domain.AjaxResult; import com.solution.common.core.page.TableDataInfo; import com.solution.common.enums.BusinessType; import com.solution.rule.domain.Rule; +import com.solution.rule.domain.config.RuleConfig; +import com.solution.rule.domain.config.RuleConfigQuery; import com.solution.rule.service.IRuleService; +import com.solution.rule.service.IRuleConfigService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; @@ -22,6 +25,8 @@ public class RuleController extends BaseController { @Autowired private IRuleService ruleService; + @Autowired + private IRuleConfigService ruleConfigService; @PreAuthorize("@ss.hasPermi('system:rule:list')") @GetMapping("/list") @@ -62,4 +67,50 @@ public class RuleController extends BaseController { public AjaxResult remove(@PathVariable Integer[] ids) { return toAjax(ruleService.deleteRuleByIds(ids)); } + + @PreAuthorize("@ss.hasPermi('system:rule:list')") + @GetMapping("/config/list") + @ApiOperation("查询规则聚合列表") + public TableDataInfo configList(RuleConfigQuery query) { + startPage(); + return getDataTable(ruleConfigService.selectRuleConfigList(query)); + } + + @PreAuthorize("@ss.hasPermi('system:rule:query')") + @GetMapping("/config/{ruleCode}") + @ApiOperation("查询规则聚合详情") + public AjaxResult configInfo(@PathVariable String ruleCode) { + return success(ruleConfigService.selectRuleConfigByCode(ruleCode)); + } + + @PreAuthorize("@ss.hasPermi('system:rule:add')") + @Log(title = "规则聚合管理", businessType = BusinessType.INSERT) + @PostMapping("/config") + @ApiOperation("新增规则聚合") + public AjaxResult addConfig(@RequestBody RuleConfig ruleConfig) { + return toAjax(ruleConfigService.insertRuleConfig(ruleConfig)); + } + + @PreAuthorize("@ss.hasPermi('system:rule:edit')") + @Log(title = "规则聚合管理", businessType = BusinessType.UPDATE) + @PutMapping("/config") + @ApiOperation("修改规则聚合") + public AjaxResult editConfig(@RequestBody RuleConfig ruleConfig) { + return toAjax(ruleConfigService.updateRuleConfig(ruleConfig)); + } + + @PreAuthorize("@ss.hasPermi('system:rule:remove')") + @Log(title = "规则聚合管理", businessType = BusinessType.DELETE) + @DeleteMapping("/config/{ruleCodes}") + @ApiOperation("删除规则聚合") + public AjaxResult removeConfig(@PathVariable String[] ruleCodes) { + return toAjax(ruleConfigService.deleteRuleConfigByCodes(ruleCodes)); + } + + @PreAuthorize("@ss.hasPermi('system:rule:query')") + @GetMapping("/config/dict/{dictType}") + @ApiOperation("按类型查询规则字典") + public AjaxResult dict(@PathVariable String dictType) { + return success(ruleConfigService.selectDictByType(dictType)); + } } \ No newline at end of file diff --git a/auto-solution-rule/src/main/java/com/solution/rule/domain/config/RuleConfig.java b/auto-solution-rule/src/main/java/com/solution/rule/domain/config/RuleConfig.java new file mode 100644 index 0000000..9836ede --- /dev/null +++ b/auto-solution-rule/src/main/java/com/solution/rule/domain/config/RuleConfig.java @@ -0,0 +1,61 @@ +package com.solution.rule.domain.config; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; +import java.util.List; + +@Data +@ApiModel("规则聚合对象") +public class RuleConfig { + + @ApiModelProperty("主键ID") + private Long id; + + @ApiModelProperty("规则编码") + private String ruleCode; + + @ApiModelProperty("规则名称") + private String ruleName; + + @ApiModelProperty("层级编码(task/action/platform)") + private String levelCode; + + @ApiModelProperty("种类编码(select/assign/deploy/config/mode/spacetime/relation/limit)") + private String kindCode; + + @ApiModelProperty("模块编码(equipment/target/position/track/group)") + private String moduleCode; + + @ApiModelProperty("优先级(数字越小越先执行)") + private Integer priorityNo; + + @ApiModelProperty("条件表达式") + private String conditionExpr; + + @ApiModelProperty("动作表达式") + private String actionExpr; + + @ApiModelProperty("版本号") + private Integer versionNo; + + @ApiModelProperty("是否启用(1是0否)") + private Integer enabled; + + @ApiModelProperty("备注") + private String remark; + + @ApiModelProperty("创建时间") + private Date createdAt; + + @ApiModelProperty("更新时间") + private Date updatedAt; + + @ApiModelProperty("参数列表") + private List params; + + @ApiModelProperty("适用任务类型编码列表") + private List taskTypes; +} diff --git a/auto-solution-rule/src/main/java/com/solution/rule/domain/config/RuleConfigParam.java b/auto-solution-rule/src/main/java/com/solution/rule/domain/config/RuleConfigParam.java new file mode 100644 index 0000000..543906a --- /dev/null +++ b/auto-solution-rule/src/main/java/com/solution/rule/domain/config/RuleConfigParam.java @@ -0,0 +1,34 @@ +package com.solution.rule.domain.config; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data +@ApiModel("规则参数对象") +public class RuleConfigParam { + + @ApiModelProperty("规则编码") + private String ruleCode; + + @ApiModelProperty("参数键") + private String paramKey; + + @ApiModelProperty("参数值") + private String paramVal; + + @ApiModelProperty("值类型(string/number/bool/json)") + private String valType; + + @ApiModelProperty("参数名称") + private String paramName; + + @ApiModelProperty("排序号") + private Integer sortNo; + + @ApiModelProperty("是否启用(1是0否)") + private Integer enabled; + + @ApiModelProperty("备注") + private String remark; +} diff --git a/auto-solution-rule/src/main/java/com/solution/rule/domain/config/RuleConfigQuery.java b/auto-solution-rule/src/main/java/com/solution/rule/domain/config/RuleConfigQuery.java new file mode 100644 index 0000000..60d209a --- /dev/null +++ b/auto-solution-rule/src/main/java/com/solution/rule/domain/config/RuleConfigQuery.java @@ -0,0 +1,28 @@ +package com.solution.rule.domain.config; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data +@ApiModel("规则配置查询对象") +public class RuleConfigQuery { + + @ApiModelProperty("规则编码") + private String ruleCode; + + @ApiModelProperty("规则名称") + private String ruleName; + + @ApiModelProperty("层级编码(task/action/platform)") + private String levelCode; + + @ApiModelProperty("种类编码(select/assign/deploy/config/mode/spacetime/relation/limit)") + private String kindCode; + + @ApiModelProperty("模块编码(equipment/target/position/track/group)") + private String moduleCode; + + @ApiModelProperty("是否启用(1是0否)") + private Integer enabled; +} diff --git a/auto-solution-rule/src/main/java/com/solution/rule/domain/config/RuleDictItem.java b/auto-solution-rule/src/main/java/com/solution/rule/domain/config/RuleDictItem.java new file mode 100644 index 0000000..5f01157 --- /dev/null +++ b/auto-solution-rule/src/main/java/com/solution/rule/domain/config/RuleDictItem.java @@ -0,0 +1,28 @@ +package com.solution.rule.domain.config; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data +@ApiModel("规则字典项") +public class RuleDictItem { + + @ApiModelProperty("字典类型") + private String dictType; + + @ApiModelProperty("字典编码") + private String dictCode; + + @ApiModelProperty("字典名称") + private String dictName; + + @ApiModelProperty("排序号") + private Integer sortNo; + + @ApiModelProperty("是否启用(1是0否)") + private Integer enabled; + + @ApiModelProperty("备注") + private String remark; +} diff --git a/auto-solution-rule/src/main/java/com/solution/rule/mapper/RuleConfigMapper.java b/auto-solution-rule/src/main/java/com/solution/rule/mapper/RuleConfigMapper.java new file mode 100644 index 0000000..9f3575c --- /dev/null +++ b/auto-solution-rule/src/main/java/com/solution/rule/mapper/RuleConfigMapper.java @@ -0,0 +1,38 @@ +package com.solution.rule.mapper; + +import com.solution.rule.domain.config.RuleConfig; +import com.solution.rule.domain.config.RuleConfigParam; +import com.solution.rule.domain.config.RuleConfigQuery; +import com.solution.rule.domain.config.RuleDictItem; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +public interface RuleConfigMapper { + + List selectRuleConfigList(RuleConfigQuery query); + + RuleConfig selectRuleConfigByCode(@Param("ruleCode") String ruleCode); + + int countByRuleCode(@Param("ruleCode") String ruleCode); + + int insertRuleConfig(RuleConfig ruleConfig); + + int updateRuleConfig(RuleConfig ruleConfig); + + int deleteRuleConfigByCodes(@Param("ruleCodes") String[] ruleCodes); + + List selectParamsByRuleCode(@Param("ruleCode") String ruleCode); + + int deleteParamsByRuleCodes(@Param("ruleCodes") String[] ruleCodes); + + int insertParamsBatch(@Param("params") List params); + + List selectTaskTypesByRuleCode(@Param("ruleCode") String ruleCode); + + int deleteTaskTypesByRuleCodes(@Param("ruleCodes") String[] ruleCodes); + + int insertTaskTypesBatch(@Param("ruleCode") String ruleCode, @Param("taskTypes") List taskTypes); + + List selectDictByType(@Param("dictType") String dictType); +} diff --git a/auto-solution-rule/src/main/java/com/solution/rule/service/IRuleConfigService.java b/auto-solution-rule/src/main/java/com/solution/rule/service/IRuleConfigService.java new file mode 100644 index 0000000..2ef3add --- /dev/null +++ b/auto-solution-rule/src/main/java/com/solution/rule/service/IRuleConfigService.java @@ -0,0 +1,22 @@ +package com.solution.rule.service; + +import com.solution.rule.domain.config.RuleConfig; +import com.solution.rule.domain.config.RuleConfigQuery; +import com.solution.rule.domain.config.RuleDictItem; + +import java.util.List; + +public interface IRuleConfigService { + + List selectRuleConfigList(RuleConfigQuery query); + + RuleConfig selectRuleConfigByCode(String ruleCode); + + int insertRuleConfig(RuleConfig ruleConfig); + + int updateRuleConfig(RuleConfig ruleConfig); + + int deleteRuleConfigByCodes(String[] ruleCodes); + + List selectDictByType(String dictType); +} diff --git a/auto-solution-rule/src/main/java/com/solution/rule/service/impl/RuleConfigServiceImpl.java b/auto-solution-rule/src/main/java/com/solution/rule/service/impl/RuleConfigServiceImpl.java new file mode 100644 index 0000000..7c68f0d --- /dev/null +++ b/auto-solution-rule/src/main/java/com/solution/rule/service/impl/RuleConfigServiceImpl.java @@ -0,0 +1,139 @@ +package com.solution.rule.service.impl; + +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.ObjectUtil; +import com.solution.common.constant.ExceptionConstants; +import com.solution.rule.domain.config.RuleConfig; +import com.solution.rule.domain.config.RuleConfigParam; +import com.solution.rule.domain.config.RuleConfigQuery; +import com.solution.rule.domain.config.RuleDictItem; +import com.solution.rule.mapper.RuleConfigMapper; +import com.solution.rule.service.IRuleConfigService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +@Service +public class RuleConfigServiceImpl implements IRuleConfigService { + + @Autowired + private RuleConfigMapper ruleConfigMapper; + + @Override + public List selectRuleConfigList(RuleConfigQuery query) { + return ruleConfigMapper.selectRuleConfigList(query); + } + + @Override + public RuleConfig selectRuleConfigByCode(String ruleCode) { + RuleConfig config = ruleConfigMapper.selectRuleConfigByCode(ruleCode); + if (config == null) { + return null; + } + config.setParams(ruleConfigMapper.selectParamsByRuleCode(ruleCode)); + config.setTaskTypes(ruleConfigMapper.selectTaskTypesByRuleCode(ruleCode)); + return config; + } + + @Override + @Transactional(rollbackFor = Exception.class) + public int insertRuleConfig(RuleConfig ruleConfig) { + validateBase(ruleConfig); + if (ruleConfigMapper.countByRuleCode(ruleConfig.getRuleCode()) > 0) { + throw new RuntimeException("规则编码已存在"); + } + int rows = ruleConfigMapper.insertRuleConfig(fillDefault(ruleConfig)); + saveChildren(ruleConfig); + return rows; + } + + @Override + @Transactional(rollbackFor = Exception.class) + public int updateRuleConfig(RuleConfig ruleConfig) { + validateBase(ruleConfig); + if (ruleConfigMapper.countByRuleCode(ruleConfig.getRuleCode()) <= 0) { + throw new RuntimeException("规则编码不存在"); + } + int rows = ruleConfigMapper.updateRuleConfig(fillDefault(ruleConfig)); + String[] ruleCodes = {ruleConfig.getRuleCode()}; + ruleConfigMapper.deleteParamsByRuleCodes(ruleCodes); + ruleConfigMapper.deleteTaskTypesByRuleCodes(ruleCodes); + saveChildren(ruleConfig); + return rows; + } + + @Override + @Transactional(rollbackFor = Exception.class) + public int deleteRuleConfigByCodes(String[] ruleCodes) { + if (ruleCodes == null || ruleCodes.length == 0) { + return 0; + } + ruleConfigMapper.deleteParamsByRuleCodes(ruleCodes); + ruleConfigMapper.deleteTaskTypesByRuleCodes(ruleCodes); + return ruleConfigMapper.deleteRuleConfigByCodes(ruleCodes); + } + + @Override + public List selectDictByType(String dictType) { + if (ObjectUtil.isEmpty(dictType)) { + throw new RuntimeException(ExceptionConstants.PARAMETER_EXCEPTION); + } + return ruleConfigMapper.selectDictByType(dictType); + } + + private void saveChildren(RuleConfig ruleConfig) { + if (CollUtil.isNotEmpty(ruleConfig.getParams())) { + Set keys = new HashSet<>(); + for (RuleConfigParam param : ruleConfig.getParams()) { + if (param == null || ObjectUtil.isEmpty(param.getParamKey())) { + throw new RuntimeException("参数键不能为空"); + } + if (!keys.add(param.getParamKey())) { + throw new RuntimeException("参数键重复: " + param.getParamKey()); + } + param.setRuleCode(ruleConfig.getRuleCode()); + if (param.getSortNo() == null) { + param.setSortNo(0); + } + if (param.getEnabled() == null) { + param.setEnabled(1); + } + if (ObjectUtil.isEmpty(param.getValType())) { + param.setValType("string"); + } + } + ruleConfigMapper.insertParamsBatch(ruleConfig.getParams()); + } + if (CollUtil.isNotEmpty(ruleConfig.getTaskTypes())) { + ruleConfigMapper.insertTaskTypesBatch(ruleConfig.getRuleCode(), ruleConfig.getTaskTypes()); + } + } + + private RuleConfig fillDefault(RuleConfig ruleConfig) { + if (ruleConfig.getPriorityNo() == null) { + ruleConfig.setPriorityNo(100); + } + if (ruleConfig.getVersionNo() == null) { + ruleConfig.setVersionNo(1); + } + if (ruleConfig.getEnabled() == null) { + ruleConfig.setEnabled(1); + } + return ruleConfig; + } + + private void validateBase(RuleConfig ruleConfig) { + if (ruleConfig == null + || ObjectUtil.isEmpty(ruleConfig.getRuleCode()) + || ObjectUtil.isEmpty(ruleConfig.getRuleName()) + || ObjectUtil.isEmpty(ruleConfig.getLevelCode()) + || ObjectUtil.isEmpty(ruleConfig.getKindCode()) + || ObjectUtil.isEmpty(ruleConfig.getModuleCode())) { + throw new RuntimeException(ExceptionConstants.PARAMETER_EXCEPTION); + } + } +} diff --git a/auto-solution-rule/src/main/resources/mapper/rule/RuleConfigMapper.xml b/auto-solution-rule/src/main/resources/mapper/rule/RuleConfigMapper.xml new file mode 100644 index 0000000..8d9e7bc --- /dev/null +++ b/auto-solution-rule/src/main/resources/mapper/rule/RuleConfigMapper.xml @@ -0,0 +1,174 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + INSERT INTO rule_item + (rule_code, rule_name, level_code, kind_code, module_code, priority_no, condition_expr, + action_expr, version_no, enabled, remark, created_at, updated_at) + VALUES + (#{ruleCode}, #{ruleName}, #{levelCode}, #{kindCode}, #{moduleCode}, #{priorityNo}, #{conditionExpr}, + #{actionExpr}, #{versionNo}, #{enabled}, #{remark}, NOW(), NOW()) + + + + UPDATE rule_item + + rule_name = #{ruleName}, + level_code = #{levelCode}, + kind_code = #{kindCode}, + module_code = #{moduleCode}, + priority_no = #{priorityNo}, + condition_expr = #{conditionExpr}, + action_expr = #{actionExpr}, + version_no = #{versionNo}, + enabled = #{enabled}, + remark = #{remark}, + updated_at = NOW() + + WHERE rule_code = #{ruleCode} + + + + DELETE FROM rule_item + WHERE rule_code IN + + #{code} + + + + + + + DELETE FROM rule_item_param + WHERE rule_code IN + + #{code} + + + + + INSERT INTO rule_item_param + (rule_code, param_key, param_val, val_type, param_name, sort_no, enabled, remark, created_at, updated_at) + VALUES + + (#{item.ruleCode}, #{item.paramKey}, #{item.paramVal}, #{item.valType}, #{item.paramName}, + #{item.sortNo}, #{item.enabled}, #{item.remark}, NOW(), NOW()) + + + + + + + DELETE FROM rule_item_task_type + WHERE rule_code IN + + #{code} + + + + + INSERT INTO rule_item_task_type (rule_code, task_type_code, created_at) + VALUES + + (#{ruleCode}, #{taskType}, NOW()) + + + + + + diff --git a/auto-solution-rule/src/main/resources/sql/rule/002_rule_seed_from_drl.sql b/auto-solution-rule/src/main/resources/sql/rule/002_rule_seed_from_drl.sql index aa15d46..96052b4 100644 --- a/auto-solution-rule/src/main/resources/sql/rule/002_rule_seed_from_drl.sql +++ b/auto-solution-rule/src/main/resources/sql/rule/002_rule_seed_from_drl.sql @@ -182,32 +182,30 @@ ON DUPLICATE KEY UPDATE `remark` = VALUES(`remark`); -- 4) 规则适用任务类型(默认全部规则覆盖五类任务,后续可在前端按需调整) -INSERT INTO `rule_item_task_type` (`rule_code`, `task_type_code`) +INSERT IGNORE INTO `rule_item_task_type` (`rule_code`, `task_type_code`) SELECT r.rule_code, t.task_type_code FROM ( - SELECT 'R_TASK_SELECT_BASE' AS rule_code - UNION ALL SELECT 'R_TASK_SELECT_SLOT_1' - UNION ALL SELECT 'R_TASK_SELECT_SLOT_2' - UNION ALL SELECT 'R_TASK_SELECT_SLOT_3' - UNION ALL SELECT 'R_TASK_REL_AIR_PLATFORM' - UNION ALL SELECT 'R_TASK_REL_AIR_TASK' - UNION ALL SELECT 'R_TASK_REL_GROUND_TASK' - UNION ALL SELECT 'R_TASK_REL_TANK' - UNION ALL SELECT 'R_TASK_REL_MISSILE' - UNION ALL SELECT 'R_TASK_ASSIGN_TARGET' - UNION ALL SELECT 'R_TASK_LIMIT_SUPPLEMENT' - UNION ALL SELECT 'R_PLATFORM_DEPLOY' - UNION ALL SELECT 'R_PLATFORM_SPACETIME' - UNION ALL SELECT 'R_ACTION_TRACK_ROUTE' - UNION ALL SELECT 'R_ACTION_TRACK_SPACETIME' - UNION ALL SELECT 'R_ACTION_GROUP_FORMATION' -) r -CROSS JOIN ( - SELECT 'strike' AS task_type_code - UNION ALL SELECT 'recon' - UNION ALL SELECT 'intercept' - UNION ALL SELECT 'support' - UNION ALL SELECT 'jamming' -) t -ON DUPLICATE KEY UPDATE -`task_type_code` = VALUES(`task_type_code`); + SELECT 'R_TASK_SELECT_BASE' AS rule_code + UNION ALL SELECT 'R_TASK_SELECT_SLOT_1' + UNION ALL SELECT 'R_TASK_SELECT_SLOT_2' + UNION ALL SELECT 'R_TASK_SELECT_SLOT_3' + UNION ALL SELECT 'R_TASK_REL_AIR_PLATFORM' + UNION ALL SELECT 'R_TASK_REL_AIR_TASK' + UNION ALL SELECT 'R_TASK_REL_GROUND_TASK' + UNION ALL SELECT 'R_TASK_REL_TANK' + UNION ALL SELECT 'R_TASK_REL_MISSILE' + UNION ALL SELECT 'R_TASK_ASSIGN_TARGET' + UNION ALL SELECT 'R_TASK_LIMIT_SUPPLEMENT' + UNION ALL SELECT 'R_PLATFORM_DEPLOY' + UNION ALL SELECT 'R_PLATFORM_SPACETIME' + UNION ALL SELECT 'R_ACTION_TRACK_ROUTE' + UNION ALL SELECT 'R_ACTION_TRACK_SPACETIME' + UNION ALL SELECT 'R_ACTION_GROUP_FORMATION' + ) r + CROSS JOIN ( + SELECT 'strike' AS task_type_code + UNION ALL SELECT 'recon' + UNION ALL SELECT 'intercept' + UNION ALL SELECT 'support' + UNION ALL SELECT 'jamming' +) t;