| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.web.bind.annotation.CrossOrigin; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.awt.geom.GeneralPath; |
| | | import java.awt.geom.Point2D; |
| | | import java.math.BigDecimal; |
| | | import java.text.DecimalFormat; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | |
| | | return new ResultMessage(ResponseCodeEnum.SUCCESS.getCode(), ResponseCodeEnum.SUCCESS.getMsg(),uavResultDTOS); |
| | | } |
| | | |
| | | @PostMapping("getUavMore") |
| | | public ResultMessage getUavMore(@RequestBody Map<String, Object> params){ |
| | | //判断是否缺少参数 |
| | | if (!params.containsKey("mac") || !params.containsKey("batch") || !params.containsKey("height1")|| !params.containsKey("uvasize")|| !params.containsKey("height2")) { |
| | | return ResultMessage.fail(ResponseCodeEnum.PARAMETERS_IS_MISSING.getCode(), ResponseCodeEnum.PARAMETERS_IS_MISSING.getMsg()); |
| | | } |
| | | List<UAVResultDTO> uavResultDTOS = uavService.getUav(params); |
| | | if (ObjectUtils.isEmpty(uavResultDTOS)){ |
| | | return new ResultMessage(ResponseCodeEnum.SENSOR_IS_NOT_EXIST,"null"); |
| | | } |
| | | return new ResultMessage(ResponseCodeEnum.SUCCESS.getCode(), ResponseCodeEnum.SUCCESS.getMsg(),uavResultDTOS); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * @Description: 查询组织在哪天有无人机飞行,返回具体日期 |
| | |
| | | return new ResultMessage(ResponseCodeEnum.SUCCESS.getCode(), ResponseCodeEnum.SUCCESS.getMsg(),vo); |
| | | } |
| | | |
| | | @GetMapping("UAVTest") |
| | | public ResultMessage UAVTest(BigDecimal lat, BigDecimal lon, String batch){ |
| | | historySecondUavService.UAVTest(lat, lon, batch); |
| | | return new ResultMessage(); |
| | | } |
| | | |
| | | @GetMapping("UAVUpdateTest") |
| | | public ResultMessage UAVUpdateTest( String batch){ |
| | | historySecondUavService.UAVUpdateTest(batch); |
| | | return new ResultMessage(); |
| | | } |
| | | |
| | | } |