| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.moral.api.entity.HistorySecondUav; |
| | | import com.moral.api.entity.Organization; |
| | | import com.moral.api.entity.SpecialDevice; |
| | | import com.moral.api.mapper.HistorySecondUavMapper; |
| | | import com.moral.api.pojo.dto.uav.UAVQueryTimeSlotDTO; |
| | | import com.moral.api.pojo.form.uav.UAVQueryTimeSlotForm; |
| | |
| | | List<Map<String, Object>> timeSlots = new ArrayList<>(); |
| | | dto.setMac(key); |
| | | //根据mac查询设备名称 |
| | | dto.setName((String) specialDeviceService.getSpecialDeviceMapByMac(key).get("name")); |
| | | SpecialDevice specialDevice = specialDeviceService.getSpecialDeviceMapByMac(key); |
| | | if(specialDevice==null) |
| | | return; |
| | | dto.setName(specialDevice.getName()); |
| | | //获取时间段与batch |
| | | value.forEach(listValue -> { |
| | | listValue.forEach((mKey, mValue) -> { |
| | | Date slotStartDate = mValue.get(0).getTime(); |
| | | Date slotStartDate = mValue. get(0).getTime(); |
| | | Date slotEndDate = mValue.get(mValue.size() - 1).getTime(); |
| | | Map<String, Object> dateMap = new HashMap<>(); |
| | | dateMap.put("startTime", slotStartDate); |
| | |
| | | Double Distance = Math.sqrt(MathUtils.mul(planDistance,planDistance)+MathUtils.mul(heightDsitance,heightDsitance)); |
| | | return Distance; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |