diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/mapper/ExtApiReportMapper.xml b/backend/services/api-test/src/main/java/io/metersphere/api/mapper/ExtApiReportMapper.xml index 9817d15f94..0347c695af 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/mapper/ExtApiReportMapper.xml +++ b/backend/services/api-test/src/main/java/io/metersphere/api/mapper/ExtApiReportMapper.xml @@ -161,6 +161,11 @@ CASE WHEN api_report.integrated = 0 THEN c.num ELSE api_report.id + END AS resourceNum, + + CASE + WHEN api_report.integrated = 0 THEN + c.id ELSE api_report.id END AS resourceId, CASE @@ -182,9 +187,10 @@ #{projectId} - and ( - api_report.name like concat('%', #{request.keyword},'%') - or c.name like concat('%', #{request.keyword},'%') + and ( (api_report.name like concat('%', #{request.keyword},'%') + and c.name like concat('%', #{request.keyword},'%')) + or (api_report.id like concat('%', #{request.keyword},'%') + and c.num like concat('%', #{request.keyword},'%')) ) diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/mapper/ExtApiScenarioReportMapper.xml b/backend/services/api-test/src/main/java/io/metersphere/api/mapper/ExtApiScenarioReportMapper.xml index 711156e4de..fd9cf3c223 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/mapper/ExtApiScenarioReportMapper.xml +++ b/backend/services/api-test/src/main/java/io/metersphere/api/mapper/ExtApiScenarioReportMapper.xml @@ -152,13 +152,18 @@ CASE WHEN api_scenario_report.integrated = 0 THEN s.num ELSE api_scenario_report.id - END AS resourceId, + END AS resourceNum, CASE WHEN api_scenario_report.integrated = 0 THEN s.NAME ELSE api_scenario_report.NAME END AS resourceName, + CASE + WHEN api_scenario_report.integrated = 0 THEN + s.id ELSE api_scenario_report.id + END AS resourceId, + t.name as poolName from api_scenario_report left join api_scenario_record a on api_scenario_report.id = a.api_scenario_report_id @@ -173,8 +178,10 @@ and ( - api_scenario_report.name like concat('%', #{request.keyword},'%') - or s.name like concat('%', #{request.keyword},'%') + (api_scenario_report.name like concat('%', #{request.keyword},'%') + and s.name like concat('%', #{request.keyword},'%')) + or (api_scenario_report.id like concat('%', #{request.keyword},'%') + and s.num like concat('%', #{request.keyword},'%')) ) diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/dto/taskcenter/TaskCenterDTO.java b/backend/services/system-setting/src/main/java/io/metersphere/system/dto/taskcenter/TaskCenterDTO.java index c7a69889fc..e8e272a499 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/dto/taskcenter/TaskCenterDTO.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/dto/taskcenter/TaskCenterDTO.java @@ -31,6 +31,9 @@ public class TaskCenterDTO implements Serializable { @Schema(description = "资源Id 单独报告显示模块业务id 集合报告显示报告id") private String resourceId; + @Schema(description = "资源编号 单独报告显示模块编号 集合报告显示报告编号") + private String resourceNum; + @Schema(description = "资源名称 单独报告显示模块名称 集合报告显示报告名称") private String resourceName; diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/mapper/ExtScheduleMapper.xml b/backend/services/system-setting/src/main/java/io/metersphere/system/mapper/ExtScheduleMapper.xml index 2b348e8366..36ae0fbf8a 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/mapper/ExtScheduleMapper.xml +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/mapper/ExtScheduleMapper.xml @@ -50,7 +50,7 @@ and ( task.resource_name like concat('%', #{request.keyword},'%') or - task.resource_id like concat('%', #{request.keyword},'%') + task.resource_num like concat('%', #{request.keyword},'%') ) diff --git a/backend/services/system-setting/src/main/java/io/metersphere/system/service/TaskCenterService.java b/backend/services/system-setting/src/main/java/io/metersphere/system/service/TaskCenterService.java index 04d3521074..2fb378d799 100644 --- a/backend/services/system-setting/src/main/java/io/metersphere/system/service/TaskCenterService.java +++ b/backend/services/system-setting/src/main/java/io/metersphere/system/service/TaskCenterService.java @@ -13,6 +13,7 @@ import io.metersphere.system.dto.taskcenter.TaskCenterScheduleDTO; import io.metersphere.system.dto.taskcenter.enums.ScheduleTagType; import io.metersphere.system.dto.taskcenter.request.TaskCenterSchedulePageRequest; import io.metersphere.system.mapper.*; +import io.metersphere.system.schedule.BaseScheduleJob; import io.metersphere.system.schedule.ScheduleService; import io.metersphere.system.utils.PageUtils; import io.metersphere.system.utils.Pager; @@ -206,7 +207,7 @@ public class TaskCenterService { schedule.setEnable(!schedule.getEnable()); scheduleService.editSchedule(schedule); scheduleService.addOrUpdateCronJob(schedule, new JobKey(schedule.getKey(), schedule.getJob()), - new TriggerKey(schedule.getKey(),schedule.getJob()), schedule.getJob().getClass()); + new TriggerKey(schedule.getKey(),schedule.getJob()), BaseScheduleJob.class); } diff --git a/frontend/src/models/projectManagement/taskCenter.ts b/frontend/src/models/projectManagement/taskCenter.ts index c6bbea0765..41b1b3417d 100644 --- a/frontend/src/models/projectManagement/taskCenter.ts +++ b/frontend/src/models/projectManagement/taskCenter.ts @@ -5,6 +5,7 @@ export interface RealTaskCenterApiCaseItem { projectId: string; id: string; resourceId: string; + resourceNum: number; // 资源业务id resourceName: string; // 资源名称 单独报告显示模块名称 集合报告显示报告名称 triggerMode: string; // 触发模式(手动,定时,批量,测试计划) poolName: string; // 资源池名称 diff --git a/frontend/src/views/project-management/taskCenter/component/apiCase.vue b/frontend/src/views/project-management/taskCenter/component/apiCase.vue index cfd7639879..ccb0ee10b2 100644 --- a/frontend/src/views/project-management/taskCenter/component/apiCase.vue +++ b/frontend/src/views/project-management/taskCenter/component/apiCase.vue @@ -193,8 +193,8 @@ const columns: MsTableColumn = [ { title: 'project.taskCenter.resourceID', - dataIndex: 'resourceId', - slotName: 'resourceId', + dataIndex: 'resourceNum', + slotName: 'resourceNum', width: 200, showTooltip: true, showDrag: false,