From fbd71fd03a3612908fafe14368134fbe31556a68 Mon Sep 17 00:00:00 2001 From: gaoqr <13665037151@163.com> Date: Wed, 19 Jun 2024 11:52:39 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=9F=E4=BA=A7=E5=8D=95=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E4=B8=AD=E7=9A=84@PreAuthorize=E6=9D=83=E9=99=90=E4=B8=B2?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/order/OrderController.java | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/controller/admin/order/OrderController.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/controller/admin/order/OrderController.java index 1dce77e80..7a41e5b66 100644 --- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/controller/admin/order/OrderController.java +++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/controller/admin/order/OrderController.java @@ -70,14 +70,14 @@ public class OrderController { @PostMapping("/create") @Operation(summary = "创建生产单") - @PreAuthorize("@ss.hasPermission('executor:order:create')") + @PreAuthorize("@ss.hasPermission('production:manager-list:create')") public CommonResult createOrder(@Valid @RequestBody OrderSaveReqVO createReqVO) { return success(orderService.createOrder(createReqVO)); } @PutMapping("/update") @Operation(summary = "更新生产单") - @PreAuthorize("@ss.hasPermission('executor:order:update')") + @PreAuthorize("@ss.hasPermission('production:manager-list:edit')") public CommonResult updateOrder(@Valid @RequestBody OrderSaveReqVO updateReqVO) { orderService.updateOrder(updateReqVO); return success(true); @@ -90,7 +90,7 @@ public class OrderController { @Parameter(name = "orderId", description = "生产单编号", required = true, example = "1024"), @Parameter(name = "bodyIds", description = "柜体编号集合", required = true, example = "1,2") }) - @PreAuthorize("@ss.hasPermission('executor:order:delete')") + @PreAuthorize("@ss.hasPermission('production:manager-list:deleteCabinet')") public CommonResult deleteBody(@RequestParam("orderId") Long orderId, @RequestParam("bodyIds") Set bodyIds) { orderService.deleteBodyByOrder(orderId, bodyIds); return success(true); @@ -99,7 +99,7 @@ public class OrderController { @DeleteMapping("/delete") @Operation(summary = "作废") @Parameter(name = "orderId", description = "生产单id", required = true, example = "1") - @PreAuthorize("@ss.hasPermission('executor:order:delete')") + @PreAuthorize("@ss.hasPermission('production:manager-list:nullify')") public CommonResult deleteOrder(@RequestParam("orderId") Long orderId) { orderService.deleteOrder(orderId); return success(true); @@ -108,7 +108,7 @@ public class OrderController { @PutMapping("/restore") @Operation(summary = "还原") @Parameter(name = "orderId", description = "生产单id", required = true, example = "1") - @PreAuthorize("@ss.hasPermission('executor:order:update')") + @PreAuthorize("@ss.hasPermission('production:manager-list:backOrder')") public CommonResult restoreOrder(@RequestBody JSONObject jsonObject) { Long orderId = jsonObject.getLong("orderId"); orderService.restoreOrder(orderId); @@ -118,7 +118,7 @@ public class OrderController { @GetMapping("/get") @Operation(summary = "获得(单个)生产单") @Parameter(name = "id", description = "编号", required = true, example = "1024") - @PreAuthorize("@ss.hasPermission('executor:order:query')") + @PreAuthorize("@ss.hasPermission('production:manager-list:detail')") public CommonResult getOrder(@RequestParam("id") Long id) { OrderDO order = orderService.getOrder(id); return success(BeanUtils.toBean(order, OrderRespVO.class)); @@ -126,7 +126,7 @@ public class OrderController { @GetMapping("/page") @Operation(summary = "获得生产单分页") - @PreAuthorize("@ss.hasPermission('executor:order:query')") + @PreAuthorize("@ss.hasPermission('productManager:List')") public CommonResult> getOrderPage(@Valid OrderPageReqVO pageReqVO) { PageResult pageResult = orderService.getOrderPage(pageReqVO); return success(BeanUtils.toBean(pageResult, OrderRespVO.class)); @@ -142,7 +142,7 @@ public class OrderController { @GetMapping("/get-room") @Operation(summary = "生产单详情-房间和柜体id") @Parameter(name = "orderId", description = "生产单编号", required = true, example = "1024") - @PreAuthorize("@ss.hasPermission('executor:order:query')") + @PreAuthorize("@ss.hasPermission('production:manager-list:detail')") public CommonResult> getRoom(@RequestParam("orderId") Long orderId) { List orderBodyMap = orderService.getOrderBody(orderId); return success(orderBodyMap); @@ -151,7 +151,7 @@ public class OrderController { @GetMapping("/get-module") @Operation(summary = "生产单详情-数量信息") @Parameter(name = "orderId", description = "生产单编号", example = "1024") - @PreAuthorize("@ss.hasPermission('executor:order:query')") + @PreAuthorize("@ss.hasPermission('production:manager-list:detail')") public CommonResult>> getModule(@RequestParam("orderId") Long orderId) { Map> moduleDOList = orderService.getModule(orderId); return success(moduleDOList); @@ -166,7 +166,7 @@ public class OrderController { @Parameter(name = "groupId", description = "加工组编号", example = "1024"), @Parameter(name = "groupName", description = "加工组名称", example = "弧形") }) - @PreAuthorize("@ss.hasPermission('executor:order:query')") + @PreAuthorize("@ss.hasPermission('production:manager-list:detail')") public CommonResult> platesDetails(@RequestParam("orderId") Long orderId, @RequestParam(value = "roomId", required = false) Long roomId, @RequestParam(value = "bodyId", required = false) Long bodyId, @@ -184,7 +184,7 @@ public class OrderController { @Parameter(name = "bodyId", description = "柜体编号", example = "1024"), @Parameter(name = "name", description = "配件名称", example = "1024") }) - @PreAuthorize("@ss.hasPermission('executor:order:query')") + @PreAuthorize("@ss.hasPermission('production:manager-list:detail')") public CommonResult> partsDetails(@RequestParam("orderId") Long orderId, @RequestParam(value = "roomId", required = false) Long roomId, @RequestParam(value = "bodyId", required = false) Long bodyId, @@ -197,14 +197,14 @@ public class OrderController { @GetMapping("/get-body") @Operation(summary = "生产单柜体数据获取") @Parameter(name = "orderId", description = "生产单编号", required = true, example = "1024") - @PreAuthorize("@ss.hasPermission('executor:order:query')") + @PreAuthorize("@ss.hasPermission('production:manager-list:detail')") public CommonResult> getBody(@RequestParam("orderId") Long orderId) { return success(BeanUtils.toBean(orderService.getBody(orderId), OrderBodyRespVO.class)); } @GetMapping("getApiData") @Operation(summary = "生产单api数据导入新增") - @PreAuthorize("@ss.hasPermission('executor:order:getApiData')") + @PreAuthorize("@ss.hasPermission('production:manager-list:create')") public CommonResult test(@RequestParam(value = "orderNo", required = false, defaultValue = "20230809027818") String orderNo) throws InterruptedException, ExecutionException { // return success(orderService.importApiData(orderNo)); @@ -235,7 +235,7 @@ public class OrderController { @Parameter(name = "file", description = "文件", required = true), @Parameter(name = "type", description = "文件类型", required = true) }) - @PreAuthorize("@ss.hasPermission('executor:order:importExcel')") + @PreAuthorize("@ss.hasPermission('production:manager-list:create')") @OperateLog(type = EXPORT) public void exportTest(@RequestPart("file") MultipartFile file, @RequestParam(value = "type", required = false, defaultValue = "true") Integer type, @@ -274,7 +274,7 @@ public class OrderController { @GetMapping("/get-goodsList") @Operation(summary = "生产单所用板材商品信息") @Parameter(name = "orderId", description = "生产单编号", required = true, example = "1024") - @PreAuthorize("@ss.hasPermission('executor:order:query')") + @PreAuthorize("@ss.hasPermission('production:manager-list:detail')") public CommonResult> getGoodsList(@RequestParam("orderId") Long orderId) { List goodsDOS = orderService.getGoodsList(orderId); return success(goodsDOS); @@ -286,7 +286,7 @@ public class OrderController { @Parameter(name = "file", description = "文件", required = true), @Parameter(name = "type", description = "是否强制上传", required = false) }) - @PreAuthorize("@ss.hasPermission('executor:order:upload')") + @PreAuthorize("@ss.hasPermission('production:manager-list:create')") public CommonResult uploadOrderType(@RequestPart("file") MultipartFile file, @RequestParam(value = "type", required = false, defaultValue = "false") Boolean type) { return success(orderService.importTemplate(file,type)); @@ -295,7 +295,7 @@ public class OrderController { @GetMapping("/printing") @Operation(summary = "打印/导出 数据文件") @Parameter(name = "type", description = "文件类型", required = true, example = "0") - @PreAuthorize("@ss.hasPermission('executor:order:query')") + @PreAuthorize("@ss.hasPermission('production:manager-list:export')") @OperateLog(type = EXPORT) public CommonResult> getOrderPrintData( @RequestParam("orderId") Long orderId,