lyhzzz 1 year ago
parent
commit
9e39a2f4e9

+ 19 - 35
README.md

@@ -1,9 +1,21 @@
 ###**v1.0.0**
 ~~~~
 部署须知:
-服务器需提供 obj2gltf,unzip,unrar,ffmpeg命令支持
+服务器需提供 obj2gltf,unzip,unrar,ffmpeg,Obj2Tiles命令支持
+服务器需提供
+/home/ubuntu/bin/PotreeConverter.sh    算法切图,ply,las转3dtiles
+/opt/ossutil/fyun-upload.sh            上传文件
+/opt/ossutil/fyun-download.sh          下载文件
+/mnt/fusion/3dtile.sh                  第三方切图,osgb转3dtiles
+/mnt/fusion/offline/zip_offline.sh     离线包打包
+/mnt/fusion/offline/template           离线包前端资源
 
-提供/home/ubuntu/bin/PotreeConverter.sh 脚本
+/oss/4dkankan/fusion/default/tag_icon_default.svg  默认标注icon
+
+sql
+内置有创库语句,直接执行就好
+4dkankan_v4-init.sql
+fd_fusion_xj-init.sql
 ~~~~
 
 ###**v1.1.0**
@@ -15,30 +27,15 @@
 ###**v1.2.0**
 ~~~~
 1.添加现场图和方位图:
-    t_case_files表 
-    添加字段: user_name,    创建人账号
-              nick_name,    创建人昵称
-              img_type,     0现场图,1方位图
-              content       现场图或方位图json
-    新增接口  /caseFiles/addOrUpdateImg      //添加或修改现场图或方位图
-    新增接口  /caseFiles/info                //根据fileId获取详情
-
 2.添加融合场景设置
-    t_case_settings 表
-    新增接口    /caseSettings/info              //设置列表
-                /caseSettings/saveOrUpdate      //新增或修改
 ~~~~
 
 ###**v1.4.0**
 ~~~~
 合并火调项目
 1.登录修改返回
-    http://120.25.146.52:3090/project/193/interface/api/6602
 2.新增根据场景码获取四维token
-    http://120.25.146.52:3090/project/193/interface/api/9800
 3.新增用户管理
-    http://120.25.146.52:3090/project/193/interface/api/9802
-4.
 ~~~~
 
 
@@ -55,26 +52,13 @@
 ###**xj-1.0.0**
 ~~~~
 1.设置支持上传自定义图片
-    http://120.25.146.52:3090/project/369/interface/api/cat_1905
-2.案件设置地图链接
-    /addNewProject,/updateProject   接口添加参数 mapUrl和latAndLong
+2.案件设置地图链接,接口添加参数 mapUrl和latAndLong
 3.添加场景复制,模型复制,场景下载hash,模型下载hash
-    http://120.25.146.52:3090/project/369/interface/api/cat_1909
 4.添加系统设置管理
-    http://120.25.146.52:3090/project/369/interface/api/cat_1913
 5.添加勘验笔录管理
-    http://120.25.146.52:3090/project/369/interface/api/cat_1917
 6.照片制卷管理
-    http://120.25.146.52:3090/project/369/interface/api/cat_1921
-~~~~
-
-###**xj-1.0.0补充**
-~~~~
-1. /changePassword 修改密码接口修改,去掉code参数,增加oldPassword参数
-2. /web/user/restPassword 新增接口,重置密码
-    http://120.25.146.52:3090/project/369/interface/api/10296
-3.固件管理
-    http://120.25.146.52:3090/project/369/interface/api/cat_1957
-4.APP管理
-    http://120.25.146.52:3090/project/369/interface/api/cat_1961
+7.修改密码接口修改,去掉code参数,增加oldPassword参数
+8.新增接口,重置密码
+9.固件管理
+10.APP管理
 ~~~~

File diff suppressed because it is too large
+ 3958 - 0
doc/4dkankan_v4-init.sql


File diff suppressed because it is too large
+ 1183 - 0
doc/fd_fusion_xj-init.sql


+ 1 - 0
src/main/java/com/fdkankan/fusion/common/enums/RoleKeyEnum.java

