liusuyi
2026-05-18 b5cd784d0cde5b7c82ea78aef4ac0e5a161d8c5d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
package com.ard.work.grid.controller;
 
import jakarta.servlet.http.HttpServletResponse;
 
import com.ard.common.core.utils.poi.ExcelUtil;
import com.ard.common.core.web.controller.BaseController;
import com.ard.common.core.web.domain.AjaxResult;
import com.ard.common.core.web.page.TableDataInfo;
import com.ard.common.log.enums.BusinessType;
import com.ard.common.security.annotation.RequiresPermissions;
import com.ard.work.grid.domain.ArdGridAreaEntity;
import com.ard.work.grid.service.IArdGridAreaEntityService;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
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.ard.common.log.annotation.Log;
 
import java.util.List;
 
/**
 * 网格信息Controller
 * 
 * @author XiaJiJian
 * @date 2024-09-27
 */
@Tag(name = "网格信息管理")
@RestController
@RequestMapping("/grid/area")
public class ArdGridAreaEntityController extends BaseController
{
    @Autowired
    private IArdGridAreaEntityService ardGridAreaEntityService;
 
    /**
     * 查询网格信息列表
     */
    @Operation(summary = "查询网格信息列表")
    @RequiresPermissions("grid:area:list")
    @GetMapping("/list")
    public TableDataInfo list(ArdGridAreaEntity ardGridAreaEntity)
    {
        startPage();
        List<ArdGridAreaEntity> list = ardGridAreaEntityService.selectArdGridAreaEntityList(ardGridAreaEntity);
        return getDataTable(list);
    }
 
    /**
     * 导出网格信息列表
     */
    @Operation(summary = "导出网格信息列表")
    @RequiresPermissions("grid:area:export")
    @Log(title = "网格信息", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response, ArdGridAreaEntity ardGridAreaEntity)
    {
        List<ArdGridAreaEntity> list = ardGridAreaEntityService.selectArdGridAreaEntityList(ardGridAreaEntity);
        ExcelUtil<ArdGridAreaEntity> util = new ExcelUtil<ArdGridAreaEntity>(ArdGridAreaEntity.class);
        util.exportExcel(response, list, "网格信息数据");
    }
 
    /**
     * 获取网格信息详细信息
     */
    @Operation(summary = "获取网格信息详细信息")
    @RequiresPermissions("grid:area:query")
    @GetMapping(value = "/{areaId}")
    public AjaxResult getInfo(@PathVariable("areaId") String areaId)
    {
        return success(ardGridAreaEntityService.selectArdGridAreaEntityByAreaId(areaId));
    }
 
    /**
     * 新增网格信息
     */
    @Operation(summary = "新增网格信息")
    @RequiresPermissions("grid:area:add")
    @Log(title = "网格信息", businessType = BusinessType.INSERT)
    @PostMapping
    public AjaxResult add(@RequestBody ArdGridAreaEntity ardGridAreaEntity)
    {
        return toAjax(ardGridAreaEntityService.insertArdGridAreaEntity(ardGridAreaEntity));
    }
 
    /**
     * 修改网格信息
     */
    @Operation(summary = "修改网格信息")
    @RequiresPermissions("grid:area:edit")
    @Log(title = "网格信息", businessType = BusinessType.UPDATE)
    @PutMapping
    public AjaxResult edit(@RequestBody ArdGridAreaEntity ardGridAreaEntity)
    {
        return toAjax(ardGridAreaEntityService.updateArdGridAreaEntity(ardGridAreaEntity));
    }
 
    /**
     * 删除网格信息
     */
    @Operation(summary = "删除网格信息")
    @RequiresPermissions("grid:area:remove")
    @Log(title = "网格信息", businessType = BusinessType.DELETE)
    @DeleteMapping("/{areaIds}")
    public AjaxResult remove(@PathVariable String[] areaIds)
    {
        return toAjax(ardGridAreaEntityService.deleteArdGridAreaEntityByAreaIds(areaIds));
    }
}