| | |
| | | CheckInMessageVo vo = new CheckInMessageVo(); |
| | | Map<String, Double> distance = GeodesyUtil.getDistance(xpCheckLocation.getLocationLon() + "," + xpCheckLocation.getLocationLat(), dto.getLongitude() + "," + dto.getLatitude()); |
| | | if(xpCheckLocation.getLocationRange().compareTo(new BigDecimal(distance.get("WGS84"))) >= 0){ |
| | | vo.setMessageType(1); |
| | | vo.setMessageType(2); |
| | | vo.setCheckLocationId(cruiseCheckInRuleLocation.getCheckLocationId()); |
| | | return vo; |
| | | } |
| | |
| | | .withSecond(0); |
| | | long time = endTime.toEpochSecond(ZoneOffset.of("+8")) - now.toEpochSecond(ZoneOffset.of("+8")); |
| | | if((time <= 10 * 60 && time > 10 * 50) || (time <= 3 * 60 && time > 3 * 50)){ |
| | | vo.setMessageType(2); |
| | | vo.setMessageType(1); |
| | | vo.setCheckLocationId(cruiseCheckInRuleLocation.getCheckLocationId()); |
| | | vo.setMessage(time > 10 * 50 ? "距离打卡超时还有10分钟,请尽快前往打卡点" : "距离打卡超时还有3分钟,请尽快前往打卡点"); |
| | | return vo; |