| | |
| | | @RequiredArgsConstructor |
| | | public class StockInRecordController { |
| | | |
| | | private StockInRecordService stockInRecordService; |
| | | private final StockInRecordService stockInRecordService; |
| | | |
| | | @GetMapping("/listPage") |
| | | @Log(title = "生产入库-入库管理-列表", businessType = BusinessType.OTHER) |
| | |
| | | return AjaxResult.success(stockInRecordService.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(stockInRecordService.batchDeletePending(ids)); |
| | | } |
| | | |
| | | @PostMapping("/exportStockInRecord") |
| | | @Operation(summary = "导出入库记录") |
| | | public void exportStockInRecord(HttpServletResponse response, StockInRecordDto stockInRecordDto) { |
| | | stockInRecordService.exportStockInRecord(response,stockInRecordDto); |
| | | } |
| | | |
| | | @PostMapping("/approve") |
| | | @Log(title = "入库管理-审批入库", businessType = BusinessType.UPDATE) |
| | | @Operation(summary = "批量审批入库记录") |
| | | public AjaxResult approve(@RequestBody StockInRecordDto approveDto) { |
| | | if(CollectionUtils.isEmpty(approveDto.getIds())){ |
| | | return AjaxResult.error("请选择至少一条数据"); |
| | | } |
| | | stockInRecordService.batchApprove(approveDto.getIds(), approveDto.getApprovalStatus()); |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | } |