| | |
| | | package com.iailab.module.model.api.controller.admin; |
| | | |
| | | import com.iailab.framework.apilog.core.annotation.ApiAccessLog; |
| | | import com.iailab.framework.common.pojo.CommonResult; |
| | | import com.iailab.module.model.api.mcs.McsApi; |
| | | import com.iailab.module.model.api.mcs.dto.*; |
| | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import static com.iailab.framework.apilog.core.enums.OperateTypeEnum.EXPORT; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author PanZhibao |
| | |
| | | return CommonResult.success(respVO); |
| | | } |
| | | |
| | | @PostMapping("/predict-data/cur") |
| | | @Operation(summary = "获取当前预测数据") |
| | | public CommonResult<Map<String, List<Object[]>>> getPreDataCur(HttpServletResponse response, HttpServletRequest |
| | | request, @RequestBody PreDataJsonReqVO reqVO)throws Exception { |
| | | apiSecurityUtils.validate(request); |
| | | reqVO.setPredictTime(new Date()); |
| | | Map<String, List<Object[]>> map = mcsApi.getPreDataCur(reqVO); |
| | | return CommonResult.success(map); |
| | | } |
| | | |
| | | @GetMapping("/predict-data/exportValue") |
| | | @Operation(summary = "导出预测数据") |
| | | public void exportPointValue(@RequestParam("itemId") String itemId, |
| | |
| | | List<ScheduleSuggestRespDTO> data = mcsApi.getLastLimitScheduleSuggest(scheduleObj, limit); |
| | | return CommonResult.success(data); |
| | | } |
| | | |
| | | @PostMapping("/schedule-model/out") |
| | | @Operation(summary = "调度模型数据下发") |
| | | public Boolean scheduleModelOut(HttpServletResponse response, HttpServletRequest |
| | | request, @RequestBody MdkScheduleRespDTO dto) throws Exception { |
| | | apiSecurityUtils.validate(request); |
| | | return mcsApi.scheduleModelOut(dto); |
| | | } |
| | | } |