瀏覽代碼

Merge branch 'test'

lyhzzz 1 年之前
父節點
當前提交
25f98fdc0c
共有 42 個文件被更改,包括 1006 次插入125 次删除
  1. 12 2
      README.md
  2. 1 1
      pom.xml
  3. 3 3
      src/main/java/com/fdkankan/manage/aop/VisitLogInterceptor.java
  4. 4 0
      src/main/java/com/fdkankan/manage/common/ResultCode.java
  5. 0 21
      src/main/java/com/fdkankan/manage/controller/MqCameraLevelController.java
  6. 0 21
      src/main/java/com/fdkankan/manage/controller/MqNumLevelController.java
  7. 97 0
      src/main/java/com/fdkankan/manage/controller/MqQueueConfigController.java
  8. 114 9
      src/main/java/com/fdkankan/manage/controller/OverallController.java
  9. 44 0
      src/main/java/com/fdkankan/manage/controller/RtkInfoController.java
  10. 9 7
      src/main/java/com/fdkankan/manage/controller/SceneController.java
  11. 11 0
      src/main/java/com/fdkankan/manage/entity/Case.java
  12. 102 0
      src/main/java/com/fdkankan/manage/entity/MqQueueConfig.java
  13. 66 0
      src/main/java/com/fdkankan/manage/entity/MqSendLog.java
  14. 27 17
      src/main/java/com/fdkankan/manage/entity/RtkInfo.java
  15. 1 1
      src/main/java/com/fdkankan/manage/generate/AutoGenerate.java
  16. 24 0
      src/main/java/com/fdkankan/manage/httpClient/service/LaserService.java
  17. 23 0
      src/main/java/com/fdkankan/manage/httpClient/service/OverallService.java
  18. 21 6
      src/main/java/com/fdkankan/manage/httpClient/vo/OverallParam.java
  19. 1 0
      src/main/java/com/fdkankan/manage/inner/controller/InnerController.java
  20. 18 0
      src/main/java/com/fdkankan/manage/mapper/IMqQueueConfigMapper.java
  21. 18 0
      src/main/java/com/fdkankan/manage/mapper/IMqSendLogMapper.java
  22. 2 0
      src/main/java/com/fdkankan/manage/mapper/IScenePlusMapper.java
  23. 21 0
      src/main/java/com/fdkankan/manage/service/IMqQueueConfigService.java
  24. 20 0
      src/main/java/com/fdkankan/manage/service/IMqSendLogService.java
  25. 2 0
      src/main/java/com/fdkankan/manage/service/IRtkInfoService.java
  26. 6 0
      src/main/java/com/fdkankan/manage/service/IScenePlusService.java
  27. 1 1
      src/main/java/com/fdkankan/manage/service/ISceneProService.java
  28. 36 0
      src/main/java/com/fdkankan/manage/service/impl/MqQueueConfigServiceImpl.java
  29. 38 0
      src/main/java/com/fdkankan/manage/service/impl/MqSendLogServiceImpl.java
  30. 60 2
      src/main/java/com/fdkankan/manage/service/impl/RtkInfoServiceImpl.java
  31. 4 1
      src/main/java/com/fdkankan/manage/service/impl/ScenePlusExtServiceImpl.java
  32. 28 0
      src/main/java/com/fdkankan/manage/service/impl/ScenePlusServiceImpl.java
  33. 117 31
      src/main/java/com/fdkankan/manage/service/impl/SceneProServiceImpl.java
  34. 2 1
      src/main/java/com/fdkankan/manage/util/ProvinceUtils.java
  35. 17 0
      src/main/java/com/fdkankan/manage/util/SceneStatusUtil.java
  36. 22 1
      src/main/java/com/fdkankan/manage/vo/request/RtkInfoParam.java
  37. 2 0
      src/main/java/com/fdkankan/manage/vo/request/SceneParam.java
  38. 8 0
      src/main/java/com/fdkankan/manage/vo/response/AddressComponent.java
  39. 5 0
      src/main/resources/mapper/manage/MqQueueConfigMapper.xml
  40. 5 0
      src/main/resources/mapper/manage/MqSendLogMapper.xml
  41. 8 0
      src/main/resources/mapper/manage/ScenePlusMapper.xml
  42. 6 0
      src/main/resources/mapper/manage/SceneProMapper.xml

+ 12 - 2
README.md

@@ -68,7 +68,7 @@
     http://120.25.146.52:3090/project/102/interface/api/cat_1713
 ~~~~
 
-
+~~~~
 所在行业:
 
 智慧城市 Smart City
@@ -105,4 +105,14 @@
 四维现勘平台            -
 四维工地管家
 四维指房宝              -
-无                     None
+无                     None
+~~~~
+
+
+###**v2.6.0**
+~~~~
+1.迁移接口支持批量迁移。 /move  添加参数 numList
+2.rtk管理
+3.计算优先级
+4.全景相机作品列表。    /overall/cameraSceneList
+~~~~

+ 1 - 1
pom.xml

@@ -21,7 +21,7 @@
     <dependency>
       <groupId>com.fdkankan</groupId>
       <artifactId>4dkankan-utils-fyun-parent</artifactId>
-      <version>5.0.0-SNAPSHOT</version>
+      <version>3.0.0-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>com.fdkankan</groupId>

+ 3 - 3
src/main/java/com/fdkankan/manage/aop/VisitLogInterceptor.java

@@ -111,9 +111,9 @@ public class VisitLogInterceptor {
 				}
 			}
 		}
-		if("GET".equals(method)){
-			return result;
-		}
+//		if("GET".equals(method)){
+//			return result;
+//		}
 		//写入mongodb
 		OperLog operLog = new OperLog();
 		operLog.setUserId(userId);

+ 4 - 0
src/main/java/com/fdkankan/manage/common/ResultCode.java

