|  |  | 
 |  |  | import com.doumee.service.business.MemberService; | 
 |  |  | import com.doumee.service.business.impl.hksync.HkSyncEmpowerServiceImpl; | 
 |  |  | import com.doumee.service.business.impl.hksync.HkSyncImgServiceImpl; | 
 |  |  | import com.doumee.service.business.impl.hksync.HkSyncParkServiceImpl; | 
 |  |  | import com.doumee.service.business.impl.hksync.ferp.HkSyncOrgUserToHKServiceImpl; | 
 |  |  | import com.doumee.service.business.impl.hksync.HkSyncVisitServiceImpl; | 
 |  |  | import com.doumee.service.business.impl.hksync.fhk.HkSyncVehicleFromHKServiceImpl; | 
 |  |  | 
 |  |  |  * @date 2021-10-10 14:40:35 | 
 |  |  |  * https://www.bejson.com/othertools/cron/  cron 表达式生成地址 | 
 |  |  |  */ | 
 |  |  | //@Component | 
 |  |  | @Component | 
 |  |  | @EnableScheduling | 
 |  |  | public class ScheduleTool { | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     private HkSyncParkServiceImpl hkSyncParkService; | 
 |  |  |     @Autowired | 
 |  |  |     private HkSyncImgServiceImpl hkSyncImgService; | 
 |  |  |     @Autowired | 
 |  |  | 
 |  |  |      * 每分钟拉取一次今日的访客预约数据 | 
 |  |  |      * @throws Exception | 
 |  |  |      */ | 
 |  |  |     @Scheduled(fixedDelay= 60*1000) | 
 |  |  |     @Scheduled(fixedDelay= 30*1000) | 
 |  |  |     public void syncVistAppointData() throws Exception { | 
 |  |  |         if(Constants.DEALING_FROM_HK_VISIT){ | 
 |  |  |             return ; | 
 |  |  | 
 |  |  |         }finally { | 
 |  |  |             Constants.DEALING_FROM_HK_VISIT =false; | 
 |  |  |         } | 
 |  |  |     } | 
 |  |  |     /** | 
 |  |  |      * 每10分钟拉取一次最新访客登记状态(预约成功和已登记) | 
 |  |  |      * @throws Exception | 
 |  |  |      */ | 
 |  |  |     @Scheduled(fixedDelay= 10*60*1000) | 
 |  |  |     public void syncVisitOuttimeStatus() throws Exception { | 
 |  |  |         hkSyncVisitService.getOutTimeVisitRecord(); | 
 |  |  |     } | 
 |  |  |     /** | 
 |  |  |      * 下载海康系统图片数据 | 
 |  |  | 
 |  |  |      */ | 
 |  |  |     @Scheduled(fixedDelay= 60*1000) | 
 |  |  |     public void syncParkBookData()  { | 
 |  |  |         hkSyncImgService.syncParkBookData(); | 
 |  |  |         hkSyncParkService.syncParkBookData(); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |  |