完善数据权限功能

This commit is contained in:
2024-03-28 15:06:58 +08:00
parent 4aef506c93
commit 20da604267
60 changed files with 4587 additions and 164 deletions

View File

@@ -0,0 +1,108 @@
package com.ruoyi.web.controller.cxxm;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.PageDomain;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.cxxm.domain.TaskCheckAudit;
import com.ruoyi.cxxm.service.ITaskCheckAuditService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 任务巡查审核Controller
*
* @author ruoyi
* @date 2024-03-28
*/
@RestController
@RequestMapping("/cxxm/audit")
public class TaskCheckAuditController extends BaseController
{
@Autowired
private ITaskCheckAuditService taskCheckAuditService;
/**
* 查询任务巡查审核列表
*/
@PreAuthorize("@ss.hasPermi('cxxm:audit:list')")
@GetMapping("/list")
public TableDataInfo list(TaskCheckAudit taskCheckAudit, PageDomain pageDomain)
{
startPage();
List<TaskCheckAudit> list = taskCheckAuditService.list(new QueryWrapper<>(taskCheckAudit));
return getDataTable(list);
}
/**
* 导出任务巡查审核列表
*/
@PreAuthorize("@ss.hasPermi('cxxm:audit:export')")
@Log(title = "任务巡查审核", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, TaskCheckAudit taskCheckAudit)
{
List<TaskCheckAudit> list = taskCheckAuditService.list(new QueryWrapper<>(taskCheckAudit));
ExcelUtil<TaskCheckAudit> util = new ExcelUtil<TaskCheckAudit>(TaskCheckAudit.class);
util.exportExcel(response, list, "任务巡查审核数据");
}
/**
* 获取任务巡查审核详细信息
*/
@PreAuthorize("@ss.hasPermi('cxxm:audit:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(taskCheckAuditService.getById(id));
}
/**
* 新增任务巡查审核
*/
@PreAuthorize("@ss.hasPermi('cxxm:audit:add')")
@Log(title = "任务巡查审核", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TaskCheckAudit taskCheckAudit)
{
return toAjax(taskCheckAuditService.save(taskCheckAudit));
}
/**
* 修改任务巡查审核
*/
@PreAuthorize("@ss.hasPermi('cxxm:audit:edit')")
@Log(title = "任务巡查审核", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TaskCheckAudit taskCheckAudit)
{
return toAjax(taskCheckAuditService.updateById(taskCheckAudit));
}
/**
* 删除任务巡查审核
*/
@PreAuthorize("@ss.hasPermi('cxxm:audit:remove')")
@Log(title = "任务巡查审核", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable List<Long> ids)
{
return toAjax(taskCheckAuditService.removeByIds(ids));
}
}

View File

@@ -0,0 +1,108 @@
package com.ruoyi.web.controller.cxxm;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.PageDomain;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.cxxm.domain.TaskCheck;
import com.ruoyi.cxxm.service.ITaskCheckService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 任务巡查记录Controller
*
* @author ruoyi
* @date 2024-03-28
*/
@RestController
@RequestMapping("/cxxm/check")
public class TaskCheckController extends BaseController
{
@Autowired
private ITaskCheckService taskCheckService;
/**
* 查询任务巡查记录列表
*/
@PreAuthorize("@ss.hasPermi('cxxm:check:list')")
@GetMapping("/list")
public TableDataInfo list(TaskCheck taskCheck, PageDomain pageDomain)
{
startPage();
List<TaskCheck> list = taskCheckService.list(new QueryWrapper<>(taskCheck));
return getDataTable(list);
}
/**
* 导出任务巡查记录列表
*/
@PreAuthorize("@ss.hasPermi('cxxm:check:export')")
@Log(title = "任务巡查记录", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, TaskCheck taskCheck)
{
List<TaskCheck> list = taskCheckService.list(new QueryWrapper<>(taskCheck));
ExcelUtil<TaskCheck> util = new ExcelUtil<TaskCheck>(TaskCheck.class);
util.exportExcel(response, list, "任务巡查记录数据");
}
/**
* 获取任务巡查记录详细信息
*/
@PreAuthorize("@ss.hasPermi('cxxm:check:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(taskCheckService.getById(id));
}
/**
* 新增任务巡查记录
*/
@PreAuthorize("@ss.hasPermi('cxxm:check:add')")
@Log(title = "任务巡查记录", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TaskCheck taskCheck)
{
return toAjax(taskCheckService.save(taskCheck));
}
/**
* 修改任务巡查记录
*/
@PreAuthorize("@ss.hasPermi('cxxm:check:edit')")
@Log(title = "任务巡查记录", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TaskCheck taskCheck)
{
return toAjax(taskCheckService.updateById(taskCheck));
}
/**
* 删除任务巡查记录
*/
@PreAuthorize("@ss.hasPermi('cxxm:check:remove')")
@Log(title = "任务巡查记录", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable List<Long> ids)
{
return toAjax(taskCheckService.removeByIds(ids));
}
}

