From 2b5a2bb0525cc70d7f44d18b8bcf44f46db8a35e Mon Sep 17 00:00:00 2001 From: jinpengyong <jpy123456> Date: Thu, 31 Aug 2023 16:01:55 +0800 Subject: [PATCH] chore:测试提交 --- screen-api/src/main/java/com/moral/api/controller/CruiserController.java | 38 ++++++++++++++++++++++++++++++++++---- 1 files changed, 34 insertions(+), 4 deletions(-) diff --git a/screen-api/src/main/java/com/moral/api/controller/CruiserController.java b/screen-api/src/main/java/com/moral/api/controller/CruiserController.java index 2001f2b..31f57f0 100644 --- a/screen-api/src/main/java/com/moral/api/controller/CruiserController.java +++ b/screen-api/src/main/java/com/moral/api/controller/CruiserController.java @@ -1,11 +1,13 @@ package com.moral.api.controller; +import com.moral.api.pojo.dto.historySecondCruiser.HistorySecondCruiserResultDTO; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.util.CollectionUtils; import org.springframework.util.ObjectUtils; import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.GetMapping; @@ -16,6 +18,8 @@ import org.springframework.web.multipart.MultipartHttpServletRequest; import java.text.ParseException; +import java.util.ArrayList; +import java.util.HashMap; import java.util.List; import java.util.Map; @@ -89,21 +93,26 @@ return ObjectUtils.isEmpty(response) ? ResultMessage.ok() : ResultMessage.ok(response); } @GetMapping("carTrajectoryNewAvg") - @ApiOperation(value = "���������������������", notes = "���������������������") + @ApiOperation(value = "���������������", notes = "���������������") @ApiImplicitParams(value = { @ApiImplicitParam(name = "token", value = "token", required = true, paramType = "header", dataType = "String"), @ApiImplicitParam(name = "mac", value = "������mac", required = true, paramType = "query", dataType = "String"), @ApiImplicitParam(name = "time1", value = "���������2021-08-18", required = true, paramType = "query", dataType = "String"), @ApiImplicitParam(name = "time2", value = "���������2021-08-18", required = true, paramType = "query", dataType = "String"), - @ApiImplicitParam(name = "type", value = "type", required = true, paramType = "query", dataType = "String") + @ApiImplicitParam(name = "type", value = "������������", required = true, paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "range", value = "������", required = true, paramType = "query", dataType = "int") }) public ResultMessage carTrajectoryNewAvg(HttpServletRequest request) { Map<String, Object> params = WebUtils.getParametersStartingWith(request, null); - if (!params.containsKey("mac") || !params.containsKey("time1")|| !params.containsKey("time2")|| !params.containsKey("type")) { + if (!params.containsKey("mac") || !params.containsKey("time1")||!params.containsKey("range")|| !params.containsKey("type")|| !params.containsKey("time2")) { return ResultMessage.fail(ResponseCodeEnum.PARAMETERS_IS_MISSING.getCode(), ResponseCodeEnum.PARAMETERS_IS_MISSING.getMsg()); } - List<Map<String, Object>> response = specialDeviceService.carTrajectory(params,false); + List<HistorySecondCruiserResultDTO> response = specialDeviceService.carTrajectoryNewAvg(params); + + //������������������ + return ObjectUtils.isEmpty(response) ? ResultMessage.ok() : ResultMessage.ok(response); + } /** @@ -208,6 +217,27 @@ return new ResultMessage(ResponseCodeEnum.SUCCESS.getCode(),ResponseCodeEnum.SUCCESS.getMsg(),map); } + + /** + * ��������������������� + * @return + */ + @PostMapping("dailyDustlds") + public ResultMessage dailyDustlds(HttpServletRequest request){ +// List<MultipartFile> files = ((MultipartHttpServletRequest) request).getFiles("files"); + Map<String, Object> params = WebUtils.getParametersStartingWith(request, null); + + + Map<String, Object> map = dustldService.dailyDustlds(null,params); + if (ObjectUtils.isEmpty(map)){ + return ResultMessage.fail(ResponseCodeEnum.TARGET_IS_NULL.getCode(), ResponseCodeEnum.TARGET_IS_NULL.getMsg()); + } + return new ResultMessage(ResponseCodeEnum.SUCCESS.getCode(),ResponseCodeEnum.SUCCESS.getMsg(),map); + } + + + + /** * ������������������ * @param id -- Gitblit v1.8.0