lyhzzz 2 тижнів тому
батько
коміт
3536d6f2d1
35 змінених файлів з 580 додано та 64 видалено
  1. 2 8
      src/main/java/com/fdkankan/fusion/common/ResultCode.java
  2. 1 1
      src/main/java/com/fdkankan/fusion/common/util/CameraUtil.java
  3. 32 0
      src/main/java/com/fdkankan/fusion/common/util/FileMd5Util.java
  4. 3 0
      src/main/java/com/fdkankan/fusion/config/FusionConfig.java
  5. 16 0
      src/main/java/com/fdkankan/fusion/controller/CaseFusionController.java
  6. 11 12
      src/main/java/com/fdkankan/fusion/controller/CaseOverviewController.java
  7. 6 5
      src/main/java/com/fdkankan/fusion/controller/CaseTabulationController.java
  8. 20 1
      src/main/java/com/fdkankan/fusion/controller/CaseTagController.java
  9. 21 0
      src/main/java/com/fdkankan/fusion/controller/UploadFileController.java
  10. 1 1
      src/main/java/com/fdkankan/fusion/entity/CaseEntity.java
  11. 7 1
      src/main/java/com/fdkankan/fusion/entity/CaseTag.java
  12. 3 1
      src/main/java/com/fdkankan/fusion/entity/ScenePlus.java
  13. 54 0
      src/main/java/com/fdkankan/fusion/entity/UploadFile.java
  14. 1 1
      src/main/java/com/fdkankan/fusion/generate/AutoGenerate.java
  15. 5 1
      src/main/java/com/fdkankan/fusion/httpClient/request/AddMediaLibraryParam.java
  16. 3 0
      src/main/java/com/fdkankan/fusion/mapper/IScenePlusMapper.java
  17. 18 0
      src/main/java/com/fdkankan/fusion/mapper/IUploadFileMapper.java
  18. 1 0
      src/main/java/com/fdkankan/fusion/response/CaseVo.java
  19. 67 0
      src/main/java/com/fdkankan/fusion/response/EvidenceVo.java
  20. 1 1
      src/main/java/com/fdkankan/fusion/service/ICaseOverviewService.java
  21. 2 0
      src/main/java/com/fdkankan/fusion/service/IFusionNumService.java
  22. 2 0
      src/main/java/com/fdkankan/fusion/service/IHotIconService.java
  23. 6 0
      src/main/java/com/fdkankan/fusion/service/IScenePlusExtService.java
  24. 0 2
      src/main/java/com/fdkankan/fusion/service/IScenePlusService.java
  25. 23 0
      src/main/java/com/fdkankan/fusion/service/IUploadFileService.java
  26. 45 6
      src/main/java/com/fdkankan/fusion/service/impl/CaseOverviewServiceImpl.java
  27. 3 0
      src/main/java/com/fdkankan/fusion/service/impl/CaseServiceImpl.java
  28. 31 5
      src/main/java/com/fdkankan/fusion/service/impl/FusionNumServiceImpl.java
  29. 16 0
      src/main/java/com/fdkankan/fusion/service/impl/HotIconServiceImpl.java
  30. 25 0
      src/main/java/com/fdkankan/fusion/service/impl/ScenePlusExtServiceImpl.java
  31. 1 16
      src/main/java/com/fdkankan/fusion/service/impl/ScenePlusServiceImpl.java
  32. 107 0
      src/main/java/com/fdkankan/fusion/service/impl/UploadFileServiceImpl.java
  33. 17 2
      src/main/java/com/fdkankan/fusion/service/impl/UploadService.java
  34. 24 0
      src/main/resources/mapper/fusion/ScenePlusMapper.xml
  35. 5 0
      src/main/resources/mapper/fusion/UploadFileMapper.xml

+ 2 - 8
src/main/java/com/fdkankan/fusion/common/ResultCode.java

@@ -62,30 +62,24 @@ public enum ResultCode {
     UPLOAD_FILE_NAME_TO_LONG(7017,"文件名超过长度限制"),
     SCENE_DATA_SOURCE_EMPTY(7018,"场景资源文件为空,无法添加"),
     CASE_HAVE_SETTINGS(7019,"案件已有设置,无法新增"),
-
     SS_SCENE_DOWN_ERROR(7020,"深时点云场景下载失败"),
     FILE_NOT_EXIST(7021,"文件不存在,或已被刪除"),
     HOST_ICON_LIMIT(7022,"案件图标超过上限"),
     CASE_REMOVE_SCENE(7023,"场景被移除"),
-
     CAMERA_SPACE_ERROR(8022, "相机容量不足"),
     INQUEST_ERROR(8023, "该案件已有勘验笔录"),
     INQUEST_ERROR2(8024, "该案件未有勘验笔录"),
     CAMERA_VERSION_EXIT(8025, "相机版本号已存在"),
     CAMERA_VERSION_NOTEXIT(8026, "相机版本号不存在"),
     CAMERA_VERSION_STATUS_ERROR(8027, "相机版本状态错误"),
-
     MEDIO_NOT_EXIT(8028, "媒体库文件不存在"),
     AUTH_ERROR(8029, "授权访问失败"),
     DEL_NUM_ERROR(8030, "无法移除,场景已加入多元融合,请进入多元融合删除场景后再试"),
-
     AI_ERROR(8031, "调用ai出错"),
-
     RECORD_NOT_EXIST(8032, "数据不存在或已删除"),
-
     FUSION_NOT_EXIST(8033,"多元融合不存在"),
-    FUSION_NOT_PERMISSION(40110,"没有编辑权限"),
-    FUSION_NOT_PERMISSION2(40111,"没有查看权限"),
+    FUSION_NOT_PERMISSION(40110,"没有编辑权限,请联系管理员开通"),
+    FUSION_NOT_PERMISSION2(40111,"没有权限,请联系管理员开通"),
     REMOVE_ERROR(60041, "至少保留一个实景三维/多元融合场景"),
 
 ;

+ 1 - 1
src/main/java/com/fdkankan/fusion/common/util/CameraUtil.java

@@ -27,7 +27,7 @@ public class CameraUtil {
             case 5: return "现勘二号/点云";
             case 6: return "现勘二号/Mesh";
             case 7: return "现勘补拍仪";
-            case 3: return "三维模型";
+            case 3: return "媒体库";
             default: return "四维看看/Mesh";
         }
     }

