|
@@ -35,6 +35,7 @@ import com.boman.web.core.service.ip.IpTimesService;
|
|
import com.boman.web.core.service.toQianShan.ToQianshanPersonnerService;
|
|
import com.boman.web.core.service.toQianShan.ToQianshanPersonnerService;
|
|
import com.boman.web.core.utils.AuthUtils;
|
|
import com.boman.web.core.utils.AuthUtils;
|
|
import com.boman.web.core.utils.HttpClientUtils;
|
|
import com.boman.web.core.utils.HttpClientUtils;
|
|
|
|
+import lombok.SneakyThrows;
|
|
import org.apache.commons.lang3.BooleanUtils;
|
|
import org.apache.commons.lang3.BooleanUtils;
|
|
import org.apache.ibatis.session.ExecutorType;
|
|
import org.apache.ibatis.session.ExecutorType;
|
|
import org.apache.ibatis.session.SqlSession;
|
|
import org.apache.ibatis.session.SqlSession;
|
|
@@ -970,6 +971,7 @@ public class TaskService {
|
|
/***
|
|
/***
|
|
* 来宜数据匹配(每个小时的35分开始跑数据)
|
|
* 来宜数据匹配(每个小时的35分开始跑数据)
|
|
*/
|
|
*/
|
|
|
|
+ @SneakyThrows
|
|
@Scheduled(cron = "0 35 * * * ? ")
|
|
@Scheduled(cron = "0 35 * * * ? ")
|
|
public void toQianshanData() {
|
|
public void toQianshanData() {
|
|
System.out.println("batchInsert 来宜人员插入开始========");
|
|
System.out.println("batchInsert 来宜人员插入开始========");
|
|
@@ -978,18 +980,32 @@ public class TaskService {
|
|
String token = getToken();
|
|
String token = getToken();
|
|
if (StringUtils.isNotBlank(token)) {
|
|
if (StringUtils.isNotBlank(token)) {
|
|
|
|
|
|
- String startTime = redisService.getCacheObject("toQianShanStartTime");
|
|
|
|
- if (StringUtils.isEmpty(startTime)) {
|
|
|
|
- startTime = "2022-05-14 00:00:00";
|
|
|
|
|
|
+ //String startTime = redisService.getCacheObject("toQianShanStartTime");
|
|
|
|
+ //if (StringUtils.isEmpty(startTime)) {
|
|
|
|
+ //startTime = "2022-05-14 00:00:00";
|
|
|
|
+ //}
|
|
|
|
+
|
|
|
|
+ //数据库查询最新数据
|
|
|
|
+ ToQianshanPersonner toQianshanPersonner = toQianshanPersonnerService.getNewInfo();
|
|
|
|
+ String startTime = "2022-05-1 00:00:00";
|
|
|
|
+ if(toQianshanPersonner != null){
|
|
|
|
+ startTime = toQianshanPersonner.getHiDate();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
+ Date date =df.parse(startTime);
|
|
|
|
+ date.setTime(date.getTime() + 1000);
|
|
|
|
+ startTime = df.format(date);
|
|
|
|
+
|
|
|
|
+
|
|
Map<String, String> paramMap = new HashMap<>();
|
|
Map<String, String> paramMap = new HashMap<>();
|
|
paramMap.put("client_id", "acdf50bd13be4901b64c62b1fee862c0");
|
|
paramMap.put("client_id", "acdf50bd13be4901b64c62b1fee862c0");
|
|
paramMap.put("access_token", token);
|
|
paramMap.put("access_token", token);
|
|
- paramMap.put("rc", "潜山");
|
|
|
|
|
|
+ paramMap.put("rc", "");
|
|
|
|
+ paramMap.put("area", "潜山");
|
|
|
|
|
|
String endTime = DateUtils.formatString(new Date());
|
|
String endTime = DateUtils.formatString(new Date());
|
|
- redisService.setCacheObject("toQianShanStartTime", endTime);
|
|
|
|
|
|
+ //redisService.setCacheObject("toQianShanStartTime", endTime);
|
|
endTime = endTime.replace(" ", "%20");
|
|
endTime = endTime.replace(" ", "%20");
|
|
startTime = startTime.replace(" ", "%20");
|
|
startTime = startTime.replace(" ", "%20");
|
|
paramMap.put("djsjqs", startTime);
|
|
paramMap.put("djsjqs", startTime);
|