From babddaa73918a054346b9af3f3926831c4667c1b Mon Sep 17 00:00:00 2001 From: Administrator <1144154118@qq.com> Date: 星期四, 03 八月 2023 17:17:10 +0800 Subject: [PATCH] 巡检计划从表查询及删除导出 --- ard-work/src/main/java/com/ruoyi/app/patrolplan/controller/ArdAppPatrolplanController.java | 57 ++++++++++++++++++++++++++++++++++++++++++--------------- 1 files changed, 42 insertions(+), 15 deletions(-) diff --git a/ard-work/src/main/java/com/ruoyi/app/patrolplan/controller/ArdAppPatrolplanController.java b/ard-work/src/main/java/com/ruoyi/app/patrolplan/controller/ArdAppPatrolplanController.java index 85a8259..c9054d5 100644 --- a/ard-work/src/main/java/com/ruoyi/app/patrolplan/controller/ArdAppPatrolplanController.java +++ b/ard-work/src/main/java/com/ruoyi/app/patrolplan/controller/ArdAppPatrolplanController.java @@ -1,13 +1,19 @@ package com.ruoyi.app.patrolplan.controller; import java.util.List; +import javax.annotation.Resource; import javax.servlet.http.HttpServletResponse; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; +import com.ruoyi.app.patrolplan.domain.ArdAppPatrolpoint; +import com.ruoyi.app.patrolplan.service.IArdAppPatrolpointService; +import com.ruoyi.app.patrolplan.service.IArdAppPatroluserService; import com.ruoyi.utils.result.Results; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; +import jdk.nashorn.internal.ir.annotations.Reference; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; @@ -41,6 +47,12 @@ @Autowired private IArdAppPatrolplanService ardAppPatrolplanService; + @Resource + IArdAppPatrolpointService ardAppPatrolpointService; + + @Resource + IArdAppPatroluserService ardAppPatroluserService; + /** * 鏌ヨapp宸℃璁″垝鍒楄〃 */ @@ -69,14 +81,39 @@ } /** - * 鑾峰彇app宸℃璁″垝璇︾粏淇℃伅 + * 鏍规嵁宸℃ID鏌ヨ鍏磋叮鐐� */ - @PreAuthorize("@ss.hasPermi('app:appPatrolplan:query')") - @GetMapping(value = "/{patroEndTime}") - public AjaxResult getInfo(@PathVariable("patroEndTime") String patroEndTime) + @PreAuthorize("@ss.hasPermi('app:appPatrolplan:wellByPlanId')") + @GetMapping(value = "wellByPlanId/{id}") + @ApiOperation("鏍规嵁宸℃ID鏌ヨ鍏磋叮鐐�") + public Results wellByPlanId(@PathVariable String id) { - return success(ardAppPatrolplanService.selectArdAppPatrolplanByPatroEndTime(patroEndTime)); + return ardAppPatrolpointService.wellByPlanId(id); } + + /** + * 鏍规嵁宸℃ID鏌ヨ宸℃浜� + */ + @PreAuthorize("@ss.hasPermi('app:appPatrolplan:userByPlanId')") + @GetMapping(value = "userByPlanId/{id}") + @ApiOperation("鏍规嵁宸℃ID鏌ヨ宸℃浜�") + public Results userByPlanId(@PathVariable String id) + { + return ardAppPatroluserService.userByPlanId(id); + } + + /** + * 鍒犻櫎app宸℃璁″垝 + */ + @PreAuthorize("@ss.hasPermi('app:appPatrolplan:remove')") + @Log(title = "app宸℃璁″垝", businessType = BusinessType.DELETE) + @DeleteMapping("/{id}") + @ApiOperation("鍒犻櫎app宸℃璁″垝") + public Results remove(@PathVariable String id) + { + return ardAppPatrolplanService.deleteArdApp(id); + } + /** * 鏂板app宸℃璁″垝 @@ -100,14 +137,4 @@ return toAjax(ardAppPatrolplanService.updateArdAppPatrolplan(ardAppPatrolplan)); } - /** - * 鍒犻櫎app宸℃璁″垝 - */ - @PreAuthorize("@ss.hasPermi('app:appPatrolplan:remove')") - @Log(title = "app宸℃璁″垝", businessType = BusinessType.DELETE) - @DeleteMapping("/{patroEndTimes}") - public AjaxResult remove(@PathVariable String[] patroEndTimes) - { - return toAjax(ardAppPatrolplanService.deleteArdAppPatrolplanByPatroEndTimes(patroEndTimes)); - } } -- Gitblit v1.9.3