DgLendController.java
4.42 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
package com.pashanhoo.lend.controller;
import com.pashanhoo.archive.entity.vo.DgArchivesSearchRequest;
import com.pashanhoo.common.Result;
import com.pashanhoo.lend.entity.vo.AddDgLendRequest;
import com.pashanhoo.lend.entity.vo.ArchiveLendSearchRequest;
import com.pashanhoo.lend.entity.vo.DgLendSearchRequest;
import com.pashanhoo.lend.entity.vo.UpdateDgLendRequest;
import com.pashanhoo.lend.service.DgLendService;
import com.pashanhoo.lendcatalog.entity.vo.AddDgLendCatalogRequest;
import com.pashanhoo.lendfile.entity.vo.AddDgLendFileRequest;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* <p>
* 档案借阅 前端控制器
* </p>
*
* @author
* @since 2021-11-05
*/
@RestController
@RequestMapping("/system/dgLend/")
@Api(tags = "档案借阅接口")
public class DgLendController {
@Autowired
private DgLendService dglendService;
@PostMapping("search")
@ApiOperation(value = "根据条件进行列表查询")
public Result searchDgLendList(@RequestBody DgLendSearchRequest request) {
return dglendService.searchDgLendList(request);
}
@PostMapping("deleteDanganJyInfo")
@ApiOperation("通过借阅标识码删除借阅记录信息")
public Result deleteDanganJyInfo(@RequestParam String lendBsm){
return dglendService.deleteDanganJyInfo(lendBsm);
}
@PostMapping("danganGh")
@ApiOperation("档案归还")
public Result danganGh(@RequestBody UpdateDgLendRequest ghRequest){
return dglendService.danganGh(ghRequest);
}
@PostMapping("showArchivesForLend")
@ApiOperation("展示可以选择借阅的列表")
public Result showArchivesForLend(@RequestBody ArchiveLendSearchRequest request) {
return dglendService.showArchivesForLend(request);
}
@PostMapping("insertDgLend")
@ApiOperation("新增档案借阅")
public Result insertDgLend(@RequestBody AddDgLendRequest request){
if(dglendService.insertDgLend(request)){
return Result.ok();
}
return Result.error("新增失败");
}
@PostMapping("addLendArchivesInfo")
@ApiOperation(value = "选择要借阅档案List")
public Result addLendArchivesInfo(@RequestBody List<AddDgLendCatalogRequest> archivesList) {
return dglendService.addDestructionArchivesInfo(archivesList);
}
@PostMapping("insertDanganJyFile")
@ApiOperation("批量借阅文件信息")
public Result insertDanganJyFile(@RequestBody List<AddDgLendFileRequest> request){
return dglendService.insertDanganJyFile(request);
}
@PostMapping("queryArchivesInfo")
@ApiOperation(value = "档案列表信息展示")
public Result queryArchivesInfo(@ApiParam("档案借阅记录ID") @RequestParam(value = "bsm_lend") String bsm_lend) {
return dglendService.queryArchivesInfo(bsm_lend);
}
@GetMapping("deleteArchivesInfo")
@ApiOperation(value = "删除档案列表中的档案信息")
public Result deleteArchivesInfo(@ApiParam("档案ID") @RequestParam(value = "bsm_lendcatalog") String bsm_lendcatalog) {
return dglendService.deleteArchivesInfo(bsm_lendcatalog);
}
@GetMapping("getDgLendDetailById")
@ApiOperation(value = "读取明细")
public Result getDgLendDetailById(@ApiParam("档案借阅ID") @RequestParam String id){
return Result.ok(dglendService.getDgLendDetailById(id));
}
@PostMapping("updateDgLend")
@ApiOperation("修改档案借阅")
public Result updateDgLend(@RequestBody UpdateDgLendRequest request){
if(dglendService.updateDgLend(request)) {
return Result.ok("修改成功");
}
return Result.error("修改失败");
}
@PostMapping("updateStateByArchives")
@ApiOperation(value = "新增档案借阅列表中的借阅操作")
public Result updateStateByArchives(@ApiParam("档案业务信息ID列表") @RequestParam(value = "idList") List<String> idList) {
return dglendService.updateStateByArchives(idList);
}
@GetMapping("updateArchivesStateByLend")
@ApiOperation(value = "编辑中的借阅操作")
public Result updateArchivesStateByLend(@ApiParam("档案借阅记录ID") @RequestParam(value = "bsm_lend") String bsm_lend) {
return dglendService.updateArchivesStateByLend(bsm_lend);
}
}