View File

@@ -0,0 +1,108 @@
package com.ruoyi.web.controller.cxxm;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.PageDomain;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.cxxm.domain.TaskCheckImage;
import com.ruoyi.cxxm.service.ITaskCheckImageService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 任务巡查图片Controller
*
* @author ruoyi
* @date 2024-03-28
*/
@RestController
@RequestMapping("/cxxm/image")
public class TaskCheckImageController extends BaseController
{
@Autowired
private ITaskCheckImageService taskCheckImageService;
/**
* 查询任务巡查图片列表
*/
@PreAuthorize("@ss.hasPermi('cxxm:image:list')")
@GetMapping("/list")
public TableDataInfo list(TaskCheckImage taskCheckImage, PageDomain pageDomain)
{
startPage();
List<TaskCheckImage> list = taskCheckImageService.list(new QueryWrapper<>(taskCheckImage));
return getDataTable(list);
}
/**
* 导出任务巡查图片列表
*/
@PreAuthorize("@ss.hasPermi('cxxm:image:export')")
@Log(title = "任务巡查图片", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, TaskCheckImage taskCheckImage)
{
List<TaskCheckImage> list = taskCheckImageService.list(new QueryWrapper<>(taskCheckImage));
ExcelUtil<TaskCheckImage> util = new ExcelUtil<TaskCheckImage>(TaskCheckImage.class);
util.exportExcel(response, list, "任务巡查图片数据");
}
/**
* 获取任务巡查图片详细信息
*/
@PreAuthorize("@ss.hasPermi('cxxm:image:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(taskCheckImageService.getById(id));
}
/**
* 新增任务巡查图片
*/
@PreAuthorize("@ss.hasPermi('cxxm:image:add')")
@Log(title = "任务巡查图片", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TaskCheckImage taskCheckImage)
{
return toAjax(taskCheckImageService.save(taskCheckImage));
}
/**
* 修改任务巡查图片
*/
@PreAuthorize("@ss.hasPermi('cxxm:image:edit')")
@Log(title = "任务巡查图片", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TaskCheckImage taskCheckImage)
{
return toAjax(taskCheckImageService.updateById(taskCheckImage));
}
/**
* 删除任务巡查图片
*/
@PreAuthorize("@ss.hasPermi('cxxm:image:remove')")
@Log(title = "任务巡查图片", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable List<Long> ids)
{
return toAjax(taskCheckImageService.removeByIds(ids));
}
}

View File

@@ -0,0 +1,108 @@
package com.ruoyi.web.controller.cxxm;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.PageDomain;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.cxxm.domain.TaskCheckVideo;
import com.ruoyi.cxxm.service.ITaskCheckVideoService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 任务巡查视频Controller
*
* @author ruoyi
* @date 2024-03-28
*/
@RestController
@RequestMapping("/cxxm/video")
public class TaskCheckVideoController extends BaseController
{
@Autowired
private ITaskCheckVideoService taskCheckVideoService;
/**
* 查询任务巡查视频列表
*/
@PreAuthorize("@ss.hasPermi('cxxm:video:list')")
@GetMapping("/list")
public TableDataInfo list(TaskCheckVideo taskCheckVideo, PageDomain pageDomain)
{
startPage();
List<TaskCheckVideo> list = taskCheckVideoService.list(new QueryWrapper<>(taskCheckVideo));
return getDataTable(list);
}
/**
* 导出任务巡查视频列表
*/
@PreAuthorize("@ss.hasPermi('cxxm:video:export')")
@Log(title = "任务巡查视频", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, TaskCheckVideo taskCheckVideo)
{
List<TaskCheckVideo> list = taskCheckVideoService.list(new QueryWrapper<>(taskCheckVideo));
ExcelUtil<TaskCheckVideo> util = new ExcelUtil<TaskCheckVideo>(TaskCheckVideo.class);
util.exportExcel(response, list, "任务巡查视频数据");
}
/**
* 获取任务巡查视频详细信息
*/
@PreAuthorize("@ss.hasPermi('cxxm:video:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(taskCheckVideoService.getById(id));
}
/**
* 新增任务巡查视频
*/
@PreAuthorize("@ss.hasPermi('cxxm:video:add')")
@Log(title = "任务巡查视频", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TaskCheckVideo taskCheckVideo)
{
return toAjax(taskCheckVideoService.save(taskCheckVideo));
}
/**
* 修改任务巡查视频
*/
@PreAuthorize("@ss.hasPermi('cxxm:video:edit')")
@Log(title = "任务巡查视频", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TaskCheckVideo taskCheckVideo)
{
return toAjax(taskCheckVideoService.updateById(taskCheckVideo));
}
/**
* 删除任务巡查视频
*/
@PreAuthorize("@ss.hasPermi('cxxm:video:remove')")
@Log(title = "任务巡查视频", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable List<Long> ids)
{
return toAjax(taskCheckVideoService.removeByIds(ids));
}
}

