|
@@ -1,6 +1,7 @@
|
|
|
package com.fdkankan.manage_jp.task;
|
|
|
|
|
|
import com.fdkankan.manage_jp.entity.Project;
|
|
|
+import com.fdkankan.manage_jp.entity.ProjectSceneGps;
|
|
|
import com.fdkankan.manage_jp.entity.ScenePlus;
|
|
|
import com.fdkankan.manage_jp.service.IProjectSceneGpsService;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -8,6 +9,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
|
|
|
@@ -26,10 +28,14 @@ public class TaskService {
|
|
|
log.info("没有需要更新GPS数据的场景");
|
|
|
}
|
|
|
|
|
|
+ List<ProjectSceneGps> list = new ArrayList<>();
|
|
|
for (String num : numList) {
|
|
|
- projectSceneGpsService.addGps(num);
|
|
|
+ ProjectSceneGps sceneGps = projectSceneGpsService.addGps(num);
|
|
|
+ if(sceneGps != null){
|
|
|
+ list.add(sceneGps);
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
+ projectSceneGpsService.saveBatch(list);
|
|
|
|
|
|
}
|
|
|
}
|