|
@ -13,6 +13,7 @@ import com.ccsens.health.bean.dto.JourneyDto; |
|
|
import com.ccsens.health.bean.po.*; |
|
|
import com.ccsens.health.bean.po.*; |
|
|
import com.ccsens.health.bean.vo.ClockVo; |
|
|
import com.ccsens.health.bean.vo.ClockVo; |
|
|
import com.ccsens.health.bean.vo.HealthVo; |
|
|
import com.ccsens.health.bean.vo.HealthVo; |
|
|
|
|
|
import com.ccsens.health.bean.vo.JourneyVo; |
|
|
import com.ccsens.health.persist.dao.RealNameAuthDao; |
|
|
import com.ccsens.health.persist.dao.RealNameAuthDao; |
|
|
import com.ccsens.health.persist.dao.SiteClockInDao; |
|
|
import com.ccsens.health.persist.dao.SiteClockInDao; |
|
|
import com.ccsens.health.persist.dao.SiteDao; |
|
|
import com.ccsens.health.persist.dao.SiteDao; |
|
@ -53,7 +54,9 @@ public class ClockService implements IClockService { |
|
|
@Autowired |
|
|
@Autowired |
|
|
private RedisUtil redisUtil; |
|
|
private RedisUtil redisUtil; |
|
|
@Autowired |
|
|
@Autowired |
|
|
private HealthService healthService; |
|
|
private IHealthService healthService; |
|
|
|
|
|
@Autowired |
|
|
|
|
|
private IConstantService constantService; |
|
|
@Autowired |
|
|
@Autowired |
|
|
private IUserService userService; |
|
|
private IUserService userService; |
|
|
@Autowired |
|
|
@Autowired |
|
@ -88,8 +91,11 @@ public class ClockService implements IClockService { |
|
|
throw new BaseException(CodeEnum.PARAM_ERROR); |
|
|
throw new BaseException(CodeEnum.PARAM_ERROR); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//获取打卡范围常量
|
|
|
|
|
|
String r = "0.8"; |
|
|
|
|
|
r = constantService.getByKey("radius"); |
|
|
//判断经纬度是否正确
|
|
|
//判断经纬度是否正确
|
|
|
boolean inCircle = DistanceUtil.isInCircle(site.getLongitude(), site.getLatitude(), clickIn.getLocationLongitude(), clickIn.getLocationLatitude(), "0.8"); |
|
|
boolean inCircle = DistanceUtil.isInCircle(site.getLongitude(), site.getLatitude(), clickIn.getLocationLongitude(), clickIn.getLocationLatitude(), r); |
|
|
log.info("是否在半径内:{}", inCircle); |
|
|
log.info("是否在半径内:{}", inCircle); |
|
|
if (!inCircle) { |
|
|
if (!inCircle) { |
|
|
throw new BaseException(CodeEnum.LOCATION_LONG); |
|
|
throw new BaseException(CodeEnum.LOCATION_LONG); |
|
@ -424,11 +430,20 @@ public class ClockService implements IClockService { |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public List<ClockVo.SiteOverview> selectSiteOverview(ClockDto.SiteOverview param) { |
|
|
public List<ClockVo.SiteOverview> selectSiteOverview(ClockDto.SiteOverview param) { |
|
|
return null; |
|
|
List<ClockVo.SiteOverview> siteOverviewList = siteDao.selectSiteOverview(param.getSiteName(),param.getTime()); |
|
|
|
|
|
return siteOverviewList; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public PageInfo<ClockVo.SiteMemberList> selectSiteMemberList(ClockDto.SelectSiteMember param) { |
|
|
|
|
|
PageHelper.startPage(param.getPageNum(), param.getPageSize()); |
|
|
|
|
|
List<ClockVo.SiteMemberList> siteMemberList = siteDao.selectSiteMemberList(param); |
|
|
|
|
|
return new PageInfo<>(siteMemberList); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public List<ClockVo.SiteMemberList> selectSiteMemberList(ClockDto.SelectSiteMember param) { |
|
|
public List<ClockVo.RealTimeStatistics> getRealTimeStatistics(ClockDto.RealTimeStatistics param) { |
|
|
return null; |
|
|
List<ClockVo.RealTimeStatistics> realTimeStatisticsList = siteDao.getRealTimeStatistics(param); |
|
|
|
|
|
return realTimeStatisticsList; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|