View File

@@ -0,0 +1,108 @@
package com.ruoyi.web.controller.cxxm;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.PageDomain;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.cxxm.domain.Task;
import com.ruoyi.cxxm.service.ITaskService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 任务Controller
*
* @author ruoyi
* @date 2024-03-28
*/
@RestController
@RequestMapping("/cxxm/task")
public class TaskController extends BaseController
{
@Autowired
private ITaskService taskService;
/**
* 查询任务列表
*/
@PreAuthorize("@ss.hasPermi('cxxm:task:list')")
@GetMapping("/list")
public TableDataInfo list(Task task, PageDomain pageDomain)
{
startPage();
List<Task> list = taskService.list(new QueryWrapper<>(task));
return getDataTable(list);
}
/**
* 导出任务列表
*/
@PreAuthorize("@ss.hasPermi('cxxm:task:export')")
@Log(title = "任务", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, Task task)
{
List<Task> list = taskService.list(new QueryWrapper<>(task));
ExcelUtil<Task> util = new ExcelUtil<Task>(Task.class);
util.exportExcel(response, list, "任务数据");
}
/**
* 获取任务详细信息
*/
@PreAuthorize("@ss.hasPermi('cxxm:task:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(taskService.getById(id));
}
/**
* 新增任务
*/
@PreAuthorize("@ss.hasPermi('cxxm:task:add')")
@Log(title = "任务", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody Task task)
{
return toAjax(taskService.save(task));
}
/**
* 修改任务
*/
@PreAuthorize("@ss.hasPermi('cxxm:task:edit')")
@Log(title = "任务", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody Task task)
{
return toAjax(taskService.updateById(task));
}
/**
* 删除任务
*/
@PreAuthorize("@ss.hasPermi('cxxm:task:remove')")
@Log(title = "任务", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable List<Long> ids)
{
return toAjax(taskService.removeByIds(ids));
}
}

View File

@@ -0,0 +1,108 @@
package com.ruoyi.web.controller.cxxm;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.PageDomain;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.cxxm.domain.Tbxx;
import com.ruoyi.cxxm.service.ITbxxService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 图斑信息Controller
*
* @author ruoyi
* @date 2024-03-28
*/
@RestController
@RequestMapping("/cxxm/tbxx")
public class TbxxController extends BaseController
{
@Autowired
private ITbxxService tbxxService;
/**
* 查询图斑信息列表
*/
@PreAuthorize("@ss.hasPermi('cxxm:tbxx:list')")
@GetMapping("/list")
public TableDataInfo list(Tbxx tbxx, PageDomain pageDomain)
{
startPage();
List<Tbxx> list = tbxxService.list(new QueryWrapper<>(tbxx));
return getDataTable(list);
}
/**
* 导出图斑信息列表
*/
@PreAuthorize("@ss.hasPermi('cxxm:tbxx:export')")
@Log(title = "图斑信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, Tbxx tbxx)
{
List<Tbxx> list = tbxxService.list(new QueryWrapper<>(tbxx));
ExcelUtil<Tbxx> util = new ExcelUtil<Tbxx>(Tbxx.class);
util.exportExcel(response, list, "图斑信息数据");
}
/**
* 获取图斑信息详细信息
*/
@PreAuthorize("@ss.hasPermi('cxxm:tbxx:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(tbxxService.getById(id));
}
/**
* 新增图斑信息
*/
@PreAuthorize("@ss.hasPermi('cxxm:tbxx:add')")
@Log(title = "图斑信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody Tbxx tbxx)
{
return toAjax(tbxxService.save(tbxx));
}
/**
* 修改图斑信息
*/
@PreAuthorize("@ss.hasPermi('cxxm:tbxx:edit')")
@Log(title = "图斑信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody Tbxx tbxx)
{
return toAjax(tbxxService.updateById(tbxx));
}
/**
* 删除图斑信息
*/
@PreAuthorize("@ss.hasPermi('cxxm:tbxx:remove')")
@Log(title = "图斑信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable List<Long> ids)
{
return toAjax(tbxxService.removeByIds(ids));
}
}