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