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
package com.ruoyi.web;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.domain.ReviewEnterpriseArchive;
import com.ruoyi.domain.vo.ReviewEnterpriseArchiveViewVO;
import com.ruoyi.service.ReviewEnterpriseArchiveService;
import com.ruoyi.web.request.*;
import com.ruoyi.web.response.TaskFindResponse;
import com.ruoyi.web.response.TaskGetInfoResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.skywalking.apm.toolkit.trace.Tag;
import org.apache.skywalking.apm.toolkit.trace.Tags;
import org.apache.skywalking.apm.toolkit.trace.Trace;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
@Api(tags = "车企文件")
@RestController
@RequestMapping("/review/enterprise/archive")
public class ReviewEnterpriseArchiveController extends BaseController {
@Autowired
private ReviewEnterpriseArchiveService reviewEnterpriseArchiveService;
@ApiOperation("分页查询车企文件")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@RequestMapping(method = RequestMethod.POST, value = "/findEnterpriseArchive")
public TableDataInfo<ReviewEnterpriseArchive> findEnterpriseArchive(@Validated @RequestBody ReviewEnterpriseArchiveFindRequest request) {
startPage(request);
return getDataTable(reviewEnterpriseArchiveService.findEnterpriseArchive(request));
}
@ApiOperation("根据任务id分页查询车企文件")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@RequestMapping(method = RequestMethod.POST, value = "/findEnterpriseArchiveByTaskId")
public TableDataInfo<ReviewEnterpriseArchive> findEnterpriseArchiveByTaskId(@Validated @RequestBody ReviewEnterpriseArchiveFindByTaskIdRequest request) {
startPage(request);
return getDataTable(reviewEnterpriseArchiveService.findEnterpriseArchiveByTaskId(request));
}
@ApiOperation("根据id查询")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@RequestMapping(method = RequestMethod.POST, value = "/getById")
public R<ReviewEnterpriseArchive> getInfo(@Validated @RequestBody ReviewEnterpriseArchiveGetInfoRequest request) {
ReviewEnterpriseArchive reviewEnterpriseArchive = reviewEnterpriseArchiveService.getInfo(request);
return R.ok(reviewEnterpriseArchive);
}
@ApiOperation("查询车企文件列表")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@RequestMapping(method = RequestMethod.POST, value = "/findList")
public TableDataInfo<ReviewEnterpriseArchive> findList(@Validated @RequestBody ReviewEnterpriseArchiveFindFileNameListRequest request) {
return getDataTable(reviewEnterpriseArchiveService.findList(request));
}
@ApiOperation("新增车企文件")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@Log(title = "车企文件", businessType = BusinessType.INSERT)
@RequestMapping(method = RequestMethod.POST, value = "/add")
public R<String> addEnterpriseArchive(@Validated @RequestBody ReviewEnterpriseArchive reviewEnterpriseArchive) {
reviewEnterpriseArchiveService.addEnterpriseArchive(reviewEnterpriseArchive);
return R.ok(reviewEnterpriseArchive.getId().toString());
}
@ApiOperation("编辑车企文件")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@Log(title = "编辑车企文件", businessType = BusinessType.UPDATE)
@RequestMapping(method = RequestMethod.POST, value = "/edit")
public R<String> editEnterpriseArchive(@Validated @RequestBody ReviewEnterpriseArchive reviewEnterpriseArchive) {
reviewEnterpriseArchiveService.updateById(reviewEnterpriseArchive);
return R.ok();
}
@ApiOperation("预览企业留档文件")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@RequestMapping(method = RequestMethod.POST, value = "/preview")
public TableDataInfo<ReviewEnterpriseArchiveViewVO> preview(@Validated @RequestBody ReviewEnterpriseArchivePreviewRequest request) {
return getDataTable(reviewEnterpriseArchiveService.view(request.getTaskId()));
}
}