Explorar o código

fix some bug
add algorithm config

allen hai 1 ano
pai
achega
b56ad4f27e
Modificáronse 22 ficheiros con 453 adicións e 52 borrados
  1. 345 2
      script/sql/postgresql/data(postgresql).sql
  2. 2 2
      taais-modules/taais-biz/src/main/java/com/taais/biz/controller/AlgorithmConfigController.java
  3. 11 2
      taais-modules/taais-biz/src/main/java/com/taais/biz/domain/AlgorithmConfig.java
  4. 13 3
      taais-modules/taais-biz/src/main/java/com/taais/biz/domain/bo/AlgorithmConfigBo.java
  5. 5 0
      taais-modules/taais-biz/src/main/java/com/taais/biz/domain/bo/AlgorithmConfigParamBo.java
  6. 15 2
      taais-modules/taais-biz/src/main/java/com/taais/biz/domain/vo/AlgorithmConfigImportVo.java
  7. 15 2
      taais-modules/taais-biz/src/main/java/com/taais/biz/domain/vo/AlgorithmConfigVo.java
  8. 1 1
      taais-modules/taais-biz/src/main/java/com/taais/biz/listener/AlgorithmConfigImportListener.java
  9. 2 2
      taais-modules/taais-biz/src/main/java/com/taais/biz/mapper/AlgorithmConfigMapper.java
  10. 2 2
      taais-modules/taais-biz/src/main/java/com/taais/biz/service/IAlgorithmConfigService.java
  11. 4 2
      taais-modules/taais-biz/src/main/java/com/taais/biz/service/impl/AlgorithmConfigServiceImpl.java
  12. 6 0
      taais-modules/taais-generator/src/main/java/com/taais/generator/service/GenTableServiceImpl.java
  13. 1 1
      taais-modules/taais-generator/src/main/resources/generator.yml
  14. 2 2
      taais-modules/taais-generator/src/main/resources/vm/java/bo.java.vm
  15. 7 7
      taais-modules/taais-generator/src/main/resources/vm/java/controller.java.vm
  16. 2 2
      taais-modules/taais-generator/src/main/resources/vm/java/domain.java.vm
  17. 5 5
      taais-modules/taais-generator/src/main/resources/vm/java/listener.java.vm
  18. 2 2
      taais-modules/taais-generator/src/main/resources/vm/java/service.java.vm
  19. 5 5
      taais-modules/taais-generator/src/main/resources/vm/java/serviceImpl.java.vm
  20. 2 2
      taais-modules/taais-generator/src/main/resources/vm/java/sub-domain.java.vm
  21. 2 2
      taais-modules/taais-generator/src/main/resources/vm/java/vo-import.java.vm
  22. 4 4
      taais-modules/taais-generator/src/main/resources/vm/java/vo.java.vm

+ 345 - 2
script/sql/postgresql/data(postgresql).sql

