Quellcode durchsuchen

目标类型修改

wurui vor 1 Monat
Ursprung
Commit
5bdaa86c91

+ 3 - 0
orbit-base-biz/base-biz-service/src/main/java/com/base/biz/model/dto/request/QueryTargetListDTO.java

@@ -9,5 +9,8 @@ public class QueryTargetListDTO extends PageDTO {
 
     @ApiModelProperty("目标名称")
     private String targetName;
+    @ApiModelProperty("目标类型")
+    private Integer type;
+
 
 }

+ 2 - 0
orbit-base-biz/base-biz-service/src/main/java/com/base/biz/model/dto/response/TargetPointDTO.java

@@ -38,4 +38,6 @@ public class TargetPointDTO {
 
     @ApiModelProperty("目标点集合")
     private List<PointDTO> pointDTOList;
+    private String pointType;//目标类型
+
 }

+ 5 - 1
orbit-base-biz/base-biz-service/src/main/java/com/base/biz/model/enums/TargetTypeEnums.java

@@ -2,7 +2,11 @@ package com.base.biz.model.enums;
 
 public enum TargetTypeEnums {
 
-    FIXED_TARGET("0", "固定目标"),MOVING_TARGET("1", "移动目标"),REGIONAL_TARGET("2", "区域目标"),UNDEFINED("-1", "未知");
+    FIXED_TARGET("0", "固定目标"),MOVING_TARGET("1", "移动目标"),REGIONAL_TARGET("2", "区域目标")
+    ,LINE("3", "线目标")
+    ,GROUPPOINT("4", "点群目标")
+    ,UNDEFINED("-1", "未知")
+    ;
 
     private String key;
 

+ 1 - 1
orbit-base-biz/base-biz-service/src/main/java/com/base/biz/service/SceneBasisTargetService.java

@@ -92,7 +92,7 @@ public class SceneBasisTargetService {
             String targetId = target.getTargetId();
             List<SceneTargetPoint> sceneTargetPointList = sceneTargetPoints.stream().filter(e -> targetId.equals(e.getTargetId())).collect(Collectors.toList());
             List<PointDTO> pointDTOList = sceneTargetPointsCastToDTO(sceneTargetPointList);
-            target.setType(TargetTypeEnums.getTargetTypeEnums(StringUtils.isEmpty(target.getType()) ? "-1" : target.getType()).getValue());
+            //target.setType(TargetTypeEnums.getTargetTypeEnums(StringUtils.isEmpty(target.getType()) ? "-1" : target.getType()).getValue());
             target.setPointDTOList(pointDTOList);
         });
         com.github.pagehelper.PageInfo<TargetPointDTO> pageInfo = new com.github.pagehelper.PageInfo<>(targetList);

+ 2 - 0
orbit-base-biz/base-biz-service/src/main/java/com/base/biz/service/TargetDemandService.java

@@ -287,6 +287,8 @@ public class TargetDemandService extends ServiceImpl<TargetDemandMapper, TargetD
         List<SceneTargetPoint> sceneTargetPoints = sceneTargetPointMapper.selectList(pointQueryWrapper);
 
         for (TargetDemandRpcDTO targetDemandRpcDTO : targetDemandRpcDTOS) {
+            SceneBasisTarget sceneBasisTarget = sceneBasisTargetMapper.selectById(targetDemandRpcDTO.getTargetId());
+            targetDemandRpcDTO.setType(sceneBasisTarget.getType());
             //  点目标集合
             List<PointRpcDTO> pointDTOList = new ArrayList<>();
             //  根据目标id匹配点目标

+ 3 - 0
orbit-base-biz/base-biz-service/src/main/resources/mapper/SceneTargetPointMapper.xml

@@ -94,6 +94,9 @@
             <if test="req.targetName!=null and req.targetName!=''">
                 and t.target_name like concat('%', #{req.targetName}, '%')
             </if>
+            <if test="req.type!=null and req.type!=''">
+                and t.type = #{req.type}
+            </if>
         </where>
         ORDER BY
             CAST(SUBSTRING_INDEX(t.target_name, '测试点位', -1) AS UNSIGNED)

+ 11 - 1
orbit-base-plan/base-plan-service/src/main/java/com/base/plan/model/enums/PointTypeEnumes.java

@@ -14,5 +14,15 @@ public enum PointTypeEnumes {
     /**
      * 点群目标
      */
-    GROUPPOINT;
+    GROUPPOINT,
+
+    /**
+     * 点目标
+     */
+    POINTTARGET,
+
+    /**
+     * 区域目标
+     */
+    REGIONTARGET;
 }

+ 3 - 3
orbit-base-plan/base-plan-service/src/main/java/com/base/plan/service/StripService.java

@@ -831,7 +831,7 @@ public class StripService extends ServiceImpl<StripMapper, StripInfo> {
                 System.out.println("====================构建观测区域===================");
 
                 //判断是那个类型的目标 目前只有移动点目标 线目标 点群目标需要做单独处理
-                if (value.get(0).getTargetType().equals(PointTypeEnumes.MOVEPOINT.toString())){
+                if (targetRelationDTO.getType()==1){
                     //移动点目标
                     //根据 航向 航速 时间进行轨迹推算 取得所需时刻后的目标点位
                     LaLonUtil.deadReckoning("","","","","");
@@ -839,7 +839,7 @@ public class StripService extends ServiceImpl<StripMapper, StripInfo> {
 
                 Map<Integer, List<PointRpcDTO>> PointRpcDTOmapNew=new HashMap<>();
 
-                if (value.get(0).getTargetType().equals(PointTypeEnumes.LINE.toString())){
+                if (targetRelationDTO.getType()==3){
                     //线目标
                     //先将多点目标按照时间连城线并绘制区域
                     PointRpcDTO pointRpcDTO1=new PointRpcDTO();
@@ -856,7 +856,7 @@ public class StripService extends ServiceImpl<StripMapper, StripInfo> {
                     }
 
                 }
-                if (value.get(0).getTargetType().equals(PointTypeEnumes.GROUPPOINT.toString())){
+                if (targetRelationDTO.getType()==4){
                     //点群目标
                     //先绘制点群外接四边形区域
                     List<PointRpcDTO> pointRpcDTOList2=new ArrayList<>();