From c45a2129b51276efd8d290c44e2943e5d3a764e7 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期二, 19 十二月 2023 09:20:47 +0800
Subject: [PATCH] 海康接口对接开发
---
server/dmvisit_admin/src/main/java/com/doumee/task/ScheduleTool.java | 43 ++++++++++++++++++++++++++++++-------------
1 files changed, 30 insertions(+), 13 deletions(-)
diff --git a/server/dmvisit_admin/src/main/java/com/doumee/task/ScheduleTool.java b/server/dmvisit_admin/src/main/java/com/doumee/task/ScheduleTool.java
index 58d4b0c..8818ff7 100644
--- a/server/dmvisit_admin/src/main/java/com/doumee/task/ScheduleTool.java
+++ b/server/dmvisit_admin/src/main/java/com/doumee/task/ScheduleTool.java
@@ -1,24 +1,14 @@
package com.doumee.task;
-import com.doumee.biz.system.SystemDictDataBiz;
import com.doumee.service.business.impl.hksync.HkSyncImgServiceImpl;
-import org.apache.http.client.methods.CloseableHttpResponse;
-import org.apache.http.client.methods.HttpGet;
-import org.apache.http.client.utils.URIBuilder;
-import org.apache.http.impl.client.CloseableHttpClient;
-import org.apache.http.impl.client.HttpClients;
-import org.apache.http.util.EntityUtils;
+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;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
-
-import java.io.IOException;
-import java.net.URI;
-import java.util.Date;
-import java.util.Map;
/**
* 瀹氭椂浠诲姟
@@ -32,6 +22,10 @@
@Autowired
private HkSyncImgServiceImpl hkSyncImgService;
+ @Autowired
+ private HkSyncOrgUserServiceImpl hkSyncOrgUserService;
+ @Autowired
+ private HkSyncVisitServiceImpl hkSyncVisitService;
/**
* 鏄惁寮�鍙戣��
*/
@@ -47,6 +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();
+ }
}
--
Gitblit v1.9.3