@@ -91,6 +91,10 @@ public enum ResultCode  {
     RTK_TOKEN_NOT_EXIT(50071, "缺少签名验证信息"),
     RTK_TOKEN_ERROR(50072, "签名校验失败"),
 
+    CAN_NOT_DEL_MODELING_SCENE(50073, "计算中的场景无法删除"),
+    RTK_SN_EXIST(50074, "板卡SN码已存在"),
+    CAMERA_SN_EXIST(50075, "相机SN码已存在"),
+
 
     ;
 

+ 0 - 21
src/main/java/com/fdkankan/manage/controller/MqCameraLevelController.java

@@ -1,21 +0,0 @@
-package com.fdkankan.manage.controller;
-
-
-import org.springframework.web.bind.annotation.RequestMapping;
-
-import org.springframework.web.bind.annotation.RestController;
-
-/**
- * <p>
- *  前端控制器
- * </p>
- *
- * @author 
- * @since 2024-04-17
- */
-@RestController
-@RequestMapping("/manage/mqCameraLevel")
-public class MqCameraLevelController {
-
-}
-

+ 0 - 21
src/main/java/com/fdkankan/manage/controller/MqNumLevelController.java

@@ -1,21 +0,0 @@
-package com.fdkankan.manage.controller;
-
-
-import org.springframework.web.bind.annotation.RequestMapping;
-
-import org.springframework.web.bind.annotation.RestController;
-
-/**
- * <p>
- *  前端控制器
- * </p>
- *
- * @author 
- * @since 2024-04-17
- */
-@RestController
-@RequestMapping("/manage/mqNumLevel")
-public class MqNumLevelController {
-
-}
-

+ 97 - 0
src/main/java/com/fdkankan/manage/controller/MqQueueConfigController.java

@@ -0,0 +1,97 @@
+package com.fdkankan.manage.controller;
+
+
+import com.fdkankan.manage.common.ResultCode;
+import com.fdkankan.manage.common.ResultData;
+import com.fdkankan.manage.entity.MqCameraLevel;
+import com.fdkankan.manage.entity.MqNumLevel;
+import com.fdkankan.manage.entity.MqQueueConfig;
+import com.fdkankan.manage.exception.BusinessException;
+import com.fdkankan.manage.service.IMqCameraLevelService;
+import com.fdkankan.manage.service.IMqNumLevelService;
+import com.fdkankan.manage.service.IMqQueueConfigService;
+import com.fdkankan.manage.vo.request.ModelingLevelParam;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.HashMap;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author 
+ * @since 2024-05-08
+ */
+@RestController
+@RequestMapping("/service/manage/mqQueueConfig")
+public class MqQueueConfigController {
+
+    @Autowired
+    IMqQueueConfigService queueConfigService;
+
+    @PostMapping("/allList")
+    public ResultData allList(){
+        return ResultData.ok(queueConfigService.getNormalConfig());
+    }
+
+
+    @Autowired
+    IMqCameraLevelService mqCameraLevelService;
+    @Autowired
+    IMqNumLevelService mqNumLevelService;
+
+    @PostMapping("/getInfo")
+    public ResultData getInfo(@RequestBody ModelingLevelParam param){
+        if( param.getCameraId() == null && StringUtils.isBlank(param.getNum())){
+            throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
+        }
+        if(StringUtils.isNotBlank(param.getNum())){
+            MqNumLevel byNum = mqNumLevelService.getByNum(param.getNum());
+            if(byNum != null){
+                return ResultData.ok(queueConfigService.getById(byNum.getQueueConfigId()));
+            }
+        }
+        if(param.getCameraId() != null){
+            MqCameraLevel byCameraId = mqCameraLevelService.getByCameraId(param.getCameraId());
+            if(byCameraId != null){
+                return ResultData.ok(queueConfigService.getById(byCameraId.getQueueConfigId()));
+            }
+        }
+        return ResultData.ok(queueConfigService.getDefaultConfig());
+    }
+
+    /**
+     * 修改场景或相机计算优先级
+     */
+    @PostMapping("/updateModelingLevel")
+    public ResultData updateModelingLevel(@RequestBody ModelingLevelParam param){
+        if(param.getConfigId() == null){
+            throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
+        }
+        if( param.getCameraId() == null && StringUtils.isBlank(param.getNum())){
+            throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
+        }
+        if(param.getCameraId() != null){
+            MqCameraLevel cameraLevel = mqCameraLevelService.getByCameraId(param.getCameraId());
+            if(cameraLevel == null){
+                mqCameraLevelService.saveEntity(param.getCameraId(),param.getConfigId());
+            }else {
+                mqCameraLevelService.updateLevelById(cameraLevel.getId(),param.getConfigId());
+            }
+        }
+        if(StringUtils.isNotBlank(param.getNum())){
+            MqNumLevel mqNumLevel = mqNumLevelService.getByNum(param.getNum());
+            if(mqNumLevel == null){
+                mqNumLevelService.saveEntity(param.getNum(),param.getConfigId());
+            }else {
+                mqNumLevelService.updateLevelById(mqNumLevel.getId(),param.getConfigId());
+            }
+        }
+
+        return ResultData.ok();
+    }
+}
+

+ 114 - 9
src/main/java/com/fdkankan/manage/controller/OverallController.java

@@ -6,9 +6,14 @@ import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.fdkankan.manage.common.PageInfo;
 import com.fdkankan.manage.common.ResultData;
+import com.fdkankan.manage.entity.*;
 import com.fdkankan.manage.httpClient.client.OverallClient;
+import com.fdkankan.manage.httpClient.service.OverallService;
 import com.fdkankan.manage.httpClient.vo.OverallParam;
 import com.fdkankan.manage.httpClient.vo.OverallVo;
+import com.fdkankan.manage.service.*;
+import com.fdkankan.manage.util.SceneStatusUtil;
+import com.fdkankan.manage.vo.response.SceneVo;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.PostMapping;
@@ -18,7 +23,9 @@ import org.springframework.web.bind.annotation.RestController;
 
 import javax.annotation.Resource;
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
+import java.util.stream.Collectors;
 
 /**
  * 全景看看作品
@@ -27,17 +34,26 @@ import java.util.List;
 @RequestMapping("/service/manage/overall")
 public class OverallController {
 
-    private static String appId ="BDA385EC848C1A425F746869011C8D23";
-    private static String key ="appId";
-
    @Autowired
-    OverallClient overallClient;
-
+   OverallService overallService;
+   @Autowired
+   IScenePlusService scenePlusService;
+   @Autowired
+   IScenePlusExtService scenePlusExtService;
+   @Autowired
+    ICommonService commonService;
+    @Autowired
+    IMqSendLogService mqSendLogService;
+    @Autowired
+    IUserService userService;
+    @Autowired
+    ISceneColdStorageService sceneColdStorageService;
     @PostMapping("/list")
     public ResultData list(@RequestBody OverallParam param){
-
-
-        OverallVo vo = overallClient.list(param,appId,key);
+        if(StringUtils.isNotBlank(param.getUserName())){
+            param.setUserId(param.getUserName());
+        }
+        OverallVo vo = overallService.list(param);
         if(vo.getCode() != 0 ){
             return ResultData.error(vo.getCode(),vo.getMsg());
         }
@@ -59,9 +75,98 @@ public class OverallController {
         return ResultData.ok(new PageInfo<>(param.getPageNum(), param.getPageSize(), total, list));
     }
 
+    @PostMapping("/cameraSceneList")
+    public ResultData cameraSceneList(@RequestBody OverallParam param){
+        param.setType(2);
+        if(StringUtils.isNotBlank(param.getUserName())){
+            List<User> userList = userService.getLikeByUserName(param.getUserName());
+            List<Long> userIds = userList.stream().map(User::getId).collect(Collectors.toList());
+            List<ScenePlus> scenePluses = scenePlusService.getByUserIdsAndLocation(userIds,7);
+            if(scenePluses.isEmpty()){
+                return ResultData.ok(new PageInfo<>(param.getPageNum(), param.getPageSize(), 0, new ArrayList()));
+            }
+            List<String> numList = scenePluses.stream().map(ScenePlus::getNum).collect(Collectors.toList());
+            param.setNums(numList);
+        }
+        OverallVo vo = overallService.list(param);
+        if(vo.getCode() != 0 ){
+            return ResultData.error(vo.getCode(),vo.getMsg());
+        }
+        Object data = vo.getData();
+        JSONObject dataObj = JSONObject.parseObject(JSONObject.toJSONString(data));
+        JSONArray array = dataObj.getJSONArray("list");
+        List<JSONObject> collect = array.stream().map(e -> (JSONObject) e).collect(Collectors.toList());
+        List<String> numList = collect.stream().map(e -> e.getString("num")).collect(Collectors.toList());
+
+        List<ScenePlus> scenePluses = scenePlusService.getByNumList(numList);
+        List<Long> plusIds = scenePluses.stream().map(ScenePlus::getId).collect(Collectors.toList());
+        HashMap<Long, ScenePlusExt> extMap = scenePlusExtService.getByPlusIds(plusIds);
+        HashMap<String, ScenePlus> plusMap = new HashMap<>();
+        scenePluses.forEach( e -> plusMap.put(e.getNum(),e));
+        HashMap<String,MqSendLog> mqSendLogMap = null;
+        if(!numList.isEmpty()){
+            mqSendLogMap = mqSendLogService.getByNumList(numList);
+        }
+        HashMap<String, SceneColdStorage> coldStorageMap = sceneColdStorageService.getByNumList(numList);
+
+
+        List<Long> userIds = scenePluses.stream().map(ScenePlus::getUserId).collect(Collectors.toList());
+        HashMap<Long, User> userMap = userService.getByIds(userIds);
+        HashMap<String,Long> numUserIdMap = new HashMap<>();
+        scenePluses.forEach( e -> numUserIdMap.put(e.getNum(),e.getUserId()));
+
+        for (Object o : array) {
+            JSONObject obj = (JSONObject) o;
+            obj.put("webSite",obj.getString("share"));
+            obj.put("sceneCodes",obj.getString("id"));
+            String name = obj.getString("name");
+            if(StringUtils.isBlank(name)){
+                name = "无标题";
+            }
+            obj.put("name",name);
+
+            String num = obj.getString("num");
+            ScenePlus scenePlus = plusMap.get(num);
+            if(scenePlus != null){
+                ScenePlusExt ext = extMap.get(scenePlus.getId());
+                if(ext != null){
+                    obj.put("algorithmTime",ext.getAlgorithmTime());
+                    obj.put("gps",ext.getGps());
+                    obj.put("addressComponent",commonService.getAddressComponent(ext.getGps()));
+                    obj.put("shootCount",ext.getShootCount());
+                }
+            }
+            obj.put("statusString", SceneStatusUtil.getOverallStatusString(obj.getInteger("payStatus"),obj.getInteger("calcStatus")));
+
+            if(mqSendLogMap!=null){
+                MqSendLog mqSendLog = mqSendLogMap.get(num);
+                if(mqSendLog != null){
+                    obj.put("statusString","排队中");
+                    obj.put("calcStatus",-4);
+                }
+            }
+            Long userId = numUserIdMap.get(num);
+            if(userId != null){
+                User user = userMap.get(userId);
+                obj.put("userName",user==null?null :user.getUserName());
+            }
+            obj.put("isColdStorage",false);
+            if(coldStorageMap != null){
+                SceneColdStorage sceneColdStorage = coldStorageMap.get(num);
+                if(sceneColdStorage != null){
+                    obj.put("isColdStorage",true);
+                }
+            }
+
+        }
+        List<Object> list = new ArrayList<>(array);
+        long total = dataObj.getLongValue("total");
+        return ResultData.ok(new PageInfo<>(param.getPageNum(), param.getPageSize(), total, list));
+    }
+
     @PostMapping("/delete")
     public ResultData delete(@RequestBody OverallParam param){
-        OverallVo vo = overallClient.delete(param.getId(),appId,key);
+        OverallVo vo = overallService.delete(param.getId());
         if(vo.getCode() != 0 ){
             return ResultData.error(vo.getCode(),vo.getMsg());
         }

+ 44 - 0
src/main/java/com/fdkankan/manage/controller/RtkInfoController.java

@@ -1,19 +1,27 @@
 package com.fdkankan.manage.controller;
 
 
+import cn.dev33.satoken.stp.StpUtil;
+import com.fdkankan.manage.common.ResultCode;
 import com.fdkankan.manage.common.ResultData;
 import com.fdkankan.manage.entity.AgentAudit;
+import com.fdkankan.manage.entity.Camera;
 import com.fdkankan.manage.entity.RtkInfo;
+import com.fdkankan.manage.exception.BusinessException;
 import com.fdkankan.manage.service.IAgentAuditService;
+import com.fdkankan.manage.service.ICameraService;
 import com.fdkankan.manage.service.IRtkInfoService;
 import com.fdkankan.manage.vo.request.AgentAuditListParam;
 import com.fdkankan.manage.vo.request.RtkInfoParam;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
+import java.util.Objects;
+
 /**
  * 经销商申请管理
  * @author 
@@ -25,6 +33,8 @@ public class RtkInfoController {
 
     @Autowired
     IRtkInfoService rtkInfoService;
+    @Autowired
+    ICameraService cameraService;
 
     @PostMapping("/list")
     public ResultData list(@RequestBody RtkInfoParam param){
@@ -33,6 +43,40 @@ public class RtkInfoController {
 
     @PostMapping("/saveOrEdit")
     public ResultData saveOrEdit(@RequestBody RtkInfo rtkInfo){
+        if(rtkInfo.getRtkType() == null || StringUtils.isBlank(rtkInfo.getCameraSnCode()) || StringUtils.isBlank(rtkInfo.getRtkSnCode())){
+            throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
+        }
+        RtkInfo dbRtkInfo = rtkInfoService.getByRtkSnCode(rtkInfo.getRtkSnCode());
+        RtkInfo dbRtkInfo2 = rtkInfoService.getByCameraSnCode(rtkInfo.getCameraSnCode());
+        if(rtkInfo.getId() == null){
+            rtkInfo.setCreateUserId(Long.valueOf((String)StpUtil.getLoginId()));
+            if(dbRtkInfo != null){
+                throw new BusinessException(ResultCode.RTK_SN_EXIST);
+            }
+            if(dbRtkInfo2 != null){
+                throw new BusinessException(ResultCode.CAMERA_SN_EXIST);
+            }
+        }else {
+            rtkInfo.setUpdateUserId(Long.valueOf((String)StpUtil.getLoginId()));
+            if( dbRtkInfo != null && !Objects.equals(dbRtkInfo.getId(), rtkInfo.getId()) ){
+                throw new BusinessException(ResultCode.RTK_SN_EXIST);
+            }
+            if( dbRtkInfo2 != null && !Objects.equals(dbRtkInfo2.getId(), rtkInfo.getId()) ){
+                throw new BusinessException(ResultCode.CAMERA_SN_EXIST);
+            }
+        }
+        if(rtkInfo.getRtkType() == 0){
+            rtkInfo.setIpAddr(null);
+            rtkInfo.setMountPoint(null);
+            rtkInfo.setPort(null);
+            rtkInfo.setUserName(null);
+            rtkInfo.setPassword(null);
+            rtkInfo.setOperator(null);
+        }
+        Camera camera = cameraService.getBySnCode(rtkInfo.getCameraSnCode());
+        if(camera == null){
+            throw new BusinessException(ResultCode.CAMERA_NOT_EXIST);
+        }
         rtkInfoService.saveOrEdit(rtkInfo);
         return ResultData.ok();
     }

+ 9 - 7
src/main/java/com/fdkankan/manage/controller/SceneController.java

@@ -4,12 +4,9 @@ package com.fdkankan.manage.controller;
 import com.alibaba.fastjson.JSONObject;
 import com.fdkankan.fyun.face.FYunFileServiceInterface;
 import com.fdkankan.manage.common.ResultCode;
-import com.fdkankan.manage.entity.SceneCopyLog;
-import com.fdkankan.manage.entity.ScenePlusExt;
+import com.fdkankan.manage.entity.*;
 import com.fdkankan.manage.exception.BusinessException;
 import com.fdkankan.manage.common.ResultData;
-import com.fdkankan.manage.entity.ScenePlus;
-import com.fdkankan.manage.entity.ScenePro;
 import com.fdkankan.manage.httpClient.client.FdKKClient;
 import com.fdkankan.manage.service.*;
 import com.fdkankan.manage.vo.request.SceneParam;
@@ -58,11 +55,16 @@ public class SceneController {
      */
     @PostMapping("/move")
     public ResultData move(@RequestBody SceneParam param){
-        if(StringUtils.isEmpty(param.getNum()) || StringUtils.isEmpty(param.getSnCode())){
+        if( StringUtils.isEmpty(param.getSnCode())){
             throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
         }
-        sceneProService.move(param);
-        return ResultData.ok();
+        if(StringUtils.isEmpty(param.getNum()) &&  (param.getNumList()== null || param.getNumList().isEmpty())){
+            throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
+        }
+        Integer moveNum = sceneProService.move(param);
+        HashMap<String,Object> map = new HashMap<>();
+        map.put("successNum",moveNum);
+        return ResultData.ok(map);
     }
 
     /**

+ 11 - 0
src/main/java/com/fdkankan/manage/entity/Case.java

@@ -87,4 +87,15 @@ public class Case implements Serializable {
     @TableField("sys_user_id")
     private Integer sysUserId;
 
+    /**
+     * 引言,序言
+     */
+    @TableField("introduction")
+    private String introduction;
+    /**
+     * 外链
+     */
+    @TableField("outside_link")
+    private String outsideLink;
+
 }

+ 102 - 0
src/main/java/com/fdkankan/manage/entity/MqQueueConfig.java

@@ -0,0 +1,102 @@
+package com.fdkankan.manage.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 2024-05-08
+ */
+@Getter
+@Setter
+@TableName("mq_queue_config")
+public class MqQueueConfig implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * mq队列名称
+     */
+    @TableField("queue_name")
+    private String queueName;
+
+    /**
+     * 是否开启弹性伸缩0否,1是
+     */
+    @TableField("open_scaling")
+    private Integer openScaling;
+
+    /**
+     * 开启弹性伸缩阈值
+     */
+    @TableField("scaling_threshold")
+    private Integer scalingThreshold;
+
+    /**
+     * 检测是否需要开启间隔时间,单位分钟
+     */
+    @TableField("open_scaling_time")
+    private Integer openScalingTime;
+
+    /**
+     * 检测关闭弹性伸缩时间间隔,单位分钟
+     */
+    @TableField("stop_scaling_time")
+    private Integer stopScalingTime;
+
+    @TableField("scaling_config_id")
+    private Integer scalingConfigId;
+
+    @TableField("remark")
+    private String remark;
+
+    @TableField("rec_status")
+    @TableLogic(value = "A",delval = "I")
+    private String recStatus;
+
+    @TableField("create_time")
+    private Date createTime;
+
+    @TableField("update_time")
+    private Date updateTime;
+
+    /**
+     * 计算优先等级
+     */
+    @TableField("level")
+    private String level;
+
+    /**
+     * 是否默认0否1是
+     */
+    @TableField("is_default")
+    private Integer isDefault;
+
+    /**
+     * 是否常驻队列
+     */
+    @TableField("is_resident")
+    private Integer isResident;
+
+    /**
+     * 特殊处理队列0否,1是,例如128G
+     */
+    @TableField("is_special")
+    private Integer isSpecial;
+
+
+}

