From bc8ca5f34b3c8f163bbfdda49a1b085aa8b4f019 Mon Sep 17 00:00:00 2001 From: Administrator <1144154118@qq.com> Date: 星期六, 05 八月 2023 10:48:37 +0800 Subject: [PATCH] 巡检人 --- ard-work/src/main/java/com/ruoyi/app/patrolplan/controller/ArdAppPatrolplanController.java | 63 ++++++++++++++++++++++++++----- 1 files changed, 52 insertions(+), 11 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..b13e2ff 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,20 @@ package com.ruoyi.app.patrolplan.controller; import java.util.List; +import java.util.Map; +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 +48,12 @@ @Autowired private IArdAppPatrolplanService ardAppPatrolplanService; + @Resource + IArdAppPatrolpointService ardAppPatrolpointService; + + @Resource + IArdAppPatroluserService ardAppPatroluserService; + /** * 鏌ヨapp宸℃璁″垝鍒楄〃 */ @@ -69,14 +82,41 @@ } /** - * 鑾峰彇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) + public AjaxResult remove(@PathVariable String id) + { + //return ardAppPatrolplanService.deleteArdApp(id); + return toAjax(ardAppPatrolplanService.deleteArdApp(id)); + } + /** * 鏂板app宸℃璁″垝 @@ -101,13 +141,14 @@ } /** - * 鍒犻櫎app宸℃璁″垝 + * 鏂板app宸℃璁″垝鍙婁汉鍛樼偣浣� */ - @PreAuthorize("@ss.hasPermi('app:appPatrolplan:remove')") - @Log(title = "app宸℃璁″垝", businessType = BusinessType.DELETE) - @DeleteMapping("/{patroEndTimes}") - public AjaxResult remove(@PathVariable String[] patroEndTimes) + @PreAuthorize("@ss.hasPermi('app:appPatrolplan:insertArdAppPatrolplan')") + @Log(title = "app宸℃璁″垝", businessType = BusinessType.INSERT) + @PostMapping("/insertArdAppPatrolplan") + @ApiOperation("鏂板app宸℃璁″垝鍙婁汉鍛樼偣浣�") + public AjaxResult addArdAppPatrolplan(@RequestBody Map<String,Object> para) { - return toAjax(ardAppPatrolplanService.deleteArdAppPatrolplanByPatroEndTimes(patroEndTimes)); + return toAjax(ardAppPatrolplanService.insertArdAppPatrolplan(para)); } } -- Gitblit v1.9.3