| | |
| | | import com.moral.api.service.ManageCoordinateDetailService; |
| | | import com.moral.api.util.RoadUtils; |
| | | import com.moral.constant.RedisConstants; |
| | | import com.moral.util.DateUtils; |
| | | import com.moral.util.TokenUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.web.context.request.RequestContextHolder; |
| | | import org.springframework.web.context.request.ServletRequestAttributes; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.*; |
| | | import java.util.concurrent.TimeUnit; |
| | |
| | | int coordinateId = Integer.parseInt(params.get("coordinateId").toString()); |
| | | QueryWrapper<ManageCoordinateDetail> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("coordinate_id",coordinateId); |
| | | String time1 = params.remove("time1").toString(); |
| | | /* String time1 = params.remove("time1").toString(); |
| | | String time2 = params.remove("time2").toString(); |
| | | long l = DateUtils.compareDateStrDay(time1, time2); |
| | | if (l>0){ |
| | |
| | | }else { |
| | | params.put("time1",time2); |
| | | params.put("time2",time1); |
| | | } |
| | | }*/ |
| | | int j =0; |
| | | List<ManageCoordinateDetail> manageCoordinateDetails = manageCoordinateDetailMapper.selectList(queryWrapper); |
| | | List<CruiserDTO> cruiserInfo = historySecondCruiserMapper.getCruiserInfo(params); |
| | | cruiserInfo = cruiserInfo.stream().distinct().collect(Collectors.toList()); |
| | | // List<CruiserDTO> cruiserInfo = (List<CruiserDTO>) params.get("list"); |
| | | List<HashMap<String, Object>> list = (List<HashMap<String, Object>>) params.get("list"); |
| | | List<CruiserDTO> cruiserInfo = list.stream().distinct() |
| | | .map(map -> { |
| | | |
| | | CruiserDTO p = new CruiserDTO(); |
| | | Double flylat = (Double) map.get("flylat"); |
| | | Double flylon = (Double) map.get("flylon"); |
| | | p.setFlyLat(flylat); |
| | | p.setFlyLon(flylon); |
| | | return p; |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | |
| | | |
| | | // List<CruiserDTO> cruiserInfo = historySecondCruiserMapper.getCruiserInfo(params); |
| | | // cruiserInfo = cruiserInfo.stream().distinct().collect(Collectors.toList()); |
| | | if (ObjectUtils.isEmpty(manageCoordinateDetails)){ |
| | | for (CruiserDTO cruiserDTO : cruiserInfo) { |
| | | Double flyLat = cruiserDTO.getFlyLat(); |