Browse Source

重构立即执行代码

tags/v1.0.0^2
wanjing 1 year ago
parent
commit
1775878bb4
3 changed files with 16 additions and 5 deletions
  1. +12
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/controller/InspectionFileController.java
  2. +2
    -2
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/enums/code/inspection/ExecuteInspectionCodeEnum.java
  3. +2
    -2
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/execute/ExecuteInspectionService.java

+ 12
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/controller/InspectionFileController.java View File

@@ -57,7 +57,7 @@ public class InspectionFileController {
* @return
*/
@GetMapping("/page/list/by/inspectionid")
public JsonResult getPageListByInspectionId(@RequestBody QueryInspectionFilePageListByInspectionIdRequest request){
public JsonResult getPageListByInspectionId(QueryInspectionFilePageListByInspectionIdRequest request){
return iInspectionFileService.getPageListByInspectionId(request);
}

@@ -81,4 +81,15 @@ public class InspectionFileController {
return iInspectionFileService.ignore(idList);
}

/**
* 生成报告
*
* @param inspectionId 巡检ID
* @return
*/
@GetMapping("/generate/report")
public JsonResult generateReport(Integer inspectionId) {
return JsonResult.success();
}

}

+ 2
- 2
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/enums/code/inspection/ExecuteInspectionCodeEnum.java View File

@@ -1,7 +1,7 @@
package com.tuoheng.admin.enums.code.inspection;

/**
* 重新提交任务信息返回码
* 立即执行任务信息返回码
* 模块代码:23(任务管理)
* 接口代码:08 (立即执行)
*
@@ -11,7 +11,7 @@ package com.tuoheng.admin.enums.code.inspection;
*/
public enum ExecuteInspectionCodeEnum {

Execute_IS_FAILED(1230800, "重新提交失败"),
EXECUTE_IS_FAILED(1230800, "立即执行失败"),
ID_IS_NULL(1230801, "任务ID为空"),
INSPECTION_IS_NOT_EXIST(1230802, "任务不存在"),
USER_ONLY_EXECUTE_DEPARTMENT_TASK(1230803, "用户只能执行本部门任务"),

+ 2
- 2
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/execute/ExecuteInspectionService.java View File

@@ -64,8 +64,8 @@ public class ExecuteInspectionService {
// 立即执行任务
this.executeTask(userId, tenantId, inspection);

log.info("立即执行任务业务:重新提交任务成功:{}", inspection);
return JsonResult.success(inspection);
log.info("立即执行任务业务:立即执行成功:id:{}", inspection.getId());
return JsonResult.success();
}

/**

Loading…
Cancel
Save