Commit 00b04817154438bc3edfc0a39d14a82e28ce1476
1 parent
74a0ab2b
基础数据按钮权限
Showing
16 changed files
with
91 additions
and
1 deletions
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/bomHeader/controller/BomHeaderController.java
1 | package org.jeecg.modules.wms.config.bomHeader.controller; | 1 | package org.jeecg.modules.wms.config.bomHeader.controller; |
2 | 2 | ||
3 | +import org.apache.shiro.authz.annotation.RequiresPermissions; | ||
3 | import org.jeecg.common.system.query.QueryGenerator; | 4 | import org.jeecg.common.system.query.QueryGenerator; |
4 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | 5 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
5 | import com.baomidou.mybatisplus.core.metadata.IPage; | 6 | import com.baomidou.mybatisplus.core.metadata.IPage; |
@@ -88,6 +89,7 @@ public class BomHeaderController extends JeecgController<BomHeader, IBomHeaderSe | @@ -88,6 +89,7 @@ public class BomHeaderController extends JeecgController<BomHeader, IBomHeaderSe | ||
88 | */ | 89 | */ |
89 | @AutoLog(value = "bom主表-添加") | 90 | @AutoLog(value = "bom主表-添加") |
90 | @ApiOperation(value="bom主表-添加", notes="bom主表-添加") | 91 | @ApiOperation(value="bom主表-添加", notes="bom主表-添加") |
92 | + @RequiresPermissions("bomHeader:add") | ||
91 | @PostMapping(value = "/add") | 93 | @PostMapping(value = "/add") |
92 | public Result<String> add(@RequestBody BomHeader bomHeader, HttpServletRequest req) { | 94 | public Result<String> add(@RequestBody BomHeader bomHeader, HttpServletRequest req) { |
93 | String warehouseCode = JwtUtil.getWarehouseCodeByToken(req); | 95 | String warehouseCode = JwtUtil.getWarehouseCodeByToken(req); |
@@ -105,6 +107,7 @@ public class BomHeaderController extends JeecgController<BomHeader, IBomHeaderSe | @@ -105,6 +107,7 @@ public class BomHeaderController extends JeecgController<BomHeader, IBomHeaderSe | ||
105 | */ | 107 | */ |
106 | @AutoLog(value = "bom主表-编辑") | 108 | @AutoLog(value = "bom主表-编辑") |
107 | @ApiOperation(value="bom主表-编辑", notes="bom主表-编辑") | 109 | @ApiOperation(value="bom主表-编辑", notes="bom主表-编辑") |
110 | + @RequiresPermissions("bomHeader:edit") | ||
108 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) | 111 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
109 | public Result<String> edit(@RequestBody BomHeader bomHeader) { | 112 | public Result<String> edit(@RequestBody BomHeader bomHeader) { |
110 | bomHeaderService.updateById(bomHeader); | 113 | bomHeaderService.updateById(bomHeader); |
@@ -118,6 +121,7 @@ public class BomHeaderController extends JeecgController<BomHeader, IBomHeaderSe | @@ -118,6 +121,7 @@ public class BomHeaderController extends JeecgController<BomHeader, IBomHeaderSe | ||
118 | */ | 121 | */ |
119 | @AutoLog(value = "bom主表-通过id删除") | 122 | @AutoLog(value = "bom主表-通过id删除") |
120 | @ApiOperation(value="bom主表-通过id删除", notes="bom主表-通过id删除") | 123 | @ApiOperation(value="bom主表-通过id删除", notes="bom主表-通过id删除") |
124 | + @RequiresPermissions("bomHeader:delete") | ||
121 | @DeleteMapping(value = "/delete") | 125 | @DeleteMapping(value = "/delete") |
122 | public Result<String> delete(@RequestParam(name="id",required=true) String id) { | 126 | public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
123 | bomHeaderService.delMain(id); | 127 | bomHeaderService.delMain(id); |
@@ -131,6 +135,7 @@ public class BomHeaderController extends JeecgController<BomHeader, IBomHeaderSe | @@ -131,6 +135,7 @@ public class BomHeaderController extends JeecgController<BomHeader, IBomHeaderSe | ||
131 | */ | 135 | */ |
132 | @AutoLog(value = "bom主表-批量删除") | 136 | @AutoLog(value = "bom主表-批量删除") |
133 | @ApiOperation(value="bom主表-批量删除", notes="bom主表-批量删除") | 137 | @ApiOperation(value="bom主表-批量删除", notes="bom主表-批量删除") |
138 | + @RequiresPermissions("bomHeader:deleteBatch") | ||
134 | @DeleteMapping(value = "/deleteBatch") | 139 | @DeleteMapping(value = "/deleteBatch") |
135 | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { | 140 | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
136 | this.bomHeaderService.delBatchMain(Arrays.asList(ids.split(","))); | 141 | this.bomHeaderService.delBatchMain(Arrays.asList(ids.split(","))); |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/carrier/controller/CarrierController.java
@@ -12,6 +12,7 @@ import javax.servlet.http.HttpServletResponse; | @@ -12,6 +12,7 @@ import javax.servlet.http.HttpServletResponse; | ||
12 | 12 | ||
13 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 13 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
14 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | 14 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
15 | +import org.apache.shiro.authz.annotation.RequiresPermissions; | ||
15 | import org.jeecg.common.api.vo.Result; | 16 | import org.jeecg.common.api.vo.Result; |
16 | import org.jeecg.common.system.query.QueryGenerator; | 17 | import org.jeecg.common.system.query.QueryGenerator; |
17 | import org.jeecg.common.system.util.JwtUtil; | 18 | import org.jeecg.common.system.util.JwtUtil; |
@@ -88,6 +89,7 @@ public class CarrierController extends JeecgController<Carrier, ICarrierService> | @@ -88,6 +89,7 @@ public class CarrierController extends JeecgController<Carrier, ICarrierService> | ||
88 | */ | 89 | */ |
89 | @AutoLog(value = "承运商管理-添加") | 90 | @AutoLog(value = "承运商管理-添加") |
90 | @ApiOperation(value="承运商管理-添加", notes="承运商管理-添加") | 91 | @ApiOperation(value="承运商管理-添加", notes="承运商管理-添加") |
92 | + @RequiresPermissions("carrier:add") | ||
91 | @PostMapping(value = "/add") | 93 | @PostMapping(value = "/add") |
92 | public Result<String> add(@RequestBody Carrier carrier, HttpServletRequest req) { | 94 | public Result<String> add(@RequestBody Carrier carrier, HttpServletRequest req) { |
93 | String warehouseCode = JwtUtil.getWarehouseCodeByToken(req); | 95 | String warehouseCode = JwtUtil.getWarehouseCodeByToken(req); |
@@ -106,6 +108,7 @@ public class CarrierController extends JeecgController<Carrier, ICarrierService> | @@ -106,6 +108,7 @@ public class CarrierController extends JeecgController<Carrier, ICarrierService> | ||
106 | */ | 108 | */ |
107 | @AutoLog(value = "承运商管理-编辑") | 109 | @AutoLog(value = "承运商管理-编辑") |
108 | @ApiOperation(value="承运商管理-编辑", notes="承运商管理-编辑") | 110 | @ApiOperation(value="承运商管理-编辑", notes="承运商管理-编辑") |
111 | + @RequiresPermissions("carrier:edit") | ||
109 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) | 112 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
110 | public Result<String> edit(@RequestBody Carrier carrier) { | 113 | public Result<String> edit(@RequestBody Carrier carrier) { |
111 | carrierService.updateById(carrier); | 114 | carrierService.updateById(carrier); |
@@ -120,6 +123,7 @@ public class CarrierController extends JeecgController<Carrier, ICarrierService> | @@ -120,6 +123,7 @@ public class CarrierController extends JeecgController<Carrier, ICarrierService> | ||
120 | */ | 123 | */ |
121 | @AutoLog(value = "承运商管理-通过id删除") | 124 | @AutoLog(value = "承运商管理-通过id删除") |
122 | @ApiOperation(value="承运商管理-通过id删除", notes="承运商管理-通过id删除") | 125 | @ApiOperation(value="承运商管理-通过id删除", notes="承运商管理-通过id删除") |
126 | + @RequiresPermissions("carrier:delete") | ||
123 | @DeleteMapping(value = "/delete") | 127 | @DeleteMapping(value = "/delete") |
124 | public Result<String> delete(@RequestParam(name="id",required=true) String id) { | 128 | public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
125 | carrierService.removeById(id); | 129 | carrierService.removeById(id); |
@@ -134,6 +138,7 @@ public class CarrierController extends JeecgController<Carrier, ICarrierService> | @@ -134,6 +138,7 @@ public class CarrierController extends JeecgController<Carrier, ICarrierService> | ||
134 | */ | 138 | */ |
135 | @AutoLog(value = "承运商管理-批量删除") | 139 | @AutoLog(value = "承运商管理-批量删除") |
136 | @ApiOperation(value="承运商管理-批量删除", notes="承运商管理-批量删除") | 140 | @ApiOperation(value="承运商管理-批量删除", notes="承运商管理-批量删除") |
141 | + @RequiresPermissions("carrier:deleteBatch") | ||
137 | @DeleteMapping(value = "/deleteBatch") | 142 | @DeleteMapping(value = "/deleteBatch") |
138 | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { | 143 | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
139 | this.carrierService.removeByIds(Arrays.asList(ids.split(","))); | 144 | this.carrierService.removeByIds(Arrays.asList(ids.split(","))); |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/company/controller/CompanyController.java
@@ -12,6 +12,7 @@ import javax.servlet.http.HttpServletResponse; | @@ -12,6 +12,7 @@ import javax.servlet.http.HttpServletResponse; | ||
12 | 12 | ||
13 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 13 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
14 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | 14 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
15 | +import org.apache.shiro.authz.annotation.RequiresPermissions; | ||
15 | import org.jeecg.common.api.vo.Result; | 16 | import org.jeecg.common.api.vo.Result; |
16 | import org.jeecg.common.system.query.QueryGenerator; | 17 | import org.jeecg.common.system.query.QueryGenerator; |
17 | import org.jeecg.common.system.util.JwtUtil; | 18 | import org.jeecg.common.system.util.JwtUtil; |
@@ -89,6 +90,7 @@ public class CompanyController extends JeecgController<Company, ICompanyService> | @@ -89,6 +90,7 @@ public class CompanyController extends JeecgController<Company, ICompanyService> | ||
89 | @AutoLog(value = "货主-添加") | 90 | @AutoLog(value = "货主-添加") |
90 | @ApiOperation(value="货主-添加", notes="货主-添加") | 91 | @ApiOperation(value="货主-添加", notes="货主-添加") |
91 | @PostMapping(value = "/add") | 92 | @PostMapping(value = "/add") |
93 | + @RequiresPermissions("company:add") | ||
92 | public Result<String> add(@RequestBody Company company, HttpServletRequest req) { | 94 | public Result<String> add(@RequestBody Company company, HttpServletRequest req) { |
93 | String warehouseCode = JwtUtil.getWarehouseCodeByToken(req); | 95 | String warehouseCode = JwtUtil.getWarehouseCodeByToken(req); |
94 | if(StringUtils.isNotEmpty(warehouseCode)) { | 96 | if(StringUtils.isNotEmpty(warehouseCode)) { |
@@ -106,6 +108,7 @@ public class CompanyController extends JeecgController<Company, ICompanyService> | @@ -106,6 +108,7 @@ public class CompanyController extends JeecgController<Company, ICompanyService> | ||
106 | */ | 108 | */ |
107 | @AutoLog(value = "货主-编辑") | 109 | @AutoLog(value = "货主-编辑") |
108 | @ApiOperation(value="货主-编辑", notes="货主-编辑") | 110 | @ApiOperation(value="货主-编辑", notes="货主-编辑") |
111 | + @RequiresPermissions("company:edit") | ||
109 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) | 112 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
110 | public Result<String> edit(@RequestBody Company company) { | 113 | public Result<String> edit(@RequestBody Company company) { |
111 | companyService.updateById(company); | 114 | companyService.updateById(company); |
@@ -120,6 +123,7 @@ public class CompanyController extends JeecgController<Company, ICompanyService> | @@ -120,6 +123,7 @@ public class CompanyController extends JeecgController<Company, ICompanyService> | ||
120 | */ | 123 | */ |
121 | @AutoLog(value = "货主-通过id删除") | 124 | @AutoLog(value = "货主-通过id删除") |
122 | @ApiOperation(value="货主-通过id删除", notes="货主-通过id删除") | 125 | @ApiOperation(value="货主-通过id删除", notes="货主-通过id删除") |
126 | + @RequiresPermissions("company:delete") | ||
123 | @DeleteMapping(value = "/delete") | 127 | @DeleteMapping(value = "/delete") |
124 | public Result<String> delete(@RequestParam(name="id",required=true) String id) { | 128 | public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
125 | companyService.removeById(id); | 129 | companyService.removeById(id); |
@@ -134,6 +138,7 @@ public class CompanyController extends JeecgController<Company, ICompanyService> | @@ -134,6 +138,7 @@ public class CompanyController extends JeecgController<Company, ICompanyService> | ||
134 | */ | 138 | */ |
135 | @AutoLog(value = "货主-批量删除") | 139 | @AutoLog(value = "货主-批量删除") |
136 | @ApiOperation(value="货主-批量删除", notes="货主-批量删除") | 140 | @ApiOperation(value="货主-批量删除", notes="货主-批量删除") |
141 | + @RequiresPermissions("company:deleteBatch") | ||
137 | @DeleteMapping(value = "/deleteBatch") | 142 | @DeleteMapping(value = "/deleteBatch") |
138 | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { | 143 | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
139 | this.companyService.removeByIds(Arrays.asList(ids.split(","))); | 144 | this.companyService.removeByIds(Arrays.asList(ids.split(","))); |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/container/controller/ContainerController.java
@@ -15,6 +15,7 @@ import javax.servlet.http.HttpServletResponse; | @@ -15,6 +15,7 @@ import javax.servlet.http.HttpServletResponse; | ||
15 | import com.aliyun.oss.ServiceException; | 15 | import com.aliyun.oss.ServiceException; |
16 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 16 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
17 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | 17 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
18 | +import org.apache.shiro.authz.annotation.RequiresPermissions; | ||
18 | import org.jeecg.common.api.vo.Result; | 19 | import org.jeecg.common.api.vo.Result; |
19 | import org.jeecg.common.system.query.QueryGenerator; | 20 | import org.jeecg.common.system.query.QueryGenerator; |
20 | import org.jeecg.common.system.util.JwtUtil; | 21 | import org.jeecg.common.system.util.JwtUtil; |
@@ -97,6 +98,7 @@ public class ContainerController extends JeecgController<Container, IContainerSe | @@ -97,6 +98,7 @@ public class ContainerController extends JeecgController<Container, IContainerSe | ||
97 | @AutoLog(value = "容器管理-添加") | 98 | @AutoLog(value = "容器管理-添加") |
98 | @ApiOperation(value="容器管理-添加", notes="容器管理-添加") | 99 | @ApiOperation(value="容器管理-添加", notes="容器管理-添加") |
99 | @PostMapping(value = "/add") | 100 | @PostMapping(value = "/add") |
101 | + @RequiresPermissions("container:add") | ||
100 | public Result<String> add(@RequestBody Container container, HttpServletRequest req) { | 102 | public Result<String> add(@RequestBody Container container, HttpServletRequest req) { |
101 | String warehouseCode = JwtUtil.getWarehouseCodeByToken(req); | 103 | String warehouseCode = JwtUtil.getWarehouseCodeByToken(req); |
102 | if(StringUtils.isNotEmpty(warehouseCode)) { | 104 | if(StringUtils.isNotEmpty(warehouseCode)) { |
@@ -115,6 +117,7 @@ public class ContainerController extends JeecgController<Container, IContainerSe | @@ -115,6 +117,7 @@ public class ContainerController extends JeecgController<Container, IContainerSe | ||
115 | */ | 117 | */ |
116 | @AutoLog(value = "容器管理-编辑") | 118 | @AutoLog(value = "容器管理-编辑") |
117 | @ApiOperation(value="容器管理-编辑", notes="容器管理-编辑") | 119 | @ApiOperation(value="容器管理-编辑", notes="容器管理-编辑") |
120 | + @RequiresPermissions("container:edit") | ||
118 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) | 121 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
119 | public Result<String> edit(@RequestBody Container container) { | 122 | public Result<String> edit(@RequestBody Container container) { |
120 | String locationCode = container.getLocationCode(); | 123 | String locationCode = container.getLocationCode(); |
@@ -140,6 +143,7 @@ public class ContainerController extends JeecgController<Container, IContainerSe | @@ -140,6 +143,7 @@ public class ContainerController extends JeecgController<Container, IContainerSe | ||
140 | @AutoLog(value = "容器管理-通过id删除") | 143 | @AutoLog(value = "容器管理-通过id删除") |
141 | @ApiOperation(value="容器管理-通过id删除", notes="容器管理-通过id删除") | 144 | @ApiOperation(value="容器管理-通过id删除", notes="容器管理-通过id删除") |
142 | @DeleteMapping(value = "/delete") | 145 | @DeleteMapping(value = "/delete") |
146 | + @RequiresPermissions("container:delete") | ||
143 | public Result<String> delete(@RequestParam(name="id",required=true) String id) { | 147 | public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
144 | containerService.removeById(id); | 148 | containerService.removeById(id); |
145 | return Result.OK("删除成功!"); | 149 | return Result.OK("删除成功!"); |
@@ -153,6 +157,7 @@ public class ContainerController extends JeecgController<Container, IContainerSe | @@ -153,6 +157,7 @@ public class ContainerController extends JeecgController<Container, IContainerSe | ||
153 | */ | 157 | */ |
154 | @AutoLog(value = "容器管理-批量删除") | 158 | @AutoLog(value = "容器管理-批量删除") |
155 | @ApiOperation(value="容器管理-批量删除", notes="容器管理-批量删除") | 159 | @ApiOperation(value="容器管理-批量删除", notes="容器管理-批量删除") |
160 | + @RequiresPermissions("container:deleteBatch") | ||
156 | @DeleteMapping(value = "/deleteBatch") | 161 | @DeleteMapping(value = "/deleteBatch") |
157 | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { | 162 | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
158 | this.containerService.removeByIds(Arrays.asList(ids.split(","))); | 163 | this.containerService.removeByIds(Arrays.asList(ids.split(","))); |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/containerCapacity/controller/ContainerCapacityController.java
@@ -9,6 +9,8 @@ import java.io.UnsupportedEncodingException; | @@ -9,6 +9,8 @@ import java.io.UnsupportedEncodingException; | ||
9 | import java.net.URLDecoder; | 9 | import java.net.URLDecoder; |
10 | import javax.servlet.http.HttpServletRequest; | 10 | import javax.servlet.http.HttpServletRequest; |
11 | import javax.servlet.http.HttpServletResponse; | 11 | import javax.servlet.http.HttpServletResponse; |
12 | + | ||
13 | +import org.apache.shiro.authz.annotation.RequiresPermissions; | ||
12 | import org.jeecg.common.api.vo.Result; | 14 | import org.jeecg.common.api.vo.Result; |
13 | import org.jeecg.common.system.query.QueryGenerator; | 15 | import org.jeecg.common.system.query.QueryGenerator; |
14 | import org.jeecg.common.system.util.JwtUtil; | 16 | import org.jeecg.common.system.util.JwtUtil; |
@@ -85,6 +87,7 @@ public class ContainerCapacityController extends JeecgController<ContainerCapaci | @@ -85,6 +87,7 @@ public class ContainerCapacityController extends JeecgController<ContainerCapaci | ||
85 | @AutoLog(value = "容器容量管理-添加") | 87 | @AutoLog(value = "容器容量管理-添加") |
86 | @ApiOperation(value="容器容量管理-添加", notes="容器容量管理-添加") | 88 | @ApiOperation(value="容器容量管理-添加", notes="容器容量管理-添加") |
87 | @PostMapping(value = "/add") | 89 | @PostMapping(value = "/add") |
90 | + @RequiresPermissions("containerCapacity:add") | ||
88 | public Result<String> add(@RequestBody ContainerCapacity containerCapacity, HttpServletRequest req) { | 91 | public Result<String> add(@RequestBody ContainerCapacity containerCapacity, HttpServletRequest req) { |
89 | String warehouseCode = JwtUtil.getWarehouseCodeByToken(req); | 92 | String warehouseCode = JwtUtil.getWarehouseCodeByToken(req); |
90 | if(StringUtils.isNotEmpty(warehouseCode)) { | 93 | if(StringUtils.isNotEmpty(warehouseCode)) { |
@@ -102,6 +105,7 @@ public class ContainerCapacityController extends JeecgController<ContainerCapaci | @@ -102,6 +105,7 @@ public class ContainerCapacityController extends JeecgController<ContainerCapaci | ||
102 | */ | 105 | */ |
103 | @AutoLog(value = "容器容量管理-编辑") | 106 | @AutoLog(value = "容器容量管理-编辑") |
104 | @ApiOperation(value="容器容量管理-编辑", notes="容器容量管理-编辑") | 107 | @ApiOperation(value="容器容量管理-编辑", notes="容器容量管理-编辑") |
108 | + @RequiresPermissions("containerCapacity:edit") | ||
105 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) | 109 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
106 | public Result<String> edit(@RequestBody ContainerCapacity containerCapacity) { | 110 | public Result<String> edit(@RequestBody ContainerCapacity containerCapacity) { |
107 | containerCapacityService.updateById(containerCapacity); | 111 | containerCapacityService.updateById(containerCapacity); |
@@ -116,6 +120,7 @@ public class ContainerCapacityController extends JeecgController<ContainerCapaci | @@ -116,6 +120,7 @@ public class ContainerCapacityController extends JeecgController<ContainerCapaci | ||
116 | */ | 120 | */ |
117 | @AutoLog(value = "容器容量管理-通过id删除") | 121 | @AutoLog(value = "容器容量管理-通过id删除") |
118 | @ApiOperation(value="容器容量管理-通过id删除", notes="容器容量管理-通过id删除") | 122 | @ApiOperation(value="容器容量管理-通过id删除", notes="容器容量管理-通过id删除") |
123 | + @RequiresPermissions("containerCapacity:delete") | ||
119 | @DeleteMapping(value = "/delete") | 124 | @DeleteMapping(value = "/delete") |
120 | public Result<String> delete(@RequestParam(name="id",required=true) String id) { | 125 | public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
121 | containerCapacityService.removeById(id); | 126 | containerCapacityService.removeById(id); |
@@ -131,6 +136,7 @@ public class ContainerCapacityController extends JeecgController<ContainerCapaci | @@ -131,6 +136,7 @@ public class ContainerCapacityController extends JeecgController<ContainerCapaci | ||
131 | @AutoLog(value = "容器容量管理-批量删除") | 136 | @AutoLog(value = "容器容量管理-批量删除") |
132 | @ApiOperation(value="容器容量管理-批量删除", notes="容器容量管理-批量删除") | 137 | @ApiOperation(value="容器容量管理-批量删除", notes="容器容量管理-批量删除") |
133 | @DeleteMapping(value = "/deleteBatch") | 138 | @DeleteMapping(value = "/deleteBatch") |
139 | + @RequiresPermissions("containerCapacity:deleteBatch") | ||
134 | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { | 140 | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
135 | this.containerCapacityService.removeByIds(Arrays.asList(ids.split(","))); | 141 | this.containerCapacityService.removeByIds(Arrays.asList(ids.split(","))); |
136 | return Result.OK("批量删除成功!"); | 142 | return Result.OK("批量删除成功!"); |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/containerType/controller/ContainerTypeController.java
@@ -12,6 +12,7 @@ import javax.servlet.http.HttpServletResponse; | @@ -12,6 +12,7 @@ import javax.servlet.http.HttpServletResponse; | ||
12 | 12 | ||
13 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 13 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
14 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | 14 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
15 | +import org.apache.shiro.authz.annotation.RequiresPermissions; | ||
15 | import org.jeecg.common.api.vo.Result; | 16 | import org.jeecg.common.api.vo.Result; |
16 | import org.jeecg.common.system.query.QueryGenerator; | 17 | import org.jeecg.common.system.query.QueryGenerator; |
17 | import org.jeecg.common.system.util.JwtUtil; | 18 | import org.jeecg.common.system.util.JwtUtil; |
@@ -88,6 +89,7 @@ public class ContainerTypeController extends JeecgController<ContainerType, ICon | @@ -88,6 +89,7 @@ public class ContainerTypeController extends JeecgController<ContainerType, ICon | ||
88 | */ | 89 | */ |
89 | @AutoLog(value = "容器类型-添加") | 90 | @AutoLog(value = "容器类型-添加") |
90 | @ApiOperation(value="容器类型-添加", notes="容器类型-添加") | 91 | @ApiOperation(value="容器类型-添加", notes="容器类型-添加") |
92 | + @RequiresPermissions("containerType:add") | ||
91 | @PostMapping(value = "/add") | 93 | @PostMapping(value = "/add") |
92 | public Result<String> add(@RequestBody ContainerType containerType, HttpServletRequest req) { | 94 | public Result<String> add(@RequestBody ContainerType containerType, HttpServletRequest req) { |
93 | String warehouseCode = JwtUtil.getWarehouseCodeByToken(req); | 95 | String warehouseCode = JwtUtil.getWarehouseCodeByToken(req); |
@@ -106,6 +108,7 @@ public class ContainerTypeController extends JeecgController<ContainerType, ICon | @@ -106,6 +108,7 @@ public class ContainerTypeController extends JeecgController<ContainerType, ICon | ||
106 | */ | 108 | */ |
107 | @AutoLog(value = "容器类型-编辑") | 109 | @AutoLog(value = "容器类型-编辑") |
108 | @ApiOperation(value="容器类型-编辑", notes="容器类型-编辑") | 110 | @ApiOperation(value="容器类型-编辑", notes="容器类型-编辑") |
111 | + @RequiresPermissions("containerType:edit") | ||
109 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) | 112 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
110 | public Result<String> edit(@RequestBody ContainerType containerType) { | 113 | public Result<String> edit(@RequestBody ContainerType containerType) { |
111 | containerTypeService.updateById(containerType); | 114 | containerTypeService.updateById(containerType); |
@@ -120,6 +123,7 @@ public class ContainerTypeController extends JeecgController<ContainerType, ICon | @@ -120,6 +123,7 @@ public class ContainerTypeController extends JeecgController<ContainerType, ICon | ||
120 | */ | 123 | */ |
121 | @AutoLog(value = "容器类型-通过id删除") | 124 | @AutoLog(value = "容器类型-通过id删除") |
122 | @ApiOperation(value="容器类型-通过id删除", notes="容器类型-通过id删除") | 125 | @ApiOperation(value="容器类型-通过id删除", notes="容器类型-通过id删除") |
126 | + @RequiresPermissions("containerType:delete") | ||
123 | @DeleteMapping(value = "/delete") | 127 | @DeleteMapping(value = "/delete") |
124 | public Result<String> delete(@RequestParam(name="id",required=true) String id) { | 128 | public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
125 | containerTypeService.removeById(id); | 129 | containerTypeService.removeById(id); |
@@ -134,6 +138,7 @@ public class ContainerTypeController extends JeecgController<ContainerType, ICon | @@ -134,6 +138,7 @@ public class ContainerTypeController extends JeecgController<ContainerType, ICon | ||
134 | */ | 138 | */ |
135 | @AutoLog(value = "容器类型-批量删除") | 139 | @AutoLog(value = "容器类型-批量删除") |
136 | @ApiOperation(value="容器类型-批量删除", notes="容器类型-批量删除") | 140 | @ApiOperation(value="容器类型-批量删除", notes="容器类型-批量删除") |
141 | + @RequiresPermissions("containerType:deleteBatch") | ||
137 | @DeleteMapping(value = "/deleteBatch") | 142 | @DeleteMapping(value = "/deleteBatch") |
138 | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { | 143 | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
139 | this.containerTypeService.removeByIds(Arrays.asList(ids.split(","))); | 144 | this.containerTypeService.removeByIds(Arrays.asList(ids.split(","))); |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/customer/controller/CustomerController.java
@@ -13,6 +13,7 @@ import javax.servlet.http.HttpServletResponse; | @@ -13,6 +13,7 @@ import javax.servlet.http.HttpServletResponse; | ||
13 | 13 | ||
14 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 14 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
15 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | 15 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
16 | +import org.apache.shiro.authz.annotation.RequiresPermissions; | ||
16 | import org.jeecg.common.api.vo.Result; | 17 | import org.jeecg.common.api.vo.Result; |
17 | import org.jeecg.common.system.query.QueryGenerator; | 18 | import org.jeecg.common.system.query.QueryGenerator; |
18 | import org.jeecg.common.system.util.JwtUtil; | 19 | import org.jeecg.common.system.util.JwtUtil; |
@@ -91,6 +92,7 @@ public class CustomerController extends JeecgController<Customer, ICustomerServi | @@ -91,6 +92,7 @@ public class CustomerController extends JeecgController<Customer, ICustomerServi | ||
91 | @AutoLog(value = "客户管理-添加") | 92 | @AutoLog(value = "客户管理-添加") |
92 | @ApiOperation(value="客户管理-添加", notes="客户管理-添加") | 93 | @ApiOperation(value="客户管理-添加", notes="客户管理-添加") |
93 | @PostMapping(value = "/add") | 94 | @PostMapping(value = "/add") |
95 | + @RequiresPermissions("customer:add") | ||
94 | public Result<String> add(@RequestBody Customer customer, HttpServletRequest req) { | 96 | public Result<String> add(@RequestBody Customer customer, HttpServletRequest req) { |
95 | String warehouseCode = JwtUtil.getWarehouseCodeByToken(req); | 97 | String warehouseCode = JwtUtil.getWarehouseCodeByToken(req); |
96 | if(StringUtils.isNotEmpty(warehouseCode)) { | 98 | if(StringUtils.isNotEmpty(warehouseCode)) { |
@@ -108,6 +110,7 @@ public class CustomerController extends JeecgController<Customer, ICustomerServi | @@ -108,6 +110,7 @@ public class CustomerController extends JeecgController<Customer, ICustomerServi | ||
108 | */ | 110 | */ |
109 | @AutoLog(value = "客户管理-编辑") | 111 | @AutoLog(value = "客户管理-编辑") |
110 | @ApiOperation(value="客户管理-编辑", notes="客户管理-编辑") | 112 | @ApiOperation(value="客户管理-编辑", notes="客户管理-编辑") |
113 | + @RequiresPermissions("customer:edit") | ||
111 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) | 114 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
112 | public Result<String> edit(@RequestBody Customer customer) { | 115 | public Result<String> edit(@RequestBody Customer customer) { |
113 | customerService.updateById(customer); | 116 | customerService.updateById(customer); |
@@ -121,6 +124,7 @@ public class CustomerController extends JeecgController<Customer, ICustomerServi | @@ -121,6 +124,7 @@ public class CustomerController extends JeecgController<Customer, ICustomerServi | ||
121 | * @return | 124 | * @return |
122 | */ | 125 | */ |
123 | @AutoLog(value = "客户管理-通过id删除") | 126 | @AutoLog(value = "客户管理-通过id删除") |
127 | + @RequiresPermissions("customer:delete") | ||
124 | @ApiOperation(value="客户管理-通过id删除", notes="客户管理-通过id删除") | 128 | @ApiOperation(value="客户管理-通过id删除", notes="客户管理-通过id删除") |
125 | @DeleteMapping(value = "/delete") | 129 | @DeleteMapping(value = "/delete") |
126 | public Result<String> delete(@RequestParam(name="id",required=true) String id) { | 130 | public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
@@ -136,6 +140,7 @@ public class CustomerController extends JeecgController<Customer, ICustomerServi | @@ -136,6 +140,7 @@ public class CustomerController extends JeecgController<Customer, ICustomerServi | ||
136 | */ | 140 | */ |
137 | @AutoLog(value = "客户管理-批量删除") | 141 | @AutoLog(value = "客户管理-批量删除") |
138 | @ApiOperation(value="客户管理-批量删除", notes="客户管理-批量删除") | 142 | @ApiOperation(value="客户管理-批量删除", notes="客户管理-批量删除") |
143 | + @RequiresPermissions("customer:deleteBatch") | ||
139 | @DeleteMapping(value = "/deleteBatch") | 144 | @DeleteMapping(value = "/deleteBatch") |
140 | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { | 145 | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
141 | this.customerService.removeByIds(Arrays.asList(ids.split(","))); | 146 | this.customerService.removeByIds(Arrays.asList(ids.split(","))); |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/material/controller/MaterialController.java
@@ -14,6 +14,7 @@ import javax.servlet.http.HttpServletResponse; | @@ -14,6 +14,7 @@ import javax.servlet.http.HttpServletResponse; | ||
14 | 14 | ||
15 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 15 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
16 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | 16 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
17 | +import org.apache.shiro.authz.annotation.RequiresPermissions; | ||
17 | import org.jeecg.common.api.vo.Result; | 18 | import org.jeecg.common.api.vo.Result; |
18 | import org.jeecg.common.system.query.QueryGenerator; | 19 | import org.jeecg.common.system.query.QueryGenerator; |
19 | import org.jeecg.common.system.util.JwtUtil; | 20 | import org.jeecg.common.system.util.JwtUtil; |
@@ -91,6 +92,7 @@ public class MaterialController extends JeecgController<Material, IMaterialServi | @@ -91,6 +92,7 @@ public class MaterialController extends JeecgController<Material, IMaterialServi | ||
91 | * @return | 92 | * @return |
92 | */ | 93 | */ |
93 | @AutoLog(value = "物料管理-添加") | 94 | @AutoLog(value = "物料管理-添加") |
95 | + @RequiresPermissions("material:add") | ||
94 | @ApiOperation(value="物料管理-添加", notes="物料管理-添加") | 96 | @ApiOperation(value="物料管理-添加", notes="物料管理-添加") |
95 | @PostMapping(value = "/add") | 97 | @PostMapping(value = "/add") |
96 | public Result<String> add(@RequestBody Material material, HttpServletRequest req) { | 98 | public Result<String> add(@RequestBody Material material, HttpServletRequest req) { |
@@ -110,6 +112,7 @@ public class MaterialController extends JeecgController<Material, IMaterialServi | @@ -110,6 +112,7 @@ public class MaterialController extends JeecgController<Material, IMaterialServi | ||
110 | */ | 112 | */ |
111 | @AutoLog(value = "物料管理-编辑") | 113 | @AutoLog(value = "物料管理-编辑") |
112 | @ApiOperation(value="物料管理-编辑", notes="物料管理-编辑") | 114 | @ApiOperation(value="物料管理-编辑", notes="物料管理-编辑") |
115 | + @RequiresPermissions("material:edit") | ||
113 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) | 116 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
114 | public Result<String> edit(@RequestBody Material material) { | 117 | public Result<String> edit(@RequestBody Material material) { |
115 | materialService.updateById(material); | 118 | materialService.updateById(material); |
@@ -125,6 +128,7 @@ public class MaterialController extends JeecgController<Material, IMaterialServi | @@ -125,6 +128,7 @@ public class MaterialController extends JeecgController<Material, IMaterialServi | ||
125 | @AutoLog(value = "物料管理-通过id删除") | 128 | @AutoLog(value = "物料管理-通过id删除") |
126 | @ApiOperation(value="物料管理-通过id删除", notes="物料管理-通过id删除") | 129 | @ApiOperation(value="物料管理-通过id删除", notes="物料管理-通过id删除") |
127 | @DeleteMapping(value = "/delete") | 130 | @DeleteMapping(value = "/delete") |
131 | + @RequiresPermissions("material:delete") | ||
128 | public Result<String> delete(@RequestParam(name="id",required=true) String id) { | 132 | public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
129 | materialService.removeById(id); | 133 | materialService.removeById(id); |
130 | return Result.OK("删除成功!"); | 134 | return Result.OK("删除成功!"); |
@@ -139,6 +143,7 @@ public class MaterialController extends JeecgController<Material, IMaterialServi | @@ -139,6 +143,7 @@ public class MaterialController extends JeecgController<Material, IMaterialServi | ||
139 | @AutoLog(value = "物料管理-批量删除") | 143 | @AutoLog(value = "物料管理-批量删除") |
140 | @ApiOperation(value="物料管理-批量删除", notes="物料管理-批量删除") | 144 | @ApiOperation(value="物料管理-批量删除", notes="物料管理-批量删除") |
141 | @DeleteMapping(value = "/deleteBatch") | 145 | @DeleteMapping(value = "/deleteBatch") |
146 | + @RequiresPermissions("material:deleteBatch") | ||
142 | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { | 147 | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
143 | this.materialService.removeByIds(Arrays.asList(ids.split(","))); | 148 | this.materialService.removeByIds(Arrays.asList(ids.split(","))); |
144 | return Result.OK("批量删除成功!"); | 149 | return Result.OK("批量删除成功!"); |
@@ -168,6 +173,7 @@ public class MaterialController extends JeecgController<Material, IMaterialServi | @@ -168,6 +173,7 @@ public class MaterialController extends JeecgController<Material, IMaterialServi | ||
168 | * @param material | 173 | * @param material |
169 | */ | 174 | */ |
170 | @RequestMapping(value = "/exportXls") | 175 | @RequestMapping(value = "/exportXls") |
176 | + @RequiresPermissions("material:exportXls") | ||
171 | public ModelAndView exportXls(HttpServletRequest request, Material material) { | 177 | public ModelAndView exportXls(HttpServletRequest request, Material material) { |
172 | return super.exportXls(request, material, Material.class, "物料管理"); | 178 | return super.exportXls(request, material, Material.class, "物料管理"); |
173 | } | 179 | } |
@@ -180,6 +186,7 @@ public class MaterialController extends JeecgController<Material, IMaterialServi | @@ -180,6 +186,7 @@ public class MaterialController extends JeecgController<Material, IMaterialServi | ||
180 | */ | 186 | */ |
181 | @AutoLog(value = "物料管理-获取打印数据") | 187 | @AutoLog(value = "物料管理-获取打印数据") |
182 | @ApiOperation(value="物料管理-获取打印数据", notes="物料管理-获取打印数据") | 188 | @ApiOperation(value="物料管理-获取打印数据", notes="物料管理-获取打印数据") |
189 | + @RequiresPermissions("material:print") | ||
183 | @PostMapping(value = "/getPrintContent") | 190 | @PostMapping(value = "/getPrintContent") |
184 | @ResponseBody | 191 | @ResponseBody |
185 | public Result getPrintContent(@RequestParam(name="ids",required=true) String ids) { | 192 | public Result getPrintContent(@RequestParam(name="ids",required=true) String ids) { |
@@ -196,7 +203,8 @@ public class MaterialController extends JeecgController<Material, IMaterialServi | @@ -196,7 +203,8 @@ public class MaterialController extends JeecgController<Material, IMaterialServi | ||
196 | * @return | 203 | * @return |
197 | */ | 204 | */ |
198 | @RequestMapping(value = "/importExcel", method = RequestMethod.POST) | 205 | @RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
199 | - public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { | 206 | + @RequiresPermissions("material:importExcel") |
207 | + public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { | ||
200 | return super.importExcel(request, response, Material.class); | 208 | return super.importExcel(request, response, Material.class); |
201 | } | 209 | } |
202 | 210 |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/materialArea/controller/MaterialAreaController.java
@@ -9,6 +9,8 @@ import java.io.UnsupportedEncodingException; | @@ -9,6 +9,8 @@ import java.io.UnsupportedEncodingException; | ||
9 | import java.net.URLDecoder; | 9 | import java.net.URLDecoder; |
10 | import javax.servlet.http.HttpServletRequest; | 10 | import javax.servlet.http.HttpServletRequest; |
11 | import javax.servlet.http.HttpServletResponse; | 11 | import javax.servlet.http.HttpServletResponse; |
12 | + | ||
13 | +import org.apache.shiro.authz.annotation.RequiresPermissions; | ||
12 | import org.jeecg.common.api.vo.Result; | 14 | import org.jeecg.common.api.vo.Result; |
13 | import org.jeecg.common.system.query.QueryGenerator; | 15 | import org.jeecg.common.system.query.QueryGenerator; |
14 | import org.jeecg.common.system.util.JwtUtil; | 16 | import org.jeecg.common.system.util.JwtUtil; |
@@ -83,6 +85,7 @@ public class MaterialAreaController extends JeecgController<MaterialArea, IMater | @@ -83,6 +85,7 @@ public class MaterialAreaController extends JeecgController<MaterialArea, IMater | ||
83 | * @return | 85 | * @return |
84 | */ | 86 | */ |
85 | @AutoLog(value = "物料分区-添加") | 87 | @AutoLog(value = "物料分区-添加") |
88 | + @RequiresPermissions("materialArea:add") | ||
86 | @ApiOperation(value="物料分区-添加", notes="物料分区-添加") | 89 | @ApiOperation(value="物料分区-添加", notes="物料分区-添加") |
87 | @PostMapping(value = "/add") | 90 | @PostMapping(value = "/add") |
88 | public Result<String> add(@RequestBody MaterialArea materialArea, HttpServletRequest req) { | 91 | public Result<String> add(@RequestBody MaterialArea materialArea, HttpServletRequest req) { |
@@ -101,6 +104,7 @@ public class MaterialAreaController extends JeecgController<MaterialArea, IMater | @@ -101,6 +104,7 @@ public class MaterialAreaController extends JeecgController<MaterialArea, IMater | ||
101 | * @return | 104 | * @return |
102 | */ | 105 | */ |
103 | @AutoLog(value = "物料分区-编辑") | 106 | @AutoLog(value = "物料分区-编辑") |
107 | + @RequiresPermissions("materialArea:edit") | ||
104 | @ApiOperation(value="物料分区-编辑", notes="物料分区-编辑") | 108 | @ApiOperation(value="物料分区-编辑", notes="物料分区-编辑") |
105 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) | 109 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
106 | public Result<String> edit(@RequestBody MaterialArea materialArea) { | 110 | public Result<String> edit(@RequestBody MaterialArea materialArea) { |
@@ -115,6 +119,7 @@ public class MaterialAreaController extends JeecgController<MaterialArea, IMater | @@ -115,6 +119,7 @@ public class MaterialAreaController extends JeecgController<MaterialArea, IMater | ||
115 | * @return | 119 | * @return |
116 | */ | 120 | */ |
117 | @AutoLog(value = "物料分区-通过id删除") | 121 | @AutoLog(value = "物料分区-通过id删除") |
122 | + @RequiresPermissions("materialArea:delete") | ||
118 | @ApiOperation(value="物料分区-通过id删除", notes="物料分区-通过id删除") | 123 | @ApiOperation(value="物料分区-通过id删除", notes="物料分区-通过id删除") |
119 | @DeleteMapping(value = "/delete") | 124 | @DeleteMapping(value = "/delete") |
120 | public Result<String> delete(@RequestParam(name="id",required=true) String id) { | 125 | public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
@@ -130,6 +135,7 @@ public class MaterialAreaController extends JeecgController<MaterialArea, IMater | @@ -130,6 +135,7 @@ public class MaterialAreaController extends JeecgController<MaterialArea, IMater | ||
130 | */ | 135 | */ |
131 | @AutoLog(value = "物料分区-批量删除") | 136 | @AutoLog(value = "物料分区-批量删除") |
132 | @ApiOperation(value="物料分区-批量删除", notes="物料分区-批量删除") | 137 | @ApiOperation(value="物料分区-批量删除", notes="物料分区-批量删除") |
138 | + @RequiresPermissions("materialArea:deleteBatch") | ||
133 | @DeleteMapping(value = "/deleteBatch") | 139 | @DeleteMapping(value = "/deleteBatch") |
134 | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { | 140 | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
135 | this.materialAreaService.removeByIds(Arrays.asList(ids.split(","))); | 141 | this.materialAreaService.removeByIds(Arrays.asList(ids.split(","))); |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/materialMultiple/controller/MaterialMultipleController.java
@@ -9,6 +9,8 @@ import java.io.UnsupportedEncodingException; | @@ -9,6 +9,8 @@ import java.io.UnsupportedEncodingException; | ||
9 | import java.net.URLDecoder; | 9 | import java.net.URLDecoder; |
10 | import javax.servlet.http.HttpServletRequest; | 10 | import javax.servlet.http.HttpServletRequest; |
11 | import javax.servlet.http.HttpServletResponse; | 11 | import javax.servlet.http.HttpServletResponse; |
12 | + | ||
13 | +import org.apache.shiro.authz.annotation.RequiresPermissions; | ||
12 | import org.jeecg.common.api.vo.Result; | 14 | import org.jeecg.common.api.vo.Result; |
13 | import org.jeecg.common.system.query.QueryGenerator; | 15 | import org.jeecg.common.system.query.QueryGenerator; |
14 | import org.jeecg.common.system.util.JwtUtil; | 16 | import org.jeecg.common.system.util.JwtUtil; |
@@ -84,6 +86,7 @@ public class MaterialMultipleController extends JeecgController<MaterialMultiple | @@ -84,6 +86,7 @@ public class MaterialMultipleController extends JeecgController<MaterialMultiple | ||
84 | */ | 86 | */ |
85 | @AutoLog(value = "物料单位换算-添加") | 87 | @AutoLog(value = "物料单位换算-添加") |
86 | @ApiOperation(value="物料单位换算-添加", notes="物料单位换算-添加") | 88 | @ApiOperation(value="物料单位换算-添加", notes="物料单位换算-添加") |
89 | + @RequiresPermissions("materialMultiple:add") | ||
87 | @PostMapping(value = "/add") | 90 | @PostMapping(value = "/add") |
88 | public Result<String> add(@RequestBody MaterialMultiple materialMultiple, HttpServletRequest req) { | 91 | public Result<String> add(@RequestBody MaterialMultiple materialMultiple, HttpServletRequest req) { |
89 | String warehouseCode = JwtUtil.getWarehouseCodeByToken(req); | 92 | String warehouseCode = JwtUtil.getWarehouseCodeByToken(req); |
@@ -101,6 +104,7 @@ public class MaterialMultipleController extends JeecgController<MaterialMultiple | @@ -101,6 +104,7 @@ public class MaterialMultipleController extends JeecgController<MaterialMultiple | ||
101 | * @return | 104 | * @return |
102 | */ | 105 | */ |
103 | @AutoLog(value = "物料单位换算-编辑") | 106 | @AutoLog(value = "物料单位换算-编辑") |
107 | + @RequiresPermissions("materialMultiple:deit") | ||
104 | @ApiOperation(value="物料单位换算-编辑", notes="物料单位换算-编辑") | 108 | @ApiOperation(value="物料单位换算-编辑", notes="物料单位换算-编辑") |
105 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) | 109 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
106 | public Result<String> edit(@RequestBody MaterialMultiple materialMultiple) { | 110 | public Result<String> edit(@RequestBody MaterialMultiple materialMultiple) { |
@@ -115,6 +119,7 @@ public class MaterialMultipleController extends JeecgController<MaterialMultiple | @@ -115,6 +119,7 @@ public class MaterialMultipleController extends JeecgController<MaterialMultiple | ||
115 | * @return | 119 | * @return |
116 | */ | 120 | */ |
117 | @AutoLog(value = "物料单位换算-通过id删除") | 121 | @AutoLog(value = "物料单位换算-通过id删除") |
122 | + @RequiresPermissions("materialMultiple:delete") | ||
118 | @ApiOperation(value="物料单位换算-通过id删除", notes="物料单位换算-通过id删除") | 123 | @ApiOperation(value="物料单位换算-通过id删除", notes="物料单位换算-通过id删除") |
119 | @DeleteMapping(value = "/delete") | 124 | @DeleteMapping(value = "/delete") |
120 | public Result<String> delete(@RequestParam(name="id",required=true) String id) { | 125 | public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
@@ -130,6 +135,7 @@ public class MaterialMultipleController extends JeecgController<MaterialMultiple | @@ -130,6 +135,7 @@ public class MaterialMultipleController extends JeecgController<MaterialMultiple | ||
130 | */ | 135 | */ |
131 | @AutoLog(value = "物料单位换算-批量删除") | 136 | @AutoLog(value = "物料单位换算-批量删除") |
132 | @ApiOperation(value="物料单位换算-批量删除", notes="物料单位换算-批量删除") | 137 | @ApiOperation(value="物料单位换算-批量删除", notes="物料单位换算-批量删除") |
138 | + @RequiresPermissions("materialMultiple:deleteBatch") | ||
133 | @DeleteMapping(value = "/deleteBatch") | 139 | @DeleteMapping(value = "/deleteBatch") |
134 | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { | 140 | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
135 | this.materialMultipleService.removeByIds(Arrays.asList(ids.split(","))); | 141 | this.materialMultipleService.removeByIds(Arrays.asList(ids.split(","))); |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/materialType/controller/MaterialTypeController.java
@@ -9,6 +9,8 @@ import java.io.UnsupportedEncodingException; | @@ -9,6 +9,8 @@ import java.io.UnsupportedEncodingException; | ||
9 | import java.net.URLDecoder; | 9 | import java.net.URLDecoder; |
10 | import javax.servlet.http.HttpServletRequest; | 10 | import javax.servlet.http.HttpServletRequest; |
11 | import javax.servlet.http.HttpServletResponse; | 11 | import javax.servlet.http.HttpServletResponse; |
12 | + | ||
13 | +import org.apache.shiro.authz.annotation.RequiresPermissions; | ||
12 | import org.jeecg.common.api.vo.Result; | 14 | import org.jeecg.common.api.vo.Result; |
13 | import org.jeecg.common.system.query.QueryGenerator; | 15 | import org.jeecg.common.system.query.QueryGenerator; |
14 | import org.jeecg.common.system.util.JwtUtil; | 16 | import org.jeecg.common.system.util.JwtUtil; |
@@ -83,6 +85,7 @@ public class MaterialTypeController extends JeecgController<MaterialType, IMater | @@ -83,6 +85,7 @@ public class MaterialTypeController extends JeecgController<MaterialType, IMater | ||
83 | * @return | 85 | * @return |
84 | */ | 86 | */ |
85 | @AutoLog(value = "物料类别-添加") | 87 | @AutoLog(value = "物料类别-添加") |
88 | + @RequiresPermissions("materialType:add") | ||
86 | @ApiOperation(value="物料类别-添加", notes="物料类别-添加") | 89 | @ApiOperation(value="物料类别-添加", notes="物料类别-添加") |
87 | @PostMapping(value = "/add") | 90 | @PostMapping(value = "/add") |
88 | public Result<String> add(@RequestBody MaterialType materialType, HttpServletRequest req) { | 91 | public Result<String> add(@RequestBody MaterialType materialType, HttpServletRequest req) { |
@@ -101,6 +104,7 @@ public class MaterialTypeController extends JeecgController<MaterialType, IMater | @@ -101,6 +104,7 @@ public class MaterialTypeController extends JeecgController<MaterialType, IMater | ||
101 | * @return | 104 | * @return |
102 | */ | 105 | */ |
103 | @AutoLog(value = "物料类别-编辑") | 106 | @AutoLog(value = "物料类别-编辑") |
107 | + @RequiresPermissions("materialType:edit") | ||
104 | @ApiOperation(value="物料类别-编辑", notes="物料类别-编辑") | 108 | @ApiOperation(value="物料类别-编辑", notes="物料类别-编辑") |
105 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) | 109 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
106 | public Result<String> edit(@RequestBody MaterialType materialType) { | 110 | public Result<String> edit(@RequestBody MaterialType materialType) { |
@@ -115,6 +119,7 @@ public class MaterialTypeController extends JeecgController<MaterialType, IMater | @@ -115,6 +119,7 @@ public class MaterialTypeController extends JeecgController<MaterialType, IMater | ||
115 | * @return | 119 | * @return |
116 | */ | 120 | */ |
117 | @AutoLog(value = "物料类别-通过id删除") | 121 | @AutoLog(value = "物料类别-通过id删除") |
122 | + @RequiresPermissions("materialType:delete") | ||
118 | @ApiOperation(value="物料类别-通过id删除", notes="物料类别-通过id删除") | 123 | @ApiOperation(value="物料类别-通过id删除", notes="物料类别-通过id删除") |
119 | @DeleteMapping(value = "/delete") | 124 | @DeleteMapping(value = "/delete") |
120 | public Result<String> delete(@RequestParam(name="id",required=true) String id) { | 125 | public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
@@ -130,6 +135,7 @@ public class MaterialTypeController extends JeecgController<MaterialType, IMater | @@ -130,6 +135,7 @@ public class MaterialTypeController extends JeecgController<MaterialType, IMater | ||
130 | */ | 135 | */ |
131 | @AutoLog(value = "物料类别-批量删除") | 136 | @AutoLog(value = "物料类别-批量删除") |
132 | @ApiOperation(value="物料类别-批量删除", notes="物料类别-批量删除") | 137 | @ApiOperation(value="物料类别-批量删除", notes="物料类别-批量删除") |
138 | + @RequiresPermissions("materialType:deleteBatch") | ||
133 | @DeleteMapping(value = "/deleteBatch") | 139 | @DeleteMapping(value = "/deleteBatch") |
134 | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { | 140 | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
135 | this.materialTypeService.removeByIds(Arrays.asList(ids.split(","))); | 141 | this.materialTypeService.removeByIds(Arrays.asList(ids.split(","))); |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/materialUnit/controller/MaterialUnitController.java
@@ -9,6 +9,8 @@ import java.io.UnsupportedEncodingException; | @@ -9,6 +9,8 @@ import java.io.UnsupportedEncodingException; | ||
9 | import java.net.URLDecoder; | 9 | import java.net.URLDecoder; |
10 | import javax.servlet.http.HttpServletRequest; | 10 | import javax.servlet.http.HttpServletRequest; |
11 | import javax.servlet.http.HttpServletResponse; | 11 | import javax.servlet.http.HttpServletResponse; |
12 | + | ||
13 | +import org.apache.shiro.authz.annotation.RequiresPermissions; | ||
12 | import org.jeecg.common.api.vo.Result; | 14 | import org.jeecg.common.api.vo.Result; |
13 | import org.jeecg.common.system.query.QueryGenerator; | 15 | import org.jeecg.common.system.query.QueryGenerator; |
14 | import org.jeecg.common.system.util.JwtUtil; | 16 | import org.jeecg.common.system.util.JwtUtil; |
@@ -85,6 +87,7 @@ public class MaterialUnitController extends JeecgController<MaterialUnit, IMater | @@ -85,6 +87,7 @@ public class MaterialUnitController extends JeecgController<MaterialUnit, IMater | ||
85 | @AutoLog(value = "物料单位-添加") | 87 | @AutoLog(value = "物料单位-添加") |
86 | @ApiOperation(value="物料单位-添加", notes="物料单位-添加") | 88 | @ApiOperation(value="物料单位-添加", notes="物料单位-添加") |
87 | @PostMapping(value = "/add") | 89 | @PostMapping(value = "/add") |
90 | + @RequiresPermissions("materialUnit:add") | ||
88 | public Result<String> add(@RequestBody MaterialUnit materialUnit, HttpServletRequest req) { | 91 | public Result<String> add(@RequestBody MaterialUnit materialUnit, HttpServletRequest req) { |
89 | String warehouseCode = JwtUtil.getWarehouseCodeByToken(req); | 92 | String warehouseCode = JwtUtil.getWarehouseCodeByToken(req); |
90 | if(StringUtils.isNotEmpty(warehouseCode)) { | 93 | if(StringUtils.isNotEmpty(warehouseCode)) { |
@@ -102,6 +105,7 @@ public class MaterialUnitController extends JeecgController<MaterialUnit, IMater | @@ -102,6 +105,7 @@ public class MaterialUnitController extends JeecgController<MaterialUnit, IMater | ||
102 | */ | 105 | */ |
103 | @AutoLog(value = "物料单位-编辑") | 106 | @AutoLog(value = "物料单位-编辑") |
104 | @ApiOperation(value="物料单位-编辑", notes="物料单位-编辑") | 107 | @ApiOperation(value="物料单位-编辑", notes="物料单位-编辑") |
108 | + @RequiresPermissions("materialUnit:edit") | ||
105 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) | 109 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
106 | public Result<String> edit(@RequestBody MaterialUnit materialUnit) { | 110 | public Result<String> edit(@RequestBody MaterialUnit materialUnit) { |
107 | materialUnitService.updateById(materialUnit); | 111 | materialUnitService.updateById(materialUnit); |
@@ -117,6 +121,7 @@ public class MaterialUnitController extends JeecgController<MaterialUnit, IMater | @@ -117,6 +121,7 @@ public class MaterialUnitController extends JeecgController<MaterialUnit, IMater | ||
117 | @AutoLog(value = "物料单位-通过id删除") | 121 | @AutoLog(value = "物料单位-通过id删除") |
118 | @ApiOperation(value="物料单位-通过id删除", notes="物料单位-通过id删除") | 122 | @ApiOperation(value="物料单位-通过id删除", notes="物料单位-通过id删除") |
119 | @DeleteMapping(value = "/delete") | 123 | @DeleteMapping(value = "/delete") |
124 | + @RequiresPermissions("materialUnit:delete") | ||
120 | public Result<String> delete(@RequestParam(name="id",required=true) String id) { | 125 | public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
121 | materialUnitService.removeById(id); | 126 | materialUnitService.removeById(id); |
122 | return Result.OK("删除成功!"); | 127 | return Result.OK("删除成功!"); |
@@ -131,6 +136,7 @@ public class MaterialUnitController extends JeecgController<MaterialUnit, IMater | @@ -131,6 +136,7 @@ public class MaterialUnitController extends JeecgController<MaterialUnit, IMater | ||
131 | @AutoLog(value = "物料单位-批量删除") | 136 | @AutoLog(value = "物料单位-批量删除") |
132 | @ApiOperation(value="物料单位-批量删除", notes="物料单位-批量删除") | 137 | @ApiOperation(value="物料单位-批量删除", notes="物料单位-批量删除") |
133 | @DeleteMapping(value = "/deleteBatch") | 138 | @DeleteMapping(value = "/deleteBatch") |
139 | + @RequiresPermissions("materialUnit:deleteBatch") | ||
134 | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { | 140 | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
135 | this.materialUnitService.removeByIds(Arrays.asList(ids.split(","))); | 141 | this.materialUnitService.removeByIds(Arrays.asList(ids.split(","))); |
136 | return Result.OK("批量删除成功!"); | 142 | return Result.OK("批量删除成功!"); |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/materialWarning/controller/MaterialWarningController.java
@@ -9,6 +9,8 @@ import java.io.UnsupportedEncodingException; | @@ -9,6 +9,8 @@ import java.io.UnsupportedEncodingException; | ||
9 | import java.net.URLDecoder; | 9 | import java.net.URLDecoder; |
10 | import javax.servlet.http.HttpServletRequest; | 10 | import javax.servlet.http.HttpServletRequest; |
11 | import javax.servlet.http.HttpServletResponse; | 11 | import javax.servlet.http.HttpServletResponse; |
12 | + | ||
13 | +import org.apache.shiro.authz.annotation.RequiresPermissions; | ||
12 | import org.jeecg.common.api.vo.Result; | 14 | import org.jeecg.common.api.vo.Result; |
13 | import org.jeecg.common.system.query.QueryGenerator; | 15 | import org.jeecg.common.system.query.QueryGenerator; |
14 | import org.jeecg.common.system.util.JwtUtil; | 16 | import org.jeecg.common.system.util.JwtUtil; |
@@ -83,6 +85,7 @@ public class MaterialWarningController extends JeecgController<MaterialWarning, | @@ -83,6 +85,7 @@ public class MaterialWarningController extends JeecgController<MaterialWarning, | ||
83 | * @return | 85 | * @return |
84 | */ | 86 | */ |
85 | @AutoLog(value = "物料预警-添加") | 87 | @AutoLog(value = "物料预警-添加") |
88 | + @RequiresPermissions("materialWarning:add") | ||
86 | @ApiOperation(value="物料预警-添加", notes="物料预警-添加") | 89 | @ApiOperation(value="物料预警-添加", notes="物料预警-添加") |
87 | @PostMapping(value = "/add") | 90 | @PostMapping(value = "/add") |
88 | public Result<String> add(@RequestBody MaterialWarning materialWarning, HttpServletRequest req) { | 91 | public Result<String> add(@RequestBody MaterialWarning materialWarning, HttpServletRequest req) { |
@@ -101,6 +104,7 @@ public class MaterialWarningController extends JeecgController<MaterialWarning, | @@ -101,6 +104,7 @@ public class MaterialWarningController extends JeecgController<MaterialWarning, | ||
101 | * @return | 104 | * @return |
102 | */ | 105 | */ |
103 | @AutoLog(value = "物料预警-编辑") | 106 | @AutoLog(value = "物料预警-编辑") |
107 | + @RequiresPermissions("materialWarning:edit") | ||
104 | @ApiOperation(value="物料预警-编辑", notes="物料预警-编辑") | 108 | @ApiOperation(value="物料预警-编辑", notes="物料预警-编辑") |
105 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) | 109 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
106 | public Result<String> edit(@RequestBody MaterialWarning materialWarning) { | 110 | public Result<String> edit(@RequestBody MaterialWarning materialWarning) { |
@@ -115,6 +119,7 @@ public class MaterialWarningController extends JeecgController<MaterialWarning, | @@ -115,6 +119,7 @@ public class MaterialWarningController extends JeecgController<MaterialWarning, | ||
115 | * @return | 119 | * @return |
116 | */ | 120 | */ |
117 | @AutoLog(value = "物料预警-通过id删除") | 121 | @AutoLog(value = "物料预警-通过id删除") |
122 | + @RequiresPermissions("materialWarning:delete") | ||
118 | @ApiOperation(value="物料预警-通过id删除", notes="物料预警-通过id删除") | 123 | @ApiOperation(value="物料预警-通过id删除", notes="物料预警-通过id删除") |
119 | @DeleteMapping(value = "/delete") | 124 | @DeleteMapping(value = "/delete") |
120 | public Result<String> delete(@RequestParam(name="id",required=true) String id) { | 125 | public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
@@ -130,6 +135,7 @@ public class MaterialWarningController extends JeecgController<MaterialWarning, | @@ -130,6 +135,7 @@ public class MaterialWarningController extends JeecgController<MaterialWarning, | ||
130 | */ | 135 | */ |
131 | @AutoLog(value = "物料预警-批量删除") | 136 | @AutoLog(value = "物料预警-批量删除") |
132 | @ApiOperation(value="物料预警-批量删除", notes="物料预警-批量删除") | 137 | @ApiOperation(value="物料预警-批量删除", notes="物料预警-批量删除") |
138 | + @RequiresPermissions("materialWarning:deleteBatch") | ||
133 | @DeleteMapping(value = "/deleteBatch") | 139 | @DeleteMapping(value = "/deleteBatch") |
134 | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { | 140 | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
135 | this.materialWarningService.removeByIds(Arrays.asList(ids.split(","))); | 141 | this.materialWarningService.removeByIds(Arrays.asList(ids.split(","))); |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/port/controller/PortController.java
@@ -9,6 +9,8 @@ import java.io.UnsupportedEncodingException; | @@ -9,6 +9,8 @@ import java.io.UnsupportedEncodingException; | ||
9 | import java.net.URLDecoder; | 9 | import java.net.URLDecoder; |
10 | import javax.servlet.http.HttpServletRequest; | 10 | import javax.servlet.http.HttpServletRequest; |
11 | import javax.servlet.http.HttpServletResponse; | 11 | import javax.servlet.http.HttpServletResponse; |
12 | + | ||
13 | +import org.apache.shiro.authz.annotation.RequiresPermissions; | ||
12 | import org.jeecg.common.api.vo.Result; | 14 | import org.jeecg.common.api.vo.Result; |
13 | import org.jeecg.common.system.query.QueryGenerator; | 15 | import org.jeecg.common.system.query.QueryGenerator; |
14 | import org.jeecg.common.system.util.JwtUtil; | 16 | import org.jeecg.common.system.util.JwtUtil; |
@@ -85,6 +87,7 @@ public class PortController extends JeecgController<Port, IPortService> { | @@ -85,6 +87,7 @@ public class PortController extends JeecgController<Port, IPortService> { | ||
85 | @AutoLog(value = "出入口-添加") | 87 | @AutoLog(value = "出入口-添加") |
86 | @ApiOperation(value="出入口-添加", notes="出入口-添加") | 88 | @ApiOperation(value="出入口-添加", notes="出入口-添加") |
87 | @PostMapping(value = "/add") | 89 | @PostMapping(value = "/add") |
90 | + @RequiresPermissions("port:add") | ||
88 | public Result<String> add(@RequestBody Port port, HttpServletRequest req) { | 91 | public Result<String> add(@RequestBody Port port, HttpServletRequest req) { |
89 | String warehouseCode = JwtUtil.getWarehouseCodeByToken(req); | 92 | String warehouseCode = JwtUtil.getWarehouseCodeByToken(req); |
90 | if(StringUtils.isNotEmpty(warehouseCode)) { | 93 | if(StringUtils.isNotEmpty(warehouseCode)) { |
@@ -102,6 +105,7 @@ public class PortController extends JeecgController<Port, IPortService> { | @@ -102,6 +105,7 @@ public class PortController extends JeecgController<Port, IPortService> { | ||
102 | */ | 105 | */ |
103 | @AutoLog(value = "出入口-编辑") | 106 | @AutoLog(value = "出入口-编辑") |
104 | @ApiOperation(value="出入口-编辑", notes="出入口-编辑") | 107 | @ApiOperation(value="出入口-编辑", notes="出入口-编辑") |
108 | + @RequiresPermissions("port:edit") | ||
105 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) | 109 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
106 | public Result<String> edit(@RequestBody Port port) { | 110 | public Result<String> edit(@RequestBody Port port) { |
107 | portService.updateById(port); | 111 | portService.updateById(port); |
@@ -116,6 +120,7 @@ public class PortController extends JeecgController<Port, IPortService> { | @@ -116,6 +120,7 @@ public class PortController extends JeecgController<Port, IPortService> { | ||
116 | */ | 120 | */ |
117 | @AutoLog(value = "出入口-通过id删除") | 121 | @AutoLog(value = "出入口-通过id删除") |
118 | @ApiOperation(value="出入口-通过id删除", notes="出入口-通过id删除") | 122 | @ApiOperation(value="出入口-通过id删除", notes="出入口-通过id删除") |
123 | + @RequiresPermissions("port:delete") | ||
119 | @DeleteMapping(value = "/delete") | 124 | @DeleteMapping(value = "/delete") |
120 | public Result<String> delete(@RequestParam(name="id",required=true) String id) { | 125 | public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
121 | portService.removeById(id); | 126 | portService.removeById(id); |
@@ -130,6 +135,7 @@ public class PortController extends JeecgController<Port, IPortService> { | @@ -130,6 +135,7 @@ public class PortController extends JeecgController<Port, IPortService> { | ||
130 | */ | 135 | */ |
131 | @AutoLog(value = "出入口-批量删除") | 136 | @AutoLog(value = "出入口-批量删除") |
132 | @ApiOperation(value="出入口-批量删除", notes="出入口-批量删除") | 137 | @ApiOperation(value="出入口-批量删除", notes="出入口-批量删除") |
138 | + @RequiresPermissions("port:deleteBatch") | ||
133 | @DeleteMapping(value = "/deleteBatch") | 139 | @DeleteMapping(value = "/deleteBatch") |
134 | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { | 140 | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
135 | this.portService.removeByIds(Arrays.asList(ids.split(","))); | 141 | this.portService.removeByIds(Arrays.asList(ids.split(","))); |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/supplier/controller/SupplierController.java
@@ -12,6 +12,7 @@ import javax.servlet.http.HttpServletResponse; | @@ -12,6 +12,7 @@ import javax.servlet.http.HttpServletResponse; | ||
12 | 12 | ||
13 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 13 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
14 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | 14 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
15 | +import org.apache.shiro.authz.annotation.RequiresPermissions; | ||
15 | import org.jeecg.common.api.vo.Result; | 16 | import org.jeecg.common.api.vo.Result; |
16 | import org.jeecg.common.system.query.QueryGenerator; | 17 | import org.jeecg.common.system.query.QueryGenerator; |
17 | import org.jeecg.common.system.util.JwtUtil; | 18 | import org.jeecg.common.system.util.JwtUtil; |
@@ -89,6 +90,7 @@ public class SupplierController extends JeecgController<Supplier, ISupplierServi | @@ -89,6 +90,7 @@ public class SupplierController extends JeecgController<Supplier, ISupplierServi | ||
89 | @AutoLog(value = "供应商管理-添加") | 90 | @AutoLog(value = "供应商管理-添加") |
90 | @ApiOperation(value="供应商管理-添加", notes="供应商管理-添加") | 91 | @ApiOperation(value="供应商管理-添加", notes="供应商管理-添加") |
91 | @PostMapping(value = "/add") | 92 | @PostMapping(value = "/add") |
93 | + @RequiresPermissions("supplier:add") | ||
92 | public Result<String> add(@RequestBody Supplier supplier, HttpServletRequest req) { | 94 | public Result<String> add(@RequestBody Supplier supplier, HttpServletRequest req) { |
93 | String warehouseCode = JwtUtil.getWarehouseCodeByToken(req); | 95 | String warehouseCode = JwtUtil.getWarehouseCodeByToken(req); |
94 | if(StringUtils.isNotEmpty(warehouseCode)) { | 96 | if(StringUtils.isNotEmpty(warehouseCode)) { |
@@ -106,6 +108,7 @@ public class SupplierController extends JeecgController<Supplier, ISupplierServi | @@ -106,6 +108,7 @@ public class SupplierController extends JeecgController<Supplier, ISupplierServi | ||
106 | */ | 108 | */ |
107 | @AutoLog(value = "供应商管理-编辑") | 109 | @AutoLog(value = "供应商管理-编辑") |
108 | @ApiOperation(value="供应商管理-编辑", notes="供应商管理-编辑") | 110 | @ApiOperation(value="供应商管理-编辑", notes="供应商管理-编辑") |
111 | + @RequiresPermissions("supplier:edit") | ||
109 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) | 112 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
110 | public Result<String> edit(@RequestBody Supplier supplier) { | 113 | public Result<String> edit(@RequestBody Supplier supplier) { |
111 | supplierService.updateById(supplier); | 114 | supplierService.updateById(supplier); |
@@ -120,6 +123,7 @@ public class SupplierController extends JeecgController<Supplier, ISupplierServi | @@ -120,6 +123,7 @@ public class SupplierController extends JeecgController<Supplier, ISupplierServi | ||
120 | */ | 123 | */ |
121 | @AutoLog(value = "供应商管理-通过id删除") | 124 | @AutoLog(value = "供应商管理-通过id删除") |
122 | @ApiOperation(value="供应商管理-通过id删除", notes="供应商管理-通过id删除") | 125 | @ApiOperation(value="供应商管理-通过id删除", notes="供应商管理-通过id删除") |
126 | + @RequiresPermissions("supplier:delete") | ||
123 | @DeleteMapping(value = "/delete") | 127 | @DeleteMapping(value = "/delete") |
124 | public Result<String> delete(@RequestParam(name="id",required=true) String id) { | 128 | public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
125 | supplierService.removeById(id); | 129 | supplierService.removeById(id); |
@@ -134,6 +138,7 @@ public class SupplierController extends JeecgController<Supplier, ISupplierServi | @@ -134,6 +138,7 @@ public class SupplierController extends JeecgController<Supplier, ISupplierServi | ||
134 | */ | 138 | */ |
135 | @AutoLog(value = "供应商管理-批量删除") | 139 | @AutoLog(value = "供应商管理-批量删除") |
136 | @ApiOperation(value="供应商管理-批量删除", notes="供应商管理-批量删除") | 140 | @ApiOperation(value="供应商管理-批量删除", notes="供应商管理-批量删除") |
141 | + @RequiresPermissions("supplier:deleteBatch") | ||
137 | @DeleteMapping(value = "/deleteBatch") | 142 | @DeleteMapping(value = "/deleteBatch") |
138 | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { | 143 | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
139 | this.supplierService.removeByIds(Arrays.asList(ids.split(","))); | 144 | this.supplierService.removeByIds(Arrays.asList(ids.split(","))); |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/zone/controller/ZoneController.java
@@ -12,6 +12,7 @@ import javax.servlet.http.HttpServletResponse; | @@ -12,6 +12,7 @@ import javax.servlet.http.HttpServletResponse; | ||
12 | 12 | ||
13 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 13 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
14 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | 14 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
15 | +import org.apache.shiro.authz.annotation.RequiresPermissions; | ||
15 | import org.jeecg.common.api.vo.Result; | 16 | import org.jeecg.common.api.vo.Result; |
16 | import org.jeecg.common.system.query.QueryGenerator; | 17 | import org.jeecg.common.system.query.QueryGenerator; |
17 | import org.jeecg.common.system.util.JwtUtil; | 18 | import org.jeecg.common.system.util.JwtUtil; |
@@ -87,6 +88,7 @@ public class ZoneController extends JeecgController<Zone, IZoneService> { | @@ -87,6 +88,7 @@ public class ZoneController extends JeecgController<Zone, IZoneService> { | ||
87 | */ | 88 | */ |
88 | @AutoLog(value = "库区管理-添加") | 89 | @AutoLog(value = "库区管理-添加") |
89 | @ApiOperation(value="库区管理-添加", notes="库区管理-添加") | 90 | @ApiOperation(value="库区管理-添加", notes="库区管理-添加") |
91 | + @RequiresPermissions("zone:add") | ||
90 | @PostMapping(value = "/add") | 92 | @PostMapping(value = "/add") |
91 | public Result<String> add(@RequestBody Zone zone, HttpServletRequest req) { | 93 | public Result<String> add(@RequestBody Zone zone, HttpServletRequest req) { |
92 | String warehouseCode = JwtUtil.getWarehouseCodeByToken(req); | 94 | String warehouseCode = JwtUtil.getWarehouseCodeByToken(req); |
@@ -105,6 +107,7 @@ public class ZoneController extends JeecgController<Zone, IZoneService> { | @@ -105,6 +107,7 @@ public class ZoneController extends JeecgController<Zone, IZoneService> { | ||
105 | */ | 107 | */ |
106 | @AutoLog(value = "库区管理-编辑") | 108 | @AutoLog(value = "库区管理-编辑") |
107 | @ApiOperation(value="库区管理-编辑", notes="库区管理-编辑") | 109 | @ApiOperation(value="库区管理-编辑", notes="库区管理-编辑") |
110 | + @RequiresPermissions("zone:edit") | ||
108 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) | 111 | @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
109 | public Result<String> edit(@RequestBody Zone zone) { | 112 | public Result<String> edit(@RequestBody Zone zone) { |
110 | zoneService.updateById(zone); | 113 | zoneService.updateById(zone); |
@@ -119,6 +122,7 @@ public class ZoneController extends JeecgController<Zone, IZoneService> { | @@ -119,6 +122,7 @@ public class ZoneController extends JeecgController<Zone, IZoneService> { | ||
119 | */ | 122 | */ |
120 | @AutoLog(value = "库区管理-通过id删除") | 123 | @AutoLog(value = "库区管理-通过id删除") |
121 | @ApiOperation(value="库区管理-通过id删除", notes="库区管理-通过id删除") | 124 | @ApiOperation(value="库区管理-通过id删除", notes="库区管理-通过id删除") |
125 | + @RequiresPermissions("zone:delete") | ||
122 | @DeleteMapping(value = "/delete") | 126 | @DeleteMapping(value = "/delete") |
123 | public Result<String> delete(@RequestParam(name="id",required=true) String id) { | 127 | public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
124 | zoneService.removeById(id); | 128 | zoneService.removeById(id); |
@@ -133,6 +137,7 @@ public class ZoneController extends JeecgController<Zone, IZoneService> { | @@ -133,6 +137,7 @@ public class ZoneController extends JeecgController<Zone, IZoneService> { | ||
133 | */ | 137 | */ |
134 | @AutoLog(value = "库区管理-批量删除") | 138 | @AutoLog(value = "库区管理-批量删除") |
135 | @ApiOperation(value="库区管理-批量删除", notes="库区管理-批量删除") | 139 | @ApiOperation(value="库区管理-批量删除", notes="库区管理-批量删除") |
140 | + @RequiresPermissions("zone:deleteBatch") | ||
136 | @DeleteMapping(value = "/deleteBatch") | 141 | @DeleteMapping(value = "/deleteBatch") |
137 | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { | 142 | public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
138 | this.zoneService.removeByIds(Arrays.asList(ids.split(","))); | 143 | this.zoneService.removeByIds(Arrays.asList(ids.split(","))); |