|
|
@@ -16,6 +16,12 @@
|
|
|
*/
|
|
|
package com.blade.check.controller;
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
|
|
+import com.blade.check.entity.AuditPaths;
|
|
|
+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;
|
|
|
@@ -25,6 +31,7 @@ import javax.validation.Valid;
|
|
|
|
|
|
import org.springblade.core.mp.support.Condition;
|
|
|
import org.springblade.core.mp.support.Query;
|
|
|
+import org.springblade.core.secure.utils.AuthUtil;
|
|
|
import org.springblade.core.tool.api.R;
|
|
|
import org.springblade.core.tool.utils.Func;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
@@ -34,6 +41,8 @@ import com.blade.check.vo.AuditPathsActsVO;
|
|
|
import com.blade.check.service.IAuditPathsActsService;
|
|
|
import org.springblade.core.boot.ctrl.BladeController;
|
|
|
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
/**
|
|
|
* 审批流配置明细表 控制器
|
|
|
*
|
|
|
@@ -48,31 +57,74 @@ public class AuditPathsActsController extends BladeController {
|
|
|
|
|
|
private final IAuditPathsActsService auditPathsActsService;
|
|
|
|
|
|
+ private final IAuditPathsLevelsService auditPathsLevelsService;
|
|
|
+
|
|
|
+
|
|
|
+ @GetMapping("/list")
|
|
|
+ @ApiOperationSupport(order = 2)
|
|
|
+ @ApiOperation(value = "列表-审批流配置明细表", notes = "传入auditPathsActs")
|
|
|
+ public R<IPage<AuditPathsActs>> list(AuditPathsActs auditPathsActs, Query query)
|
|
|
+ {
|
|
|
+ LambdaQueryWrapper<AuditPathsActs> lambdaQueryWrapper=new LambdaQueryWrapper<>();
|
|
|
+ lambdaQueryWrapper.eq(AuditPathsActs::getTenantId, AuthUtil.getTenantId());
|
|
|
+ lambdaQueryWrapper.like(StringUtils.isNotBlank(auditPathsActs.getActName()),AuditPathsActs::getActName,auditPathsActs.getActName());
|
|
|
+ IPage<AuditPathsActs> pages = auditPathsActsService.page(Condition.getPage(query), lambdaQueryWrapper);
|
|
|
+ return R.data(pages);
|
|
|
+ }
|
|
|
+
|
|
|
+ @PostMapping("modify")
|
|
|
+ @ApiOperationSupport(order = 2)
|
|
|
+ @ApiOperation(value = "保存-审批流配置明细表", notes = "传入auditPathsActs")
|
|
|
+ public R modify(@RequestBody List<AuditPathsActs> auditPathsActsList)
|
|
|
+ {
|
|
|
+ if(CollectionUtils.isEmpty(auditPathsActsList))
|
|
|
+ {
|
|
|
+ throw new SecurityException("传入数据为空");
|
|
|
+ }
|
|
|
+ auditPathsActsService.modify(auditPathsActsList);
|
|
|
+ return R.success("操作成功");
|
|
|
+ }
|
|
|
+
|
|
|
+ @GetMapping("listLevelsByActId")
|
|
|
+ public List<AuditPathsLevels> listLevelsByActId(@ApiParam(value = "feign接口专用,前端勿调", required = true) @RequestParam int actId,@ApiParam(value = "feign接口专用,前端勿调", required = true) @RequestParam String fidStatus)
|
|
|
+ {
|
|
|
+ AuditPathsActs pathsActs = auditPathsActsService.getOne(new LambdaQueryWrapper<AuditPathsActs>().eq(AuditPathsActs::getActId, actId).eq(AuditPathsActs::getFidStatus,fidStatus).eq(AuditPathsActs::getTenantId,AuthUtil.getTenantId()));
|
|
|
+ Long pathId = pathsActs.getPathId();
|
|
|
+ List<AuditPathsLevels> levelsList = auditPathsLevelsService.list(new LambdaQueryWrapper<AuditPathsLevels>().eq(AuditPathsLevels::getTenantId,AuthUtil.getTenantId()).eq(AuditPathsLevels::getPathId, pathId));
|
|
|
+ return levelsList;
|
|
|
+ }
|
|
|
+
|
|
|
+ @GetMapping("getActsByActId")
|
|
|
+ public AuditPathsActs getActsByActId(@ApiParam(value = "feign接口专用,前端勿调", required = true) @RequestParam int actId,@ApiParam(value = "feign接口专用,前端勿调", required = true) @RequestParam String fidStatus)
|
|
|
+ {
|
|
|
+ LambdaQueryWrapper<AuditPathsActs> auditPathsActsLambdaQueryWrapper=new LambdaQueryWrapper<>();
|
|
|
+ auditPathsActsLambdaQueryWrapper
|
|
|
+ .eq(AuditPathsActs::getFidStatus,fidStatus)
|
|
|
+ .eq(AuditPathsActs::getTenantId,AuthUtil.getTenantId())
|
|
|
+ .eq(AuditPathsActs::getActId,actId);
|
|
|
+ return auditPathsActsService.getOne(auditPathsActsLambdaQueryWrapper);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 详情
|
|
|
- */
|
|
|
@GetMapping("/detail")
|
|
|
@ApiOperationSupport(order = 1)
|
|
|
@ApiOperation(value = "详情", notes = "传入auditPathsActs")
|
|
|
public R<AuditPathsActs> detail(AuditPathsActs auditPathsActs) {
|
|
|
AuditPathsActs detail = auditPathsActsService.getOne(Condition.getQueryWrapper(auditPathsActs));
|
|
|
return R.data(detail);
|
|
|
- }
|
|
|
+ }*/
|
|
|
|
|
|
/**
|
|
|
* 分页 审批流配置明细表
|
|
|
*/
|
|
|
- @GetMapping("/list")
|
|
|
- @ApiOperationSupport(order = 2)
|
|
|
- @ApiOperation(value = "分页", notes = "传入auditPathsActs")
|
|
|
- public R<IPage<AuditPathsActs>> list(AuditPathsActs auditPathsActs, Query query) {
|
|
|
- IPage<AuditPathsActs> pages = auditPathsActsService.page(Condition.getPage(query), Condition.getQueryWrapper(auditPathsActs));
|
|
|
- return R.data(pages);
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 自定义分页 审批流配置明细表
|
|
|
- */
|
|
|
@GetMapping("/page")
|
|
|
@ApiOperationSupport(order = 3)
|
|
|
@ApiOperation(value = "分页", notes = "传入auditPathsActs")
|
|
|
@@ -80,20 +132,18 @@ public class AuditPathsActsController extends BladeController {
|
|
|
IPage<AuditPathsActsVO> pages = auditPathsActsService.selectAuditPathsActsPage(Condition.getPage(query), auditPathsActs);
|
|
|
return R.data(pages);
|
|
|
}
|
|
|
-
|
|
|
+ */
|
|
|
/**
|
|
|
* 新增 审批流配置明细表
|
|
|
- */
|
|
|
@PostMapping("/save")
|
|
|
@ApiOperationSupport(order = 4)
|
|
|
@ApiOperation(value = "新增", notes = "传入auditPathsActs")
|
|
|
public R save(@Valid @RequestBody AuditPathsActs auditPathsActs) {
|
|
|
return R.status(auditPathsActsService.save(auditPathsActs));
|
|
|
- }
|
|
|
+ }*/
|
|
|
|
|
|
/**
|
|
|
* 修改 审批流配置明细表
|
|
|
- */
|
|
|
@PostMapping("/update")
|
|
|
@ApiOperationSupport(order = 5)
|
|
|
@ApiOperation(value = "修改", notes = "传入auditPathsActs")
|
|
|
@@ -101,9 +151,9 @@ public class AuditPathsActsController extends BladeController {
|
|
|
return R.status(auditPathsActsService.updateById(auditPathsActs));
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
+ *//**
|
|
|
* 新增或修改 审批流配置明细表
|
|
|
- */
|
|
|
+ *//*
|
|
|
@PostMapping("/submit")
|
|
|
@ApiOperationSupport(order = 6)
|
|
|
@ApiOperation(value = "新增或修改", notes = "传入auditPathsActs")
|
|
|
@@ -111,16 +161,16 @@ public class AuditPathsActsController extends BladeController {
|
|
|
return R.status(auditPathsActsService.saveOrUpdate(auditPathsActs));
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- /**
|
|
|
+
|
|
|
+ *//**
|
|
|
* 删除 审批流配置明细表
|
|
|
- */
|
|
|
+ *//*
|
|
|
@PostMapping("/remove")
|
|
|
@ApiOperationSupport(order = 8)
|
|
|
@ApiOperation(value = "删除", notes = "传入ids")
|
|
|
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
|
|
|
return R.status(auditPathsActsService.removeByIds(Func.toLongList(ids)));
|
|
|
- }
|
|
|
+ }*/
|
|
|
+
|
|
|
|
|
|
-
|
|
|
}
|