commit
20f8470b55
|
@ -61,14 +61,14 @@ public class ErpPurchaseOrderController {
|
||||||
|
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
@Operation(summary = "创建采购订单")
|
@Operation(summary = "创建采购订单")
|
||||||
@PreAuthorize("@ss.hasPermission('erp:purchase-create:create')")
|
@PreAuthorize("@ss.hasPermission('erp:purchase-order:create')")
|
||||||
public CommonResult<Long> createPurchaseOrder(@Valid @RequestBody ErpPurchaseOrderSaveReqVO createReqVO) {
|
public CommonResult<Long> createPurchaseOrder(@Valid @RequestBody ErpPurchaseOrderSaveReqVO createReqVO) {
|
||||||
return success(purchaseOrderService.createPurchaseOrder(createReqVO));
|
return success(purchaseOrderService.createPurchaseOrder(createReqVO));
|
||||||
}
|
}
|
||||||
|
|
||||||
@PutMapping("/update")
|
@PutMapping("/update")
|
||||||
@Operation(summary = "更新采购订单")
|
@Operation(summary = "更新采购订单")
|
||||||
@PreAuthorize("@ss.hasPermission('erp:purchase-create:update')")
|
@PreAuthorize("@ss.hasPermission('erp:purchase-order:update')")
|
||||||
public CommonResult<Boolean> updatePurchaseOrder(@Valid @RequestBody ErpPurchaseOrderSaveReqVO updateReqVO) {
|
public CommonResult<Boolean> updatePurchaseOrder(@Valid @RequestBody ErpPurchaseOrderSaveReqVO updateReqVO) {
|
||||||
purchaseOrderService.updatePurchaseOrder(updateReqVO);
|
purchaseOrderService.updatePurchaseOrder(updateReqVO);
|
||||||
return success(true);
|
return success(true);
|
||||||
|
@ -76,7 +76,7 @@ public class ErpPurchaseOrderController {
|
||||||
|
|
||||||
@PutMapping("/update-status")
|
@PutMapping("/update-status")
|
||||||
@Operation(summary = "更新采购订单的状态")
|
@Operation(summary = "更新采购订单的状态")
|
||||||
@PreAuthorize("@ss.hasPermission('erp:purchase-create:update-status')")
|
@PreAuthorize("@ss.hasPermission('erp:purchase-order:update-status')")
|
||||||
public CommonResult<Boolean> updatePurchaseOrderStatus(@RequestParam("id") Long id,
|
public CommonResult<Boolean> updatePurchaseOrderStatus(@RequestParam("id") Long id,
|
||||||
@RequestParam("status") Integer status) {
|
@RequestParam("status") Integer status) {
|
||||||
purchaseOrderService.updatePurchaseOrderStatus(id, status);
|
purchaseOrderService.updatePurchaseOrderStatus(id, status);
|
||||||
|
@ -86,7 +86,7 @@ public class ErpPurchaseOrderController {
|
||||||
@DeleteMapping("/delete")
|
@DeleteMapping("/delete")
|
||||||
@Operation(summary = "删除采购订单")
|
@Operation(summary = "删除采购订单")
|
||||||
@Parameter(name = "ids", description = "编号数组", required = true)
|
@Parameter(name = "ids", description = "编号数组", required = true)
|
||||||
@PreAuthorize("@ss.hasPermission('erp:purchase-create:delete')")
|
@PreAuthorize("@ss.hasPermission('erp:purchase-order:delete')")
|
||||||
public CommonResult<Boolean> deletePurchaseOrder(@RequestParam("ids") List<Long> ids) {
|
public CommonResult<Boolean> deletePurchaseOrder(@RequestParam("ids") List<Long> ids) {
|
||||||
purchaseOrderService.deletePurchaseOrder(ids);
|
purchaseOrderService.deletePurchaseOrder(ids);
|
||||||
return success(true);
|
return success(true);
|
||||||
|
@ -95,7 +95,7 @@ public class ErpPurchaseOrderController {
|
||||||
@GetMapping("/get")
|
@GetMapping("/get")
|
||||||
@Operation(summary = "获得采购订单")
|
@Operation(summary = "获得采购订单")
|
||||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||||
@PreAuthorize("@ss.hasPermission('erp:purchase-create:query')")
|
@PreAuthorize("@ss.hasPermission('erp:purchase-order:query')")
|
||||||
public CommonResult<ErpPurchaseOrderRespVO> getPurchaseOrder(@RequestParam("id") Long id) {
|
public CommonResult<ErpPurchaseOrderRespVO> getPurchaseOrder(@RequestParam("id") Long id) {
|
||||||
ErpPurchaseOrderDO purchaseOrder = purchaseOrderService.getPurchaseOrder(id);
|
ErpPurchaseOrderDO purchaseOrder = purchaseOrderService.getPurchaseOrder(id);
|
||||||
if (purchaseOrder == null) {
|
if (purchaseOrder == null) {
|
||||||
|
@ -115,7 +115,7 @@ public class ErpPurchaseOrderController {
|
||||||
|
|
||||||
@GetMapping("/page")
|
@GetMapping("/page")
|
||||||
@Operation(summary = "获得采购订单分页")
|
@Operation(summary = "获得采购订单分页")
|
||||||
@PreAuthorize("@ss.hasPermission('erp:purchase-create:query')")
|
@PreAuthorize("@ss.hasPermission('erp:purchase-order:query')")
|
||||||
public CommonResult<PageResult<ErpPurchaseOrderRespVO>> getPurchaseOrderPage(@Valid ErpPurchaseOrderPageReqVO pageReqVO) {
|
public CommonResult<PageResult<ErpPurchaseOrderRespVO>> getPurchaseOrderPage(@Valid ErpPurchaseOrderPageReqVO pageReqVO) {
|
||||||
PageResult<ErpPurchaseOrderDO> pageResult = purchaseOrderService.getPurchaseOrderPage(pageReqVO);
|
PageResult<ErpPurchaseOrderDO> pageResult = purchaseOrderService.getPurchaseOrderPage(pageReqVO);
|
||||||
return success(buildPurchaseOrderVOPageResult(pageResult));
|
return success(buildPurchaseOrderVOPageResult(pageResult));
|
||||||
|
@ -123,7 +123,7 @@ public class ErpPurchaseOrderController {
|
||||||
|
|
||||||
@GetMapping("/export-excel")
|
@GetMapping("/export-excel")
|
||||||
@Operation(summary = "导出采购订单 Excel")
|
@Operation(summary = "导出采购订单 Excel")
|
||||||
@PreAuthorize("@ss.hasPermission('erp:purchase-create:export')")
|
@PreAuthorize("@ss.hasPermission('erp:purchase-order:export')")
|
||||||
@OperateLog(type = EXPORT)
|
@OperateLog(type = EXPORT)
|
||||||
public void exportPurchaseOrderExcel(@Valid ErpPurchaseOrderPageReqVO pageReqVO,
|
public void exportPurchaseOrderExcel(@Valid ErpPurchaseOrderPageReqVO pageReqVO,
|
||||||
HttpServletResponse response) throws IOException {
|
HttpServletResponse response) throws IOException {
|
||||||
|
|
Loading…
Reference in New Issue