+ 66 - 0
src/main/java/com/fdkankan/manage/entity/MqSendLog.java

@@ -0,0 +1,66 @@
+package com.fdkankan.manage.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 2024-05-08
+ */
+@Getter
+@Setter
+@TableName("mq_send_log")
+public class MqSendLog implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    @TableField("num")
+    private String num;
+
+    /**
+     * 发送的队列
+     */
+    @TableField("queue")
+    private String queue;
+
+    /**
+     * 发送的mq消息
+     */
+    @TableField("content")
+    private String content;
+
+    /**
+     * 0未发送,1已发送
+     */
+    @TableField("status")
+    private Integer status;
+
+    @TableField("create_time")
+    private Date createTime;
+
+    @TableField("update_time")
+    private Date updateTime;
+
+    @TableField("sort")
+    private Integer sort;
+
+    @TableField("rec_status")
+    @TableLogic(value = "A",delval = "I")
+    private String recStatus;
+
+
+}

+ 27 - 17
src/main/java/com/fdkankan/manage/entity/RtkInfo.java

@@ -1,10 +1,7 @@
 package com.fdkankan.manage.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 com.baomidou.mybatisplus.annotation.*;
+
 import java.io.Serializable;
 import java.util.Date;
 import lombok.Getter;
@@ -31,31 +28,31 @@ public class RtkInfo implements Serializable {
     /**
      * ip地址
      */
-    @TableField("ip_addr")
+    @TableField(value = "ip_addr",updateStrategy = FieldStrategy.IGNORED )
     private String ipAddr;
 
     /**
      * 挂载点
      */
-    @TableField("mount_point")
+    @TableField(value ="mount_point",updateStrategy = FieldStrategy.IGNORED )
     private String mountPoint;
 
     /**
      * 端口
      */
-    @TableField("port")
+    @TableField(value ="port",updateStrategy = FieldStrategy.IGNORED )
     private String port;
 
     /**
      * 用户名称
      */
-    @TableField("user_name")
+    @TableField(value ="user_name",updateStrategy = FieldStrategy.IGNORED )
     private String userName;
 
     /**
      * 密码
      */
-    @TableField("password")
+    @TableField(value ="password",updateStrategy = FieldStrategy.IGNORED )
     private String password;
 
     /**
@@ -64,9 +61,14 @@ public class RtkInfo implements Serializable {
     @TableField("rtk_sn_code")
     private String rtkSnCode;
     /**
+     * 相机sn
+     */
+    @TableField("camera_sn_code")
+    private String cameraSnCode;
+    /**
      * 运营商
      */
-    @TableField("operator")
+    @TableField(value ="operator",updateStrategy = FieldStrategy.IGNORED )
     private String operator;
 
 
@@ -77,14 +79,9 @@ public class RtkInfo implements Serializable {
     private Integer status;
 
     /**
-     * rkt类型,0本地鉴权,1自带鉴权
-     */
-    @TableField("auth_type")
-    private Integer authType;
-    /**
      *  0千寻板卡千寻账号,1千寻板卡移动账号,2北云板卡移动账号
      */
-    @TableField("rtk_ype ")
+    @TableField("rtk_type")
     private Integer rtkType ;
 
     @TableField("rec_status")
@@ -97,5 +94,18 @@ public class RtkInfo implements Serializable {
     @TableField("update_time")
     private Date updateTime;
 
+    @TableField("create_user_id")
+    private Long createUserId;
+
+    @TableField(exist = false)
+    private String createUserName;
+    @TableField(exist = false)
+    private String createNickName;
+
+    @TableField("update_user_id")
+    private Long updateUserId;
+
+    @TableField(exist = false)
+    private String updateUserName;
 
 }

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

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

+ 24 - 0
src/main/java/com/fdkankan/manage/httpClient/service/LaserService.java

@@ -407,4 +407,28 @@ public class LaserService {
         }
     }
 
+    public HashMap<String, JSONObject> list(List<String> sceneNumList,Integer sceneSource) {
+        LaserSceneParam newParam = new LaserSceneParam();
+        newParam.setPageNum(1);
+        newParam.setPageSize(sceneNumList.size());
+        newParam.setSceneCodes(sceneNumList);
+        newParam.setSceneSource(sceneSource);
+        return this.list(newParam);
+    }
+
+    public HashMap<String, JSONObject> list(LaserSceneParam newParam) {
+        HashMap<String, JSONObject> map = new HashMap<>();
+        FdkkResponse fdkkResponse = laserClient.sceneList(newParam);
+        JSONObject jsonObject = fdkkResponse.getData();
+        if(jsonObject == null){
+            return map;
+        }
+        JSONArray list = jsonObject.getJSONArray("list");
+
+        for (Object o : list) {
+            JSONObject obj = (JSONObject) o;
+            map.put(obj.getString("num"),obj);
+        }
+        return map;
+    }
 }

