| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.moral.api.entity.HistorySecondUav; |
| | | import com.moral.api.mapper.HistorySecondUavMapper; |
| | | import com.moral.api.pojo.vo.uav.UAVQueryDateVO; |
| | | import com.moral.api.service.HistorySecondUavService; |
| | | import com.moral.constant.ResponseCodeEnum; |
| | | import com.moral.constant.ResultMessage; |
| | | import io.swagger.annotations.Api; |
| | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | |
| | | @Autowired |
| | | HistorySecondUavMapper historySecondUavMapper; |
| | | @Autowired |
| | | HistorySecondUavService historySecondUavService; |
| | | /** |
| | | * @Description: 根据组织id,mac以及时间查询无人机数据 |
| | | * @Param: [] |
| | |
| | | List<HistorySecondUav> historySecondUavs = historySecondUavMapper.selectList(new QueryWrapper<>()); |
| | | return new ResultMessage(ResponseCodeEnum.SUCCESS.getCode(), ResponseCodeEnum.SUCCESS.getMsg(),historySecondUavs); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * @Description: 查询组织在哪天有无人机飞行,返回具体日期 |
| | | * @Param: [organizationId] |
| | | * @return: com.moral.constant.ResultMessage |
| | | * @Author: 陈凯裕 |
| | | * @Date: 2021/9/8 |
| | | */ |
| | | @RequestMapping("queryDate") |
| | | public ResultMessage queryDate(Integer organizationId){ |
| | | //处理查询业务 |
| | | List<Date> dates = historySecondUavService.queryDate(organizationId); |
| | | //封装vo层 |
| | | UAVQueryDateVO vo = UAVQueryDateVO.convert(dates); |
| | | //返回数据 |
| | | return new ResultMessage(ResponseCodeEnum.SUCCESS.getCode(), ResponseCodeEnum.SUCCESS.getMsg(),vo); |
| | | } |
| | | |
| | | } |