Ver código fonte

运行数据模块接口权限

chenshudong 1 mês atrás
pai
commit
de69881713

+ 8 - 0
airport-admin/src/main/java/com/sundot/airport/web/controller/item/HkOperationDataController.java

@@ -11,6 +11,7 @@ import com.sundot.airport.item.domain.HkOperationData;
11 11
 import com.sundot.airport.item.service.IHkOperationDataService;
12 12
 import org.apache.poi.ss.usermodel.*;
13 13
 import org.springframework.beans.factory.annotation.Autowired;
14
+import org.springframework.security.access.prepost.PreAuthorize;
14 15
 import org.springframework.web.bind.annotation.*;
15 16
 import org.springframework.web.multipart.MultipartFile;
16 17
 
@@ -29,6 +30,7 @@ public class HkOperationDataController extends BaseController {
29 30
     @Autowired
30 31
     private IHkOperationDataService service;
31 32
 
33
+    @PreAuthorize("@ss.hasPermi('system:dailyRunData:list')")
32 34
     @GetMapping("/list")
33 35
     public TableDataInfo list(HkOperationData query) {
34 36
         startPage();
@@ -36,11 +38,13 @@ public class HkOperationDataController extends BaseController {
36 38
         return getDataTable(list);
37 39
     }
38 40
 
41
+    @PreAuthorize("@ss.hasPermi('system:dailyRunData:query')")
39 42
     @GetMapping("/{id}")
40 43
     public AjaxResult getInfo(@PathVariable Long id) {
41 44
         return success(service.selectHkOperationDataById(id));
42 45
     }
43 46
 
47
+    @PreAuthorize("@ss.hasPermi('system:dailyRunData:export')")
44 48
     @Log(title = "每日运行数据", businessType = BusinessType.EXPORT)
45 49
     @PostMapping("/export")
46 50
     public void export(HttpServletResponse response, HkOperationData query) {
@@ -49,18 +53,21 @@ public class HkOperationDataController extends BaseController {
49 53
         util.exportExcel(response, list, "每日运行数据");
50 54
     }
51 55
 
56
+    @PreAuthorize("@ss.hasPermi('system:dailyRunData:add')")
52 57
     @Log(title = "每日运行数据", businessType = BusinessType.INSERT)
53 58
     @PostMapping
54 59
     public AjaxResult add(@RequestBody HkOperationData data) {
55 60
         return toAjax(service.insertHkOperationData(data));
56 61
     }
57 62
 
63
+    @PreAuthorize("@ss.hasPermi('system:dailyRunData:edit')")
58 64
     @Log(title = "每日运行数据", businessType = BusinessType.UPDATE)
59 65
     @PutMapping
60 66
     public AjaxResult edit(@RequestBody HkOperationData data) {
61 67
         return toAjax(service.updateHkOperationData(data));
62 68
     }
63 69
 
70
+    @PreAuthorize("@ss.hasPermi('system:dailyRunData:remove')")
64 71
     @Log(title = "每日运行数据", businessType = BusinessType.DELETE)
65 72
     @DeleteMapping("/{ids}")
66 73
     public AjaxResult remove(@PathVariable Long[] ids) {
@@ -83,6 +90,7 @@ public class HkOperationDataController extends BaseController {
83 90
      * col18=南侧车检  col19=防爆(国内货站)  col20=国际货站  col21=道口(国际货站)
84 91
      * col22=北侧车检  col23=防爆(国际货站)
85 92
      */
93
+    @PreAuthorize("@ss.hasPermi('system:dailyRunData:import')")
86 94
     @Log(title = "每日运行数据", businessType = BusinessType.IMPORT)
87 95
     @PostMapping("/importData")
88 96
     public AjaxResult importData(MultipartFile file) throws Exception {

+ 8 - 0
airport-admin/src/main/java/com/sundot/airport/web/controller/item/HkPendingConfiscateController.java

@@ -11,6 +11,7 @@ import com.sundot.airport.item.domain.HkPendingConfiscate;
11 11
 import com.sundot.airport.item.service.IHkPendingConfiscateService;
12 12
 import org.apache.poi.ss.usermodel.*;
13 13
 import org.springframework.beans.factory.annotation.Autowired;
14
+import org.springframework.security.access.prepost.PreAuthorize;
14 15
 import org.springframework.web.bind.annotation.*;
15 16
 import org.springframework.web.multipart.MultipartFile;
16 17
 
@@ -30,6 +31,7 @@ public class HkPendingConfiscateController extends BaseController {
30 31
     @Autowired
31 32
     private IHkPendingConfiscateService service;
32 33
 
34
+    @PreAuthorize("@ss.hasPermi('system:collectWaitingAreaData:list')")
33 35
     @GetMapping("/list")
34 36
     public TableDataInfo list(HkPendingConfiscate query) {
35 37
         startPage();
@@ -37,11 +39,13 @@ public class HkPendingConfiscateController extends BaseController {
37 39
         return getDataTable(list);
38 40
     }
39 41
 
42
+    @PreAuthorize("@ss.hasPermi('system:collectWaitingAreaData:query')")
40 43
     @GetMapping("/{id}")
41 44
     public AjaxResult getInfo(@PathVariable Long id) {
42 45
         return success(service.selectHkPendingConfiscateById(id));
43 46
     }
44 47
 
48
+    @PreAuthorize("@ss.hasPermi('system:collectWaitingAreaData:export')")
45 49
     @Log(title = "待检区收缴数据", businessType = BusinessType.EXPORT)
46 50
     @PostMapping("/export")
47 51
     public void export(HttpServletResponse response, HkPendingConfiscate query) {
@@ -50,18 +54,21 @@ public class HkPendingConfiscateController extends BaseController {
50 54
         util.exportExcel(response, list, "待检区收缴数据");
51 55
     }
52 56
 
57
+    @PreAuthorize("@ss.hasPermi('system:collectWaitingAreaData:add')")
53 58
     @Log(title = "待检区收缴数据", businessType = BusinessType.INSERT)
54 59
     @PostMapping
55 60
     public AjaxResult add(@RequestBody HkPendingConfiscate data) {
56 61
         return toAjax(service.insertHkPendingConfiscate(data));
57 62
     }
58 63
 
64
+    @PreAuthorize("@ss.hasPermi('system:collectWaitingAreaData:edit')")
59 65
     @Log(title = "待检区收缴数据", businessType = BusinessType.UPDATE)
60 66
     @PutMapping
61 67
     public AjaxResult edit(@RequestBody HkPendingConfiscate data) {
62 68
         return toAjax(service.updateHkPendingConfiscate(data));
63 69
     }
64 70
 
71
+    @PreAuthorize("@ss.hasPermi('system:collectWaitingAreaData:remove')")
65 72
     @Log(title = "待检区收缴数据", businessType = BusinessType.DELETE)
66 73
     @DeleteMapping("/{ids}")
67 74
     public AjaxResult remove(@PathVariable Long[] ids) {
@@ -82,6 +89,7 @@ public class HkPendingConfiscateController extends BaseController {
82 89
      * col8-10=T2国内(火种/液态物品/其他)  col11-13=T2国际(火种/液态物品/其他)
83 90
      * col14-16=T2中转(火种/液态物品/其他)
84 91
      */
92
+    @PreAuthorize("@ss.hasPermi('system:collectWaitingAreaData:import')")
85 93
     @Log(title = "待检区收缴数据", businessType = BusinessType.IMPORT)
86 94
     @PostMapping("/importData")
87 95
     public AjaxResult importData(MultipartFile file) throws Exception {

+ 8 - 0
airport-admin/src/main/java/com/sundot/airport/web/controller/item/HkPersuadePowerBankController.java

@@ -11,6 +11,7 @@ import com.sundot.airport.item.domain.HkPersuadePowerBank;
11 11
 import com.sundot.airport.item.service.IHkPersuadePowerBankService;
12 12
 import org.apache.poi.ss.usermodel.*;
13 13
 import org.springframework.beans.factory.annotation.Autowired;
14
+import org.springframework.security.access.prepost.PreAuthorize;
14 15
 import org.springframework.web.bind.annotation.*;
15 16
 import org.springframework.web.multipart.MultipartFile;
16 17
 
@@ -30,6 +31,7 @@ public class HkPersuadePowerBankController extends BaseController {
30 31
     @Autowired
31 32
     private IHkPersuadePowerBankService service;
32 33
 
34
+    @PreAuthorize("@ss.hasPermi('system:discouragePowerBanksData:list')")
33 35
     @GetMapping("/list")
34 36
     public TableDataInfo list(HkPersuadePowerBank query) {
35 37
         startPage();
@@ -37,11 +39,13 @@ public class HkPersuadePowerBankController extends BaseController {
37 39
         return getDataTable(list);
38 40
     }
39 41
 
42
+    @PreAuthorize("@ss.hasPermi('system:discouragePowerBanksData:query')")
40 43
     @GetMapping("/{id}")
41 44
     public AjaxResult getInfo(@PathVariable Long id) {
42 45
         return success(service.selectHkPersuadePowerBankById(id));
43 46
     }
44 47
 
48
+    @PreAuthorize("@ss.hasPermi('system:discouragePowerBanksData:export')")
45 49
     @Log(title = "劝阻充电宝数据", businessType = BusinessType.EXPORT)
46 50
     @PostMapping("/export")
47 51
     public void export(HttpServletResponse response, HkPersuadePowerBank query) {
@@ -50,18 +54,21 @@ public class HkPersuadePowerBankController extends BaseController {
50 54
         util.exportExcel(response, list, "劝阻充电宝数据");
51 55
     }
52 56
 
57
+    @PreAuthorize("@ss.hasPermi('system:discouragePowerBanksData:add')")
53 58
     @Log(title = "劝阻充电宝数据", businessType = BusinessType.INSERT)
54 59
     @PostMapping
55 60
     public AjaxResult add(@RequestBody HkPersuadePowerBank data) {
56 61
         return toAjax(service.insertHkPersuadePowerBank(data));
57 62
     }
58 63
 
64
+    @PreAuthorize("@ss.hasPermi('system:discouragePowerBanksData:edit')")
59 65
     @Log(title = "劝阻充电宝数据", businessType = BusinessType.UPDATE)
60 66
     @PutMapping
61 67
     public AjaxResult edit(@RequestBody HkPersuadePowerBank data) {
62 68
         return toAjax(service.updateHkPersuadePowerBank(data));
63 69
     }
64 70
 
71
+    @PreAuthorize("@ss.hasPermi('system:discouragePowerBanksData:remove')")
65 72
     @Log(title = "劝阻充电宝数据", businessType = BusinessType.DELETE)
66 73
     @DeleteMapping("/{ids}")
67 74
     public AjaxResult remove(@PathVariable Long[] ids) {
@@ -81,6 +88,7 @@ public class HkPersuadePowerBankController extends BaseController {
81 88
      * col2-8=T1(召回充电宝/无3C标识/标识不清/超规数量/邮寄/自弃/暂存)
82 89
      * col9-15=T2(召回充电宝/无3C标识/标识不清/超规数量/邮寄/自弃/暂存)
83 90
      */
91
+    @PreAuthorize("@ss.hasPermi('system:discouragePowerBanksData:import')")
84 92
     @Log(title = "劝阻充电宝数据", businessType = BusinessType.IMPORT)
85 93
     @PostMapping("/importData")
86 94
     public AjaxResult importData(MultipartFile file) throws Exception {

+ 8 - 0
airport-admin/src/main/java/com/sundot/airport/web/controller/item/HkSeizureStatController.java

@@ -11,6 +11,7 @@ import com.sundot.airport.item.domain.HkSeizureStat;
11 11
 import com.sundot.airport.item.service.IHkSeizureStatService;
12 12
 import org.apache.poi.ss.usermodel.*;
13 13
 import org.springframework.beans.factory.annotation.Autowired;
14
+import org.springframework.security.access.prepost.PreAuthorize;
14 15
 import org.springframework.web.bind.annotation.*;
15 16
 import org.springframework.web.multipart.MultipartFile;
16 17
 
@@ -29,6 +30,7 @@ public class HkSeizureStatController extends BaseController {
29 30
     @Autowired
30 31
     private IHkSeizureStatService service;
31 32
 
33
+    @PreAuthorize("@ss.hasPermi('system:seizeData:list')")
32 34
     @GetMapping("/list")
33 35
     public TableDataInfo list(HkSeizureStat query) {
34 36
         startPage();
@@ -36,11 +38,13 @@ public class HkSeizureStatController extends BaseController {
36 38
         return getDataTable(list);
37 39
     }
38 40
 
41
+    @PreAuthorize("@ss.hasPermi('system:seizeData:query')")
39 42
     @GetMapping("/{id}")
40 43
     public AjaxResult getInfo(@PathVariable Long id) {
41 44
         return success(service.selectHkSeizureStatById(id));
42 45
     }
43 46
 
47
+    @PreAuthorize("@ss.hasPermi('system:seizeData:export')")
44 48
     @Log(title = "查获数据", businessType = BusinessType.EXPORT)
45 49
     @PostMapping("/export")
46 50
     public void export(HttpServletResponse response, HkSeizureStat query) {
@@ -49,18 +53,21 @@ public class HkSeizureStatController extends BaseController {
49 53
         util.exportExcel(response, list, "查获数据");
50 54
     }
51 55
 
56
+    @PreAuthorize("@ss.hasPermi('system:seizeData:add')")
52 57
     @Log(title = "查获数据", businessType = BusinessType.INSERT)
53 58
     @PostMapping
54 59
     public AjaxResult add(@RequestBody HkSeizureStat data) {
55 60
         return toAjax(service.insertHkSeizureStat(data));
56 61
     }
57 62
 
63
+    @PreAuthorize("@ss.hasPermi('system:seizeData:edit')")
58 64
     @Log(title = "查获数据", businessType = BusinessType.UPDATE)
59 65
     @PutMapping
60 66
     public AjaxResult edit(@RequestBody HkSeizureStat data) {
61 67
         return toAjax(service.updateHkSeizureStat(data));
62 68
     }
63 69
 
70
+    @PreAuthorize("@ss.hasPermi('system:seizeData:remove')")
64 71
     @Log(title = "查获数据", businessType = BusinessType.DELETE)
65 72
     @DeleteMapping("/{ids}")
66 73
     public AjaxResult remove(@PathVariable Long[] ids) {
@@ -80,6 +87,7 @@ public class HkSeizureStatController extends BaseController {
80 87
      * col3-14=T1各类别  col15=T1总数(公式,跳过)
81 88
      * col16-27=T2各类别  col28=T2总数(公式,跳过)  col29=合计(公式,跳过)
82 89
      */
90
+    @PreAuthorize("@ss.hasPermi('system:seizeData:import')")
83 91
     @Log(title = "查获数据", businessType = BusinessType.IMPORT)
84 92
     @PostMapping("/importData")
85 93
     public AjaxResult importData(MultipartFile file) throws Exception {