|
|
|
|
@ -21,7 +21,6 @@ import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
|
|
|
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
|
|
|
import io.swagger.v3.oas.annotations.Parameter;
|
|
|
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
|
|
@ -53,14 +52,14 @@ public class ErpStockCheckController {
|
|
|
|
|
|
|
|
|
|
@PostMapping("/create")
|
|
|
|
|
@Operation(summary = "创建库存调拨单")
|
|
|
|
|
@PreAuthorize("@ss.hasPermission('erp:stock-check:create')")
|
|
|
|
|
//@PreAuthorize("@ss.hasPermission('erp:stock-check:create')")
|
|
|
|
|
public CommonResult<Long> createStockCheck(@Valid @RequestBody ErpStockCheckSaveReqVO createReqVO) {
|
|
|
|
|
return success(stockCheckService.createStockCheck(createReqVO));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@PutMapping("/update")
|
|
|
|
|
@Operation(summary = "更新库存调拨单")
|
|
|
|
|
@PreAuthorize("@ss.hasPermission('erp:stock-check:update')")
|
|
|
|
|
//@PreAuthorize("@ss.hasPermission('erp:stock-check:update')")
|
|
|
|
|
public CommonResult<Boolean> updateStockCheck(@Valid @RequestBody ErpStockCheckSaveReqVO updateReqVO) {
|
|
|
|
|
stockCheckService.updateStockCheck(updateReqVO);
|
|
|
|
|
return success(true);
|
|
|
|
|
@ -68,7 +67,7 @@ public class ErpStockCheckController {
|
|
|
|
|
|
|
|
|
|
@PutMapping("/update-status")
|
|
|
|
|
@Operation(summary = "更新库存调拨单的状态")
|
|
|
|
|
@PreAuthorize("@ss.hasPermission('erp:stock-check:update-status')")
|
|
|
|
|
//@PreAuthorize("@ss.hasPermission('erp:stock-check:update-status')")
|
|
|
|
|
public CommonResult<Boolean> updateStockCheckStatus(@RequestParam("id") Long id,
|
|
|
|
|
@RequestParam("status") Integer status) {
|
|
|
|
|
stockCheckService.updateStockCheckStatus(id, status);
|
|
|
|
|
@ -78,7 +77,7 @@ public class ErpStockCheckController {
|
|
|
|
|
@DeleteMapping("/delete")
|
|
|
|
|
@Operation(summary = "删除库存调拨单")
|
|
|
|
|
@Parameter(name = "ids", description = "编号数组", required = true)
|
|
|
|
|
@PreAuthorize("@ss.hasPermission('erp:stock-check:delete')")
|
|
|
|
|
//@PreAuthorize("@ss.hasPermission('erp:stock-check:delete')")
|
|
|
|
|
public CommonResult<Boolean> deleteStockCheck(@RequestParam("ids") List<Long> ids) {
|
|
|
|
|
stockCheckService.deleteStockCheck(ids);
|
|
|
|
|
return success(true);
|
|
|
|
|
@ -87,7 +86,7 @@ public class ErpStockCheckController {
|
|
|
|
|
@GetMapping("/get")
|
|
|
|
|
@Operation(summary = "获得库存调拨单")
|
|
|
|
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
|
|
|
|
@PreAuthorize("@ss.hasPermission('erp:stock-check:query')")
|
|
|
|
|
//@PreAuthorize("@ss.hasPermission('erp:stock-check:query')")
|
|
|
|
|
public CommonResult<ErpStockCheckRespVO> getStockCheck(@RequestParam("id") Long id) {
|
|
|
|
|
ErpStockCheckDO stockCheck = stockCheckService.getStockCheck(id);
|
|
|
|
|
if (stockCheck == null) {
|
|
|
|
|
@ -104,7 +103,7 @@ public class ErpStockCheckController {
|
|
|
|
|
|
|
|
|
|
@GetMapping("/page")
|
|
|
|
|
@Operation(summary = "获得库存调拨单分页")
|
|
|
|
|
@PreAuthorize("@ss.hasPermission('erp:stock-check:query')")
|
|
|
|
|
//@PreAuthorize("@ss.hasPermission('erp:stock-check:query')")
|
|
|
|
|
public CommonResult<PageResult<ErpStockCheckRespVO>> getStockCheckPage(@Valid ErpStockCheckPageReqVO pageReqVO) {
|
|
|
|
|
PageResult<ErpStockCheckDO> pageResult = stockCheckService.getStockCheckPage(pageReqVO);
|
|
|
|
|
return success(buildStockCheckVOPageResult(pageResult));
|
|
|
|
|
@ -112,7 +111,7 @@ public class ErpStockCheckController {
|
|
|
|
|
|
|
|
|
|
@GetMapping("/export-excel")
|
|
|
|
|
@Operation(summary = "导出库存调拨单 Excel")
|
|
|
|
|
@PreAuthorize("@ss.hasPermission('erp:stock-check:export')")
|
|
|
|
|
//@PreAuthorize("@ss.hasPermission('erp:stock-check:export')")
|
|
|
|
|
@ApiAccessLog(operateType = EXPORT)
|
|
|
|
|
public void exportStockCheckExcel(@Valid ErpStockCheckPageReqVO pageReqVO,
|
|
|
|
|
HttpServletResponse response) throws IOException {
|
|
|
|
|
|