hdy
4 天以前 51eb318f6df9ebc7d1ff47522e33b2ee7cea1ba8
提交 | 用户 | 时间
76a2cd 1 package com.billion.main.da.controller;
H 2
3 import com.billion.common.annotation.Log;
4 import com.billion.common.core.controller.BaseController;
5 import com.billion.common.core.domain.AjaxResult;
6 import com.billion.common.core.page.TableDataInfo;
7 import com.billion.common.enums.BusinessType;
8 import com.billion.common.utils.poi.ExcelUtil;
9 import com.billion.main.da.domain.DaStationCollection;
10 import com.billion.main.da.service.IDaStationCollectionService;
11 import org.springframework.beans.factory.annotation.Autowired;
12 import org.springframework.security.access.prepost.PreAuthorize;
13 import org.springframework.web.bind.annotation.*;
14
15 import javax.servlet.http.HttpServletResponse;
16 import java.util.List;
17
18 /**
19  * 过站采集Controller
20  * 
21  * @author HDY
22  * @date 2025-02-12
23  */
24 @RestController
25 @RequestMapping("/da/stationCollection")
26 public class DaStationCollectionController extends BaseController
27 {
28     @Autowired
29     private IDaStationCollectionService daStationCollectionService;
30
31     /**
32      * 查询过站采集列表
33      */
34     @PreAuthorize("@ss.hasPermi('da:stationCollection:list')")
35     @GetMapping("/list")
36     public TableDataInfo list(DaStationCollection daStationCollection)
37     {
38         startPage();
39         List<DaStationCollection> list = daStationCollectionService.selectDaStationCollectionList(daStationCollection);
40         return getDataTable(list);
41     }
42
43     /**
44      * 导出过站采集列表
45      */
46     @PreAuthorize("@ss.hasPermi('da:stationCollection:export')")
47     @Log(title = "过站采集", businessType = BusinessType.EXPORT)
48     @PostMapping("/export")
49     public void export(HttpServletResponse response, DaStationCollection daStationCollection)
50     {
51         List<DaStationCollection> list = daStationCollectionService.selectDaStationCollectionList(daStationCollection);
52         ExcelUtil<DaStationCollection> util = new ExcelUtil<DaStationCollection>(DaStationCollection.class);
53         util.exportExcel(response, list, "过站采集数据");
54     }
55
56     /**
57      * 获取过站采集详细信息
58      */
59     @PreAuthorize("@ss.hasPermi('da:stationCollection:query')")
60     @GetMapping(value = "/{id}")
61     public AjaxResult getInfo(@PathVariable("id") Long id)
62     {
63         return success(daStationCollectionService.selectDaStationCollectionById(id));
64     }
65
66     /**
67      * 新增过站采集
68      */
69     @PreAuthorize("@ss.hasPermi('da:stationCollection:add')")
70     @Log(title = "过站采集", businessType = BusinessType.INSERT)
71     @PostMapping
72     public AjaxResult add(@RequestBody DaStationCollection daStationCollection)
73     {
74         return toAjax(daStationCollectionService.insertDaStationCollection(daStationCollection));
75     }
76
77     /**
78      * 修改过站采集
79      */
80     @PreAuthorize("@ss.hasPermi('da:stationCollection:edit')")
81     @Log(title = "过站采集", businessType = BusinessType.UPDATE)
82     @PutMapping
83     public AjaxResult edit(@RequestBody DaStationCollection daStationCollection)
84     {
85         return toAjax(daStationCollectionService.updateDaStationCollection(daStationCollection));
86     }
87
88     /**
89      * 删除过站采集
90      */
91     @PreAuthorize("@ss.hasPermi('da:stationCollection:remove')")
92     @Log(title = "过站采集", businessType = BusinessType.DELETE)
93     @DeleteMapping("/{ids}")
94     public AjaxResult remove(@PathVariable Long[] ids)
95     {
96         return toAjax(daStationCollectionService.deleteDaStationCollectionByIds(ids));
97     }
98 }