Administrator
2023-08-03 babddaa73918a054346b9af3f3926831c4667c1b
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));
    }
}