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:
+8
-8
@@ -37,14 +37,14 @@ public class PlanController {
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建排单")
|
||||
@PreAuthorize("@ss.hasPermission('executor:plan:create')")
|
||||
@PreAuthorize("@ss.hasPermission('placeorder:create')")
|
||||
public CommonResult<Long> createPlan(@Validated(CreateGroup.class) @RequestBody PlanSaveReqVO createReqVO) {
|
||||
return success(planService.createPlan(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新排单")
|
||||
@PreAuthorize("@ss.hasPermission('executor:plan:update')")
|
||||
@PreAuthorize("@ss.hasPermission('placeorder:update')")
|
||||
public CommonResult<Boolean> updatePlan(@Validated(UpdateGroup.class) @RequestBody PlanSaveReqVO updateReqVO) {
|
||||
planService.updatePlan(updateReqVO);
|
||||
return success(true);
|
||||
@@ -53,7 +53,7 @@ public class PlanController {
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除排单")
|
||||
@Parameter(name = "id", description = "排单id", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('executor:plan:delete')")
|
||||
@PreAuthorize("@ss.hasPermission('placeorder:delete')")
|
||||
public CommonResult<Boolean> deletePlan(@RequestParam("id") Long id) {
|
||||
return success(planService.deletePlan(id));
|
||||
}
|
||||
@@ -70,7 +70,7 @@ public class PlanController {
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得排单")
|
||||
@Parameter(name = "id", description = "排单id", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('executor:plan:query')")
|
||||
@PreAuthorize("@ss.hasPermission('placeorder:query')")
|
||||
public CommonResult<PlanRespVO> getPlan(@RequestParam("id") Long id) {
|
||||
PlanRespVO plan = planService.getPlan(id);
|
||||
return success(BeanUtils.toBean(plan, PlanRespVO.class));
|
||||
@@ -85,14 +85,14 @@ public class PlanController {
|
||||
|
||||
@GetMapping("getOrderByPlan")
|
||||
@Operation(summary = "根据排单获取生产单分页")
|
||||
@PreAuthorize("@ss.hasPermission('executor:plan:query')")
|
||||
@PreAuthorize("@ss.hasPermission('placeorder:orderlist')")
|
||||
public CommonResult<PageResult<OrderRespVO>> getOrderByPlanId(@Valid PlanOrderPageReqVO pageReqVO) {
|
||||
return success(planService.getOrderByPlanId(pageReqVO));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得排单分页")
|
||||
@PreAuthorize("@ss.hasPermission('executor:plan:query')")
|
||||
@PreAuthorize("@ss.hasPermission('placeorder:query')")
|
||||
public CommonResult<PageResult<PlanRespVO>> getPlanPage(@Valid PlanPageReqVO pageReqVO) {
|
||||
PageResult<PlanRespVO> pageResult = planService.getPlanPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, PlanRespVO.class));
|
||||
@@ -100,14 +100,14 @@ public class PlanController {
|
||||
|
||||
@PostMapping("/setSort")
|
||||
@Operation(summary = "设置排单优先级")
|
||||
@PreAuthorize("@ss.hasPermission('executor:plan:query')")
|
||||
@PreAuthorize("@ss.hasPermission('placeorder:priority')")
|
||||
public CommonResult<Boolean> setSort(@Valid @NotEmpty(message = "参数不能空") @RequestBody List<SortVO> list) {
|
||||
return success(planService.setSort(list));
|
||||
}
|
||||
|
||||
@GetMapping("getNotPlanOrderListPage")
|
||||
@Operation(summary = "获取未排单的板材生产单板材分页列表")
|
||||
@PreAuthorize("@ss.hasPermission('executor:plan:query')")
|
||||
@PreAuthorize("@ss.hasPermission('placeorder:query')")
|
||||
public CommonResult<PageResult<OrderRespVOCopy>> getOrderPage(@Valid OrderPageReqVOCopy pageReqVO) {
|
||||
return success(planService.getOrderPage(pageReqVO));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user