+ 23 - 0
src/main/java/com/fdkankan/manage/httpClient/service/OverallService.java

@@ -0,0 +1,23 @@
+package com.fdkankan.manage.httpClient.service;
+
+import com.fdkankan.manage.httpClient.client.OverallClient;
+import com.fdkankan.manage.httpClient.vo.OverallParam;
+import com.fdkankan.manage.httpClient.vo.OverallVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+@Service
+public class OverallService {
+    @Autowired
+    OverallClient overallClient;
+
+    private static String appId ="BDA385EC848C1A425F746869011C8D23";
+    private static String key ="appId";
+    public  OverallVo delete(String num) {
+        return overallClient.delete(num,appId,key);
+    }
+
+    public OverallVo list(OverallParam param) {
+        return overallClient.list(param,appId,key);
+    }
+}

+ 21 - 6
src/main/java/com/fdkankan/manage/httpClient/vo/OverallParam.java

@@ -34,18 +34,33 @@ public class OverallParam {
 
     private String sort ;
 
+    /**
+     * 1:查询全景作品,2:查询全景相机作品
+     */
+    private Integer type = 1;
+
+    /**
+     * 相机码
+     */
+    private String snCode;
+
+    /**
+     * 场景码
+     */
+    private String num;
+
+    /**
+     * 场景列表集合
+     */
+    private List<String> nums;
+
     public String getSearchKey() {
         if(StringUtils.isNotBlank(sceneName)){
             return sceneName;
         }
         return searchKey;
     }
-    public String getUserId() {
-        if(StringUtils.isNotBlank(userName)){
-            return userName;
-        }
-        return userId;
-    }
+
 
     public String getOrderBy() {
         if(StringUtil.isNotBlank(field)){

+ 1 - 0
src/main/java/com/fdkankan/manage/inner/controller/InnerController.java

@@ -1,5 +1,6 @@
 package com.fdkankan.manage.inner.controller;
 
+import cn.hutool.log.Log;
 import com.fdkankan.common.util.SecurityUtil;
 import com.fdkankan.manage.common.ResultCode;
 import com.fdkankan.manage.common.ResultData;

+ 18 - 0
src/main/java/com/fdkankan/manage/mapper/IMqQueueConfigMapper.java

@@ -0,0 +1,18 @@
+package com.fdkankan.manage.mapper;
+
+import com.fdkankan.manage.entity.MqQueueConfig;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 
+ * @since 2024-05-08
+ */
+@Mapper
+public interface IMqQueueConfigMapper extends BaseMapper<MqQueueConfig> {
+
+}

+ 18 - 0
src/main/java/com/fdkankan/manage/mapper/IMqSendLogMapper.java

@@ -0,0 +1,18 @@
+package com.fdkankan.manage.mapper;
+
+import com.fdkankan.manage.entity.MqSendLog;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 
+ * @since 2024-05-08
+ */
+@Mapper
+public interface IMqSendLogMapper extends BaseMapper<MqSendLog> {
+
+}

+ 2 - 0
src/main/java/com/fdkankan/manage/mapper/IScenePlusMapper.java

@@ -25,4 +25,6 @@ public interface IScenePlusMapper extends BaseMapper<ScenePlus> {
     List<GroupByCount> getCountGroupByCameraId(@Param("cameraIds") List<Long> cameraIds);
 
     Long getSpaceSumByCameraId(@Param("cameraId") Long cameraId);
+
+    List<ScenePlus> getByUserIdsAndLocation(@Param("userIds")List<Long> userIds, @Param("location")Integer location);
 }

+ 21 - 0
src/main/java/com/fdkankan/manage/service/IMqQueueConfigService.java

@@ -0,0 +1,21 @@
+package com.fdkankan.manage.service;
+
+import com.fdkankan.manage.entity.MqQueueConfig;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+import java.util.List;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 
+ * @since 2024-05-08
+ */
+public interface IMqQueueConfigService extends IService<MqQueueConfig> {
+
+    List<MqQueueConfig> getNormalConfig();
+
+    MqQueueConfig getDefaultConfig();
+}

+ 20 - 0
src/main/java/com/fdkankan/manage/service/IMqSendLogService.java

@@ -0,0 +1,20 @@
+package com.fdkankan.manage.service;
+
+import com.fdkankan.manage.entity.MqSendLog;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+import java.util.HashMap;
+import java.util.List;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 
+ * @since 2024-05-08
+ */
+public interface IMqSendLogService extends IService<MqSendLog> {
+
+    HashMap<String, MqSendLog> getByNumList(List<String> modelingNumList);
+}

+ 2 - 0
src/main/java/com/fdkankan/manage/service/IRtkInfoService.java

@@ -21,4 +21,6 @@ public interface IRtkInfoService extends IService<RtkInfo> {
     void saveOrEdit(RtkInfo rtkInfo);
 
     void del(RtkInfo rtkInfo);
+
+    RtkInfo getByCameraSnCode(String cameraSnCode);
 }

+ 6 - 0
src/main/java/com/fdkankan/manage/service/IScenePlusService.java

@@ -33,4 +33,10 @@ public interface IScenePlusService extends IService<ScenePlus> {
     Long getCountByCameraId(Long cameraId);
 
     List<ScenePlus> getListByCameraId(Long cameraId);
+
+    List<ScenePlus> getByNumList(List<String> numList);
+
+    List<ScenePlus> getByUserIds(List<Long> userIds);
+
+    List<ScenePlus> getByUserIdsAndLocation(List<Long> userIds, Integer location);
 }

+ 1 - 1
src/main/java/com/fdkankan/manage/service/ISceneProService.java

@@ -35,7 +35,7 @@ public interface ISceneProService extends IService<ScenePro> {
 
     PageInfo pageList(SceneParam param);
 
-    void move(SceneParam param);
+    Integer move(SceneParam param);
 
     void copy(String num) throws Exception;
 

+ 36 - 0
src/main/java/com/fdkankan/manage/service/impl/MqQueueConfigServiceImpl.java

@@ -0,0 +1,36 @@
+package com.fdkankan.manage.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.fdkankan.manage.entity.MqQueueConfig;
+import com.fdkankan.manage.mapper.IMqQueueConfigMapper;
+import com.fdkankan.manage.service.IMqQueueConfigService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 
+ * @since 2024-05-08
+ */
+@Service
+public class MqQueueConfigServiceImpl extends ServiceImpl<IMqQueueConfigMapper, MqQueueConfig> implements IMqQueueConfigService {
+
+    @Override
+    public List<MqQueueConfig> getNormalConfig() {
+        LambdaQueryWrapper<MqQueueConfig> wrapper = new LambdaQueryWrapper<>();
+        wrapper.eq(MqQueueConfig::getIsSpecial,0);
+        return this.list(wrapper);
+    }
+
+    @Override
+    public MqQueueConfig getDefaultConfig() {
+        LambdaQueryWrapper<MqQueueConfig> wrapper = new LambdaQueryWrapper<>();
+        wrapper.eq(MqQueueConfig::getIsDefault,1);
+        return this.getOne(wrapper);
+    }
+}

+ 38 - 0
src/main/java/com/fdkankan/manage/service/impl/MqSendLogServiceImpl.java

@@ -0,0 +1,38 @@
+package com.fdkankan.manage.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.fdkankan.manage.entity.MqSendLog;
+import com.fdkankan.manage.mapper.IMqSendLogMapper;
+import com.fdkankan.manage.service.IMqSendLogService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+import java.util.HashMap;
+import java.util.List;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 
+ * @since 2024-05-08
+ */
+@Service
+public class MqSendLogServiceImpl extends ServiceImpl<IMqSendLogMapper, MqSendLog> implements IMqSendLogService {
+
+    @Override
+    public HashMap<String, MqSendLog> getByNumList(List<String> modelingNumList) {
+        HashMap<String, MqSendLog> map = new HashMap<>();
+        if(modelingNumList.isEmpty()){
+            return map;
+        }
+        LambdaQueryWrapper<MqSendLog> wrapper = new LambdaQueryWrapper<>();
+        wrapper.in(MqSendLog::getNum,modelingNumList);
+        wrapper.eq(MqSendLog::getStatus,0);
+        wrapper.isNull(MqSendLog::getQueue);
+        List<MqSendLog> list = this.list(wrapper);
+        list.forEach(e -> map.put(e.getNum(),e));
+        return map;
+    }
+}

+ 60 - 2
src/main/java/com/fdkankan/manage/service/impl/RtkInfoServiceImpl.java

@@ -1,13 +1,28 @@
 package com.fdkankan.manage.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fdkankan.manage.common.PageInfo;
+import com.fdkankan.manage.common.ResultCode;
+import com.fdkankan.manage.entity.AgentAudit;
 import com.fdkankan.manage.entity.RtkInfo;
+import com.fdkankan.manage.entity.SysUser;
+import com.fdkankan.manage.exception.BusinessException;
 import com.fdkankan.manage.mapper.IRtkInfoMapper;
 import com.fdkankan.manage.service.IRtkInfoService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.fdkankan.manage.service.ISysUserService;
 import com.fdkankan.manage.vo.request.RtkInfoParam;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.stream.Collectors;
+
 /**
  * <p>
  *  服务实现类
@@ -19,6 +34,10 @@ import org.springframework.stereotype.Service;
 @Service
 public class RtkInfoServiceImpl extends ServiceImpl<IRtkInfoMapper, RtkInfo> implements IRtkInfoService {
 
+
+    @Autowired
+    ISysUserService sysUserService;
+
     @Override
     public RtkInfo getByRtkSnCode(String rtkSnCode) {
         LambdaQueryWrapper<RtkInfo> wrapper = new LambdaQueryWrapper<>();
@@ -28,16 +47,55 @@ public class RtkInfoServiceImpl extends ServiceImpl<IRtkInfoMapper, RtkInfo> imp
 
     @Override
     public Object pageList(RtkInfoParam param) {
-        return null;
+        LambdaQueryWrapper<RtkInfo> wrapper = new LambdaQueryWrapper<>();
+        if(StringUtils.isNotBlank(param.getRtkSnCode())){
+            wrapper.like(RtkInfo::getRtkSnCode,param.getRtkSnCode());
+        }
+        if(StringUtils.isNotBlank(param.getUserName())){
+            wrapper.like(RtkInfo::getUserName,param.getUserName());
+        }
+        if(StringUtils.isNotBlank(param.getOperator())){
+            wrapper.like(RtkInfo::getOperator,param.getOperator());
+        }
+        if(StringUtils.isNotBlank(param.getStartTime())&& StringUtils.isNotBlank(param.getEndTime()) ) {
+            wrapper.between(RtkInfo::getCreateTime,param.getStartTime(),param.getEndTime());
+        }
+        wrapper.orderByDesc(RtkInfo::getCreateTime);
+        wrapper.orderByDesc(RtkInfo::getId);
+        Page<RtkInfo> page = this.page(new Page<>(param.getPageNum(), param.getPageSize()), wrapper);
+        Set<Long> createUserIds = page.getRecords().stream().map(RtkInfo::getCreateUserId).collect(Collectors.toSet());
+        HashMap<Long, SysUser> byIds = sysUserService.getByIds(createUserIds);
+        for (RtkInfo record : page.getRecords()) {
+            SysUser sysUser = byIds.get(record.getCreateUserId());
+            if(sysUser != null){
+                record.setCreateUserName(sysUser.getUserName());
+                record.setCreateNickName(sysUser.getNickName());
+            }
+        }
+        return PageInfo.PageInfo(page);
     }
 
     @Override
     public void saveOrEdit(RtkInfo rtkInfo) {
-
+        this.saveOrUpdate(rtkInfo);
     }
 
     @Override
     public void del(RtkInfo rtkInfo) {
+        if(rtkInfo.getId() == null){
+            throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
+        }
+        RtkInfo rtkInfo1 = this.getById(rtkInfo.getId());
+        if(rtkInfo1 == null){
+            throw new BusinessException(ResultCode.RECOED_NO_EXITS);
+        }
+        this.removeById(rtkInfo.getId());
+    }
 
+    @Override
+    public RtkInfo getByCameraSnCode(String cameraSnCode) {
+        LambdaQueryWrapper<RtkInfo> wrapper = new LambdaQueryWrapper<>();
+        wrapper.eq(RtkInfo::getCameraSnCode,cameraSnCode);
+        return this.getOne(wrapper);
     }
 }

+ 4 - 1
src/main/java/com/fdkankan/manage/service/impl/ScenePlusExtServiceImpl.java

@@ -33,10 +33,13 @@ public class ScenePlusExtServiceImpl extends ServiceImpl<IScenePlusExtMapper, Sc
 
     @Override
     public HashMap<Long, ScenePlusExt> getByPlusIds(List<Long> plusIds) {
+        HashMap<Long,ScenePlusExt> map = new HashMap<>();
+        if(plusIds.isEmpty()){
+            return map;
+        }
         LambdaQueryWrapper<ScenePlusExt> wrapper = new LambdaQueryWrapper<>();
         wrapper.in(ScenePlusExt::getPlusId,plusIds);
         List<ScenePlusExt> list = this.list(wrapper);
-        HashMap<Long,ScenePlusExt> map = new HashMap<>();
         list.forEach(entity -> map.put(entity.getPlusId(),entity));
         return map;
     }

+ 28 - 0
src/main/java/com/fdkankan/manage/service/impl/ScenePlusServiceImpl.java

@@ -105,4 +105,32 @@ public class ScenePlusServiceImpl extends ServiceImpl<IScenePlusMapper, ScenePlu
         wrapper.eq(ScenePlus::getCameraId,cameraId);
         return this.list(wrapper);
     }
+
+    @Override
+    public List<ScenePlus> getByNumList(List<String> numList) {
+        if(numList.isEmpty()){
+            return new ArrayList<>();
+        }
+        LambdaQueryWrapper<ScenePlus> wrapper = new LambdaQueryWrapper<>();
+        wrapper.in(ScenePlus::getNum,numList);
+        return this.list(wrapper);
+    }
+
+    @Override
+    public List<ScenePlus> getByUserIds(List<Long> userIds) {
+        if(userIds.isEmpty()){
+            return new ArrayList<>();
+        }
+        LambdaQueryWrapper<ScenePlus> wrapper = new LambdaQueryWrapper<>();
+        wrapper.in(ScenePlus::getUserId,userIds);
+        return this.list(wrapper);
+    }
+
+    @Override
+    public List<ScenePlus> getByUserIdsAndLocation(List<Long> userIds, Integer location) {
+        if(userIds.isEmpty()){
+            return new ArrayList<>();
+        }
+        return this.getBaseMapper().getByUserIdsAndLocation(userIds,location);
+    }
 }

+ 117 - 31
src/main/java/com/fdkankan/manage/service/impl/SceneProServiceImpl.java

@@ -16,8 +16,11 @@ import com.fdkankan.manage.common.*;
 import com.fdkankan.manage.exception.BusinessException;
 import com.fdkankan.common.util.*;
 import com.fdkankan.manage.httpClient.client.FdKKClient;
+import com.fdkankan.manage.httpClient.client.OverallClient;
 import com.fdkankan.manage.httpClient.service.LaserService;
 import com.fdkankan.manage.entity.*;
+import com.fdkankan.manage.httpClient.service.OverallService;
+import com.fdkankan.manage.httpClient.vo.OverallVo;
 import com.fdkankan.manage.mapper.ISceneProMapper;
 import com.fdkankan.manage.mq.common.MqQueueUtil;
 import com.fdkankan.manage.mq.param.ScenePayStatusVo;
@@ -98,6 +101,10 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
     ICommonService commonService;
     @Autowired
     IUserService userService;
+    @Autowired
+    IMqSendLogService mqSendLogService;
+    @Autowired
+    OverallService overallService;
 
 
     @Override
@@ -197,9 +204,6 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
 
     @Override
     public PageInfo pageList(SceneParam param) {
-        if(param.getType() == 2 || param.getType() == 6){  //深时
-            return laserService.pageList(param);
-        }
         if(param.getType() == 3){ //双目lite
            return sceneService.pageList(param);
         }
@@ -236,20 +240,45 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
         HashMap<String,SceneColdStorage> coldStorageMap = null;
         HashMap<Long, User> userMap = null;
         HashMap<Long, Camera> cameraMap = null;
+        HashMap<String,JSONObject> ssSceneMap = null;
+        HashMap<String,MqSendLog> mqSendLogMap = null;
 
+        List<String> sceneNumList = page.getRecords().stream().map(SceneVo::getNum).collect(Collectors.toList());
         if(!records.isEmpty()){
-            List<String> numList = records.parallelStream().map(SceneVo::getNum).collect(Collectors.toList());
-            map = copyLogService.getByNewNumList(numList);
-            coldStorageMap = sceneColdStorageService.getByNumList(numList);
-
+            map = copyLogService.getByNewNumList(sceneNumList);
+            coldStorageMap = sceneColdStorageService.getByNumList(sceneNumList);
             List<Long> userIds = records.parallelStream().map(SceneVo::getUserId).collect(Collectors.toList());
             userMap = userService.getByIds(userIds);
-
             List<Long> cameraIds = records.parallelStream().map(SceneVo::getCameraId).collect(Collectors.toList());
             cameraMap = cameraService.getByIds(cameraIds);
 
+            if(param.getType() == 2 ){
+                ssSceneMap = laserService.list(sceneNumList,4);
+            }
+            if(param.getType() == 6){
+                ssSceneMap = laserService.list(sceneNumList,5);
+            }
+            List<String> modelingNumList = page.getRecords().stream().filter(e -> e.getStatus() == 0).map(SceneVo::getNum).collect(Collectors.toList());
+            if(!modelingNumList.isEmpty()){
+                mqSendLogMap = mqSendLogService.getByNumList(modelingNumList);
+            }
         }
         for (SceneVo record : page.getRecords()) {
+            if(param.getType() == 2 || param.getType() == 6){
+                JSONObject ssObj = ssSceneMap.get(record.getNum());
+                if(ssObj!=null){
+                    record.setSceneName(ssObj.getString("title"));
+                    record.setThumb(ssObj.getString("thumb"));
+                    record.setWebSite(ssObj.getString("webSite"));
+                    record.setIsObj(ssObj.getInteger("buildObjStatus"));
+                    record.setViewCount(ssObj.getInteger("viewCount"));
+                    record.setStatus(toFdStatus(ssObj.getInteger("status")));
+                }else{
+                    record.setStatus(-1);
+                    record.setWebSite(null);
+                }
+            }
+
             record.setStatusString(SceneStatusUtil.getStatusString(record));
             if(userMap != null){
                 User user = userMap.get(record.getUserId());
@@ -286,12 +315,34 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
             }
             //{"latitude":22.3672085,"longitude":113.595673,"altitude":9.275519,"horizontalAccuracy":65.0,"verticalAccuracy":10.0,"timestamp":1564381147.2775609}
             record.setAddressComponent(commonService.getAddressComponent(record.getGps()));
+
+            if(mqSendLogMap!=null){
+                MqSendLog mqSendLog = mqSendLogMap.get(record.getNum());
+                if(mqSendLog != null){
+                    record.setStatusString("排队中");
+                    record.setStatus(-4);
+                }
+            }
         }
         return PageInfo.PageInfo(page);
     }
 
+    private Integer toFdStatus(Integer status) {
+        //深时状态,-1:场景被删 0:计算中 1计算失败 2计算成功 3封存 4生成OBJ中
+        switch (status) {
+            case 0:
+            case 4:
+                return 0;
+            case 2:
+                return -2;
+            case 3:
+                return -3;
+            default:
+                return -1;
+        }
+    }
     @Override
-    public synchronized void move(SceneParam param) {
+    public synchronized Integer move(SceneParam param) {
         Camera camera = cameraService.getBySnCode(param.getSnCode());
         if(camera == null){
             throw new BusinessException(ResultCode.CAMERA_SN_NOT_EXIST);
@@ -300,13 +351,30 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
         if(cameraDetail == null){
             throw new BusinessException(ResultCode.CAMERA_SN_NOT_EXIST);
         }
-        ScenePro scenePro = this.getByNum(param.getNum());
-        ScenePlus scenePlus = scenePlusService.getByNum(param.getNum());
+        if(StringUtils.isNotBlank(param.getNum())){
+           moveScene(param.getNum(),camera,cameraDetail);
+           return 1;
+        }
+        Integer successNum = param.getNumList().size();
+        for (String num : param.getNumList()) {
+            try {
+                moveScene(num,camera,cameraDetail);
+            }catch (Exception e){
+                successNum --;
+                log.info("move-scene-error:num:{},errorNum:{},error:{}",num,successNum,e.getMessage());
+            }
+        }
+        return successNum;
+    }
+
+    private void moveScene(String num,Camera camera,CameraDetail cameraDetail){
+        ScenePro scenePro = this.getByNum(num);
+        ScenePlus scenePlus = scenePlusService.getByNum(num);
         if((scenePro == null || scenePro.getCameraId() == null ) && (scenePlus== null || scenePlus.getCameraId() == null)){
             throw new BusinessException(SceneConstant.FAILURE_CODE_5005, SceneConstant.FAILURE_MSG_5005);
         }
         Integer status =  scenePro == null ? scenePlus.getSceneStatus() : scenePro.getStatus();
-        if(status == 0){
+        if(status != -2){
             throw new BusinessException(SceneConstant.FAILURE_CODE_5037, SceneConstant.FAILURE_MSG_5037);
         }
 
@@ -340,15 +408,6 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
         if(!oldCameraDetail.getType().equals(cameraDetail.getType())){
             throw new BusinessException(ResultCode.CAMERA_TYPE_NOT_ERROR);
         }
-//        String home = dataSource.replace("/mnt/data", "home")+"/data.fdage";
-//        if(!fYunFileServiceInterface.fileExist(home)){
-//            throw new BusinessException(ResultCode.MOVE_ERROR);
-//        }
-
-//        HashMap<String, SceneCopyLog> byNewNumList = copyLogService.getByNewNumList(Arrays.asList(param.getNum()));
-//        if(byNewNumList.size() >0){
-//            throw new BusinessException(ResultCode.MOVE_ERROR_COPY);
-//        }
 
         Long oldUseSpace = oldCameraDetail.getUsedSpace() - space < 0 ? 0 : oldCameraDetail.getUsedSpace() - space;
         if("GB".equals(oldCameraDetail.getUnit())){
@@ -361,8 +420,8 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
             wrapper.eq(ScenePro::getId,scenePro.getId());
             wrapper.set(ScenePro::getCameraId,camera.getId());
             wrapper.set(ScenePro::getUserId,cameraDetail.getUserId());
-           // wrapper.set(ScenePro::getStatus,0);
-           // this.updateOssStatus(String.format(OssPath.v3_statusPath,scenePro.getNum()),0,"status");
+            // wrapper.set(ScenePro::getStatus,0);
+            // this.updateOssStatus(String.format(OssPath.v3_statusPath,scenePro.getNum()),0,"status");
             this.update(wrapper);
             //场景迁移到另外的相机清除本身在的文件夹
             folderSceneService.delBySceneId(scenePro.getId());
@@ -378,14 +437,14 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
             folderSceneService.delBySceneId(scenePlus.getId());
         }
         //协作相机
-        sceneResourceCameraService.setCooperationUser(cameraDetail,param.getNum());
+        sceneResourceCameraService.setCooperationUser(cameraDetail,num);
 
         //String newDataSource = updateFdageNewDataSource(scenePro, scenePlus, oldCamera.getSnCode(), param.getSnCode(), dataSource);
 
         if(cameraDetail.getType() == 10 || cameraDetail.getType() == 11){       //深时场景
             //迁移深时 dataSource
             //FileUtil.move(new File(dataSource +"_laserData"),new File(newDataSource+"_laserData"),true);
-            laserService.move(param.getNum(),oldCamera.getSnCode(),camera.getSnCode(),cameraDetail.getUserId(),dataSource);
+            laserService.move(num,oldCamera.getSnCode(),camera.getSnCode(),cameraDetail.getUserId(),dataSource);
         }
         cameraDetailService.initSpace(oldCameraDetail);
         cameraDetailService.initSpace(cameraDetail);
@@ -404,8 +463,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
             this.lockOrUnLockBySpace(cameraDetail.getCameraId());
         }
         sceneMoveLogService.saveLog(scenePro,scenePlus,camera.getSnCode(),oldCamera.getSnCode(),dataSource,dataSource, null);
-        laserService.moveWenBao(param.getNum(),oldCamera.getSnCode(),camera.getSnCode(),cameraDetail.getUserId(),dataSource);
-
+        laserService.moveWenBao(num,oldCamera.getSnCode(),camera.getSnCode(),cameraDetail.getUserId(),dataSource);
     }
 
 
@@ -557,19 +615,45 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
         Integer sceneSource = null;
         Long cameraId = null;
         ScenePro scenePro = this.getByNum(num);
+        Scene scene = sceneService.getByNum(num);
+        ScenePlus scenePlus = scenePlusService.getByNum(num);
+        Integer status = null;
+
         if(scenePro!=null){
             cameraId = scenePro.getCameraId();
             sceneSource = scenePro.getSceneSource();
-            this.removeById(scenePro.getId());
+            status = scenePro.getStatus();
         }
-        Scene scene = sceneService.getByNum(num);
         if(scene!=null){
-            sceneService.removeById(scene.getId());
+            cameraId = scene.getCameraId();
+            status = scene.getStatus();
         }
-        ScenePlus scenePlus = scenePlusService.getByNum(num);
         if(scenePlus!=null){
             cameraId = scenePlus.getCameraId();
             sceneSource = scenePlus.getSceneSource();
+            status = scenePlus.getSceneStatus();
+        }
+        HashMap<String, MqSendLog> mqSendLogHashMap = mqSendLogService.getByNumList(Arrays.asList(num));
+        String redisKey = "mq-wait:queue:num:"+num;
+        if(!mqSendLogHashMap.isEmpty()){
+            for (String key : mqSendLogHashMap.keySet()) {
+                if(!redisUtil.hasKey(redisKey)){
+                    mqSendLogService.removeById(mqSendLogHashMap.get(key).getId());
+                    status = -1;
+                }
+            }
+        }
+        if(status != null && status == 0){
+            throw new BusinessException(ResultCode.CAN_NOT_DEL_MODELING_SCENE);
+        }
+
+        if(scenePro!=null){
+            this.removeById(scenePro.getId());
+        }
+        if(scene!=null){
+            sceneService.removeById(scene.getId());
+        }
+        if(scenePlus!=null){
             ScenePlusExt plusExt = scenePlusExtService.getByPlusId(scenePlus.getId());
             if(plusExt != null){
                 scenePlusExtService.delByPlus(scenePlus.getId());
@@ -579,6 +663,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
         if(sceneSource != null && (sceneSource == 4 || sceneSource == 5)){
             laserService.delete(num);
         }
+        overallService.delete(num);
         if(cameraId != null){
             cameraDetailService.initSpace(cameraId);
             this.lockOrUnLockBySpace(cameraId);
@@ -738,6 +823,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
         }
         HashMap<String,Object> paramMap = new HashMap<>();
         paramMap.put("num",num);
+        paramMap.put("from","manage");
         try {
             JSONObject jsonObject = fdKKClient.rebuildScene(paramMap);
             Integer code = jsonObject.getInteger("code");

+ 2 - 1
src/main/java/com/fdkankan/manage/util/ProvinceUtils.java

@@ -125,7 +125,8 @@ public class ProvinceUtils {
     }
 
     public static void main(String[] args) {
-        System.out.println( getAddressByIp("127"));
+
+        System.out.println( pointsToLocationsAll("120.42355098505286,23.543548401862722"));
     }
 
 }

+ 17 - 0
src/main/java/com/fdkankan/manage/util/SceneStatusUtil.java

@@ -21,4 +21,21 @@ public class SceneStatusUtil {
         }
 
     }
+
+
+    public static String getOverallStatusString(Integer payStatus,Integer calcStatus) {
+        if(calcStatus == null || payStatus == null){
+            return "";
+        }
+        switch (calcStatus){
+            case 0: return "计算中";
+            case 1:
+                if(payStatus != 1){
+                    return  "封存";
+                }
+                return "计算成功";
+            case -1: return "计算失败";
+            default: return "";
+        }
+    }
 }

+ 22 - 1
src/main/java/com/fdkankan/manage/vo/request/RtkInfoParam.java

@@ -1,11 +1,32 @@
 package com.fdkankan.manage.vo.request;
 
+import com.fdkankan.manage.util.DateUtils;
 import lombok.Data;
 
+import java.util.List;
+
 @Data
 public class RtkInfoParam extends RequestBase{
     private String rtkSnCode;
     private String userName;
-    private String createTime;
     private String operator;
+
+    private List<String> timeList;
+
+    private String startTime;
+    private String endTime;
+
+    public String getStartTime() {
+        if(timeList != null && timeList.size() >1){
+            return DateUtils.getStartTime(timeList.get(0));
+        }
+        return DateUtils.getStartTime(startTime);
+    }
+
+    public String getEndTime() {
+        if(timeList != null && timeList.size() >1){
+            return DateUtils.getEndTime(timeList.get(1));
+        }
+        return DateUtils.getEndTime(endTime);
+    }
 }

+ 2 - 0
src/main/java/com/fdkankan/manage/vo/request/SceneParam.java

@@ -5,6 +5,7 @@ import com.fdkankan.manage.util.FiledUtil;
 import jodd.util.StringUtil;
 import lombok.Data;
 
+import java.util.ArrayList;
 import java.util.List;
 @Data
 public class SceneParam extends RequestBase {
@@ -29,6 +30,7 @@ public class SceneParam extends RequestBase {
     private List<Long> cameraIds;
     private List<Long> userIds;
 
+    private List<String> numList = new ArrayList<>();
     public String getStartTime() {
         if(timeList != null && timeList.size() >1){
             return DateUtils.getStartTime(timeList.get(0));

+ 8 - 0
src/main/java/com/fdkankan/manage/vo/response/AddressComponent.java

@@ -2,6 +2,7 @@ package com.fdkankan.manage.vo.response;
 
 import lombok.Data;
 import lombok.ToString;
+import org.apache.commons.lang3.StringUtils;
 
 @Data
 @ToString
@@ -11,4 +12,11 @@ public class AddressComponent {
     private String city;
     private String district;
     private String township;
+
+    public String getCity() {
+        if(StringUtils.isNotBlank(city) && StringUtils.isNotBlank(province) && city.equals("[]")){
+            return province;
+        }
+        return city;
+    }
 }

+ 5 - 0
src/main/resources/mapper/manage/MqQueueConfigMapper.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.manage.mapper.IMqQueueConfigMapper">
+
+</mapper>

+ 5 - 0
src/main/resources/mapper/manage/MqSendLogMapper.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.manage.mapper.IMqSendLogMapper">
+
+</mapper>

+ 8 - 0
src/main/resources/mapper/manage/ScenePlusMapper.xml

@@ -34,4 +34,12 @@
     <select id="getSpaceSumByCameraId" resultType="java.lang.Long">
         select  sum(space) from  t_scene_plus p left join t_scene_plus_ext e on p.id = e.plus_id where p.rec_status = 'A' and p.scene_status = -2 and p.camera_id = #{cameraId}
     </select>
+    <select id="getByUserIdsAndLocation" resultType="com.fdkankan.manage.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 e.location = 7
+                                                                                           and s.user_id in
+            <foreach collection="userIds" item="userId" open="(" separator="," close=")">
+                #{userId}
+            </foreach>
+
+    </select>
 </mapper>

+ 6 - 0
src/main/resources/mapper/manage/SceneProMapper.xml

@@ -74,9 +74,15 @@
         <if test="param.type !=null and param.type == 1">
             and s.scene_source = 3
         </if>
+        <if test="param.type !=null and param.type == 2">
+            and s.scene_source = 4
+        </if>
         <if test="param.type !=null and param.type == 5">
             and s.scene_source = 4 and is_obj = 1
         </if>
+        <if test="param.type !=null and param.type == 6">
+            and s.scene_source = 5
+        </if>
         <if test="param.type !=null and param.type == 7">
             and s.scene_source = 5 and is_obj = 1
         </if>