@@ -84,7 +84,9 @@ DROP TABLE IF EXISTS public.algorithm_config;
 
 CREATE TABLE "public"."algorithm_config" (
  "id" "pg_catalog"."int8" NOT NULL,
- "subsystem" "pg_catalog"."varchar" COLLATE "pg_catalog"."default" NOT NULL,
+ "type" "pg_catalog"."varchar" COLLATE "pg_catalog"."default" NOT NULL,
+ "parent_id" "pg_catalog"."int8",
+ "subsystem" "pg_catalog"."varchar" COLLATE "pg_catalog"."default",
  "algorithm_name" "pg_catalog"."varchar" COLLATE "pg_catalog"."default" NOT NULL,
  "algorithm_address" "pg_catalog"."varchar" COLLATE "pg_catalog"."default" NOT NULL,
  "parameter_config" "pg_catalog"."text" COLLATE "pg_catalog"."default",
@@ -96,6 +98,7 @@ CREATE TABLE "public"."algorithm_config" (
  "tenant_id" "pg_catalog"."int8" DEFAULT 0,
  version           integer                 DEFAULT 0,
  del_flag      smallint               DEFAULT '0'::smallint         NOT NULL,
+ "system" "pg_catalog"."varchar" COLLATE "pg_catalog"."default",
  CONSTRAINT "algorithm_config_pkey" PRIMARY KEY ("id")
 );
 
@@ -104,6 +107,10 @@ ALTER TABLE "public"."algorithm_config"
 
 COMMENT ON COLUMN "public"."algorithm_config"."id" IS '主键ID';
 
+COMMENT ON COLUMN "public"."algorithm_config"."type" IS '类型';
+
+COMMENT ON COLUMN "public"."algorithm_config"."parent_id" IS '父id';
+
 COMMENT ON COLUMN "public"."algorithm_config"."subsystem" IS '分系统';
 
 COMMENT ON COLUMN "public"."algorithm_config"."algorithm_name" IS '算法名称';
@@ -128,8 +135,12 @@ COMMENT ON COLUMN "public"."algorithm_config"."update_time" IS '更新时间';
 
 COMMENT ON COLUMN "public"."algorithm_config"."remarks" IS '备注';
 
+COMMENT ON COLUMN "public"."algorithm_config"."system" IS '系统';
+
 COMMENT ON TABLE "public"."algorithm_config" IS '算法配置表';
--- 菜单 SQL
+
+
+
 -- 菜单 SQL
 insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
 values(2024052717402600, '算法配置', 152584418900430848, '1', 'config', 'ag/config/index', 1, 0, 'C', '0', '0', 'ag:config:list', '', 1, now(), 1, null, '算法配置菜单');
@@ -150,5 +161,337 @@ values(2024052717402604, '算法配置删除', 2024052717402600, '4',  '', '', 1
 insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
 values(2024052717402605, '算法配置导出', 2024052717402600, '5',  '', '', 1, 0, 'F', '0', '0', 'ag:config:export',       '', 1, now(), 1, null, '');
 
+-- 算法模型表
+DROP TABLE IF EXISTS public.algorithm_model;
+
+CREATE TABLE "public"."algorithm_model" (
+ "id" "pg_catalog"."int8" NOT NULL,
+ "algorithm_id" "pg_catalog"."int8" NOT NULL,
+ "model_name" "pg_catalog"."varchar" COLLATE "pg_catalog"."default" NOT NULL,
+ "model_address" "pg_catalog"."varchar" COLLATE "pg_catalog"."default" NOT NULL,
+ "sample_number" "pg_catalog"."int8",
+ "cycle_epoch" "pg_catalog"."int8",
+ "create_by" "pg_catalog"."int8",
+ "create_time" "pg_catalog"."timestamp" DEFAULT CURRENT_TIMESTAMP,
+ "update_by" "pg_catalog"."int8",
+ "update_time" "pg_catalog"."timestamp" DEFAULT CURRENT_TIMESTAMP,
+ "remarks" "pg_catalog"."varchar" COLLATE "pg_catalog"."default" DEFAULT NULL::character varying,
+ "tenant_id" "pg_catalog"."int8" DEFAULT 0,
+ version           integer                 DEFAULT 0,
+ del_flag      smallint               DEFAULT '0'::smallint         NOT NULL,
+ "system" "pg_catalog"."varchar" COLLATE "pg_catalog"."default",
+ CONSTRAINT "algorithm_model_pkey" PRIMARY KEY ("id")
+);
+
+ALTER TABLE "public"."algorithm_model"
+    OWNER TO "postgres";
+
+COMMENT ON COLUMN "public"."algorithm_model"."id" IS '主键ID';
+
+COMMENT ON COLUMN "public"."algorithm_model"."algorithm_id" IS '算法';
+
+COMMENT ON COLUMN "public"."algorithm_model"."model_name" IS '模型名称';
+
+COMMENT ON COLUMN "public"."algorithm_model"."model_address" IS '模型';
+
+COMMENT ON COLUMN "public"."algorithm_model"."sample_number" IS '训练样本数';
+
+COMMENT ON COLUMN "public"."algorithm_model"."cycle_epoch" IS '训练循环次数';
+
+COMMENT ON COLUMN "public"."algorithm_model"."create_by" IS '创建人';
+
+COMMENT ON COLUMN "public"."algorithm_model"."create_time" IS '创建时间';
+
+COMMENT ON COLUMN "public"."algorithm_model"."update_by" IS '更新人';
+
+COMMENT ON COLUMN "public"."algorithm_model"."update_time" IS '更新时间';
+
+COMMENT ON COLUMN "public"."algorithm_model"."remarks" IS '备注';
+
+COMMENT ON COLUMN "public"."algorithm_model"."system" IS '系统';
+
+COMMENT ON COLUMN "public"."algorithm_model"."version" IS '乐观锁';
+
+COMMENT ON COLUMN "public"."algorithm_model"."tenant_id" IS '租户编码';
+
+COMMENT ON COLUMN "public"."algorithm_model"."del_flag" IS '逻辑删除标志(0代表存在 1代表删除)';
+
+COMMENT ON TABLE "public"."algorithm_model" IS '算法模型配置表';
+
+
+-- 算法任务表
+DROP TABLE IF EXISTS public.algorithm_task;
+
+CREATE TABLE "public"."algorithm_task" (
+ "id" "pg_catalog"."int8" NOT NULL,
+ "name" "pg_catalog"."varchar" COLLATE "pg_catalog"."default" NOT NULL,
+ "status" "pg_catalog"."varchar" COLLATE "pg_catalog"."default" DEFAULT 0 NOT NULL,
+ "start_time" "pg_catalog"."timestamp",
+ "end_time" "pg_catalog"."timestamp",
+ "cost_second" "pg_catalog"."int8",
+ "log" "pg_catalog"."text" COLLATE "pg_catalog"."default",
+ "create_by" "pg_catalog"."int8",
+ "create_time" "pg_catalog"."timestamp" DEFAULT CURRENT_TIMESTAMP,
+ "update_by" "pg_catalog"."int8",
+ "update_time" "pg_catalog"."timestamp" DEFAULT CURRENT_TIMESTAMP,
+ "remarks" "pg_catalog"."varchar" COLLATE "pg_catalog"."default" DEFAULT NULL::character varying,
+ "tenant_id" "pg_catalog"."int8" DEFAULT 0,
+ version           integer                 DEFAULT 0,
+ del_flag      smallint               DEFAULT '0'::smallint         NOT NULL,
+ "system" "pg_catalog"."varchar" COLLATE "pg_catalog"."default",
+ CONSTRAINT "algorithm_task_pkey" PRIMARY KEY ("id")
+);
+
+ALTER TABLE "public"."algorithm_task"
+    OWNER TO "postgres";
+
+COMMENT ON COLUMN "public"."algorithm_task"."id" IS '主键ID';
+
+COMMENT ON COLUMN "public"."algorithm_task"."name" IS '任务名称';
+
+COMMENT ON COLUMN "public"."algorithm_task"."status" IS '任务状态';
+
+COMMENT ON COLUMN "public"."algorithm_task"."start_time" IS '开始时间';
+
+COMMENT ON COLUMN "public"."algorithm_task"."end_time" IS '结束时间';
+
+COMMENT ON COLUMN "public"."algorithm_task"."cost_second" IS '耗时';
+
+COMMENT ON COLUMN "public"."algorithm_task"."log" IS '日志';
+
+COMMENT ON COLUMN "public"."algorithm_task"."create_by" IS '创建人';
+
+COMMENT ON COLUMN "public"."algorithm_task"."create_time" IS '创建时间';
+
+COMMENT ON COLUMN "public"."algorithm_task"."update_by" IS '更新人';
+
+COMMENT ON COLUMN "public"."algorithm_task"."update_time" IS '更新时间';
+
+COMMENT ON COLUMN "public"."algorithm_task"."remarks" IS '备注';
+
+COMMENT ON COLUMN "public"."algorithm_task"."version" IS '乐观锁';
+
+COMMENT ON COLUMN "public"."algorithm_task"."tenant_id" IS '租户编码';
+
+COMMENT ON COLUMN "public"."algorithm_task"."del_flag" IS '逻辑删除标志(0代表存在 1代表删除)';
+
+COMMENT ON COLUMN "public"."algorithm_task"."system" IS '系统';
+
+COMMENT ON TABLE "public"."algorithm_task" IS '算法任务表';
+
+
+-- 算法子任务表
+DROP TABLE IF EXISTS public.algorithm_subtask;
+
+CREATE TABLE "public"."algorithm_subtask" (
+ "id" "pg_catalog"."int8" NOT NULL,
+ "name" "pg_catalog"."varchar" COLLATE "pg_catalog"."default" NOT NULL,
+ "status" "pg_catalog"."varchar" COLLATE "pg_catalog"."default" NOT NULL,
+ "parameters" "pg_catalog"."text" COLLATE "pg_catalog"."default" NOT NULL,
+ "start_time" "pg_catalog"."timestamp",
+ "end_time" "pg_catalog"."timestamp",
+ "cost_second" "pg_catalog"."int8",
+ "log" "pg_catalog"."text" COLLATE "pg_catalog"."default",
+ "has_details" "pg_catalog"."int8" DEFAULT 0,
+ "create_by" "pg_catalog"."int8",
+ "create_time" "pg_catalog"."timestamp" DEFAULT CURRENT_TIMESTAMP,
+ "update_by" "pg_catalog"."int8",
+ "update_time" "pg_catalog"."timestamp" DEFAULT CURRENT_TIMESTAMP,
+ "remarks" "pg_catalog"."varchar" COLLATE "pg_catalog"."default" DEFAULT NULL::character varying,
+ "tenant_id" "pg_catalog"."int8" DEFAULT 0,
+ version           integer                 DEFAULT 0,
+ del_flag      smallint               DEFAULT '0'::smallint         NOT NULL,
+ "system" "pg_catalog"."varchar" COLLATE "pg_catalog"."default",
+ CONSTRAINT "algorithm_subtask_pkey" PRIMARY KEY ("id")
+);
+
+ALTER TABLE "public"."algorithm_subtask"
+    OWNER TO "postgres";
+
+COMMENT ON COLUMN "public"."algorithm_subtask"."id" IS '主键ID';
+
+COMMENT ON COLUMN "public"."algorithm_subtask"."name" IS '任务名称';
+
+COMMENT ON COLUMN "public"."algorithm_subtask"."status" IS '任务状态';
+
+COMMENT ON COLUMN "public"."algorithm_subtask"."parameters" IS '调用算法时所用的参数';
+
+COMMENT ON COLUMN "public"."algorithm_subtask"."start_time" IS '开始时间';
+
+COMMENT ON COLUMN "public"."algorithm_subtask"."end_time" IS '结束时间';
+
+COMMENT ON COLUMN "public"."algorithm_subtask"."cost_second" IS '耗时';
+
+COMMENT ON COLUMN "public"."algorithm_subtask"."log" IS '日志';
+
+COMMENT ON COLUMN "public"."algorithm_subtask"."has_details" IS '是否包含详情';
+
+COMMENT ON COLUMN "public"."algorithm_subtask"."create_by" IS '创建人';
+
+COMMENT ON COLUMN "public"."algorithm_subtask"."create_time" IS '创建时间';
+
+COMMENT ON COLUMN "public"."algorithm_subtask"."update_by" IS '更新人';
+
+COMMENT ON COLUMN "public"."algorithm_subtask"."update_time" IS '更新时间';
+
+COMMENT ON COLUMN "public"."algorithm_subtask"."remarks" IS '备注';
+
+COMMENT ON COLUMN "public"."algorithm_subtask"."version" IS '乐观锁';
+
+COMMENT ON COLUMN "public"."algorithm_subtask"."tenant_id" IS '租户编码';
+
+COMMENT ON COLUMN "public"."algorithm_subtask"."del_flag" IS '逻辑删除标志(0代表存在 1代表删除)';
+
+COMMENT ON COLUMN "public"."algorithm_subtask"."system" IS '系统';
+
+COMMENT ON TABLE "public"."algorithm_subtask" IS '算法子任务表';
+
+-- 算法子任务详情表
+DROP TABLE IF EXISTS public.algorithm_subtask_detail;
+
+CREATE TABLE "public"."algorithm_subtask_detail" (
+ "id" "pg_catalog"."int8" NOT NULL,
+ "name" "pg_catalog"."varchar" COLLATE "pg_catalog"."default" NOT NULL,
+ "status" "pg_catalog"."varchar" COLLATE "pg_catalog"."default" NOT NULL,
+ "parameters" "pg_catalog"."text" COLLATE "pg_catalog"."default" NOT NULL,
+ "start_time" "pg_catalog"."timestamp",
+ "end_time" "pg_catalog"."timestamp",
+ "cost_second" "pg_catalog"."int8",
+ "log" "pg_catalog"."text" COLLATE "pg_catalog"."default",
+ "create_by" "pg_catalog"."int8",
+ "create_time" "pg_catalog"."timestamp" DEFAULT CURRENT_TIMESTAMP,
+ "update_by" "pg_catalog"."int8",
+ "update_time" "pg_catalog"."timestamp" DEFAULT CURRENT_TIMESTAMP,
+ "remarks" "pg_catalog"."varchar" COLLATE "pg_catalog"."default" DEFAULT NULL::character varying,
+ "tenant_id" "pg_catalog"."int8" DEFAULT 0,
+ version           integer                 DEFAULT 0,
+ del_flag      smallint               DEFAULT '0'::smallint         NOT NULL,
+ "system" "pg_catalog"."varchar" COLLATE "pg_catalog"."default",
+ CONSTRAINT "algorithm_subtask_detail_pkey" PRIMARY KEY ("id")
+);
+
+
+ALTER TABLE "public"."algorithm_subtask_detail"
+    OWNER TO "postgres";
+
+COMMENT ON COLUMN "public"."algorithm_subtask_detail"."id" IS '主键ID';
+
+COMMENT ON COLUMN "public"."algorithm_subtask_detail"."name" IS '任务名称';
+
+COMMENT ON COLUMN "public"."algorithm_subtask_detail"."status" IS '任务状态';
+
+COMMENT ON COLUMN "public"."algorithm_subtask_detail"."parameters" IS '调用算法时所用的参数';
+
+COMMENT ON COLUMN "public"."algorithm_subtask_detail"."start_time" IS '开始时间';
+
+COMMENT ON COLUMN "public"."algorithm_subtask_detail"."end_time" IS '结束时间';
+
+COMMENT ON COLUMN "public"."algorithm_subtask_detail"."cost_second" IS '耗时';
+
+COMMENT ON COLUMN "public"."algorithm_subtask_detail"."log" IS '日志';
+
+COMMENT ON COLUMN "public"."algorithm_subtask_detail"."create_by" IS '创建人';
+
+COMMENT ON COLUMN "public"."algorithm_subtask_detail"."create_time" IS '创建时间';
+
+COMMENT ON COLUMN "public"."algorithm_subtask_detail"."update_by" IS '更新人';
+
+COMMENT ON COLUMN "public"."algorithm_subtask_detail"."update_time" IS '更新时间';
+
+COMMENT ON COLUMN "public"."algorithm_subtask_detail"."remarks" IS '备注';
+
+COMMENT ON COLUMN "public"."algorithm_subtask_detail"."version" IS '乐观锁';
+
+COMMENT ON COLUMN "public"."algorithm_subtask_detail"."tenant_id" IS '租户编码';
+
+COMMENT ON COLUMN "public"."algorithm_subtask_detail"."del_flag" IS '逻辑删除标志(0代表存在 1代表删除)';
+
+COMMENT ON COLUMN "public"."algorithm_subtask_detail"."system" IS '系统';
+
+COMMENT ON TABLE "public"."algorithm_subtask_detail" IS '算法子任务详情表';
+
+
+-- 菜单 SQL
+insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values(2024052914210100, '算法模型配置', 152584418900430848, '1', 'model', 'ag/model/index', 1, 0, 'C', '0', '0', 'ag:model:list', '', 1, now(), 1, null, '算法模型配置菜单');
+
+-- 按钮 SQL
+insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values(2024052914210001, '算法模型配置查询', 2024052914210100, '1',  '', '', 1, 0, 'F', '0', '0', 'ag:model:query',        '', 1, now(), 1, null, '');
+
+insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values(2024052914210002, '算法模型配置新增', 2024052914210100, '2',  '', '', 1, 0, 'F', '0', '0', 'ag:model:add',          '', 1, now(), 1, null, '');
+
+insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values(2024052914210003, '算法模型配置修改', 2024052914210100, '3',  '', '', 1, 0, 'F', '0', '0', 'ag:model:edit',         '', 1, now(), 1, null, '');
+
+insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values(2024052914210004, '算法模型配置删除', 2024052914210100, '4',  '', '', 1, 0, 'F', '0', '0', 'ag:model:remove',       '', 1, now(), 1, null, '');
+
+insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values(2024052914210005, '算法模型配置导出', 2024052914210100, '5',  '', '', 1, 0, 'F', '0', '0', 'ag:model:export',       '', 1, now(), 1, null, '');
+
+
+-- 菜单 SQL
+insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values(2024052914210200, '算法任务', 153308760386924544, '1', 'task', 'task/task/index', 1, 0, 'C', '0', '0', 'task:task:list', '', 1, now(), 1, null, '算法任务菜单');
+
+-- 按钮 SQL
+insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values(2024052914210101, '算法任务查询', 2024052914210200, '1',  '', '', 1, 0, 'F', '0', '0', 'task:task:query',        '', 1, now(), 1, null, '');
+
+insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values(2024052914210102, '算法任务新增', 2024052914210200, '2',  '', '', 1, 0, 'F', '0', '0', 'task:task:add',          '', 1, now(), 1, null, '');
+
+insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values(2024052914210103, '算法任务修改', 2024052914210200, '3',  '', '', 1, 0, 'F', '0', '0', 'task:task:edit',         '', 1, now(), 1, null, '');
+
+insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values(2024052914210104, '算法任务删除', 2024052914210200, '4',  '', '', 1, 0, 'F', '0', '0', 'task:task:remove',       '', 1, now(), 1, null, '');
+
+insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values(2024052914210105, '算法任务导出', 2024052914210200, '5',  '', '', 1, 0, 'F', '0', '0', 'task:task:export',       '', 1, now(), 1, null, '');
+
+
+-- 菜单 SQL
+insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values(2024052914210300, '算法子任务', 153308760386924544, '1', 'subtask', 'task/subtask/index', 1, 0, 'C', '0', '0', 'task:subtask:list', '', 1, now(), 1, null, '算法子任务菜单');
+
+-- 按钮 SQL
+insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values(2024052914210201, '算法子任务查询', 2024052914210300, '1',  '', '', 1, 0, 'F', '0', '0', 'task:subtask:query',        '', 1, now(), 1, null, '');
+
+insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values(2024052914210202, '算法子任务新增', 2024052914210300, '2',  '', '', 1, 0, 'F', '0', '0', 'task:subtask:add',          '', 1, now(), 1, null, '');
+
+insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values(2024052914210203, '算法子任务修改', 2024052914210300, '3',  '', '', 1, 0, 'F', '0', '0', 'task:subtask:edit',         '', 1, now(), 1, null, '');
+
+insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values(2024052914210204, '算法子任务删除', 2024052914210300, '4',  '', '', 1, 0, 'F', '0', '0', 'task:subtask:remove',       '', 1, now(), 1, null, '');
+
+insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values(2024052914210205, '算法子任务导出', 2024052914210300, '5',  '', '', 1, 0, 'F', '0', '0', 'task:subtask:export',       '', 1, now(), 1, null, '');
+
+
+-- 菜单 SQL
+insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values(2024052914210400, '算法子任务详情', 153308760386924544, '1', 'subtaskDetail', 'task/subtaskDetail/index', 1, 0, 'C', '0', '0', 'task:subtaskDetail:list', '', 1, now(), 1, null, '算法子任务详情菜单');
+
+-- 按钮 SQL
+insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values(2024052914210301, '算法子任务详情查询', 2024052914210400, '1',  '', '', 1, 0, 'F', '0', '0', 'task:subtaskDetail:query',        '', 1, now(), 1, null, '');
+
+insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values(2024052914210302, '算法子任务详情新增', 2024052914210400, '2',  '', '', 1, 0, 'F', '0', '0', 'task:subtaskDetail:add',          '', 1, now(), 1, null, '');
+
+insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values(2024052914210303, '算法子任务详情修改', 2024052914210400, '3',  '', '', 1, 0, 'F', '0', '0', 'task:subtaskDetail:edit',         '', 1, now(), 1, null, '');
+
+insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values(2024052914210304, '算法子任务详情删除', 2024052914210400, '4',  '', '', 1, 0, 'F', '0', '0', 'task:subtaskDetail:remove',       '', 1, now(), 1, null, '');
+
+insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values(2024052914210305, '算法子任务详情导出', 2024052914210400, '5',  '', '', 1, 0, 'F', '0', '0', 'task:subtaskDetail:export',       '', 1, now(), 1, null, '');
 
 

+ 2 - 2
taais-modules/taais-biz/src/main/java/com/taais/biz/controller/AlgorithmConfigController.java

@@ -23,8 +23,8 @@ import com.taais.common.core.core.page.PageResult;
 /**
  * 算法配置Controller
  *
- * @author Allen
- * 2024-05-27
+ * @author 0
+ * 2024-05-28
  */
 @Validated
 @RequiredArgsConstructor

+ 11 - 2
taais-modules/taais-biz/src/main/java/com/taais/biz/domain/AlgorithmConfig.java

@@ -12,8 +12,8 @@ import com.taais.common.orm.core.domain.BaseEntity;
 /**
  * 算法配置对象 algorithm_config
  *
- * @author Allen
- * 2024-05-27
+ * @author 0
+ * 2024-05-28
  */
 @Data
 @EqualsAndHashCode(callSuper = true)
@@ -27,6 +27,12 @@ private static final long serialVersionUID = 1L;
     @Id
     private Long id;
 
+    /** 类型 */
+    private String type;
+
+    /** 父id */
+    private Long parentId;
+
     /** 分系统 */
     private String subsystem;
 
@@ -46,5 +52,8 @@ private static final long serialVersionUID = 1L;
     @Column(isLogicDelete = true)
     private Integer delFlag;
 
+    /** 系统 */
+    private String system;
+
 
 }

+ 13 - 3
taais-modules/taais-biz/src/main/java/com/taais/biz/domain/bo/AlgorithmConfigBo.java

@@ -10,8 +10,8 @@ import com.taais.common.orm.core.domain.BaseEntity;
 /**
  * 算法配置业务对象 algorithm_config
  *
- * @author Allen
- * @date 2024-05-27
+ * @author 0
+ * @date 2024-05-28
  */
 @Data
 @EqualsAndHashCode(callSuper = true)
@@ -19,10 +19,20 @@ import com.taais.common.orm.core.domain.BaseEntity;
 public class AlgorithmConfigBo extends BaseEntity{
 
     private Long id;
+    /**
+     * 类型
+     */
+    @NotBlank(message = "类型不能为空")
+    private String type;
+
+    /**
+     * 父id
+     */
+    private Long parentId;
+
     /**
      * 分系统
      */
-    @NotBlank(message = "分系统不能为空")
     private String subsystem;
 
     /**

+ 5 - 0
taais-modules/taais-biz/src/main/java/com/taais/biz/domain/bo/AlgorithmConfigParamBo.java

@@ -4,9 +4,14 @@ import lombok.Data;
 
 @Data
 public class AlgorithmConfigParamBo {
+    // 参数名称
     private String name;
+    // 参数值
     private String value;
+    // 验证
     private String validate;
+    // 默认值
     private String defaultValue;
+    // 排序
     private int index;
 }

+ 15 - 2
taais-modules/taais-biz/src/main/java/com/taais/biz/domain/vo/AlgorithmConfigImportVo.java

@@ -11,8 +11,8 @@ import lombok.NoArgsConstructor;
 /**
  * 算法配置导入视图对象 algorithm_config
  *
- * @author Allen
- * @date 2024-05-27
+ * @author 0
+ * @date 2024-05-28
  */
 
 @Data
@@ -24,6 +24,15 @@ public class AlgorithmConfigImportVo implements Serializable
     private static final long serialVersionUID = 1L;
 
 
+     /** 类型 */
+    @ExcelProperty(value = "类型", converter = ExcelDictConvert.class)
+    @ExcelDictFormat(dictType = "sys_app_type")
+    private String type;
+
+     /** 父id */
+    @ExcelProperty(value = "父id")
+    private Long parentId;
+
      /** 分系统 */
     @ExcelProperty(value = "分系统", converter = ExcelDictConvert.class)
     @ExcelDictFormat(dictType = "biz_sub_config")
@@ -49,5 +58,9 @@ public class AlgorithmConfigImportVo implements Serializable
     @ExcelProperty(value = "逻辑删除标志(0代表存在 1代表删除)")
     private Integer delFlag;
 
+     /** 系统 */
+    @ExcelProperty(value = "系统")
+    private String system;
+
 
 }

+ 15 - 2
taais-modules/taais-biz/src/main/java/com/taais/biz/domain/vo/AlgorithmConfigVo.java

@@ -15,8 +15,8 @@ import com.taais.common.orm.core.domain.BaseEntity;
 /**
  * 算法配置视图对象 algorithm_config
  *
- * @author Allen
- * @date 2024-05-27
+ * @author 0
+ * @date 2024-05-28
  */
 @Data
 @ExcelIgnoreUnannotated
@@ -31,6 +31,15 @@ private static final long serialVersionUID = 1L;
     @ExcelProperty(value = "主键ID")
     private Long id;
 
+    /** 类型 */
+    @ExcelProperty(value = "类型", converter = ExcelDictConvert.class)
+    @ExcelDictFormat(dictType = "sys_app_type")
+    private String type;
+
+    /** 父id */
+    @ExcelProperty(value = "父id")
+    private Long parentId;
+
     /** 分系统 */
     @ExcelProperty(value = "分系统", converter = ExcelDictConvert.class)
     @ExcelDictFormat(dictType = "biz_sub_config")
@@ -56,6 +65,10 @@ private static final long serialVersionUID = 1L;
     @ExcelProperty(value = "逻辑删除标志(0代表存在 1代表删除)")
     private Integer delFlag;
 
+    /** 系统 */
+    @ExcelProperty(value = "系统")
+    private String system;
+
 
 
 }

