zhanghua
2022-11-03 240a430cd12066a13e35e3da554b3b6afecdf512
ycl-platform/src/main/java/com/ycl/controller/cockpit/aiIot/AIIotController.java
@@ -1,15 +1,19 @@
package com.ycl.controller.cockpit.aiIot;
import com.ycl.api.CommonResult;
import com.ycl.util.CheckApiUtil;
import com.ycl.vo.cockpit.CockpitVO;
import com.ycl.vo.cockpit.aiIot.AIIotVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.ArrayList;
@@ -25,9 +29,13 @@
@RequestMapping("/api/lot")
public class AIIotController {
    @Resource
    private CheckApiUtil checkApiUtil;
    @ApiOperation(value = "监测数据")
    @GetMapping("/detection")
    public CommonResult<AIIotVO.DetectionVO> detection(@Validated CockpitVO.Params1VO params) {
        checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), null, null,null);
        AIIotVO.DetectionVO detectionVO = new AIIotVO.DetectionVO();
        detectionVO.setVideo(121);
        detectionVO.setIndividual(20);
@@ -39,7 +47,9 @@
    @ApiOperation(value = "实时视频监控")
    @GetMapping("/video")
    public CommonResult<List<AIIotVO.VideoVO>> video(@Validated CockpitVO.Params1VO params) {
    @ApiImplicitParam(name = "regionId",value = "地区Id",required = true,dataType = "String")
    public CommonResult<List<AIIotVO.VideoVO>> video(@Validated CockpitVO.Params1VO params, @RequestParam(required = true)String regionId) {
        checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), null, null,regionId);
        List<AIIotVO.VideoVO> videoVOS = new ArrayList<>();
        AIIotVO.VideoVO a = null;
        for (int i = 0; i < 4; i++) {
@@ -60,6 +70,7 @@
    @ApiOperation(value = "AI算法效能")
    @GetMapping("/efficiency")
    public CommonResult<List<AIIotVO.EfficiencyVO>> efficiency(@Validated CockpitVO.Params2VO params) {
        checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), params.getBeginTime(), params.getEndTime(),null);
        List<AIIotVO.EfficiencyVO> efficiencyVOS = new ArrayList<>();
        AIIotVO.EfficiencyVO a = null;
        for (int i = 0; i < 4; i++) {
@@ -75,6 +86,7 @@
    @ApiOperation(value = "渣土联动")
    @GetMapping("/slag_car")
    public CommonResult<AIIotVO.SlagCarVO> slagCar(@Validated CockpitVO.Params1VO params) {
        checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), null, null,null);
        AIIotVO.SlagCarVO slagCarVO = new AIIotVO.SlagCarVO();
        slagCarVO.setCar(236);
        slagCarVO.setTeam(20);
@@ -84,6 +96,7 @@
    @ApiOperation(value = "AI事件统计")
    @GetMapping("/event_statistics")
    public CommonResult<List<AIIotVO.StatisticsVO>> statistics(@Validated CockpitVO.Params2VO params) {
        checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), params.getBeginTime(), params.getEndTime(),null);
        List<AIIotVO.StatisticsVO> statisticsVOS = new ArrayList<>();
        List<AIIotVO.Statistics1VO> statistics1VOS = new ArrayList<>();
        AIIotVO.StatisticsVO a = null;