From 1685885aef158c3f8f915264e1ae0836ef711f6a Mon Sep 17 00:00:00 2001 From: yang_shj <1069818635@QQ.com> Date: Mon, 25 Nov 2024 13:59:00 +0800 Subject: [PATCH] =?UTF-8?q?#=E5=B7=A1=E6=A3=80=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hnac/hzinfo/inspect/obj/web/ContentController.java | 18 +++++++++--------- .../hzinfo/inspect/plan/controller/PlanController.java | 18 +++++++----------- 2 files changed, 16 insertions(+), 20 deletions(-) diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/web/ContentController.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/web/ContentController.java index 37f605a..4a9d03e 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/web/ContentController.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/web/ContentController.java @@ -37,7 +37,7 @@ import java.util.List; /** * 巡检内容 - * ninglong + * @author ysj */ @RestController @RequestMapping("/obj/content") @@ -69,7 +69,7 @@ public class ContentController { */ @GetMapping("/detail") @ApiOperation(value = "查看详情", notes = "传入id") - @Operate(label="查询巡检内容详情",type = BusinessType.QUERY,ignore = false) + @Operate(label="查询巡检内容详情",type = BusinessType.QUERY) public R detail(Long id) { ContentEntity content = contentService.getById(id); return R.data(content); @@ -80,7 +80,7 @@ public class ContentController { */ @PostMapping("/submit") @ApiOperation(value = "新增或修改", notes = "传入巡检内容") - @Operate(label="新增/修改巡检内容",type = BusinessType.INSERT,risk = Risk.LOW,ignore = false) + @Operate(label="新增/修改巡检内容",type = BusinessType.INSERT,risk = Risk.LOW) public R submit(@Valid @RequestBody ContentEntity content) { if(content.getId()==null && Func.isBlank(content.getCode())){ content.setCode(CodeUtils.randomCode()); @@ -91,7 +91,7 @@ public class ContentController { @PostMapping("/saveBatch") @ApiOperationSupport(order = 3) @ApiOperation(value = "巡检内容批量新增", notes = "传入object") - @Operate(label="批量新增巡检内容",type = BusinessType.INSERT,risk = Risk.LOW,ignore = false) + @Operate(label="批量新增巡检内容",type = BusinessType.INSERT,risk = Risk.LOW) public R submit(@Valid @RequestBody ContentBatchVo batchVo) { return R.status(contentService.saveBatch(batchVo.getContents())); } @@ -101,12 +101,12 @@ public class ContentController { */ @PostMapping("/remove") @ApiOperation(value = "删除", notes = "传入id集合") - @Operate(label="删除巡检内容",type = BusinessType.DELETE,risk = Risk.MEDIUM,ignore = false) + @Operate(label="删除巡检内容",type = BusinessType.DELETE,risk = Risk.MEDIUM) public R remove(@RequestParam String ids) { List delIdList = Func.toLongList(ids); - QueryWrapper qw = new QueryWrapper(); + QueryWrapper qw = new QueryWrapper<>(); qw.lambda().in(ProjectContentEntity::getContentId,delIdList); - Long count = projectContentService.count(qw); + long count = projectContentService.count(qw); if(count>0) { return R.fail("该巡检内容已被巡检项目引用,无法删除。"); } @@ -118,7 +118,7 @@ public class ContentController { */ @PostMapping("/insertCopyBatch") @ApiOperation(value = "根据ids 数据库批量复制", notes = "传入id集合") - @Operate(label="批量拷贝巡检内容",type = BusinessType.INSERT,risk = Risk.LOW,ignore = false) + @Operate(label="批量拷贝巡检内容",type = BusinessType.INSERT,risk = Risk.LOW) public R insertCopyBatch(@ApiParam(value = "主键集合 ,隔开", required = true)@RequestParam String ids, @ApiParam(value = "添加的名称前缀") @RequestParam String pre) { contentService.databaseCopyBatch(Func.toLongList(ids), pre); @@ -127,7 +127,7 @@ public class ContentController { @PutMapping("/updateBatch") @ApiOperation(value = "根据ids 数据库批量复制", notes = "传入id集合") - @Operate(label="批量编辑巡检内容",type = BusinessType.UPDATE,risk = Risk.LOW,ignore = false) + @Operate(label="批量编辑巡检内容",type = BusinessType.UPDATE,risk = Risk.LOW) public R updateBatch(@RequestBody List contentList) { List contentEntityList = JSONArray.parseArray(JSON.toJSONString(contentList), ContentEntity.class); return R.status(contentService.updateBatchById(contentEntityList)); diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/plan/controller/PlanController.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/plan/controller/PlanController.java index 929b55f..23ce284 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/plan/controller/PlanController.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/plan/controller/PlanController.java @@ -32,7 +32,6 @@ import org.springblade.core.tool.constant.BladeConstant; import org.springblade.core.tool.utils.CollectionUtil; import org.springblade.core.tool.utils.Func; import org.springblade.system.user.cache.UserCache; -import org.springblade.system.user.entity.User; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -52,7 +51,7 @@ import java.util.Map; @RequestMapping("/plan") @Validated @Api(value = "巡检计划", tags = "巡检计划") -@Business(module = Constants.APP_NAME,value = "巡检计划管理",ignore = false) +@Business(module = Constants.APP_NAME,value = "巡检计划管理") public class PlanController extends BladeController { private final IPlanService planService; @@ -66,7 +65,7 @@ public class PlanController extends BladeController { @GetMapping("/detail") @ApiOperationSupport(order = 1) @ApiOperation(value = "查看", notes = "传入planId") - @Operate(label = "查看巡检计划详情",type = BusinessType.QUERY,ignore = false) + @Operate(label = "查看巡检计划详情",type = BusinessType.QUERY) public R detail(Long id) { PlanVO detail = planService.detail(id); return R.data(detail); @@ -78,7 +77,7 @@ public class PlanController extends BladeController { @GetMapping("/list") @ApiOperationSupport(order = 2) @ApiOperation(value = "分页显示计划列表", notes = "传入plan") - @Operate(label = "巡检计划列表分页查询",type = BusinessType.QUERY,ignore = false) + @Operate(label = "巡检计划列表分页查询",type = BusinessType.QUERY) public R> list(PlanListQueryVO plan, Query query) { LambdaQueryWrapper queryWrapper = Condition.getQueryWrapper(new PlanEntity(),plan); if(plan.getStartTime()!=null){ @@ -87,9 +86,6 @@ public class PlanController extends BladeController { if(plan.getEndTime()!=null){ queryWrapper.le(PlanEntity::getEndTime,plan.getEndTime()); } -// if(plan.getStatus()==null){ -// queryWrapper.ne(PlanEntity::getStatus, PlanContants.PlanStatusEnum.PLAN_AUTH.getStatus()); -// } if(plan.getCreateDept()!=null){ queryWrapper.eq(PlanEntity::getCreateDept,plan.getCreateDept()); } @@ -105,7 +101,7 @@ public class PlanController extends BladeController { @PostMapping("/submit") @ApiOperationSupport(order = 6) @ApiOperation(value = "新增或修改", notes = "传入plan") - @Operate(label = "新增/修改巡检计划",type = BusinessType.INSERT, risk = Risk.LOW,ignore = false) + @Operate(label = "新增/修改巡检计划",type = BusinessType.INSERT, risk = Risk.LOW) public R submit(@Valid @RequestBody PlanVO plan) { return R.status(planService.submit(plan)); } @@ -116,7 +112,7 @@ public class PlanController extends BladeController { @PostMapping("/addAndChecked") @ApiOperationSupport(order = 6) @ApiOperation(value = "新增或修改", notes = "传入plan") - @Operate(label = "审核巡检计划",type = BusinessType.UPDATE, risk = Risk.LOW,ignore = false) + @Operate(label = "审核巡检计划",type = BusinessType.UPDATE, risk = Risk.LOW) public R> addAndChecked(@Valid @RequestBody PlanVO plan) { return R.data(planService.addAndChecked(plan)); } @@ -126,7 +122,7 @@ public class PlanController extends BladeController { @GetMapping("/revoke") @ApiOperationSupport(order = 6) @ApiOperation(value = "撤销", notes = "传入plan") - @Operate(label = "撤销巡检计划",type = BusinessType.UPDATE, risk = Risk.LOW,ignore = false) + @Operate(label = "撤销巡检计划",type = BusinessType.UPDATE, risk = Risk.LOW) public R revoke(@RequestParam Long planId) { return R.data(planService.revoke(planId)); } @@ -137,7 +133,7 @@ public class PlanController extends BladeController { @PostMapping("/remove") @ApiOperationSupport(order = 7) @ApiOperation(value = "逻辑删除,不删除关联信息", notes = "传入ids") - @Operate(label = "删除巡检计划",type = BusinessType.DELETE, risk = Risk.MEDIUM,ignore = false) + @Operate(label = "删除巡检计划",type = BusinessType.DELETE, risk = Risk.MEDIUM) public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { return R.status(planService.removeByIds(Func.toLongList(ids))); }