mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
生产单管理中的@PreAuthorize权限串修改
This commit is contained in:
+17
-17
@@ -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<Long> 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<Boolean> 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<Boolean> deleteBody(@RequestParam("orderId") Long orderId, @RequestParam("bodyIds") Set<Long> 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<Boolean> 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<Boolean> 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<OrderRespVO> 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<PageResult<OrderRespVO>> getOrderPage(@Valid OrderPageReqVO pageReqVO) {
|
||||
PageResult<OrderDO> 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<List<OrderBodyRespVO>> getRoom(@RequestParam("orderId") Long orderId) {
|
||||
List<OrderBodyRespVO> 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<Map<String,List<?>>> getModule(@RequestParam("orderId") Long orderId) {
|
||||
Map<String,List<?>> 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<List<OrderPlatesDetailReqVO>> 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<List<OrderPartsRespVO>> 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<List<OrderBodyRespVO>> 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<Long> 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<List<GoodsDO>> getGoodsList(@RequestParam("orderId") Long orderId) {
|
||||
List<GoodsDO> 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<String> 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<Map<String, Object>> getOrderPrintData(
|
||||
@RequestParam("orderId") Long orderId,
|
||||
|
||||
Reference in New Issue
Block a user