+ 1 - 1
taais-modules/taais-biz/src/main/java/com/taais/biz/listener/AlgorithmConfigImportListener.java

@@ -20,7 +20,7 @@ import java.util.List;
 /**
  * 算法配置自定义导入
  *
- * @author Allen
+ * @author 0
  */
 @Slf4j
 public class AlgorithmConfigImportListener extends AnalysisEventListener<AlgorithmConfigImportVo> implements ExcelListener<AlgorithmConfigImportVo> {

+ 2 - 2
taais-modules/taais-biz/src/main/java/com/taais/biz/mapper/AlgorithmConfigMapper.java

@@ -7,8 +7,8 @@ import com.taais.biz.domain.AlgorithmConfig;
 /**
  * 算法配置Mapper接口
  *
- * @author Allen
- * 2024-05-27
+ * @author 0
+ * 2024-05-28
  */
 @Mapper
 public interface AlgorithmConfigMapper extends BaseMapper<AlgorithmConfig> {

+ 2 - 2
taais-modules/taais-biz/src/main/java/com/taais/biz/service/IAlgorithmConfigService.java

@@ -11,8 +11,8 @@ import com.taais.common.core.core.page.PageResult;
 /**
  * 算法配置Service接口
  *
- * @author Allen
- * 2024-05-27
+ * @author 0
+ * 2024-05-28
  */
 public interface IAlgorithmConfigService extends IBaseService<AlgorithmConfig> {
     /**

+ 4 - 2
taais-modules/taais-biz/src/main/java/com/taais/biz/service/impl/AlgorithmConfigServiceImpl.java

@@ -24,8 +24,8 @@ import static com.taais.biz.domain.table.AlgorithmConfigTableDef.ALGORITHM_CONFI
 /**
  * 算法配置Service业务层处理
  *
- * @author Allen
- * 2024-05-27
+ * @author 0
+ * 2024-05-28
  */
 @Service
 public class AlgorithmConfigServiceImpl extends BaseServiceImpl<AlgorithmConfigMapper, AlgorithmConfig> implements IAlgorithmConfigService {
@@ -39,6 +39,8 @@ public class AlgorithmConfigServiceImpl extends BaseServiceImpl<AlgorithmConfigM
 
     private QueryWrapper buildQueryWrapper(AlgorithmConfigBo algorithmConfigBo) {
         QueryWrapper queryWrapper = super.buildBaseQueryWrapper();
+        queryWrapper.and(ALGORITHM_CONFIG.TYPE.eq
+        (algorithmConfigBo.getType()));
         queryWrapper.and(ALGORITHM_CONFIG.SUBSYSTEM.eq
         (algorithmConfigBo.getSubsystem()));
         queryWrapper.and(ALGORITHM_CONFIG.ALGORITHM_NAME.like

+ 6 - 0
taais-modules/taais-generator/src/main/java/com/taais/generator/service/GenTableServiceImpl.java

@@ -380,6 +380,12 @@ public class GenTableServiceImpl extends BaseServiceImpl<GenTableMapper, GenTabl
         List<String> dbTableColumnNames = dbTableColumns.stream().map(GenTableColumn::getColumnName).collect(Collectors.toList());
 
         dbTableColumns.forEach(column -> {
+            // 乐观锁版本
+            Integer version = column.getVersion();
+            if(version == null){
+                version = 0;
+            }
+            column.setVersion(++version);
             GenUtils.initColumnField(column, table);
             if (tableColumnMap.containsKey(column.getColumnName())) {
                 GenTableColumn prevColumn = tableColumnMap.get(column.getColumnName());

+ 1 - 1
taais-modules/taais-generator/src/main/resources/generator.yml

@@ -3,7 +3,7 @@ gen:
   # 作者
   author: km
   # 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool
-  packageName: com.km.demo
+  packageName: com.taais.demo
   # 自动去除表前缀,默认是false
   autoRemovePre: false
   # 表前缀(生成类名不会包含表前缀,多个用逗号分隔)

+ 2 - 2
taais-modules/taais-generator/src/main/resources/vm/java/bo.java.vm

@@ -12,9 +12,9 @@ import jakarta.validation.constraints.*;
 import ${import};
 #end
 #if($table.crud || $table.sub)
-import com.km.common.orm.core.domain.BaseEntity;
+import com.taais.common.orm.core.domain.BaseEntity;
 #elseif($table.tree)
-import com.km.common.orm.core.domain.TreeEntity;
+import com.taais.common.orm.core.domain.TreeEntity;
 #end
 
 /**

+ 7 - 7
taais-modules/taais-generator/src/main/resources/vm/java/controller.java.vm

@@ -7,19 +7,19 @@ import jakarta.servlet.http.HttpServletResponse;
 import cn.dev33.satoken.annotation.SaCheckPermission;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.validation.annotation.Validated;
-import com.km.common.core.core.domain.CommonResult;
-import com.km.common.excel.utils.ExcelUtil;
-import com.km.common.log.annotation.Log;
-import com.km.common.log.enums.BusinessType;
-import com.km.common.web.annotation.RepeatSubmit;
-import com.km.common.web.core.BaseController;
+import com.taais.common.core.core.domain.CommonResult;
+import com.taais.common.excel.utils.ExcelUtil;
+import com.taais.common.log.annotation.Log;
+import com.taais.common.log.enums.BusinessType;
+import com.taais.common.web.annotation.RepeatSubmit;
+import com.taais.common.web.core.BaseController;
 import jakarta.annotation.Resource;
 import ${packageName}.domain.vo.${ClassName}Vo;
 import ${packageName}.domain.bo.${ClassName}Bo;
 import ${packageName}.service.I${ClassName}Service;
 
 #if($table.crud || $table.sub)
-import com.km.common.core.core.page.PageResult;
+import com.taais.common.core.core.page.PageResult;
 #elseif($table.tree)
 #end
 

+ 2 - 2
taais-modules/taais-generator/src/main/resources/vm/java/domain.java.vm

@@ -27,9 +27,9 @@ import lombok.EqualsAndHashCode;
 
 import java.io.Serial;
 #if($table.crud || $table.sub)
-import com.km.common.orm.core.domain.BaseEntity;
+import com.taais.common.orm.core.domain.BaseEntity;
 #elseif($table.tree)
-import com.km.common.orm.core.domain.TreeEntity;
+import com.taais.common.orm.core.domain.TreeEntity;
 #end
 
 /**

+ 5 - 5
taais-modules/taais-generator/src/main/resources/vm/java/listener.java.vm

@@ -4,11 +4,11 @@ import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.util.ObjectUtil;
 import com.alibaba.excel.context.AnalysisContext;
 import com.alibaba.excel.event.AnalysisEventListener;
-import com.km.common.core.exception.ServiceException;
-import com.km.common.core.utils.SpringUtils;
-import com.km.common.core.utils.ValidatorUtils;
-import com.km.common.excel.core.ExcelListener;
-import com.km.common.excel.core.ExcelResult;
+import com.taais.common.core.exception.ServiceException;
+import com.taais.common.core.utils.SpringUtils;
+import com.taais.common.core.utils.ValidatorUtils;
+import com.taais.common.excel.core.ExcelListener;
+import com.taais.common.excel.core.ExcelResult;
 import ${packageName}.domain.bo.${ClassName}Bo;
 import ${packageName}.domain.vo.${ClassName}ImportVo;
 import ${packageName}.domain.vo.${ClassName}Vo;

+ 2 - 2
taais-modules/taais-generator/src/main/resources/vm/java/service.java.vm

@@ -5,9 +5,9 @@ import java.util.List;
 import ${packageName}.domain.${ClassName};
 import ${packageName}.domain.vo.${ClassName}Vo;
 import ${packageName}.domain.bo.${ClassName}Bo;
-import com.km.common.orm.core.service.IBaseService;
+import com.taais.common.orm.core.service.IBaseService;
 #if($table.crud || $table.sub)
-import com.km.common.core.core.page.PageResult;
+import com.taais.common.core.core.page.PageResult;
 #end
 
 /**

+ 5 - 5
taais-modules/taais-generator/src/main/resources/vm/java/serviceImpl.java.vm

@@ -6,11 +6,11 @@ import java.util.List;
 import cn.hutool.core.util.ObjectUtil;
 import com.mybatisflex.core.paginate.Page;
 import com.mybatisflex.core.query.QueryWrapper;
-import com.km.common.core.utils.MapstructUtils;
-import com.km.common.core.utils.StringUtils;
-import com.km.common.orm.core.page.PageQuery;
-import com.km.common.core.core.page.PageResult;
-import com.km.common.orm.core.service.impl.BaseServiceImpl;
+import com.taais.common.core.utils.MapstructUtils;
+import com.taais.common.core.utils.StringUtils;
+import com.taais.common.orm.core.page.PageQuery;
+import com.taais.common.core.core.page.PageResult;
+import com.taais.common.orm.core.service.impl.BaseServiceImpl;
     #foreach ($column in $columns)
         #if($column.javaField == 'createTime' || $column.javaField == 'updateTime')
             #break

+ 2 - 2
taais-modules/taais-generator/src/main/resources/vm/java/sub-domain.java.vm

@@ -10,9 +10,9 @@ import lombok.EqualsAndHashCode;
 
 import java.io.Serial;
 #if($table.crud || $table.sub)
-import com.km.common.orm.core.domain.BaseEntity;
+import com.taais.common.orm.core.domain.BaseEntity;
 #elseif($table.tree)
-import com.km.common.orm.core.domain.TreeEntity;
+import com.taais.common.orm.core.domain.TreeEntity;
 #end
 
 /**

+ 2 - 2
taais-modules/taais-generator/src/main/resources/vm/java/vo-import.java.vm

@@ -4,8 +4,8 @@ package ${packageName}.domain.vo;
 import ${import};
 #end
 import com.alibaba.excel.annotation.ExcelProperty;
-import com.km.common.excel.annotation.ExcelDictFormat;
-import com.km.common.excel.convert.ExcelDictConvert;
+import com.taais.common.excel.annotation.ExcelDictFormat;
+import com.taais.common.excel.convert.ExcelDictConvert;
 import lombok.Data;
 import java.io.Serial;
 import java.io.Serializable;

+ 4 - 4
taais-modules/taais-generator/src/main/resources/vm/java/vo.java.vm

@@ -6,8 +6,8 @@ import ${import};
 import ${packageName}.domain.${ClassName};
 import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
 import com.alibaba.excel.annotation.ExcelProperty;
-import com.km.common.excel.annotation.ExcelDictFormat;
-import com.km.common.excel.convert.ExcelDictConvert;
+import com.taais.common.excel.annotation.ExcelDictFormat;
+import com.taais.common.excel.convert.ExcelDictConvert;
 import io.github.linpeilie.annotations.AutoMapper;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
@@ -18,9 +18,9 @@ import ${packageName}.domain.${subClassName};
 import java.io.Serial;
 import java.io.Serializable;
 #if($table.crud || $table.sub)
-import com.km.common.orm.core.domain.BaseEntity;
+import com.taais.common.orm.core.domain.BaseEntity;
 #elseif($table.tree)
-import com.km.common.orm.core.domain.TreeEntity;
+import com.taais.common.orm.core.domain.TreeEntity;
 #end
 
 /**