|
@@ -12,6 +12,7 @@ import lombok.extern.slf4j.Slf4j;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
+import java.io.File;
|
|
import java.util.HashMap;
|
|
import java.util.HashMap;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
@@ -67,6 +68,23 @@ public class CommonServiceImpl implements ICommonService {
|
|
uploadMap.put(localDataJsonPath, ossDataJsonPath);
|
|
uploadMap.put(localDataJsonPath, ossDataJsonPath);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ //户型图上传
|
|
|
|
+ String floorplanCadPath = ossResultPath + "floorplan_cad";
|
|
|
|
+ String cadPicPathFormat = floorplanCadPath + "/floor-cad-%s.%s";
|
|
|
|
+ String floorCadPath = dataSource + "/results/floorplan_cad";
|
|
|
|
+ //清除原有旧的cad图
|
|
|
|
+ fYunFileServiceInterface.deleteFolder(floorplanCadPath);
|
|
|
|
+ List<String> floorCadList = FileUtils.getFileList(floorCadPath);
|
|
|
|
+ if(CollUtil.isNotEmpty(floorCadList)){
|
|
|
|
+ floorCadList.stream().forEach(str->{
|
|
|
|
+ String substring = str.substring(str.lastIndexOf(File.separator) + 1);
|
|
|
|
+ String[] arr = substring.split("floor");
|
|
|
|
+ String[] arr2 = arr[1].split("\\.");
|
|
|
|
+ //上传到用户编辑目录
|
|
|
|
+ uploadMap.put(str, String.format(cadPicPathFormat, num, arr2[0], arr2[1]));
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+
|
|
//开始上传
|
|
//开始上传
|
|
fYunFileServiceInterface.uploadMulFiles(uploadMap);
|
|
fYunFileServiceInterface.uploadMulFiles(uploadMap);
|
|
}
|
|
}
|