| | |
| | | @PostMapping("/asnOrder/items/save") |
| | | @ApiOperation("保存主单及明细") |
| | | @PreAuthorize("hasAuthority('manager:asnOrder:save')") |
| | | public R orderAndItem(@RequestBody AsnOrderAndItemsParams params) { |
| | | public R orderAndItem(@RequestBody AsnOrderAndItemsParams params) throws Exception { |
| | | if (Objects.isNull(params)) { |
| | | return R.error("参数不能为空!!"); |
| | | } |
| | | |
| | | return asnOrderService.saveOrderAndItems(params, getLoginUserId()); |
| | | } |
| | | |
| | | @ApiOperation("单据信息修改") |
| | | @PostMapping("/asnOrder/items/update") |
| | | @PreAuthorize("hasAuthority('manager:asnOrder:update')") |
| | | public R orderAndrItemUpdate(@RequestBody AsnOrderAndItemsParams params) { |
| | | public R orderAndrItemUpdate(@RequestBody AsnOrderAndItemsParams params) throws Exception { |
| | | if (Objects.isNull(params)) { |
| | | return R.error("参数不能为空!!"); |
| | | } |
| | | return asnOrderService.updateOrderItem(params, getLoginUserId()); |
| | | } |
| | | |
| | | @ApiOperation("单据批量修改") |
| | | @PostMapping("/asnOrder/batch/update") |
| | | @PreAuthorize("hasAuthority('manager:asnOrder:update')") |
| | | public R batchUpdate(@RequestBody BatchUpdateParam params) { |
| | | if (Objects.isNull(params)) { |
| | | return R.error("参数不能为空!!"); |
| | |
| | | } |
| | | return R.ok(asnOrderService.batchUpdate(params, getLoginUserId())); |
| | | } |
| | | |
| | | @ApiOperation("一键收货") |
| | | @PostMapping("/asnOrder/complete/{id}") |
| | | @PreAuthorize("hasAuthority('manager:asnOrder:update')") |
| | | public R completeOrder(@PathVariable Long id) { |
| | | if (Objects.isNull(id)) { |
| | | return R.error("参数不能为空!!"); |
| | | } |
| | | return asnOrderService.completeOrder(id, getLoginUserId()); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |