JudgmentController.java
1.74 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
package cn.com.glsx.admin.modules.controller;
import cn.com.glsx.admin.modules.model.export.JudgmentExport;
import cn.com.glsx.admin.modules.model.param.JudgmentSearch;
import cn.com.glsx.admin.modules.service.JudgmentService;
import cn.com.glsx.admin.modules.utils.FdfsUtils;
import com.github.pagehelper.PageInfo;
import com.glsx.plat.core.web.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* 大数据研判 controller
*
* @author yll
*/
@Slf4j
@RestController
@RequestMapping(value = "/judgment")
@Api(value = "大数据研判报表", tags = {"大数据研判报表"})
public class JudgmentController extends AbstractController {
@Autowired
private JudgmentService judgmentService;
@GetMapping("/search")
@ApiOperation(value = "查询大数据研判列表")
public R findJudgmentList(JudgmentSearch judgmentSearch) {
PageInfo pageInfo = judgmentService.findJudgmentList(judgmentSearch);
return R.ok().putPageData(pageInfo);
}
@GetMapping("/export")
@ApiOperation(value = "导出大数据研判报表")
public R<String> exportJudgmentList(JudgmentSearch judgmentSearch) {
String fileName = FdfsUtils.getFileName("大数据研判报表");
List<JudgmentExport> judgmentList = judgmentService.exportJudgmentList(judgmentSearch);
String url = super.uploadExcel(fileName, judgmentList, JudgmentExport.class);
return R.ok().data(url);
}
}