| | |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | return AjaxResult.success(stockOutRecordService.batchDelete(ids)); |
| | | } |
| | | |
| | | @DeleteMapping("/pending") |
| | | @Log(title = "出库管理-删除待审批出库", businessType = BusinessType.DELETE) |
| | | @Operation(summary = "删除待审批的出库记录") |
| | | public AjaxResult deletePending(@RequestBody List<Long> ids) { |
| | | if(CollectionUtils.isEmpty(ids)){ |
| | | return AjaxResult.error("请选择至少一条数据"); |
| | | } |
| | | return AjaxResult.success(stockOutRecordService.batchDeletePending(ids)); |
| | | } |
| | | |
| | | @PostMapping("/exportStockOutRecord") |
| | | @Operation(summary = "导出出库记录") |
| | | public void exportStockOutRecord(HttpServletResponse response, StockOutRecordDto stockOutRecordDto) { |
| | | stockOutRecordService.exportStockOutRecord(response,stockOutRecordDto); |
| | | } |
| | | |
| | | @PostMapping("/approve") |
| | | @Log(title = "出库管理-审批出库", businessType = BusinessType.UPDATE) |
| | | @Operation(summary = "批量审批出库记录") |
| | | public AjaxResult approve(@RequestBody StockOutRecordDto approveDto) { |
| | | if(CollectionUtils.isEmpty(approveDto.getIds())){ |
| | | return AjaxResult.error("请选择至少一条数据"); |
| | | } |
| | | stockOutRecordService.batchApprove(approveDto.getIds(), approveDto.getApprovalStatus()); |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | } |