|
@@ -5,13 +5,10 @@ import com.fdkankan.common.util.DateUtil;
|
|
|
import com.fdkankan.common.util.FileUtils;
|
|
|
import com.fdkankan.contro.entity.Camera;
|
|
|
import com.fdkankan.contro.entity.ScenePlus;
|
|
|
-import com.fdkankan.contro.entity.ScenePlusExt;
|
|
|
import com.fdkankan.contro.entity.ScenePro;
|
|
|
import com.fdkankan.contro.service.IFdkkLaserService;
|
|
|
-import com.fdkankan.contro.service.IScenePlusService;
|
|
|
import com.fdkankan.web.response.Result;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.http.HttpStatus;
|
|
|
import org.springframework.http.ResponseEntity;
|
|
@@ -20,6 +17,7 @@ import org.springframework.util.ObjectUtils;
|
|
|
import org.springframework.web.client.RestTemplate;
|
|
|
|
|
|
import java.io.File;
|
|
|
+import java.util.Date;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.Map;
|
|
|
|
|
@@ -34,18 +32,14 @@ public class IFdkkLaserServiceImpl implements IFdkkLaserService {
|
|
|
@Value("${4dkk.laserService.host}")
|
|
|
private String laserHost;
|
|
|
|
|
|
- @Autowired
|
|
|
- private IScenePlusService scenePlusService;
|
|
|
-
|
|
|
private RestTemplate restTemplate = new RestTemplate();
|
|
|
|
|
|
- public void updateSceneStatus(String sceneCode, int sceneStatus, String path) {
|
|
|
+ public void updateSceneStatus(String sceneCode, int sceneStatus, String path, Date createTime) {
|
|
|
String url = laserHost + String.format(SAVE_SCENE_URL_TEMPLATE, sceneCode);
|
|
|
Map<String, Object> params = new HashMap<>();
|
|
|
params.put("sceneCode", sceneCode);
|
|
|
params.put("status", sceneStatus);
|
|
|
- ScenePlus scenePlus = scenePlusService.getScenePlusByNum(sceneCode);
|
|
|
- params.put("createTime", DateUtil.date2String(scenePlus.getCreateTime(), null));
|
|
|
+ params.put("createTime", DateUtil.date2String(createTime, null));
|
|
|
if (!ObjectUtils.isEmpty(path)) {
|
|
|
params.put("path", path);
|
|
|
}
|
|
@@ -57,7 +51,7 @@ public class IFdkkLaserServiceImpl implements IFdkkLaserService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- public void syncBuildResult(String sceneNum, String dataSource) {
|
|
|
+ public void syncBuildResult(String sceneNum, String dataSource,Date createTime) {
|
|
|
log.info("激光转台相机构建结果 同步 请求 ");
|
|
|
try {
|
|
|
String jgPath = dataSource;
|
|
@@ -85,7 +79,7 @@ public class IFdkkLaserServiceImpl implements IFdkkLaserService {
|
|
|
FileUtils.copyDirectiory(dataSource + "/results/laserData/cover", jgPath + "/extras");
|
|
|
FileUtils.copyFile(dataSource + "/results/laserData", jgPath, true);
|
|
|
|
|
|
- updateSceneStatus(sceneNum, 2, jgPath + File.separator + "laserData");
|
|
|
+ updateSceneStatus(sceneNum, 2, jgPath + File.separator + "laserData",createTime);
|
|
|
} catch (Exception e) {
|
|
|
log.error("激光转台相机同步失败", e);
|
|
|
}
|