|
|
@@ -16,6 +16,11 @@
|
|
|
*/
|
|
|
package com.blade.check.controller;
|
|
|
|
|
|
+import com.alibaba.cloud.commons.lang.StringUtils;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
+import com.blade.check.entity.AuditPathsLevels;
|
|
|
+import com.blade.check.service.IAuditPathsLevelsService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
|
@@ -34,6 +39,8 @@ import com.blade.check.vo.AuditPathsVO;
|
|
|
import com.blade.check.service.IAuditPathsService;
|
|
|
import org.springblade.core.boot.ctrl.BladeController;
|
|
|
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
/**
|
|
|
* 审批流配置主表 控制器
|
|
|
*
|
|
|
@@ -48,79 +55,58 @@ public class AuditPathsController extends BladeController {
|
|
|
|
|
|
private final IAuditPathsService auditPathsService;
|
|
|
|
|
|
+ private final IAuditPathsLevelsService auditPathsLevelsService;
|
|
|
+
|
|
|
/**
|
|
|
* 详情
|
|
|
*/
|
|
|
@GetMapping("/detail")
|
|
|
@ApiOperationSupport(order = 1)
|
|
|
- @ApiOperation(value = "详情", notes = "传入auditPaths")
|
|
|
+ @ApiOperation(value = "详情-审批流配置主表", notes = "传入auditPaths")
|
|
|
public R<AuditPaths> detail(AuditPaths auditPaths) {
|
|
|
AuditPaths detail = auditPathsService.getOne(Condition.getQueryWrapper(auditPaths));
|
|
|
+ List<AuditPathsLevels> pathsLevelsList = auditPathsLevelsService.list(new LambdaQueryWrapper<AuditPathsLevels>().eq(AuditPathsLevels::getPathId, detail.getId()));
|
|
|
+ detail.setAuditPathsLevels(pathsLevelsList);
|
|
|
return R.data(detail);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 分页 审批流配置主表
|
|
|
+ * 列表-审批流配置主表
|
|
|
*/
|
|
|
@GetMapping("/list")
|
|
|
@ApiOperationSupport(order = 2)
|
|
|
- @ApiOperation(value = "分页", notes = "传入auditPaths")
|
|
|
+ @ApiOperation(value = "列表-审批流配置主表", notes = "传入auditPaths")
|
|
|
public R<IPage<AuditPaths>> list(AuditPaths auditPaths, Query query) {
|
|
|
- IPage<AuditPaths> pages = auditPathsService.page(Condition.getPage(query), Condition.getQueryWrapper(auditPaths));
|
|
|
+ LambdaQueryWrapper<AuditPaths> lambdaQueryWrapper=new LambdaQueryWrapper<>();
|
|
|
+ lambdaQueryWrapper.like(StringUtils.isNotBlank(auditPaths.getPathName()),AuditPaths::getPathName,auditPaths.getPathName())
|
|
|
+ .orderByDesc(AuditPaths::getOpDate);
|
|
|
+ IPage<AuditPaths> pages = auditPathsService.page(Condition.getPage(query),lambdaQueryWrapper);
|
|
|
return R.data(pages);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 自定义分页 审批流配置主表
|
|
|
- */
|
|
|
- @GetMapping("/page")
|
|
|
- @ApiOperationSupport(order = 3)
|
|
|
- @ApiOperation(value = "分页", notes = "传入auditPaths")
|
|
|
- public R<IPage<AuditPathsVO>> page(AuditPathsVO auditPaths, Query query) {
|
|
|
- IPage<AuditPathsVO> pages = auditPathsService.selectAuditPathsPage(Condition.getPage(query), auditPaths);
|
|
|
- return R.data(pages);
|
|
|
- }
|
|
|
+ * 新增或编辑审批流配置
|
|
|
+ * */
|
|
|
+ @PostMapping("/modify")
|
|
|
+ @ApiOperationSupport(order = 3)
|
|
|
+ @ApiOperation(value = "新增或编辑审批流配置", notes = "传入auditPaths")
|
|
|
+ public R modify(@Valid @RequestBody AuditPaths auditPaths)
|
|
|
+ {
|
|
|
+ return R.data(auditPathsService.modify(auditPaths));
|
|
|
+ }
|
|
|
|
|
|
- /**
|
|
|
- * 新增 审批流配置主表
|
|
|
- */
|
|
|
- @PostMapping("/save")
|
|
|
- @ApiOperationSupport(order = 4)
|
|
|
- @ApiOperation(value = "新增", notes = "传入auditPaths")
|
|
|
- public R save(@Valid @RequestBody AuditPaths auditPaths) {
|
|
|
- return R.status(auditPathsService.save(auditPaths));
|
|
|
- }
|
|
|
|
|
|
- /**
|
|
|
- * 修改 审批流配置主表
|
|
|
- */
|
|
|
- @PostMapping("/update")
|
|
|
- @ApiOperationSupport(order = 5)
|
|
|
- @ApiOperation(value = "修改", notes = "传入auditPaths")
|
|
|
- public R update(@Valid @RequestBody AuditPaths auditPaths) {
|
|
|
- return R.status(auditPathsService.updateById(auditPaths));
|
|
|
- }
|
|
|
|
|
|
- /**
|
|
|
- * 新增或修改 审批流配置主表
|
|
|
- */
|
|
|
- @PostMapping("/submit")
|
|
|
- @ApiOperationSupport(order = 6)
|
|
|
- @ApiOperation(value = "新增或修改", notes = "传入auditPaths")
|
|
|
- public R submit(@Valid @RequestBody AuditPaths auditPaths) {
|
|
|
- return R.status(auditPathsService.saveOrUpdate(auditPaths));
|
|
|
- }
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* 删除 审批流配置主表
|
|
|
*/
|
|
|
@PostMapping("/remove")
|
|
|
- @ApiOperationSupport(order = 8)
|
|
|
- @ApiOperation(value = "删除", notes = "传入ids")
|
|
|
+ @ApiOperationSupport(order = 4)
|
|
|
+ @ApiOperation(value = "删除-审批流配置主表", notes = "传入ids")
|
|
|
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
|
|
|
return R.status(auditPathsService.removeByIds(Func.toLongList(ids)));
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
}
|