Commit 9079b758 by huangfusuper

修正

parent db56f0d4
...@@ -15,7 +15,6 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -15,7 +15,6 @@ import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.text.ParseException; import java.text.ParseException;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -24,7 +23,7 @@ import java.util.Map; ...@@ -24,7 +23,7 @@ import java.util.Map;
* @author: gml * @author: gml
* @create: 2019-12-30 14:20 * @create: 2019-12-30 14:20
*/ */
@Api(tags = "工作流api") @Api(tags = "工作流api")
@RestController @RestController
@RequestMapping("api/flow") @RequestMapping("api/flow")
public class ApiFlowController { public class ApiFlowController {
...@@ -44,7 +43,7 @@ public class ApiFlowController { ...@@ -44,7 +43,7 @@ public class ApiFlowController {
@PostMapping("deleteFlow") @PostMapping("deleteFlow")
@ApiOperation("删除工作流,若当前工作流被依赖则删除失败,只允许删除不被依赖的工作流,当前工作流依赖其他工作流不影响") @ApiOperation("删除工作流,若当前工作流被依赖则删除失败,只允许删除不被依赖的工作流,当前工作流依赖其他工作流不影响")
public ResponseResult deleteFlow(String param){ public ResponseResult deleteFlow(String param) {
apiFlowService.deleteFlow(param); apiFlowService.deleteFlow(param);
return ResponseResult.ok("SUCCESS"); return ResponseResult.ok("SUCCESS");
} }
...@@ -87,67 +86,65 @@ public class ApiFlowController { ...@@ -87,67 +86,65 @@ public class ApiFlowController {
@PostMapping("stopSchedule") @PostMapping("stopSchedule")
@ApiOperation("暂停工作流所有调度") @ApiOperation("暂停工作流所有调度")
public ResponseResult stopSchedule(String param){ public ResponseResult stopSchedule(String param) {
return ResponseResult.ok(apiFlowService.stopSchedule(param)); return ResponseResult.ok(apiFlowService.stopSchedule(param));
} }
@PostMapping("stopScheduleByRunId") @PostMapping("stopScheduleByRunId")
@ApiOperation("暂停指定的工作流调度") @ApiOperation("暂停指定的工作流调度")
public ResponseResult stopScheduleByRunId(String runId){ public ResponseResult stopScheduleByRunId(String runId) {
return ResponseResult.ok(apiFlowService.stopScheduleByRunId(runId)); return ResponseResult.ok(apiFlowService.stopScheduleByRunId(runId));
} }
@PostMapping("reStartSchedule") @PostMapping("reStartSchedule")
@ApiOperation("重新开始某次调度") @ApiOperation("重新开始某次调度")
public ResponseResult reStartSchedule(String runIds){ public ResponseResult reStartSchedule(String runIds) {
apiFlowService.reStartSchedule(runIds); apiFlowService.reStartSchedule(runIds);
return ResponseResult.ok("SUCCESS"); return ResponseResult.ok("SUCCESS");
} }
@PostMapping("reRunJob") @PostMapping("reRunJob")
@ApiOperation("重跑节点") @ApiOperation("重跑节点")
public ResponseResult reRunJob(String param){ public ResponseResult reRunJob(String param) {
apiFlowService.reRunJob(param); apiFlowService.reRunJob(param);
return ResponseResult.ok("SUCCESS"); return ResponseResult.ok("SUCCESS");
} }
@PostMapping("reRunFlow") @PostMapping("reRunFlow")
@ApiOperation("重跑工作流") @ApiOperation("重跑工作流")
public ResponseResult reRunFlow(String param){ public ResponseResult reRunFlow(String param) {
apiFlowService.reRunFlow(param); apiFlowService.reRunFlow(param);
return ResponseResult.ok("SUCCESS"); return ResponseResult.ok("SUCCESS");
} }
@PostMapping("madeSuccess") @PostMapping("madeSuccess")
@ApiOperation("手动置为成功") @ApiOperation("手动置为成功")
public ResponseResult madeSuccess(String param){ public ResponseResult madeSuccess(String param) {
apiFlowService.madeSuccess(param); apiFlowService.madeSuccess(param);
return ResponseResult.ok("SUCCESS"); return ResponseResult.ok("SUCCESS");
} }
/** /**
* * @param param startTime
* @param param startTime * endTime
* endTime * flowName
* flowName * workspaceName
* workspaceName
* @return * @return
*/ */
@PostMapping("loadScheduleResult") @PostMapping("loadScheduleResult")
@ApiOperation("加载运行记录") @ApiOperation("加载运行记录")
public ResponseResult loadScheduleResult(String param){ public ResponseResult loadScheduleResult(String param) {
List<RunRecording> result = apiFlowService.loadScheduleResult(param); List<RunRecording> result = apiFlowService.loadScheduleResult(param);
return ResponseResult.ok(result); return ResponseResult.ok(result);
} }
/** /**
*
* @param param * @param param
* @return * @return
*/ */
@PostMapping("loadScheduleLog") @PostMapping("loadScheduleLog")
@ApiOperation("加载运行日志") @ApiOperation("加载运行日志")
public ResponseResult loadScheduleLog(String param){ public ResponseResult loadScheduleLog(String param) {
RunRecordingVo result = apiFlowService.loadScheduleLog(param); RunRecordingVo result = apiFlowService.loadScheduleLog(param);
return ResponseResult.ok(result); return ResponseResult.ok(result);
} }
...@@ -155,57 +152,60 @@ public class ApiFlowController { ...@@ -155,57 +152,60 @@ public class ApiFlowController {
/** /**
* 补批节点 * 补批节点
*
* @param param * @param param
* @return * @return
*/ */
@PostMapping("/repairJob") @PostMapping("/repairJob")
@ApiOperation("补批") @ApiOperation("补批")
public ResponseResult repairJob(String param){ public ResponseResult repairJob(String param) {
apiFlowService.repairJob(param); apiFlowService.repairJob(param);
return ResponseResult.ok("SUCCESS"); return ResponseResult.ok("SUCCESS");
} }
/** /**
* 补批工作流 * 补批工作流
*
* @param param * @param param
* @return * @return
*/ */
@PostMapping("/repairFlow") @PostMapping("/repairFlow")
@ApiOperation("补批工作流") @ApiOperation("补批工作流")
public ResponseResult repairFlow(String param){ public ResponseResult repairFlow(String param) {
apiFlowService.repairFlow(param); apiFlowService.repairFlow(param);
return ResponseResult.ok("SUCCESS"); return ResponseResult.ok("SUCCESS");
} }
/** /**
* 获取整体运行的统计数据 * 获取整体运行的统计数据
*
* @param param * @param param
* @return * @return
*/ */
@PostMapping("/loadStatisticData") @PostMapping("/loadStatisticData")
@ApiOperation("获取运行的统计数据") @ApiOperation("获取运行的统计数据")
public ResponseResult loadStatisticData(String param){ public ResponseResult loadStatisticData(String param) {
CollectData collectData = apiFlowService.loadStatisticData(param); CollectData collectData = apiFlowService.loadStatisticData(param);
return ResponseResult.ok(collectData); return ResponseResult.ok(collectData);
} }
/** /**
* 获取节点运行的统计数据 * 获取节点运行的统计数据
*
* @param param * @param param
* @return * @return
*/ */
@PostMapping("/loadNodeStatisticData") @PostMapping("/loadNodeStatisticData")
@ApiOperation("获取运行的统计数据") @ApiOperation("获取运行的统计数据")
public ResponseResult loadNodeStatisticData(String param){ public ResponseResult loadNodeStatisticData(String param) {
CollectData collectData = apiFlowService.loadNodeStatisticData(param); CollectData collectData = apiFlowService.loadNodeStatisticData(param);
return ResponseResult.ok(collectData); return ResponseResult.ok(collectData);
} }
@PostMapping("/loadCurrentStatus") @PostMapping("/loadCurrentStatus")
@ApiOperation("获取当前的工作流运行状态") @ApiOperation("获取当前的工作流运行状态")
public ResponseResult loadCurrentStatus(String param){ public ResponseResult loadCurrentStatus(String param) {
Map<String, RunRecording> statusMap = apiFlowService.loadCurrentStatus(param); Map<String, RunRecording> statusMap = apiFlowService.loadCurrentStatus(param);
return ResponseResult.ok(statusMap); return ResponseResult.ok(statusMap);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment