|
|
@@ -13,6 +13,7 @@ import com.fdkankan.scene.entity.ScenePlus;
|
|
|
import com.fdkankan.scene.httpclient.HaixinClient;
|
|
|
import com.fdkankan.scene.service.IHaixinService;
|
|
|
import com.fdkankan.scene.service.IScenePlusService;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
@@ -25,6 +26,7 @@ import java.util.List;
|
|
|
import java.util.Map;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
+@Slf4j
|
|
|
@Service
|
|
|
public class HaixinServiceImpl implements IHaixinService {
|
|
|
|
|
|
@@ -45,6 +47,8 @@ public class HaixinServiceImpl implements IHaixinService {
|
|
|
@Override
|
|
|
public void sendCadImgToHaixin(String num) throws Exception {
|
|
|
|
|
|
+ log.info("进入场景平面图推送方法");
|
|
|
+
|
|
|
ScenePlus scenePlus = scenePlusService.getScenePlusByNum(num);
|
|
|
|
|
|
String userViewPath = String.format(UploadFilePath.USER_VIEW_PATH, num);
|
|
|
@@ -52,10 +56,12 @@ public class HaixinServiceImpl implements IHaixinService {
|
|
|
if(CollUtil.isEmpty(userKeyS)){
|
|
|
return;
|
|
|
}
|
|
|
+ log.info("user列表文件:{}", JSON.toJSONString(userKeyS));
|
|
|
List<String> cadImgKeys = userKeyS.stream().filter(v->v.contains("cad-style-3-")).collect(Collectors.toList());
|
|
|
if(CollUtil.isEmpty(cadImgKeys)){
|
|
|
return;
|
|
|
}
|
|
|
+ log.info("平面图列表文件:{}", JSON.toJSONString(userKeyS));
|
|
|
String currentTimeMillis = String.valueOf(System.currentTimeMillis());
|
|
|
String tmpPath = String.format(ConstantFilePath.SCENE_USER_PATH_V4, num) + currentTimeMillis + "/";
|
|
|
cadImgKeys.stream().forEach(key->{
|
|
|
@@ -75,6 +81,7 @@ public class HaixinServiceImpl implements IHaixinService {
|
|
|
map.put("img_name", "cad-style-3-" + subgroup + ".jpg");
|
|
|
return map;
|
|
|
}).collect(Collectors.toList());
|
|
|
+ log.info("readme.json:{}", JSON.toJSONString(readme));
|
|
|
FileUtil.writeUtf8String(JSON.toJSONString(readme), tmpPath + "readme.json");
|
|
|
|
|
|
String zipPath = String.format(ConstantFilePath.SCENE_USER_PATH_V4, num) + currentTimeMillis + ".zip";
|
|
|
@@ -90,6 +97,7 @@ public class HaixinServiceImpl implements IHaixinService {
|
|
|
//通知计算结果
|
|
|
this.sendResult(scenePlus.getTaskId(), data.getString("fileNameRemote"));
|
|
|
|
|
|
+
|
|
|
}
|
|
|
|
|
|
private void zip(String sourcePath, String zipPath) throws Exception {
|