|
|
|
@ -1,7 +1,9 @@ |
|
|
|
package com.ccsens.defaultwbs.api; |
|
|
|
|
|
|
|
import com.ccsens.cloudutil.annotation.MustLogin; |
|
|
|
import com.ccsens.common.bean.dto.CPluginDto; |
|
|
|
import com.ccsens.common.bean.dto.CTaskDto; |
|
|
|
import com.ccsens.common.bean.vo.CPluginVo; |
|
|
|
import com.ccsens.common.bean.vo.CTaskVo; |
|
|
|
import com.ccsens.common.service.ITaskService; |
|
|
|
import com.ccsens.defaultwbs.bean.vo.TaskVo; |
|
|
|
@ -89,4 +91,40 @@ public class TaskController { |
|
|
|
log.info("查找项目下的任务结束{}",taskList); |
|
|
|
return JsonResponse.newInstance().ok(taskList); |
|
|
|
} |
|
|
|
|
|
|
|
@ApiOperation(value = "修改任务信息", notes = "") |
|
|
|
@RequestMapping(value = "/update", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|
|
|
public JsonResponse updateTask(@ApiParam @Validated @RequestBody QueryDto<CTaskDto.UpdateTask> params) throws Exception { |
|
|
|
log.info("修改任务信息开始{}",params); |
|
|
|
taskService.updateTaskDetail(params.getParam(), params.getUserId()); |
|
|
|
log.info("修改任务信息结束"); |
|
|
|
return JsonResponse.newInstance().ok(); |
|
|
|
} |
|
|
|
|
|
|
|
@ApiOperation(value = "删除任务", notes = "") |
|
|
|
@RequestMapping(value = "/delete", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|
|
|
public JsonResponse deleteTask(@ApiParam @Validated @RequestBody QueryDto<CTaskDto.FindSonTask> params) throws Exception { |
|
|
|
log.info("删除任务开始{}",params); |
|
|
|
taskService.deleteTaskDetail(params.getParam(), params.getUserId()); |
|
|
|
log.info("删除任务结束"); |
|
|
|
return JsonResponse.newInstance().ok(); |
|
|
|
} |
|
|
|
|
|
|
|
@ApiOperation(value = "查找任务下的插件列表", notes = "") |
|
|
|
@RequestMapping(value = "/queryTaskPlugin", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|
|
|
public JsonResponse<List<CPluginVo.TaskPlugin>> queryTaskPlugin(@ApiParam @Validated @RequestBody QueryDto<CTaskDto.FindSonTask> params) throws Exception { |
|
|
|
log.info("查找任务下的插件列表开始{}",params); |
|
|
|
List<CPluginVo.TaskPlugin> taskPlugins = taskService.queryPluginByTaskId(params.getParam(), params.getUserId()); |
|
|
|
log.info("查找任务下的插件列表结束:{}",taskPlugins); |
|
|
|
return JsonResponse.newInstance().ok(taskPlugins); |
|
|
|
} |
|
|
|
|
|
|
|
@ApiOperation(value = "给任务添加关联插件", notes = "") |
|
|
|
@RequestMapping(value = "/saveTaskPlugin", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|
|
|
public JsonResponse saveTaskPlugin(@ApiParam @Validated @RequestBody QueryDto<CPluginDto.SaveTaskPlugin> params) throws Exception { |
|
|
|
log.info("给任务添加关联插件{}",params); |
|
|
|
taskService.saveTaskPlugin(params.getParam(), params.getUserId()); |
|
|
|
log.info("给任务添加关联插件结束"); |
|
|
|
return JsonResponse.newInstance().ok(); |
|
|
|
} |
|
|
|
} |
|
|
|
|