fix -- 格式化代码风格

This commit is contained in:
hewenqiang
2022-02-11 14:56:18 +08:00
parent e6bfd5bf0a
commit b47bcba0a4
8 changed files with 42 additions and 44 deletions

View File

@@ -42,7 +42,7 @@ import java.util.List;
@RequestMapping("/workflow/category")
public class FlowCategoryController extends BaseController {
private final IFlowCategoryService iFlowCategoryService;
private final IFlowCategoryService flowCategoryService;
/**
* 查询流程分类列表
@@ -51,7 +51,7 @@ public class FlowCategoryController extends BaseController {
@SaCheckPermission("workflow:category:list")
@GetMapping("/list")
public TableDataInfo<FlowCategoryVo> list(@Validated(QueryGroup.class) FlowCategoryBo bo, PageQuery pageQuery) {
return iFlowCategoryService.queryPageList(bo, pageQuery);
return flowCategoryService.queryPageList(bo, pageQuery);
}
/**
@@ -62,7 +62,7 @@ public class FlowCategoryController extends BaseController {
@Log(title = "流程分类", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(@Validated FlowCategoryBo bo, HttpServletResponse response) {
List<FlowCategoryVo> list = iFlowCategoryService.queryList(bo);
List<FlowCategoryVo> list = flowCategoryService.queryList(bo);
ExcelUtil.exportExcel(list, "流程分类", FlowCategoryVo.class, response);
}
@@ -75,7 +75,7 @@ public class FlowCategoryController extends BaseController {
public R<FlowCategoryVo> getInfo(@ApiParam("主键")
@NotNull(message = "主键不能为空")
@PathVariable("categoryId") Long categoryId) {
return R.ok(iFlowCategoryService.queryById(categoryId));
return R.ok(flowCategoryService.queryById(categoryId));
}
/**
@@ -87,7 +87,7 @@ public class FlowCategoryController extends BaseController {
@RepeatSubmit()
@PostMapping()
public R<Void> add(@Validated(AddGroup.class) @RequestBody FlowCategoryBo bo) {
return toAjax(iFlowCategoryService.insertByBo(bo) ? 1 : 0);
return toAjax(flowCategoryService.insertByBo(bo) ? 1 : 0);
}
/**
@@ -99,7 +99,7 @@ public class FlowCategoryController extends BaseController {
@RepeatSubmit()
@PutMapping()
public R<Void> edit(@Validated(EditGroup.class) @RequestBody FlowCategoryBo bo) {
return toAjax(iFlowCategoryService.updateByBo(bo) ? 1 : 0);
return toAjax(flowCategoryService.updateByBo(bo) ? 1 : 0);
}
/**
@@ -109,9 +109,7 @@ public class FlowCategoryController extends BaseController {
@SaCheckPermission("workflow:category:remove")
@Log(title = "流程分类" , businessType = BusinessType.DELETE)
@DeleteMapping("/{categoryIds}")
public R<Void> remove(@ApiParam("主键串")
@NotEmpty(message = "主键不能为空")
@PathVariable Long[] categoryIds) {
return toAjax(iFlowCategoryService.deleteWithValidByIds(Arrays.asList(categoryIds), true) ? 1 : 0);
public R<Void> remove(@ApiParam("主键串") @NotEmpty(message = "主键不能为空") @PathVariable Long[] categoryIds) {
return toAjax(flowCategoryService.deleteWithValidByIds(Arrays.asList(categoryIds), true) ? 1 : 0);
}
}

View File

@@ -62,6 +62,7 @@ public class FlowDefinitionController extends BaseController {
/**
* 列出指定流程的发布版本列表
*
* @param processKey 流程定义Key
* @return
*/
@@ -76,8 +77,8 @@ public class FlowDefinitionController extends BaseController {
@ApiOperation(value = "导入流程文件", notes = "上传bpmn20的xml文件")
@PostMapping("/import")
public R<Void> importFile(@RequestParam(required = false) String name,
@RequestParam(required = false) String category,
MultipartFile file) {
@RequestParam(required = false) String category,
MultipartFile file) {
try (InputStream in = file.getInputStream()) {
flowDefinitionService.importFile(name, category, in);
} catch (Exception e) {
@@ -133,7 +134,7 @@ public class FlowDefinitionController extends BaseController {
@ApiOperation(value = "根据流程定义id启动流程实例")
@PostMapping("/start/{procDefId}")
public R<Void> start(@ApiParam(value = "流程定义id") @PathVariable(value = "procDefId") String procDefId,
@ApiParam(value = "变量集合,json对象") @RequestBody Map<String, Object> variables) {
@ApiParam(value = "变量集合,json对象") @RequestBody Map<String, Object> variables) {
flowDefinitionService.startProcessInstanceById(procDefId, variables);
return success("流程启动成功");
@@ -142,7 +143,7 @@ public class FlowDefinitionController extends BaseController {
@ApiOperation(value = "激活或挂起流程定义")
@PutMapping(value = "/updateState")
public R<Void> updateState(@ApiParam(value = "ture:挂起,false:激活", required = true) @RequestParam Boolean suspended,
@ApiParam(value = "流程定义ID", required = true) @RequestParam String definitionId) {
@ApiParam(value = "流程定义ID", required = true) @RequestParam String definitionId) {
flowDefinitionService.updateState(suspended, definitionId);
return success();
}

View File

@@ -31,16 +31,17 @@ public class FlowInstanceController {
@ApiOperation(value = "根据流程定义id启动流程实例")
@PostMapping("/startBy/{procDefId}")
public R startById(@ApiParam(value = "流程定义id") @PathVariable(value = "procDefId") String procDefId,
@ApiParam(value = "变量集合,json对象") @RequestBody Map<String, Object> variables) {
return flowInstanceService.startProcessInstanceById(procDefId, variables);
@ApiParam(value = "变量集合,json对象") @RequestBody Map<String, Object> variables) {
flowInstanceService.startProcessInstanceById(procDefId, variables);
return R.ok("流程启动成功");
}
@ApiOperation(value = "激活或挂起流程实例")
@PostMapping(value = "/updateState")
public R updateState(@ApiParam(value = "1:激活,2:挂起", required = true) @RequestParam Integer state,
@ApiParam(value = "流程实例ID", required = true) @RequestParam String instanceId) {
flowInstanceService.updateState(state,instanceId);
@ApiParam(value = "流程实例ID", required = true) @RequestParam String instanceId) {
flowInstanceService.updateState(state, instanceId);
return R.ok();
}
@@ -54,8 +55,8 @@ public class FlowInstanceController {
@ApiOperation(value = "删除流程实例")
@DeleteMapping(value = "/delete")
public R delete(@ApiParam(value = "流程实例ID", required = true) @RequestParam String instanceId,
@ApiParam(value = "删除原因") @RequestParam(required = false) String deleteReason) {
flowInstanceService.delete(instanceId,deleteReason);
@ApiParam(value = "删除原因") @RequestParam(required = false) String deleteReason) {
flowInstanceService.delete(instanceId, deleteReason);
return R.ok();
}
}

View File

@@ -76,7 +76,7 @@ public class FlowTaskController {
@ApiOperation(value = "获取流程变量", response = FlowTaskDto.class)
@GetMapping(value = "/processVariables/{taskId}")
public R processVariables(@ApiParam(value = "流程任务Id") @PathVariable(value = "taskId") String taskId) {
public R processVariables(@ApiParam(value = "流程任务Id") @PathVariable(value = "taskId") String taskId) {
return flowTaskService.processVariables(taskId);
}
@@ -157,7 +157,7 @@ public class FlowTaskController {
@RequestMapping("/diagram/{processId}")
public void genProcessDiagram(HttpServletResponse response,
@PathVariable("processId") String processId) {
InputStream inputStream = flowTaskService.diagram(processId);
InputStream inputStream = flowTaskService.diagram(processId);
OutputStream os = null;
BufferedImage image = null;
try {
@@ -167,9 +167,9 @@ public class FlowTaskController {
if (image != null) {
ImageIO.write(image, "png", os);
}
}catch (Exception e) {
} catch (Exception e) {
e.printStackTrace();
}finally {
} finally {
try {
if (os != null) {
os.flush();