+ 32 - 0
src/main/java/com/fdkankan/fusion/common/util/FileMd5Util.java

@@ -1,9 +1,14 @@
 package com.fdkankan.fusion.common.util;
 
+import org.springframework.web.multipart.MultipartFile;
+
 import java.io.File;
 import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
 import java.security.MessageDigest;
 
+
 public class FileMd5Util {
     public static final String KEY_MD5 = "MD5";
     public static final String CHARSET_ISO88591 = "ISO-8859-1";
@@ -11,6 +16,21 @@ public class FileMd5Util {
     public FileMd5Util() {
     }
 
+    public static String getFileMD5(MultipartFile file)  {
+        try (InputStream is = file.getInputStream()) {
+            MessageDigest digest = MessageDigest.getInstance("MD5");
+            byte[] buffer = new byte[8192];
+            int read;
+            while ((read = is.read(buffer)) > 0) {
+                digest.update(buffer, 0, read);
+            }
+            byte[] hash = digest.digest();
+            return bytesToHex(hash);
+        } catch (Exception e) {
+            return null;
+        }
+    }
+
     public static String getFileMD5(File file) {
         if (file.exists() && file.isFile()) {
             MessageDigest digest = null;
@@ -55,6 +75,18 @@ public class FileMd5Util {
         }
     }
 
+    public static String bytesToHex(byte[] bytes) {
+        StringBuilder hexString = new StringBuilder();
+        for (byte b : bytes) {
+            String hex = Integer.toHexString(0xff & b);
+            if (hex.length() == 1) {
+                hexString.append('0');
+            }
+            hexString.append(hex);
+        }
+        return hexString.toString();
+    }
+
     public static String getFileMD5(String filepath) {
         File file = new File(filepath);
         return getFileMD5(file);

+ 3 - 0
src/main/java/com/fdkankan/fusion/config/FusionConfig.java

@@ -24,4 +24,7 @@ public class FusionConfig {
 
     @Value("${to-haixin.server-url}")
     private String serverUrl;
+
+    @Value("${upload.query-path}")
+    private String queryPath;
 }

+ 16 - 0
src/main/java/com/fdkankan/fusion/controller/CaseFusionController.java

@@ -54,6 +54,8 @@ public class CaseFusionController extends BaseController{
     @Autowired
     IScenePlusService scenePlusService;
     @Autowired
+    IScenePlusExtService scenePlusExtService;
+    @Autowired
     ICommonUploadService commonUploadService;
     @GetMapping("/list")
     public ResultData allList(@RequestParam(required = false) Integer fusionId){
@@ -107,6 +109,8 @@ public class CaseFusionController extends BaseController{
             return ResultData.ok(fusionNumService.addModel(param,model.getModelId(),model.getModelTitle()));
         }
         ScenePlus scenePlus = scenePlusService.getByNum(param.getNum());
+        ScenePlusExt scenePlusExt = scenePlusExtService.getByPlusId(scenePlus.getId());
+        scenePlus.setScenePlusExt(scenePlusExt);
         return ResultData.ok(fusionNumService.add(param,scenePlus,param.getIsObj()));
     }
 
@@ -160,6 +164,12 @@ public class CaseFusionController extends BaseController{
         HashMap<String,ScenePlus> map = new HashMap<>();
         scenePlusList.stream().forEach(e -> map.put(e.getNum(),e));
 
+        List<Long> plusIds = scenePlusList.stream().map(ScenePlus::getId).collect(Collectors.toList());
+        List<ScenePlusExt> extList = scenePlusExtService.getByPlusIds(plusIds);
+        HashMap<Long,ScenePlusExt> mapext = new HashMap<>();
+        extList.stream().forEach(e -> mapext.put(e.getPlusId(),e));
+
+
         for (FusionNum fusionNum : fusionNumList) {
             Transform transform = JSONObject.parseObject(fusionNum.getTransform(),Transform.class);
             FusionNumVo vo = new FusionNumVo();
@@ -176,6 +186,12 @@ public class CaseFusionController extends BaseController{
                         sceneVo.setStatus(scenePlus.getSceneStatus() == -2 ? 2:scenePlus.getSceneStatus());
                         sceneVo.setName(scenePlus.getTitle());
                         sceneVo.setSceneName(scenePlus.getTitle());
+                        sceneVo.setCreateTime(scenePlus.getCreateTime());
+                        ScenePlusExt scenePlusExt = mapext.get(scenePlus.getId());
+                        if(scenePlusExt != null){
+                            sceneVo.setRtkLocation(scenePlusExt.getRtkLocation());
+                            sceneVo.setOrientation(scenePlusExt.getOrientation());
+                        }
                     }
                 }else {
                     sceneVo.setStatus(2);

+ 11 - 12
src/main/java/com/fdkankan/fusion/controller/CaseOverviewController.java

@@ -68,7 +68,7 @@ public class CaseOverviewController extends BaseController{
         CaseOverview caseOverview = null;
         if (overviewId != null) {
              caseOverview = caseOverviewService.getById(overviewId);
-             caseOverviewService.checkLoginUser(caseOverview,null);
+             caseOverviewService.checkLoginUser(caseOverview,null,"view");
         }
         if (StringUtils.isNotBlank(num)) {
             caseOverview = caseOverviewService.getByNumAndSubGroup(num, subGroup);
@@ -79,31 +79,30 @@ public class CaseOverviewController extends BaseController{
     @PostMapping("/addOrUpdate")
     @PushJm(event_content = "添加绘图")
     public ResultData addOrUpdate(@RequestBody CaseOverview caseOverview) {
+        CaseTabulation caseTabulation = new CaseTabulation();
         if(caseOverview.getId() != null){
-            caseOverviewService.checkLoginUser(caseOverviewService.getById(caseOverview.getId()),null);
+            caseOverviewService.checkLoginUser(caseOverviewService.getById(caseOverview.getId()),null,"edit");
+        }else {
+            caseOverview.setPlatformId(getPlatformId());
+            caseOverview.setSysUserId(getSysUserId());
+            caseTabulation.setSysUserId(caseOverview.getSysUserId());
+            caseTabulation.setPlatformId(caseOverview.getPlatformId());
         }
-        caseOverview.setPlatformId(getPlatformId());
-        caseOverview.setSysUserId(getSysUserId());
         if(StringUtils.isNotBlank(caseOverview.getNum()) && caseOverview.getSubGroup() == null){
             caseOverview.setSubGroup(0);
         }
         if(caseOverview.getId() ==null && StringUtils.isBlank(caseOverview.getTitle())){
             Long no = caseOverviewService.getNo(getSysUserId());
-            String title = "平面图"+ DateUtil.format(new Date(),"yyyyMMdd")+"_"+no;
+            String title = "平面图"+ DateUtil.format(new Date(),"yyyyMMdd")+"_"+no +1;
             caseOverview.setTitle(title);
         }
         caseOverviewService.saveOrUpdate(caseOverview);
-        CaseTabulation caseTabulation = new CaseTabulation();
         if (caseOverview.getCaseTabulation() != null) {
             caseTabulation = caseOverview.getCaseTabulation();
         }
-        if(StringUtils.isBlank(caseTabulation.getListCover())){
-            caseTabulation.setListCover(caseOverview.getListCover());
-        }
+        caseTabulation.setListCover(caseOverview.getListCover());
         caseTabulation.setOverviewId(caseOverview.getId());
         caseTabulation.setCaseId(caseOverview.getCaseId());
-        caseTabulation.setSysUserId(caseOverview.getSysUserId());
-        caseTabulation.setPlatformId(caseOverview.getPlatformId());
         caseTabulation.setTitle(caseOverview.getTitle());
         caseTabulationService.addOrUpdate(caseTabulation);
         //同步mesh编辑器
@@ -117,7 +116,7 @@ public class CaseOverviewController extends BaseController{
     @PostMapping("/del")
     public ResultData del(@RequestBody CaseOverview caseOverview) {
         if(caseOverview.getId() != null){
-            caseOverviewService.checkLoginUser(caseOverviewService.getById(caseOverview.getId()),null);
+            caseOverviewService.checkLoginUser(caseOverviewService.getById(caseOverview.getId()),null,"edit");
         }
         caseOverviewService.removeById(caseOverview.getId());
         return ResultData.ok();

+ 6 - 5
src/main/java/com/fdkankan/fusion/controller/CaseTabulationController.java

@@ -62,7 +62,7 @@ public class CaseTabulationController extends BaseController{
         if(caseTabulation == null){
             throw new BusinessException(ResultCode.RECORD_NOT_EXIST);
         }
-        caseOverviewService.checkLoginUser(null,caseTabulation);
+        caseOverviewService.checkLoginUser(null,caseTabulation,"view");
         return ResultData.ok(caseTabulation);
     }
 
@@ -77,11 +77,12 @@ public class CaseTabulationController extends BaseController{
     public ResultData addOrUpdate (@RequestBody CaseTabulation caseTabulation){
 
         if(caseTabulation.getId() != null){
-            caseOverviewService.checkLoginUser(null,caseTabulationService.getById(caseTabulation.getId()));
+            caseOverviewService.checkLoginUser(null,caseTabulationService.getById(caseTabulation.getId()),"edit");
+        }else {
+            caseTabulation.setPlatformId(getPlatformId());
+            caseTabulation.setSysUserId(getSysUserId());
         }
 
-        caseTabulation.setPlatformId(getPlatformId());
-        caseTabulation.setSysUserId(getSysUserId());
         if(caseTabulation.getId() == null && StringUtils.isBlank(caseTabulation.getTitle())){
             Long no = caseTabulationService.getNo(getSysUserId());
             String title = "方位图"+ DateUtil.format(new Date(),"yyyyMMdd")+"_"+no +1;
@@ -114,7 +115,7 @@ public class CaseTabulationController extends BaseController{
     @PostMapping("/del")
     public ResultData del (@RequestBody CaseTabulation caseTabulation){
         if(caseTabulation.getId() != null){
-            caseOverviewService.checkLoginUser(null,caseTabulationService.getById(caseTabulation.getId()));
+            caseOverviewService.checkLoginUser(null,caseTabulationService.getById(caseTabulation.getId()),"edit");
         }
         caseTabulationService.removeById(caseTabulation.getId());
         return ResultData.ok();

+ 20 - 1
src/main/java/com/fdkankan/fusion/controller/CaseTagController.java

@@ -1,16 +1,27 @@
 package com.fdkankan.fusion.controller;
 
 
+import cn.dev33.satoken.stp.StpUtil;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.fdkankan.fusion.aop.PushJm;
 import com.fdkankan.fusion.common.ResultCode;
 import com.fdkankan.fusion.common.ResultData;
+import com.fdkankan.fusion.common.util.UploadToOssUtil;
+import com.fdkankan.fusion.config.FusionConfig;
 import com.fdkankan.fusion.entity.CaseTag;
 import com.fdkankan.fusion.entity.CaseTagPoint;
+import com.fdkankan.fusion.entity.UploadFile;
 import com.fdkankan.fusion.exception.BusinessException;
+import com.fdkankan.fusion.httpClient.FdService;
+import com.fdkankan.fusion.httpClient.client.FdKKClient;
+import com.fdkankan.fusion.httpClient.request.AddMediaLibraryParam;
+import com.fdkankan.fusion.response.EvidenceVo;
 import com.fdkankan.fusion.service.ICaseTagPointService;
 import com.fdkankan.fusion.service.ICaseTagService;
 import com.fdkankan.fusion.service.IHotIconService;
+import com.fdkankan.fusion.service.IUploadFileService;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
@@ -31,7 +42,8 @@ public class CaseTagController {
     ICaseTagService caseTagService;
     @Autowired
     IHotIconService hotIconService;
-
+    @Autowired
+    IUploadFileService uploadFileService;
 
     @PostMapping("/add")
     @PushJm(event_content = "新增案件标注")
@@ -43,8 +55,14 @@ public class CaseTagController {
         //新增时取消icon上次使用标识,增加使用次数,设置新的上次使用标识
         if(caseTag.getHotIconId() !=null){
             hotIconService.addUseNum(caseTag.getHotIconId());
+            if(caseTag.getDictId() == null){
+                Integer dictId = hotIconService.getDictId(caseTag.getHotIconId());
+                caseTag.setDictId(dictId);
+            }
         }
         caseTagService.save(caseTag);
+        uploadFileService.addMediaLiary(caseTag);
+
         return ResultData.ok(caseTag);
     }
 
@@ -71,6 +89,7 @@ public class CaseTagController {
         }
         caseTag.setUpdateTime(null);
         caseTagService.updateById(caseTag);
+        uploadFileService.addMediaLiary(caseTag);
         return ResultData.ok();
     }
 

+ 21 - 0
src/main/java/com/fdkankan/fusion/controller/UploadFileController.java

@@ -0,0 +1,21 @@
+package com.fdkankan.fusion.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author 
+ * @since 2025-09-15
+ */
+@RestController
+@RequestMapping("/fusion/uploadFile")
+public class UploadFileController {
+
+}
+

+ 1 - 1
src/main/java/com/fdkankan/fusion/entity/CaseEntity.java

@@ -112,7 +112,7 @@ public class CaseEntity implements Serializable {
     /**
      * 案发时间
      */
-    @TableField("crime_time")
+    @TableField(value = "crime_time",updateStrategy = FieldStrategy.IGNORED)
     private String crimeTime;
 
     /**

+ 7 - 1
src/main/java/com/fdkankan/fusion/entity/CaseTag.java

@@ -7,6 +7,8 @@ import com.baomidou.mybatisplus.annotation.TableLogic;
 import com.baomidou.mybatisplus.annotation.TableName;
 import java.io.Serializable;
 import java.util.Date;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
 import lombok.Getter;
 import lombok.Setter;
 
@@ -135,5 +137,9 @@ public class CaseTag implements Serializable {
     private String tqStatus;
 
     @TableField("tq_time")
-    private String tqTime;
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date tqTime;
+
+    @TableField(exist = false)
+    private Integer dictId;
 }

+ 3 - 1
src/main/java/com/fdkankan/fusion/entity/ScenePlus.java

@@ -101,7 +101,7 @@ public class ScenePlus implements Serializable {
      * 创建时间
      */
     @TableField("create_time")
-    private Date createTime;
+    private String createTime;
 
     /**
      * 更新时间
@@ -128,6 +128,8 @@ public class ScenePlus implements Serializable {
     @TableField(exist = false)
     private String sceneName;
 
+    @TableField(exist = false)
+    private ScenePlusExt scenePlusExt;
     public String getSceneName() {
         return title;
     }

+ 54 - 0
src/main/java/com/fdkankan/fusion/entity/UploadFile.java

@@ -0,0 +1,54 @@
+package com.fdkankan.fusion.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 
+ * @since 2025-09-15
+ */
+@Getter
+@Setter
+@TableName("t_upload_file")
+public class UploadFile implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    @TableField("file_name")
+    private String fileName;
+
+    @TableField("file_url")
+    private String fileUrl;
+
+    @TableField("file_size")
+    private String fileSize;
+
+    @TableField("file_md5")
+    private String fileMd5;
+
+    @TableField("tb_status")
+    @TableLogic
+    private Integer tbStatus;
+
+    @TableField("create_time")
+    private Date createTime;
+
+    @TableField("update_time")
+    private Date updateTime;
+
+
+}

+ 1 - 1
src/main/java/com/fdkankan/fusion/generate/AutoGenerate.java

@@ -18,7 +18,7 @@ public class AutoGenerate {
         String path =System.getProperty("user.dir") ;
 
         generate(path,"fusion", getTables(new String[]{
-               "t_case_fusion_relation"
+               "t_upload_file"
         }));
 
 //        generate(path,"goods", getTables(new String[]{

+ 5 - 1
src/main/java/com/fdkankan/fusion/httpClient/request/AddMediaLibraryParam.java

@@ -1,5 +1,6 @@
 package com.fdkankan.fusion.httpClient.request;
 
+import com.fdkankan.fusion.response.EvidenceVo;
 import lombok.AllArgsConstructor;
 import lombok.Data;
 import lombok.NoArgsConstructor;
@@ -17,11 +18,14 @@ public class AddMediaLibraryParam {
     private Integer toHaixin = 0;
     private Integer category ;
     private Integer dictId;
+    private String fileMd5;
+    private EvidenceVo content;
 
-    public AddMediaLibraryParam(String fileName, String filePath, String fileSize, Integer dictId) {
+    public AddMediaLibraryParam(String fileName, String filePath, String fileSize,String fileMd5, Integer dictId) {
         this.fileName = fileName;
         this.filePath = filePath;
         this.fileSize = fileSize;
+        this.fileMd5 = fileMd5;
         this.dictId = dictId;
     }
 }

+ 3 - 0
src/main/java/com/fdkankan/fusion/mapper/IScenePlusMapper.java

@@ -1,7 +1,9 @@
 package com.fdkankan.fusion.mapper;
 
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.fdkankan.fusion.entity.ScenePlus;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.fdkankan.fusion.httpClient.request.ManageSceneParam;
 import com.fdkankan.fusion.request.DataParam;
 import com.fdkankan.fusion.response.DataGroupVo;
 import org.apache.ibatis.annotations.Mapper;
@@ -24,4 +26,5 @@ public interface IScenePlusMapper extends BaseMapper<ScenePlus> {
 
     List<DataGroupVo> groupByType(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("cameraIds") List<Long> cameraIds);
 
+    Page<ScenePlus> scenePostPage(Page<Object> objectPage, ManageSceneParam param);
 }

+ 18 - 0
src/main/java/com/fdkankan/fusion/mapper/IUploadFileMapper.java

@@ -0,0 +1,18 @@
+package com.fdkankan.fusion.mapper;
+
+import com.fdkankan.fusion.entity.UploadFile;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 
+ * @since 2025-09-15
+ */
+@Mapper
+public interface IUploadFileMapper extends BaseMapper<UploadFile> {
+
+}

+ 1 - 0
src/main/java/com/fdkankan/fusion/response/CaseVo.java

@@ -16,4 +16,5 @@ public class CaseVo extends CaseEntity {
 
     private Boolean viewAuth = false;
     private Boolean editAuth = false;
+    private Boolean isAuthor = false;
 }

+ 67 - 0
src/main/java/com/fdkankan/fusion/response/EvidenceVo.java

@@ -0,0 +1,67 @@
+package com.fdkankan.fusion.response;
+
+import cn.hutool.core.date.DateUtil;
+import com.fdkankan.fusion.entity.CaseTag;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.apache.commons.lang3.StringUtils;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+public class EvidenceVo {
+    /**
+     * 标题
+     */
+    private String title;
+    /**
+     * 遗留部位
+     */
+    private String leftPosition;
+    /**
+     * 特征描述
+     */
+    private String feature;
+    /**
+     * 提取方法
+     */
+    private String collectionModeName;
+    /**
+     * 提取时间
+     */
+    private String collectedTime;
+    /**
+     * 提取人
+     */
+    private String createAccount;
+    /**
+     * 委托状态 0未送检,1送检中,2完成送检
+     */
+    private Integer status ;
+
+    private Integer hotIconId;
+
+    public EvidenceVo(CaseTag caseTag) {
+        this.title = caseTag.getTagTitle();
+        this.leftPosition = caseTag.getLeaveBehind();
+        this.feature = caseTag.getTagDescribe();
+        this.collectionModeName = caseTag.getGetMethod();
+        this.collectedTime = caseTag.getTqTime() != null ?String.valueOf(caseTag.getTqTime().getTime()) : null;
+        this.createAccount = caseTag.getGetUser();
+        this.status = getTqStatus(caseTag.getTqStatus());
+        this.hotIconId = caseTag.getHotIconId();
+    }
+
+    private Integer getTqStatus(String str){
+        if(StringUtils.isBlank(str)){
+            return 0;
+        }
+        switch (str){
+            case "未送检" : return 0;
+            case "送检中" : return 1;
+            case "完成送检" : return 2;
+            default:return 0;
+        }
+    }
+}

+ 1 - 1
src/main/java/com/fdkankan/fusion/service/ICaseOverviewService.java

@@ -33,5 +33,5 @@ public interface ICaseOverviewService extends IService<CaseOverview> {
 
     void updateCaseByIds(List<Integer> overviewIds, Integer caseId);
 
-    void checkLoginUser(CaseOverview caseOverview, CaseTabulation caseTabulation);
+    void checkLoginUser(CaseOverview caseOverview, CaseTabulation caseTabulation,String pageType);
 }

+ 2 - 0
src/main/java/com/fdkankan/fusion/service/IFusionNumService.java

@@ -46,4 +46,6 @@ public interface IFusionNumService extends IService<FusionNum> {
     HashMap<Integer, FusionNum> getByCaseId(Integer caseId);
 
     FusionNumVo addModel(FusionParam param, Integer modelId,String title);
+    FusionNumVo addModel(FusionParam param, Integer modelId,ScenePlus scenePlus);
+
 }

+ 2 - 0
src/main/java/com/fdkankan/fusion/service/IHotIconService.java

@@ -31,4 +31,6 @@ public interface IHotIconService extends IService<HotIcon> {
     List<HotIcon> getListByFusionId(Integer fusionId);
 
     List<HotIcon> treeList(List<HotIcon> iconList);
+
+    Integer getDictId(Integer hotIconId);
 }

+ 6 - 0
src/main/java/com/fdkankan/fusion/service/IScenePlusExtService.java

@@ -1,8 +1,11 @@
 package com.fdkankan.fusion.service;
 
+import com.fdkankan.fusion.entity.ScenePlus;
 import com.fdkankan.fusion.entity.ScenePlusExt;
 import com.baomidou.mybatisplus.extension.service.IService;
 
+import java.util.List;
+
 /**
  * <p>
  *  服务类
@@ -13,4 +16,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
  */
 public interface IScenePlusExtService extends IService<ScenePlusExt> {
 
+    List<ScenePlusExt> getByPlusIds(List<Long> plusIds);
+
+    ScenePlusExt getByPlusId(Long id);
 }

+ 0 - 2
src/main/java/com/fdkankan/fusion/service/IScenePlusService.java

@@ -26,13 +26,11 @@ public interface IScenePlusService extends IService<ScenePlus> {
 
     List<DataGroupVo> groupByType(DataParam param, List<Long> cameraIds);
 
-
     List<ScenePlus> getByNumListAndAi(List<String> numList);
 
     List<ScenePlus> getByNumList(List<String> numList);
 
     List<ScenePlus> getByUserId(Long userId);
 
-
     Page<ScenePlus>  pageList(ManageSceneParam param);
 }

+ 23 - 0
src/main/java/com/fdkankan/fusion/service/IUploadFileService.java

@@ -0,0 +1,23 @@
+package com.fdkankan.fusion.service;
+
+import com.fdkankan.fusion.entity.CaseTag;
+import com.fdkankan.fusion.entity.UploadFile;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 
+ * @since 2025-09-15
+ */
+public interface IUploadFileService extends IService<UploadFile> {
+
+    void addFile(String oldName, String url, Long length, String fileMD5);
+
+    UploadFile getByMd5(String fileMD5);
+    UploadFile getByFileUrl(String fileUrl);
+
+    void addMediaLiary(CaseTag caseTag);
+}

+ 45 - 6
src/main/java/com/fdkankan/fusion/service/impl/CaseOverviewServiceImpl.java

@@ -14,6 +14,7 @@ import com.fdkankan.fusion.entity.CaseFiles;
 import com.fdkankan.fusion.entity.CaseOverview;
 import com.fdkankan.fusion.entity.CaseTabulation;
 import com.fdkankan.fusion.exception.BusinessException;
+import com.fdkankan.fusion.httpClient.FdService;
 import com.fdkankan.fusion.mapper.ICaseOverviewMapper;
 import com.fdkankan.fusion.request.ExportOverviewParam;
 import com.fdkankan.fusion.service.ICaseFilesService;
@@ -27,7 +28,9 @@ import org.springframework.stereotype.Service;
 
 import java.io.File;
 import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
 import java.util.List;
+import java.util.stream.Collectors;
 
 /**
  * <p>
@@ -167,23 +170,59 @@ public class CaseOverviewServiceImpl extends ServiceImpl<ICaseOverviewMapper, Ca
         }
 
     }
+    @Autowired
+    FdService fdService;
 
     @Override
-    public void checkLoginUser(CaseOverview caseOverview, CaseTabulation caseTabulation) {
+    public void checkLoginUser(CaseOverview caseOverview, CaseTabulation caseTabulation,String pageType) {
         if(caseOverview == null && caseTabulation == null){
             throw new BusinessException(ResultCode.RECORD_NOT_EXIST);
         }
-        Integer loginUserId = Integer.valueOf(StpUtil.getLoginId().toString());
+        List<Integer> caseIds = new ArrayList<>();
         if(caseOverview != null){
-            if(!caseOverview.getSysUserId().equals(loginUserId)){
-                throw new BusinessException(ResultCode.NOT_PER);
+            caseIds = caseFilesService.getByOverviewId(caseOverview.getId()).stream().map(CaseFiles::getCaseId).collect(Collectors.toList());
+            if(caseOverview.getCaseId() != null){
+                caseIds.add(caseOverview.getCaseId());
             }
         }
         if(caseTabulation != null){
-            if(!caseTabulation.getSysUserId().equals(loginUserId)){
-                throw new BusinessException(ResultCode.NOT_PER);
+            caseIds = caseFilesService.getByTabulation(caseTabulation.getId()).stream().map(CaseFiles::getCaseId).collect(Collectors.toList());
+            if(caseTabulation.getCaseId() != null){
+                caseIds.add(caseTabulation.getCaseId());
             }
         }
+        Integer sysUserId = caseOverview != null ? caseOverview.getSysUserId() : caseTabulation.getSysUserId();
+        Integer platformId = caseOverview != null ? caseOverview.getPlatformId() : caseTabulation.getPlatformId();
+
+        if(Integer.valueOf(StpUtil.getLoginId().toString()).equals(sysUserId)){
+            return;
+        }
+        Integer platform_id = (Integer) StpUtil.getExtra("platformId");
+
+        String roleType =  (String) StpUtil.getExtra("roleType");
+        if("super-admin".equals(roleType)){
+            return;
+        }
+        if(roleType.contains("admin") && platformId.equals(platform_id)){
+            return;
+        }
+        if(!caseIds.isEmpty()){
+            Boolean flag = false;
+            for (Integer caseId : caseIds) {
+                try {
+                    fdService.checkCaseAuth(caseId.toString(),null,pageType,StpUtil.getTokenValue());
+                    flag = true;
+                }catch (Exception e){
+
+                }
+            }
+            if(flag){
+                return;
+            }
+        }
+
+
+        throw new BusinessException(ResultCode.NOT_PER);
 
     }
 }

+ 3 - 0
src/main/java/com/fdkankan/fusion/service/impl/CaseServiceImpl.java

@@ -217,6 +217,7 @@ public class CaseServiceImpl extends ServiceImpl<ICaseMapper, CaseEntity> implem
 
         if(Long.valueOf(StpUtil.getLoginId().toString()).equals(caseVo.getSysUserId())){
             caseVo.setViewAuth(true);
+            caseVo.setIsAuthor(true);
             caseVo.setEditAuth(true);
             return caseVo;
         }
@@ -226,11 +227,13 @@ public class CaseServiceImpl extends ServiceImpl<ICaseMapper, CaseEntity> implem
         if("super-admin".equals(roleType)){
             caseVo.setViewAuth(true);
             caseVo.setEditAuth(true);
+            caseVo.setIsAuthor(true);
             return caseVo;
         }
         if(roleType.contains("admin") && caseVo.getPlatformId().equals(platform_id)){
             caseVo.setViewAuth(true);
             caseVo.setEditAuth(true);
+            caseVo.setIsAuthor(true);
             return caseVo;
         }
 

+ 31 - 5
src/main/java/com/fdkankan/fusion/service/impl/FusionNumServiceImpl.java

@@ -6,10 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.fdkankan.fusion.common.ResultCode;
 import com.fdkankan.fusion.common.util.CameraUtil;
 import com.fdkankan.fusion.common.util.NumTypeUtils;
-import com.fdkankan.fusion.entity.CaseFusion;
-import com.fdkankan.fusion.entity.FusionNum;
-import com.fdkankan.fusion.entity.Model;
-import com.fdkankan.fusion.entity.ScenePlus;
+import com.fdkankan.fusion.entity.*;
 import com.fdkankan.fusion.entity.jsonEntity.Transform;
 import com.fdkankan.fusion.exception.BusinessException;
 import com.fdkankan.fusion.mapper.IFusionNumMapper;
@@ -145,7 +142,36 @@ public class FusionNumServiceImpl extends ServiceImpl<IFusionNumMapper, FusionNu
             throw new BusinessException(ResultCode.MODEL_NOT_EXIST);
         }
 
-        return addModel(param,model.getModelId(),scenePlus.getTitle());
+        return addModel(param,model.getModelId(),scenePlus);
+    }
+
+    @Override
+    public FusionNumVo addModel(FusionParam param, Integer modelId,ScenePlus scenePlus) {
+        FusionNum fusionNum = new FusionNum();
+        BeanUtils.copyProperties(param,fusionNum);
+        fusionNum.setFusionId(param.getFusionId());
+        fusionNum.setModelId(modelId);
+        fusionNum.setTransform(JSONObject.toJSONString(param.getTransform()));
+        this.save(fusionNum);
+
+        FusionNumVo vo = new FusionNumVo();
+        SceneVo sceneVo = new SceneVo();
+        BeanUtils.copyProperties(fusionNum,vo);
+        Model model = modelService.getById(modelId);
+        BeanUtils.copyProperties(model,sceneVo);
+        sceneVo.setStatus(2);
+        sceneVo.setSceneName(scenePlus.getTitle());
+        sceneVo.setSourceName(CameraUtil.getSourceName(model.getType()));
+        sceneVo.setName(scenePlus.getTitle());
+        sceneVo.setCreateTime(scenePlus.getCreateTime());
+        ScenePlusExt scenePlusExt = scenePlus.getScenePlusExt();
+        if(scenePlusExt != null){
+            sceneVo.setRtkLocation(scenePlusExt.getRtkLocation());
+            sceneVo.setOrientation(scenePlusExt.getOrientation());
+        }
+
+        vo.setSceneData(sceneVo);
+        return vo;
     }
 
     @Override

+ 16 - 0
src/main/java/com/fdkankan/fusion/service/impl/HotIconServiceImpl.java

@@ -171,4 +171,20 @@ public class HotIconServiceImpl extends ServiceImpl<IHotIconMapper, HotIcon> imp
 
         return result;
     }
+
+    @Override
+    public Integer getDictId(Integer hotIconId) {
+        HotIcon hotIcon = this.getById(hotIconId);
+        if(hotIcon == null){
+            return null;
+        }
+        if(hotIcon.getDictId() != null || hotIcon.getParentId() == null){
+            return hotIcon.getDictId();
+        }
+        HotIcon hotIcon1 = this.getById(hotIcon.getParentId());
+        if(hotIcon1 !=null){
+            return hotIcon1.getDictId();
+        }
+        return null;
+    }
 }

+ 25 - 0
src/main/java/com/fdkankan/fusion/service/impl/ScenePlusExtServiceImpl.java

@@ -1,12 +1,17 @@
 package com.fdkankan.fusion.service.impl;
 
 import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.fdkankan.fusion.entity.ScenePlus;
 import com.fdkankan.fusion.entity.ScenePlusExt;
 import com.fdkankan.fusion.mapper.IScenePlusExtMapper;
 import com.fdkankan.fusion.service.IScenePlusExtService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.stereotype.Service;
 
+import java.util.ArrayList;
+import java.util.List;
+
 /**
  * <p>
  *  服务实现类
@@ -19,4 +24,24 @@ import org.springframework.stereotype.Service;
 @DS("db2")
 public class ScenePlusExtServiceImpl extends ServiceImpl<IScenePlusExtMapper, ScenePlusExt> implements IScenePlusExtService {
 
+    @Override
+    public List<ScenePlusExt> getByPlusIds(List<Long> plusIds) {
+        if(plusIds == null || plusIds.isEmpty()){
+            return new ArrayList<>();
+        }
+        LambdaQueryWrapper<ScenePlusExt> wrapper = new LambdaQueryWrapper<>();
+        wrapper.in(ScenePlusExt::getPlusId,plusIds);
+        return this.list(wrapper);
+    }
+
+    @Override
+    public ScenePlusExt getByPlusId(Long id) {
+        LambdaQueryWrapper<ScenePlusExt> wrapper = new LambdaQueryWrapper<>();
+        wrapper.eq(ScenePlusExt::getPlusId,id);
+        List<ScenePlusExt> list = this.list(wrapper);
+        if(list == null || list.isEmpty()){
+            return null;
+        }
+        return list.get(0);
+    }
 }

+ 1 - 16
src/main/java/com/fdkankan/fusion/service/impl/ScenePlusServiceImpl.java

@@ -77,22 +77,7 @@ public class ScenePlusServiceImpl extends ServiceImpl<IScenePlusMapper, ScenePlu
 
     @Override
     public Page<ScenePlus> pageList(ManageSceneParam param) {
-        LambdaQueryWrapper<ScenePlus> wrapper = new LambdaQueryWrapper<>();
-        if(param.getNumList() != null && !param.getNumList().isEmpty()){
-            wrapper.in(ScenePlus::getNum,param.getNumList());
-        }
-        if(StringUtils.isNotBlank(param.getNum())){
-            wrapper.eq(ScenePlus::getNum,param.getNum());
-        }
-        if(StringUtils.isNotBlank(param.getSceneName())){
-            wrapper.like(ScenePlus::getTitle,param.getSceneName());
-        }
-        if(param.getUserId() != null){
-            wrapper.eq(ScenePlus::getUserId,param.getUserId());
-        }
-        wrapper.eq(ScenePlus::getSceneStatus,param.getSceneStatus());
-        wrapper.orderByDesc(ScenePlus::getId);
-        Page<ScenePlus> page = this.page(new Page<>(param.getPageNum(), param.getPageSize()), wrapper);
+        Page<ScenePlus> page =   this.getBaseMapper().scenePostPage(new Page<>(param.getPageNum(), param.getPageSize()),param);
         return page;
     }
 }

+ 107 - 0
src/main/java/com/fdkankan/fusion/service/impl/UploadFileServiceImpl.java

@@ -0,0 +1,107 @@
+package com.fdkankan.fusion.service.impl;
+import java.util.Date;
+import java.util.List;
+
+import cn.dev33.satoken.stp.StpUtil;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.fdkankan.fusion.common.util.UploadToOssUtil;
+import com.fdkankan.fusion.config.FusionConfig;
+import com.fdkankan.fusion.entity.CaseTag;
+import com.fdkankan.fusion.entity.UploadFile;
+import com.fdkankan.fusion.httpClient.client.FdKKClient;
+import com.fdkankan.fusion.httpClient.request.AddMediaLibraryParam;
+import com.fdkankan.fusion.mapper.IUploadFileMapper;
+import com.fdkankan.fusion.response.EvidenceVo;
+import com.fdkankan.fusion.service.IUploadFileService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 
+ * @since 2025-09-15
+ */
+@Service
+@Slf4j
+public class UploadFileServiceImpl extends ServiceImpl<IUploadFileMapper, UploadFile> implements IUploadFileService {
+
+    @Autowired
+    FdKKClient fdKKClient;
+    @Autowired
+    FusionConfig fusionConfig;
+
+    @Override
+    public void addFile(String oldName, String url, Long length, String fileMD5) {
+        UploadFile uploadFile = new UploadFile();
+        uploadFile.setFileName(oldName);
+        uploadFile.setFileUrl(url);
+        uploadFile.setFileSize(length.toString());
+        uploadFile.setFileMd5(fileMD5);
+        this.save(uploadFile);
+    }
+
+    @Override
+    public UploadFile getByMd5(String fileMD5) {
+        LambdaQueryWrapper<UploadFile> wrapper = new LambdaQueryWrapper<>();
+        wrapper.eq(UploadFile::getFileMd5,fileMD5);
+        List<UploadFile> list = this.list(wrapper);
+        if(list == null || list.isEmpty()){
+            return null;
+        }
+        return list.get(0);
+    }
+
+    @Override
+    public UploadFile getByFileUrl(String fileUrl) {
+        LambdaQueryWrapper<UploadFile> wrapper = new LambdaQueryWrapper<>();
+        wrapper.eq(UploadFile::getFileUrl,fileUrl);
+        List<UploadFile> list = this.list(wrapper);
+        if(list == null || list.isEmpty()){
+            return null;
+        }
+        return list.get(0);
+    }
+
+
+    @Override
+    public void addMediaLiary(CaseTag caseTag) {
+        try {
+            if(StringUtils.isNotBlank(caseTag.getTagImgUrl())){
+                JSONArray jsonArray = JSONArray.parseArray(caseTag.getTagImgUrl());
+                for (Object object : jsonArray) {
+                    String imageUrl = (String) object;
+                    UploadFile uploadFile = this.getByFileUrl(imageUrl);
+                    if(uploadFile != null){
+                        String url = uploadFile.getFileUrl().replace(fusionConfig.getQueryPath(),"");
+                        AddMediaLibraryParam addMediaLibraryParam = new AddMediaLibraryParam(uploadFile.getFileName(),url, uploadFile.getFileSize(),uploadFile.getFileMd5(), caseTag.getDictId());
+                        EvidenceVo vo = new EvidenceVo(caseTag);
+                        addMediaLibraryParam.setContent(vo);
+                        fdKKClient.addMediaLibrary(addMediaLibraryParam, StpUtil.getTokenValue());
+                    }
+
+                }
+            }
+            if(StringUtils.isNotBlank(caseTag.getAudio())) {
+                UploadFile uploadFile = this.getByFileUrl(caseTag.getAudio());
+                if(uploadFile != null){
+                    String url = uploadFile.getFileUrl().replace(fusionConfig.getQueryPath(),"");
+                    AddMediaLibraryParam addMediaLibraryParam = new AddMediaLibraryParam(uploadFile.getFileName(), url, uploadFile.getFileSize(),uploadFile.getFileMd5(), caseTag.getDictId());
+                    EvidenceVo vo = new EvidenceVo(caseTag);
+                    addMediaLibraryParam.setContent(vo);
+                    fdKKClient.addMediaLibrary(addMediaLibraryParam, StpUtil.getTokenValue());
+                }
+            }
+        }catch (Exception e){
+            log.info("addMediaLiary-error:{}",e);
+        }
+
+    }
+}

+ 17 - 2
src/main/java/com/fdkankan/fusion/service/impl/UploadService.java

@@ -1,13 +1,18 @@
 package com.fdkankan.fusion.service.impl;
 
+import cn.hutool.core.io.FileUtil;
 import com.fdkankan.fusion.common.FilePath;
 import com.fdkankan.fusion.common.ResultCode;
+import com.fdkankan.fusion.common.util.FileMd5Util;
 import com.fdkankan.fusion.common.util.ShellUtil;
 import com.fdkankan.fusion.common.util.UploadToOssUtil;
 import com.fdkankan.fusion.common.util.VideoUtil;
+import com.fdkankan.fusion.entity.UploadFile;
 import com.fdkankan.fusion.exception.BusinessException;
+import com.fdkankan.fusion.service.IUploadFileService;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 import org.springframework.web.multipart.MultipartFile;
@@ -31,6 +36,8 @@ public class UploadService {
     private String queryPath;
     @Value("${spring.profiles.active}")
     private String environment;
+    @Autowired
+    IUploadFileService uploadFileService;
 
     public String uploadFile(MultipartFile file, Integer videoFolderId) {
         if(file.isEmpty()){
@@ -72,14 +79,19 @@ public class UploadService {
             throw new BusinessException(ResultCode.UPLOAD_FILE_NO_EXIST);
         }
         if(file.getSize()>10 * 1024 * 1024 * 100){
-            System.out.println(file.getSize());
             throw new BusinessException(ResultCode.UPLOAD_FILE_TO_LONG);
         }
         //获取文件名
         String fileName = file.getOriginalFilename();
+        String fileMD5 = FileMd5Util.getFileMD5(file);
+        UploadFile uploadFile = uploadFileService.getByMd5(fileMD5);
+        if(uploadFile != null){
+            return uploadFile.getFileUrl();
+        }
         if(StringUtils.isEmpty(fileName)){
             throw new BusinessException(ResultCode.UPLOAD_FILE_NO_EXIST);
         }
+        String oldName = fileName.substring(0,fileName.lastIndexOf("."));
         File localFile = null;
         try {
             //获取文件后缀名
@@ -95,12 +107,15 @@ public class UploadService {
             }
             localFile = File.createTempFile(fileName + suffixName,suffixName);
             file.transferTo(localFile);
+
             String path = localFile.getPath();
             uploadToOssUtil.uploadOss(path,filePathAdd+ fileName + suffixName);
             if(!uploadToOssUtil.existKey(filePathAdd + fileName + suffixName)){
                 throw new BusinessException(ResultCode.UPLOAD_ERROR.code,ResultCode.UPLOAD_ERROR.msg);
             }
-            return queryPath +filePathAdd+ URLEncoder.encode(fileName,"utf-8") + suffixName;
+            String url =  queryPath +filePathAdd+ URLEncoder.encode(fileName,"utf-8") + suffixName;
+            uploadFileService.addFile(oldName,url,localFile.length(), fileMD5);
+            return url;
         }catch (Exception e){
             log.info("upload-error:{}",e);
             throw new BusinessException(ResultCode.UPLOAD_ERROR.code,ResultCode.UPLOAD_ERROR.msg);

+ 24 - 0
src/main/resources/mapper/fusion/ScenePlusMapper.xml

@@ -33,4 +33,28 @@
         </if>
         group by scene_source
     </select>
+
+    <select id="scenePostPage" resultType="com.fdkankan.fusion.entity.ScenePlus">
+        select s.* from t_scene_plus s left join  t_scene_plus_ext e on s.id = e.plus_id
+        where s.rec_status = 'A' and ( s.scene_source not in (4,5,7,57) or ( s.scene_source in (4,5,7,57) and e.is_obj =1))
+        <if test="param.numList != null and param.numList.size >0">
+            and s.num in
+            <foreach item="num" collection="param.numList" open="(" separator="," close=")">
+                #{num}
+            </foreach>
+        </if>
+        <if test="param.num !=null and param.num !=''">
+            and s.num = #{param.num}
+        </if>
+        <if test="param.sceneName !=null and param.sceneName !=''">
+            and s.title like  concat ('%',#{param.sceneName},'%')
+        </if>
+        <if test="param.userId !=null">
+            and s.user_id = #{param.userId}
+        </if>
+        <if test="param.sceneStatus !=null">
+            and s.scene_status = #{param.sceneStatus}
+        </if>
+        order by s.id desc
+    </select>
 </mapper>

+ 5 - 0
src/main/resources/mapper/fusion/UploadFileMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.fdkankan.fusion.mapper.IUploadFileMapper">
+
+</mapper>