余料库存:接口权限串修改

This commit is contained in:
gaoqr
2024-09-04 15:31:51 +08:00
parent 5e6422c1f2
commit ce93f91782
@@ -42,21 +42,21 @@ public class RemainPlateController {
@PostMapping("/create")
@Operation(summary = "创建生产单余料板表(单个)")
@PreAuthorize("@ss.hasPermission('placeorder:remain')")
@PreAuthorize("@ss.hasAnyPermissions('manage:remain-plate:create','placeorder:optimize')")
public CommonResult<Boolean> createRemainPlate(@Valid @RequestBody RemainPlateSaveReqVO createReqVO) {
return success(remainPlateService.createRemainPlate(createReqVO));
}
@PostMapping("/createMultiple")
@Operation(summary = "创建生产单余料板表(多个)")
@PreAuthorize("@ss.hasPermission('placeorder:remain')")
@PreAuthorize("@ss.hasAnyPermissions('manage:remain-plate:create','placeorder:optimize')")
public CommonResult<Boolean> createRemainPlateMultiple(@Valid @RequestBody Set<RemainPlateSaveReqVO> createReqVOS) {
return success(remainPlateService.createRemainPlateMultiple(createReqVOS));
}
@PutMapping("/update")
@Operation(summary = "更新生产单余料板表")
@PreAuthorize("@ss.hasPermission('placeorder:remain')")
@PreAuthorize("@ss.hasPermission('manage:remain-plate:update')")
public CommonResult<Boolean> updateRemainPlate(@Valid @RequestBody RemainPlateSaveReqVO updateReqVO) {
remainPlateService.updateRemainPlate(updateReqVO);
return success(true);
@@ -64,7 +64,7 @@ public class RemainPlateController {
@PutMapping("/updateStatus")
@Operation(summary = "余料板批量核销")
@PreAuthorize("@ss.hasPermission('placeorder:remain')")
@PreAuthorize("@ss.hasPermission('manage:remain-plate:update')")
public CommonResult<Boolean> updateRemainPlate(@RequestBody RemainPlateUptReqVO updateReqVO) {
remainPlateService.updateRemainPlateStatus(updateReqVO.getId(),
updateReqVO.getStatus(),
@@ -75,7 +75,7 @@ public class RemainPlateController {
@PutMapping("/revertUpdate")
@Operation(summary = "余料板批量释放")
@PreAuthorize("@ss.hasPermission('placeorder:remain')")
@PreAuthorize("@ss.hasPermission('manage:remain-plate:update')")
public CommonResult<Boolean> revertRemainPlate(@RequestBody RemainPlateUptReqVO updateReqVO) {
remainPlateService.revertRemainPlateStatus(updateReqVO.getId(),updateReqVO.getStatus());
return success(true);
@@ -84,7 +84,7 @@ public class RemainPlateController {
@DeleteMapping("/delete")
@Operation(summary = "删除生产单余料板表")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('placeorder:remain')")
@PreAuthorize("@ss.hasPermission('manage:remain-plate:delete')")
public CommonResult<Boolean> deleteRemainPlate(@RequestParam("id") Set<Long> ids) {
remainPlateService.deleteRemainPlate(ids);
return success(true);
@@ -93,7 +93,7 @@ public class RemainPlateController {
@GetMapping("/get")
@Operation(summary = "获得生产单余料板表")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('placeorder:remain')")
@PreAuthorize("@ss.hasPermission('manage:remain-plate:query')")
public CommonResult<RemainPlateRespVO> getRemainPlate(@RequestParam("id") Long id) {
RemainPlateDO remainPlate = remainPlateService.getRemainPlate(id);
return success(BeanUtils.toBean(remainPlate, RemainPlateRespVO.class));
@@ -101,7 +101,7 @@ public class RemainPlateController {
@GetMapping("/page")
@Operation(summary = "获得生产单余料板表分页")
@PreAuthorize("@ss.hasPermission('placeorder:remain')")
@PreAuthorize("@ss.hasAnyPermissions('manage:remain-plate:query','placeorder:optimize')")
public CommonResult<PageResult<RemainPlateRespVO>> getRemainPlatePage(@Valid RemainPlatePageReqVO pageReqVO) {
PageResult<RemainPlateDO> pageResult = remainPlateService.getRemainPlatePage(pageReqVO);
return success(BeanUtils.toBean(pageResult, RemainPlateRespVO.class));
@@ -109,7 +109,7 @@ public class RemainPlateController {
@GetMapping("/pageAdd")
@Operation(summary = "获得生产单余料板可添加分页")
@PreAuthorize("@ss.hasPermission('placeorder:remain')")
@PreAuthorize("@ss.hasPermission('manage:remain-plate:query')")
public CommonResult<PageResult<RemainPlateRespVO>> getRemainPlatePageToAdd(@Valid RemainPlatePageReqVO pageReqVO) {
PageResult<RemainPlateDO> pageResult = remainPlateService.getRemainPlatePageToAdd(pageReqVO);
return success(BeanUtils.toBean(pageResult, RemainPlateRespVO.class));
@@ -117,7 +117,7 @@ public class RemainPlateController {
@GetMapping("/export-excel")
@Operation(summary = "导出生产单余料板表Excel")
@PreAuthorize("@ss.hasPermission('placeorder:remain')")
@PreAuthorize("@ss.hasPermission('manage:remain-plate:export')")
@OperateLog(type = EXPORT)
public void exportRemainPlateExcel(@Valid RemainPlatePageReqVO pageReqVO,
HttpServletResponse response) throws IOException {