ArchivesBorrowController.java
2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
package com.ruoyi.controller;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.domain.ArchivesBorrow;
import com.ruoyi.domain.ArchivesBox;
import com.ruoyi.service.IArchivesBorrowService;
import com.ruoyi.service.IArchivesBoxService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* 【请填写功能名称】Controller
*
* @author ym
* @date 2022-08-23
*/
@RestController
@RequestMapping("/archives/borrow")
public class ArchivesBorrowController extends BaseController
{
@Autowired
private IArchivesBorrowService archivesBorrowService;
/**
* 查询【请填写功能名称】列表
*/
@PreAuthorize("@ss.hasPermi('archives:borrow:list')")
@GetMapping("/list")
public TableDataInfo list(ArchivesBorrow archivesBorrow)
{
startPage();
archivesBorrow.setStatus("true");
List<ArchivesBorrow> list = archivesBorrowService.selectArchivesBorrowListByFilingDept(archivesBorrow);
return getDataTable(list);
}
@PreAuthorize("@ss.hasPermi('archives:borrow:update')")
@Log(title = "归还", businessType = BusinessType.UPDATE)
@PostMapping("/archivesReturn/{ids}")
public AjaxResult archivesReturn(@PathVariable Long[] ids)
{
archivesBorrowService.archivesReturn(ids);
return success();
}
@PreAuthorize("@ss.hasPermi('archives:borrow:update')")
@Log(title = "续借", businessType = BusinessType.UPDATE)
@PostMapping("/archivesRenew/{ids}")
public AjaxResult archivesRenew(@PathVariable Long[] ids)
{
archivesBorrowService.archivesRenew(ids);
return success();
}
}