| | |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | |
| | | import com.ruoyi.warehouse.mapper.DocumentationBorrowManagementMapper; |
| | | import com.ruoyi.warehouse.mapper.DocumentationReturnManagementMapper; |
| | | import com.ruoyi.warehouse.pojo.DocumentationBorrowManagement; |
| | | import com.ruoyi.warehouse.pojo.DocumentationReturnManagement; |
| | | import com.ruoyi.warehouse.pojo.Warehouse; |
| | | import com.ruoyi.warehouse.service.DocumentationBorrowManagementService; |
| | | import com.ruoyi.warehouse.service.WarehouseService; |
| | |
| | | private DocumentationBorrowManagementService documentationBorrowManagementService; |
| | | @Autowired |
| | | private DocumentationBorrowManagementMapper documentationBorrowManagementMapper; |
| | | @Autowired |
| | | private DocumentationReturnManagementMapper documentationReturnManagementMapper; |
| | | @GetMapping("/listPage") |
| | | @ApiOperation("文档借阅管理-借阅分页查询") |
| | | @Log(title = "文档借阅管理-借阅分页查询", businessType = BusinessType.OTHER) |
| | | public AjaxResult listPage(Page page, DocumentationBorrowManagement documentationBorrowManagement) { |
| | | return AjaxResult.success(documentationBorrowManagementService.listPage(page, documentationBorrowManagement)); |
| | | } |
| | | @GetMapping("/list") |
| | | @ApiOperation("文档借阅管理-借阅查询") |
| | | @Log(title = "文档借阅管理-借阅查询", businessType = BusinessType.OTHER) |
| | | public AjaxResult list() { |
| | | return AjaxResult.success(documentationBorrowManagementService.listAll()); |
| | | } |
| | | @GetMapping("/listPageReturn") |
| | | @ApiOperation("文档借阅管理-归还分页查询") |
| | | @Log(title = "文档借阅管理-归还分页查询", businessType = BusinessType.OTHER) |
| | | public AjaxResult listPageReturn(Page page, DocumentationReturnManagement documentationReturnManagement) { |
| | | return AjaxResult.success(documentationReturnManagementMapper.listPage(page, documentationReturnManagement)); |
| | | } |
| | | @PostMapping("/add") |
| | | @ApiOperation("文档借阅管理-借阅") |
| | |
| | | @PutMapping("/revent") |
| | | @ApiOperation("文档借阅管理-归还") |
| | | @Log(title = "文档借阅管理-归还", businessType = BusinessType.UPDATE) |
| | | public AjaxResult reventdbm(@RequestBody DocumentationBorrowManagement documentationBorrowManagement) { |
| | | return AjaxResult.success(documentationBorrowManagementService.reventdbm(documentationBorrowManagement)); |
| | | public AjaxResult revent(@RequestBody DocumentationReturnManagement documentationReturnManagement) { |
| | | return AjaxResult.success(documentationBorrowManagementService.reventdbm(documentationReturnManagement)); |
| | | } |
| | | @PutMapping("/update") |
| | | @ApiOperation("文档借阅管理-更新") |
| | | @Log(title = "文档借阅管理-更新", businessType = BusinessType.UPDATE) |
| | | public AjaxResult update(@RequestBody DocumentationBorrowManagement documentationBorrowManagement) { |
| | | return AjaxResult.success(documentationBorrowManagementService.updateById(documentationBorrowManagement)); |
| | | } |
| | | @PutMapping("/reventUpdate") |
| | | @ApiOperation("文档借阅管理-归还更新") |
| | | @Log(title = "文档借阅管理-归还更新", businessType = BusinessType.UPDATE) |
| | | public AjaxResult reventupdate(@RequestBody DocumentationReturnManagement documentationReturnManagement) { |
| | | return AjaxResult.success(documentationReturnManagementMapper.updateById(documentationReturnManagement)); |
| | | } |
| | | @DeleteMapping ("/delete") |
| | | @ApiOperation("文档借阅管理-借阅删除") |
| | |
| | | @PostMapping("/exportrevent") |
| | | @ApiOperation("文档借阅管理-归还导出") |
| | | @Log(title = "文档借阅管理-归还导出", businessType = BusinessType.EXPORT) |
| | | public void exportrevent(HttpServletResponse response,DocumentationBorrowManagement documentationBorrowManagement) { |
| | | documentationBorrowManagementService.exportrevent(response,documentationBorrowManagement); |
| | | // List<DocumentationBorrowManagement> documentationBorrowManagements = documentationBorrowManagementMapper.selectList(new LambdaQueryWrapper<DocumentationBorrowManagement>().eq(DocumentationBorrowManagement::getBorrowStatus, "归还")); |
| | | // ExcelUtil<DocumentationBorrowManagement> util = new ExcelUtil<>(DocumentationBorrowManagement.class); |
| | | // util.exportExcel(response, documentationBorrowManagements, "文档借阅-归还记录"); |
| | | public void exportrevent(HttpServletResponse response, DocumentationReturnManagement documentationReturnManagement) { |
| | | documentationBorrowManagementService.exportrevent(response,documentationReturnManagement); |
| | | } |
| | | } |