| | |
| | | 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.dto.uav.UAVQueryTimeSlotDTO; |
| | | import com.moral.api.pojo.form.uav.UAVQueryTimeSlotForm; |
| | | import com.moral.api.pojo.vo.uav.UAVQueryDateVO; |
| | | import com.moral.api.pojo.vo.uav.UAVQueryTimeSlotVO; |
| | | import com.moral.api.pojo.vo.uav.UAVQueryTimeSlotVOs; |
| | | import com.moral.api.service.HistorySecondUavService; |
| | | import com.moral.constant.ResponseCodeEnum; |
| | | import com.moral.constant.ResultMessage; |
| | | import com.moral.util.DateUtils; |
| | | import io.swagger.annotations.Api; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * @ClassName UAVController |
| | |
| | | return new ResultMessage(ResponseCodeEnum.SUCCESS.getCode(), ResponseCodeEnum.SUCCESS.getMsg(),vo); |
| | | } |
| | | |
| | | |
| | | @RequestMapping("queryTimeSlot") |
| | | public ResultMessage queryTimeSlot(UAVQueryTimeSlotForm form){ |
| | | //判断是否缺少参数 |
| | | if (!form.valid()) |
| | | return ResultMessage.fail(ResponseCodeEnum.PARAMETERS_IS_MISSING.getCode(), |
| | | ResponseCodeEnum.PARAMETERS_IS_MISSING.getMsg()); |
| | | //处理查询业务 |
| | | List<UAVQueryTimeSlotDTO> dtos = historySecondUavService.queryTimeSlot(form); |
| | | //封装vo层 |
| | | UAVQueryTimeSlotVOs vo = UAVQueryTimeSlotVOs.convert(dtos); |
| | | //返回数据 |
| | | return new ResultMessage(ResponseCodeEnum.SUCCESS.getCode(), ResponseCodeEnum.SUCCESS.getMsg(),vo); |
| | | } |
| | | |
| | | } |