@@ -5,6 +5,7 @@ public enum RoleKeyEnum {
     ADMIN(2,"admin" , "平台运营管理员"),
     ADMIN_DEPT(3,"admin-dept" , "组织总管理员"),
     ADMIN_ORDINARY(4,"admin-ordinary" , "普通管理员"),
+    ADMIN_SYSTEM(5,"admin-system" , "系统管理员"),
     ;
 
     private Integer id;

+ 18 - 5
src/main/java/com/fdkankan/fusion/controller/NoLoginController.java

@@ -1,7 +1,12 @@
 package com.fdkankan.fusion.controller;
 
 import cn.hutool.captcha.CaptchaUtil;
+import cn.hutool.captcha.CircleCaptcha;
 import cn.hutool.captcha.LineCaptcha;
+import cn.hutool.captcha.ShearCaptcha;
+import cn.hutool.captcha.generator.CodeGenerator;
+import cn.hutool.captcha.generator.MathGenerator;
+import cn.hutool.captcha.generator.RandomGenerator;
 import cn.hutool.crypto.digest.MD5;
 import cn.hutool.http.ContentType;
 import com.alibaba.fastjson.JSONObject;
@@ -14,17 +19,21 @@ import com.fdkankan.fusion.exception.BusinessException;
 import com.fdkankan.fusion.response.UserAddRequest;
 import com.fdkankan.fusion.service.ITmUserService;
 import com.fdkankan.redis.util.RedisUtil;
+import jdk.nashorn.internal.runtime.regexp.joni.Config;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.compress.utils.OsgiUtils;
 import org.apache.http.HttpHeaders;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.kafka.KafkaProperties;
 import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import java.awt.image.BufferedImage;
 import java.io.IOException;
 import java.nio.charset.StandardCharsets;
 import java.security.Security;
-
+import java.util.Properties;
 @RestController
 @RequestMapping("/notAuth")
 @Slf4j
@@ -41,7 +50,9 @@ public class NoLoginController {
         response.setContentType("image/jpeg");
         String id = request.getSession().getId();
         try {
-            LineCaptcha lineCaptcha = CaptchaUtil.createLineCaptcha(200, 100,4,60);
+            LineCaptcha lineCaptcha = new LineCaptcha(200, 100);
+            RandomGenerator mathGenerator = new RandomGenerator("1234567890",4);
+            lineCaptcha.setGenerator(mathGenerator);
             redisUtil.set(String.format(RedisKeyUtil.loginAuthCode,lineCaptcha.getCode()),lineCaptcha.getCode(),60*5);
             lineCaptcha.write(response.getOutputStream());
             response.getOutputStream().close();
@@ -62,9 +73,11 @@ public class NoLoginController {
         return ResultData.ok( tmUserService.getMsgAuthCode(phoneNum));
     }
 
-    public static void main(String[] args) {
-        String md5Hex = MD5.create().digestHex("Aa123456");
 
-        System.out.println(MD5.create().digestHex(md5Hex));
+    public static void main(String[] args) {
+        String passwordHash = MD5.create().digestHex("6N^KJTG*GkWj3C");
+        System.out.println(passwordHash);
+        String passwordHash2 = MD5.create().digestHex(passwordHash);
+        System.out.println(passwordHash2);
     }
 }

+ 6 - 1
src/main/java/com/fdkankan/fusion/controller/TmRoleController.java

@@ -36,9 +36,14 @@ public class TmRoleController {
         LambdaQueryWrapper<TmRole> wrapper = new LambdaQueryWrapper<>();
         wrapper.ne(TmRole::getRoleKey, RoleKeyEnum.ADMIN_SUPER.getKey());
         TmRole tmRole = tmRoleService.getByUserId((String) StpUtil.getLoginId());
-        if(!tmRole.getRoleKey().equals(RoleKeyEnum.ADMIN_SUPER.getKey()) && !tmRole.getRoleKey().equals(RoleKeyEnum.ADMIN.getKey())){
+        if(!tmRole.getRoleKey().equals(RoleKeyEnum.ADMIN_SUPER.getKey())
+                && !tmRole.getRoleKey().equals(RoleKeyEnum.ADMIN.getKey())){
             wrapper.ne(TmRole::getRoleKey, RoleKeyEnum.ADMIN.getKey());
         }
+        if(!tmRole.getRoleKey().equals(RoleKeyEnum.ADMIN_SUPER.getKey())
+                && !tmRole.getRoleKey().equals(RoleKeyEnum.ADMIN_SYSTEM.getKey())){
+            wrapper.ne(TmRole::getRoleKey, RoleKeyEnum.ADMIN_SYSTEM.getKey());
+        }
         return ResultData.ok(tmRoleService.list(wrapper));
     }
 }

+ 5 - 1
src/main/java/com/fdkankan/fusion/down/CaseDownService.java

@@ -314,7 +314,11 @@ public class CaseDownService {
         }
         jsonObject.put(basePath+caseExtractDetail+caseId, ResultData.ok(caseExtractDetail1));
 
-        jsonObject.put(basePath+caseImg+caseId, ResultData.ok(caseImgService.getByCaseId(caseId,1)));
+        List<CaseImg> caseImgList = caseImgService.getByCaseId(caseId, 1);
+        for (CaseImg img : caseImgList) {
+            downResource(img.getCaseId(),img.getImgUrl());
+        }
+        jsonObject.put(basePath+caseImg+caseId, ResultData.ok(caseImgList));
 
 
         FileUtil.writeString(JSON.toJSONString(jsonObject), FilePath.OFFLINE_PACKAGE_PATH+caseId+"/www/package/"+jsonDataName,"UTF-8");