|
@@ -37,11 +37,11 @@ import java.util.*;
|
|
|
|
|
|
/**
|
|
|
* <p>
|
|
|
- * TODO
|
|
|
+ * 处理三维模型
|
|
|
* </p>
|
|
|
*
|
|
|
* @author dengsixing
|
|
|
- * @since 2022/10/19
|
|
|
+ * @since 2025-02-12
|
|
|
**/
|
|
|
@Slf4j
|
|
|
@Service
|
|
@@ -54,6 +54,14 @@ public class BoxModelServiceImpl implements IBoxModelService {
|
|
|
@Autowired
|
|
|
private SceneEditInfoService sceneEditInfoService;
|
|
|
|
|
|
+ /**
|
|
|
+ * 上传并转换obj
|
|
|
+ * @param num 场景码
|
|
|
+ * @param sid sid
|
|
|
+ * @param file obj压缩包
|
|
|
+ * @return ResutData
|
|
|
+ * @throws Exception
|
|
|
+ */
|
|
|
@Override
|
|
|
public ResultData uploadBoxModel(String num, Integer subgroup, String upTime, String sid, MultipartFile file) throws Exception {
|
|
|
|
|
@@ -106,6 +114,10 @@ public class BoxModelServiceImpl implements IBoxModelService {
|
|
|
ZipUtil.unzip("F:\\test\\新建文件夹\\police模型\\police模型.zip","F:\\test\\新建文件夹\\police模型\\maps");
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 保存三维模型数据
|
|
|
+ * @since 2025-02-12
|
|
|
+ */
|
|
|
@Override
|
|
|
public ResultData saveBoxModel(BaseJsonDataParamVO param) throws Exception {
|
|
|
|
|
@@ -129,6 +141,10 @@ public class BoxModelServiceImpl implements IBoxModelService {
|
|
|
return ResultData.ok();
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 删除三维模型
|
|
|
+ * @since 2025-02-12
|
|
|
+ */
|
|
|
@Override
|
|
|
public ResultData deleteBoxModel(DeleteSidParamVO param) throws Exception {
|
|
|
|
|
@@ -147,6 +163,9 @@ public class BoxModelServiceImpl implements IBoxModelService {
|
|
|
return ResultData.ok();
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 叠加场景版本号
|
|
|
+ */
|
|
|
private void updateBoxModels(SceneEditInfo sceneEditInfo, String boxModels){
|
|
|
sceneEditInfoService.update(new LambdaUpdateWrapper<SceneEditInfo>()
|
|
|
.set(SceneEditInfo::getBoxModels, boxModels)
|
|
@@ -154,6 +173,9 @@ public class BoxModelServiceImpl implements IBoxModelService {
|
|
|
.eq(SceneEditInfo::getId, sceneEditInfo.getId()));
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 生成三维模型json数据
|
|
|
+ */
|
|
|
private String createBoxModels(String num, Integer subgroup, String upTime, String sid, JSONObject data, SceneEditInfo sceneEditInfo, int type){
|
|
|
|
|
|
String boxModels = null;
|