提交 | 用户 | 时间
|
ead005
|
1 |
package com.iailab.module.model.api.controller.admin; |
潘 |
2 |
|
|
3 |
import com.iailab.framework.common.pojo.CommonResult; |
|
4 |
import com.iailab.module.model.api.mcs.McsApi; |
a4891a
|
5 |
import com.iailab.module.model.api.mcs.dto.*; |
ead005
|
6 |
import com.iailab.module.model.common.utils.ApiSecurityUtils; |
潘 |
7 |
import io.swagger.v3.oas.annotations.Operation; |
|
8 |
import io.swagger.v3.oas.annotations.tags.Tag; |
|
9 |
import lombok.extern.slf4j.Slf4j; |
|
10 |
import org.springframework.beans.factory.annotation.Autowired; |
a4891a
|
11 |
import org.springframework.web.bind.annotation.*; |
ead005
|
12 |
|
潘 |
13 |
import javax.annotation.Resource; |
|
14 |
import javax.annotation.security.PermitAll; |
|
15 |
import javax.servlet.http.HttpServletRequest; |
|
16 |
import javax.servlet.http.HttpServletResponse; |
a4891a
|
17 |
import java.util.List; |
ead005
|
18 |
|
潘 |
19 |
/** |
|
20 |
* @author PanZhibao |
|
21 |
* @Description |
|
22 |
* @createTime 2024年11月14日 |
|
23 |
*/ |
|
24 |
@Slf4j |
|
25 |
@RestController |
|
26 |
@RequestMapping("/model/api/mcs") |
|
27 |
@Tag(name = "数据") |
|
28 |
public class McsApiController { |
|
29 |
|
|
30 |
@Resource |
|
31 |
private ApiSecurityUtils apiSecurityUtils; |
|
32 |
|
|
33 |
@Autowired |
|
34 |
private McsApi mcsApi; |
|
35 |
|
|
36 |
@PermitAll |
a4891a
|
37 |
@GetMapping("/predict-item/tree") |
潘 |
38 |
@Operation(summary = "预测项树") |
|
39 |
public CommonResult<List<PredictItemTreeDTO>> getPredictItemTree(HttpServletResponse response, HttpServletRequest |
|
40 |
request) throws Exception { |
|
41 |
apiSecurityUtils.validate(request); |
|
42 |
List<PredictItemTreeDTO> list = mcsApi.getPredictItemTree(); |
|
43 |
return CommonResult.success(list); |
|
44 |
} |
|
45 |
|
|
46 |
@PermitAll |
ead005
|
47 |
@PostMapping("/predict-data/charts") |
潘 |
48 |
@Operation(summary = "预测数据图表") |
|
49 |
public CommonResult<PreDataBarLineRespVO> getPreDataCharts(HttpServletResponse response, HttpServletRequest |
|
50 |
request, @RequestBody PreDataBarLineReqVO reqVO) throws Exception { |
|
51 |
apiSecurityUtils.validate(request); |
|
52 |
PreDataBarLineRespVO respVO = mcsApi.getPreDataCharts(reqVO); |
|
53 |
return CommonResult.success(respVO); |
|
54 |
} |
|
55 |
|
|
56 |
@PermitAll |
|
57 |
@PostMapping("/predict-data/item-chart") |
|
58 |
@Operation(summary = "预测数据图表") |
|
59 |
public CommonResult<PreDataItemChartRespVO> getPreDataItemChart(HttpServletResponse response, HttpServletRequest |
|
60 |
request, @RequestBody PreDataItemChartReqVO reqVO) throws Exception { |
|
61 |
apiSecurityUtils.validate(request); |
|
62 |
PreDataItemChartRespVO respVO = mcsApi.getPreDataItemChart(reqVO); |
|
63 |
return CommonResult.success(respVO); |
|
64 |
} |
|
65 |
} |