lyhzzz 7 月之前
父节点
当前提交
cf5373955b

+ 4 - 1
src/main/java/com/fdkankan/fusion/common/ResultCode.java

@@ -76,7 +76,10 @@ public enum ResultCode {
     COMPOSE_FILE_ERROR(7029, "合并文件失败"),
     TYPE_ERROR(7030, "上传资源类型错误"),
 
-;
+    upload_error2(7031, "继续上传失败"),
+
+
+    ;
 
     public int code;
     public String msg;

+ 6 - 0
src/main/java/com/fdkankan/fusion/controller/UploadController.java

@@ -51,6 +51,12 @@ public class UploadController extends BaseController{
                 || StringUtils.isBlank(uploadDto.getFileName()) || uploadDto.getFileSize() ==null){
             throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
         }
+        if(uploadDto.getId() != null){
+            UploadChunk uploadChunk = uploadChunkService.getById(uploadDto.getId());
+            if(!uploadChunk.getFileMd5().equals(uploadDto.getFileMd5())){
+                throw new BusinessException(ResultCode.upload_error2);
+            }
+        }
         uploadDto.setDeptId(getDeptId());
         uploadDto.setUserName(getUserName());
         String suffix = uploadDto.getFileName().substring(uploadDto.getFileName().lastIndexOf("."));

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

@@ -170,6 +170,9 @@ public class DataService implements IDataService {
 
         TreeMap<String,Long> countMap = new TreeMap<>();
         for (DataGroupVo dataGroupVo : groupVoList) {
+            if(dataGroupVo.getGroupKey() == null){
+                continue;
+            }
             String key = CameraUtil.getCameraNameByType(Integer.valueOf(dataGroupVo.getGroupKey()));
             countMap.merge(key, dataGroupVo.getDataCount(), Long::sum);
         }

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

@@ -130,7 +130,7 @@ public class SceneService implements ISceneService {
             }
             param.setUserNames(userNames);
         }
-        if((param.getType() == 2 || param.getType() == 5) && StringUtils.isNotBlank(param.getSceneName())){
+        if((param.getType() == 2 || param.getType() == 5 || param.getType() == 7) && StringUtils.isNotBlank(param.getSceneName())){
             List<JSONObject> laserList = scenePlusService.getLaserSceneByName(param.getSceneName());
             List<String > numList = new ArrayList<>();
             for (JSONObject jsonObject : laserList) {

+ 6 - 2
src/main/resources/mapper/fusion/UploadChunkMapper.xml

@@ -31,11 +31,15 @@
             </foreach>
         </if>
 
-        <if test="param.sceneName != null and param.sceneName != ''">
+        <if test="param.type != null and param.type == 8 and param.sceneName != null and param.sceneName != ''">
             and (u.title like concat ('%',#{param.sceneName},'%')
-                or s.title like concat ('%',#{param.sceneName},'%') )
+            or s.title like concat ('%',#{param.sceneName},'%') )
         </if>
 
+<!--        <if test="param.type != null and param.type == 7 and param.sceneName != null and param.sceneName != ''">-->
+<!--            and u.title like concat ('%',#{param.sceneName},'%'-->
+<!--        </if>-->
+
     order by  u.id desc
     </select>
 </mapper>