k94314517
2023-12-19 165078645b8cfe800aeda7206e89ebd901c7e6c8
server/dmvisit_admin/src/main/java/com/doumee/task/ScheduleTool.java
@@ -2,6 +2,8 @@
import com.doumee.service.business.impl.hksync.HkSyncImgServiceImpl;
import com.doumee.service.business.impl.hksync.HkSyncOrgUserServiceImpl;
import com.doumee.service.business.impl.hksync.HkSyncVisitServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.EnableScheduling;
@@ -20,6 +22,10 @@
    @Autowired
    private HkSyncImgServiceImpl hkSyncImgService;
    @Autowired
    private HkSyncOrgUserServiceImpl hkSyncOrgUserService;
    @Autowired
    private HkSyncVisitServiceImpl hkSyncVisitService;
    /**
     * 是否开发者
     */
@@ -35,5 +41,29 @@
    public void downloadHkImg() throws Exception {
        hkSyncImgService.downHKImgs(0);
    }
    /**
     * 定时同步组织信息到海康系统
     * @throws Exception
     */
//    @Scheduled(fixedDelay= 60*1000)
//    public void syncOrgData() {
//        hkSyncOrgUserService.syncOrgData();
//    }
    /**
     * 定时同步组织信息到海康系统
     * @throws Exception
     */
    @Scheduled(fixedDelay= 60*1000)
    public void syncVisitData() {
        hkSyncVisitService.syncVisitData();
    }
    /**
     * 定时同步用户信息到海康系统
     * @throws Exception
     */
//    @Scheduled(fixedDelay= 60*1000)
//    public void syncUserData()  {
//        hkSyncImgService.syncUserData();
//    }
}