| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | return AjaxResult.success(result); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/editStockInStock") |
| | | @PreAuthorize("@ss.hasPermi('receipt_edit')") |
| | | @ApiOperation("编辑入库记录") |
| | | public AjaxResult editStockInStock(@RequestBody StockInRecordDto stockInRecordDto) { |
| | | return AjaxResult.success(stockInRecordService.editStockInStock(stockInRecordDto)); |
| | | } |
| | | |
| | | @DeleteMapping("") |
| | | @PreAuthorize("@ss.hasPermi('receipt_cancel')") |
| | | @Log(title = "入库管理-删除入库", businessType = BusinessType.DELETE) |
| | | public AjaxResult delete(@RequestBody List<Long> ids) { |
| | | if(CollectionUtils.isEmpty(ids)){ |
| | | if (CollectionUtils.isEmpty(ids)) { |
| | | return AjaxResult.error("请选择至少一条数据"); |
| | | } |
| | | return AjaxResult.success(stockInRecordService.batchDelete(ids)); |
| | |
| | | @PostMapping("/exportStockInRecord") |
| | | @ApiOperation("导出入库记录") |
| | | public void exportStockInRecord(HttpServletResponse response, StockInRecordDto stockInRecordDto) { |
| | | stockInRecordService.exportStockInRecord(response,stockInRecordDto); |
| | | stockInRecordService.exportStockInRecord(response, stockInRecordDto); |
| | | } |
| | | |
| | | } |