Browse Source

Merge branch 'develop' of http://39.106.8.246:3003/BDTP/digital-delivery into develop

lijie 3 years ago
parent
commit
8c46fc5908
23 changed files with 345 additions and 238 deletions
  1. 20 8
      adm-business/adm-diagram/src/main/java/com/persagy/adm/diagram/controller/DiagramController.java
  2. 9 0
      adm-business/adm-diagram/src/main/java/com/persagy/adm/diagram/core/DataStrategy.java
  3. 23 8
      adm-business/adm-diagram/src/main/java/com/persagy/adm/diagram/core/impl/DataStrategyImpl.java
  4. 2 10
      adm-business/adm-diagram/src/main/java/com/persagy/adm/diagram/entity/ModelAdapter.java
  5. 1 1
      adm-business/adm-diagram/src/main/resources/db.init/schema.sql
  6. 3 3
      adm-business/adm-diagram/src/main/resources/mapper/Diagram.xml
  7. 1 1
      adm-business/adm-middleware/src/main/java/com/persagy/proxy/migration/controller/DataMigrationController.java
  8. 30 14
      adm-business/adm-middleware/src/main/java/com/persagy/proxy/migration/service/Impl/MigrationAbstractServiceImpl.java
  9. 18 8
      adm-business/adm-middleware/src/main/java/com/persagy/proxy/migration/service/Impl/ObjectDigitalMigration.java
  10. 11 33
      adm-business/adm-middleware/src/main/java/com/persagy/proxy/migration/service/Impl/ObjectRelationMigration.java
  11. 9 8
      adm-business/adm-middleware/src/main/java/com/persagy/proxy/object/controller/AdmSpaceController.java
  12. 0 36
      adm-business/adm-server/pom.xml
  13. 0 36
      adm-business/adm-server/src/main/java/com/persagy/adm/server/custom/common/AdmResult.java
  14. 9 11
      adm-business/adm-server/src/main/java/com/persagy/adm/server/custom/controller/AdmFileController.java
  15. 14 20
      adm-business/adm-server/src/main/java/com/persagy/adm/server/custom/controller/AppController.java
  16. 4 3
      adm-business/adm-server/src/main/java/com/persagy/adm/server/custom/controller/ManageController.java
  17. 18 17
      adm-business/adm-server/src/main/java/com/persagy/adm/server/custom/controller/ToolController.java
  18. 4 4
      adm-business/adm-server/src/main/java/com/persagy/adm/server/custom/entity/db/AdmCad.java
  19. 1 1
      adm-business/adm-server/src/main/java/com/persagy/adm/server/custom/entity/db/AdmProblem.java
  20. 4 4
      adm-business/adm-server/src/main/java/com/persagy/adm/server/custom/service/CallException.java
  21. 1 2
      adm-business/adm-server/src/main/java/com/persagy/adm/server/custom/service/ServiceUtil.java
  22. 0 9
      adm-business/adm-server/src/main/java/com/persagy/adm/server/custom/service/impl/SyncAppImpl.java
  23. 163 1
      adm-business/adm-server/src/main/resources/db/init/data.sql

+ 20 - 8
adm-business/adm-diagram/src/main/java/com/persagy/adm/diagram/controller/DiagramController.java

@@ -4,6 +4,7 @@ import com.fasterxml.jackson.databind.node.ObjectNode;
 import com.persagy.adm.diagram.core.ContentParser;
 import com.persagy.adm.diagram.core.DataStrategy;
 import com.persagy.adm.diagram.core.model.Diagram;
+import com.persagy.adm.diagram.core.model.DiagramNode;
 import com.persagy.adm.diagram.core.model.template.DiagramTemplate;
 import com.persagy.adm.diagram.frame.BdtpRequest;
 import com.persagy.adm.diagram.manage.DemoDiagramManager;
@@ -22,6 +23,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
+import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
 import java.util.Optional;
@@ -69,7 +71,6 @@ public class DiagramController {
      *
      * @param params    参数集合
      * @param projectId 项目id
-     * @param systemId  系统实例id
      * @param groupCode 集团code
      * @return 系统图信息
      */
@@ -77,12 +78,10 @@ public class DiagramController {
     @PostMapping("/newDiagram")
     public CommonResult<Diagram> newDiagram(@RequestBody Map<String, Object> params,
                                             @RequestParam String projectId,
-                                            @RequestParam(required = false) String systemId,
                                             @RequestParam String groupCode) {
         Diagram diagram = new Diagram();
         diagram.setGroupCode(groupCode);
         diagram.setProjectId(projectId);
-        diagram.setSystemId(systemId);
 
         Optional.ofNullable(params).ifPresent(map -> {
             Optional.ofNullable(map.get("id")).ifPresent(o -> diagram.setId(String.valueOf(o)));
@@ -93,6 +92,7 @@ public class DiagramController {
                 diagram.setType(String.valueOf(o));
                 diagram.setSystem(String.valueOf(o).substring(0, 4));
             });
+            Optional.ofNullable(map.get("systemId")).ifPresent(o -> diagram.setSystemId(String.valueOf(o)));
             Optional.ofNullable(map.get("name")).ifPresent(o -> diagram.setName(String.valueOf(o)));
             Optional.ofNullable(map.get("remark")).ifPresent(o -> diagram.setRemark(String.valueOf(o)));
             Optional.ofNullable(map.get("templateId")).ifPresent(o -> diagram.setTemplateId(String.valueOf(o)));
@@ -102,10 +102,9 @@ public class DiagramController {
             });
             Optional.ofNullable(map.get("lines")).ifPresent(lines ->
                     diagram.setLines(parser.parseContent(parser.toJson(lines), List.class)));
-            Optional.ofNullable(map.get("nodes")).ifPresent(nodes ->
-                    diagram.setNodes(parser.parseContent(parser.toJson(nodes), List.class)));
-            Optional.ofNullable(map.get("template")).ifPresent(s ->
-                    diagram.setTemplate(parser.parseContent(parser.toJson(s), DiagramTemplate.class)));
+            Optional.ofNullable(map.get("nodes")).ifPresent(nodes -> {
+                diagram.setNodes(Arrays.asList(parser.parseContent(parser.toJson(nodes), DiagramNode[].class)));
+            });
         });
 
         return ResultHelper.single(dataStrategy.saveDiagram(diagram));
@@ -132,7 +131,9 @@ public class DiagramController {
     @ApiOperation("根据系统图id获取系统图信息")
     @GetMapping("/getDiagram")
     public CommonResult<Diagram> getDiagram(String diagramId) {
-        return ResultHelper.single(dataStrategy.getDiagram(diagramId));
+        Diagram diagram = dataStrategy.getDiagram(diagramId);
+        diagramManager.buildDiagram(diagram, true);
+        return ResultHelper.single(diagram);
     }
 
     /**
@@ -217,4 +218,15 @@ public class DiagramController {
     public CommonResult<Diagram> loadData(@RequestBody Diagram diagram) {
         return ResultHelper.single(diagramManager.loadData(diagram.getId(), true));
     }
+
+    /**
+     * 系统图状态变更
+     *
+     * @return 是否成功
+     */
+    @ApiOperation("系统图状态变更")
+    @PostMapping("/update/state")
+    public CommonResult<Boolean> updateState(@RequestBody Map<String, String> params) {
+        return ResultHelper.single(dataStrategy.updateState(params.get("state"), params.get("id")));
+    }
 }

+ 9 - 0
adm-business/adm-diagram/src/main/java/com/persagy/adm/diagram/core/DataStrategy.java

@@ -87,4 +87,13 @@ public interface DataStrategy {
      * @return
      */
     List<ObjectNode> loadSystemTypeTemplate(Diagram diagram);
+
+    /**
+     * 更新系统图状态
+     *
+     * @param state 状态
+     * @param id
+     * @return
+     */
+    boolean updateState(String state, String id);
 }

+ 23 - 8
adm-business/adm-diagram/src/main/java/com/persagy/adm/diagram/core/impl/DataStrategyImpl.java

@@ -41,7 +41,6 @@ import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.stereotype.Service;
 
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
@@ -339,6 +338,7 @@ public class DataStrategyImpl implements DataStrategy {
             }
         }
         diagram.setId(IdUtil.simpleUUID());
+        diagram.setExtraProp("state","Draft");
         diagramMapper.saveDiagram(modelAdapter.toDiagramEntity(diagram));
         return diagram;
     }
@@ -434,9 +434,9 @@ public class DataStrategyImpl implements DataStrategy {
     /**
      * 查询obj_from 和 objTo 的数据
      *
-     * @param projectId 项目id
-     * @param groupCode 集团code
-     * @param objectIds 对象id列表
+     * @param projectId  项目id
+     * @param groupCode  集团code
+     * @param objectIds  对象id列表
      * @param graphTypes 关系的图类型(同时处理图类型和边类型不太可行,优选图类型过滤)
      * @return
      */
@@ -445,16 +445,18 @@ public class DataStrategyImpl implements DataStrategy {
 
         //graph_code
         ArrayNode graphCode = objectMapper.createArrayNode();
-        if(graphTypes.size() > 0)
-            graphTypes.forEach(code -> graphCode.add(code));
+        if (graphTypes.size() > 0) {
+            graphTypes.forEach(graphCode::add);
+        }
 
         //obj_from
         CompletableFuture<List<ObjectRelation>> fromFuture = CompletableFuture.supplyAsync(() -> {
             QueryCriteria criteria = ServiceUtil.getQueryCriteria(objectMapper);
             ArrayNode objFrom = criteria.getCriteria().putArray(ObjectRelation.OBJ_FROM_HUM);
             Optional.ofNullable(objectIds).ifPresent(strings -> strings.forEach(objFrom::add));
-            if(graphCode.size() > 0)
+            if (graphCode.size() > 0) {
                 criteria.getCriteria().set(ObjectRelation.GRAPH_CODE_HUM, graphCode);
+            }
             return DigitalRelationFacade.query(groupCode, projectId, null, null, criteria);
         }, executor);
         //obj_to
@@ -462,8 +464,9 @@ public class DataStrategyImpl implements DataStrategy {
             QueryCriteria criteria = ServiceUtil.getQueryCriteria(objectMapper);
             ArrayNode objTo = criteria.getCriteria().putArray(ObjectRelation.OBJ_TO_HUM);
             Optional.ofNullable(objectIds).ifPresent(strings -> strings.forEach(objTo::add));
-            if(graphCode.size() > 0)
+            if (graphCode.size() > 0) {
                 criteria.getCriteria().set(ObjectRelation.GRAPH_CODE_HUM, graphCode);
+            }
             return DigitalRelationFacade.query(groupCode, projectId, null, null, criteria);
         }, executor);
 
@@ -650,4 +653,16 @@ public class DataStrategyImpl implements DataStrategy {
 
         return objectNodes;
     }
+
+    @Override
+    public boolean updateState(String state, String id) {
+        if (StrUtil.isBlank(state) || StrUtil.isBlank(id)) {
+            throw new BusinessException(ResponseCode.A0400.getCode(), "主键id或者状态参数为空");
+        }
+        DiagramEntity entity = new DiagramEntity();
+        entity.setId(id);
+        entity.setState(state);
+        diagramMapper.updateById(entity);
+        return true;
+    }
 }

+ 2 - 10
adm-business/adm-diagram/src/main/java/com/persagy/adm/diagram/entity/ModelAdapter.java

@@ -7,9 +7,6 @@ import com.persagy.adm.diagram.core.model.template.DiagramTemplate;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import java.util.List;
-import java.util.Map;
-
 /**
  * 运行时模型-实体 类型转换适配器
  *
@@ -64,13 +61,7 @@ public class ModelAdapter {
     }
 
     public Diagram toDiagram(DiagramEntity diagramEntity) {
-        //Diagram diagram = parser.parseContent(diagramEntity.getDiagramContent(), Diagram.class);
-        Diagram diagram = new Diagram();
-        Map map = parser.parseContent(diagramEntity.getDiagramContent(), Map.class);
-        diagram.setLines(parser.parseContent(parser.toJson(map.get("lines")), List.class));
-        diagram.setNodes(parser.parseContent(parser.toJson(map.get("nodes")), List.class));
-        diagram.setTemplate(parser.parseContent(parser.toJson(map.get("template")), DiagramTemplate.class));
-
+        Diagram diagram = parser.parseContent(diagramEntity.getDiagramContent(), Diagram.class);
         diagram.setId(diagramEntity.getId());
         diagram.setName(diagramEntity.getName());
         diagram.setRemark(diagramEntity.getRemark());
@@ -80,6 +71,7 @@ public class ModelAdapter {
         diagram.setProjectId(diagramEntity.getProjectId());
         diagram.setSystemId(diagramEntity.getSystemId());
         diagram.setGroupCode(diagramEntity.getGroupCode());
+        diagram.setCreateTime(diagramEntity.getCreationTime());
         diagram.setExtraProp("state", diagramEntity.getState());
         return diagram;
     }

+ 1 - 1
adm-business/adm-diagram/src/main/resources/db.init/schema.sql

@@ -63,7 +63,7 @@ CREATE TABLE IF NOT EXISTS `diagram` (
   `project_id` varchar(40) DEFAULT NULL COMMENT '项目id',
   `system_id` varchar(100) DEFAULT NULL COMMENT '系统id',
   `group_code` varchar(40) DEFAULT NULL COMMENT '集团编码',
-  `state` tinyint DEFAULT 1 NOT NULL COMMENT '系统图状态',
+  `state` varchar(40) DEFAULT NULL NOT NULL COMMENT '系统图状态',
   `diagram_content` json DEFAULT NULL COMMENT '系统图内容,json格式',
   `creator` varchar(32) DEFAULT NULL COMMENT '创建人',
   `creation_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',

+ 3 - 3
adm-business/adm-diagram/src/main/resources/mapper/Diagram.xml

@@ -12,7 +12,7 @@
         <result column="project_id" property="projectId" jdbcType="VARCHAR"/>
         <result column="system_id" property="systemId" jdbcType="VARCHAR"/>
         <result column="group_code" property="groupCode" jdbcType="VARCHAR"/>
-        <result column="state" property="state" jdbcType="TINYINT"/>
+        <result column="state" property="state" jdbcType="VARCHAR"/>
         <result column="diagram_content" property="diagramContent" jdbcType="VARCHAR"/>
         <result column="creator" property="creator" jdbcType="VARCHAR"/>
         <result column="creation_time" property="creationTime" jdbcType="CHAR"/>
@@ -31,11 +31,11 @@
         INSERT INTO diagram
         (id,name,remark,type,bt_system,template_id,
         project_id,system_id,group_code,diagram_content,
-        creator,creation_time,modifier,modified_time)
+        creator,creation_time,modifier,modified_time,state)
         VALUES
         (#{id},#{name},#{remark},#{type},#{btSystem},#{templateId},
         #{projectId},#{systemId},#{groupCode},#{diagramContent},
-        #{creator}, #{creationTime},#{modifier},#{modifiedTime})
+        #{creator}, #{creationTime},#{modifier},#{modifiedTime},#{state})
     </insert>
 
     <delete id="deleteByDiagramId">

+ 1 - 1
adm-business/adm-middleware/src/main/java/com/persagy/proxy/migration/controller/DataMigrationController.java

@@ -74,7 +74,7 @@ public class DataMigrationController {
         try {
 
             if (migrationInfo == null || StrUtil.isBlank(migrationInfo.getTargetUrl())) {
-                throw new BusinessException(ResponseCode.A0402.getCode(), ResponseCode.A0402.getDesc());
+                throw new BusinessException(ResponseCode.A0402.toString());
             }
             InstanceUrlParam context = AdmContextUtil.toDmpContext();
             //确定集团编码 和 项目id

+ 30 - 14
adm-business/adm-middleware/src/main/java/com/persagy/proxy/migration/service/Impl/MigrationAbstractServiceImpl.java

@@ -242,6 +242,9 @@ public class MigrationAbstractServiceImpl<T> implements IMigrationAbstractServic
                         || fieldKey.equals(AuditableEntity.DO_PROP_MODIFIEDTIME)
                         || fieldKey.equals(AuditableEntity.PROP_MODIFIER)
                         || fieldKey.equals(BaseEntity.PROP_TS)
+                        || fieldKey.equals("createApp")
+                        || fieldKey.equals("updateApp")
+                        || fieldKey.equals(BaseEntity.PROP_TS)
                         || fieldKey.equals("dataSource")
                 ){
                     continue;
@@ -349,11 +352,6 @@ public class MigrationAbstractServiceImpl<T> implements IMigrationAbstractServic
         if(CollUtil.isEmpty(difference)){
             return null;
         }
-        /*difference.forEach(set1 -> System.out.println(set1));
-        System.out.println("-------------------------------------------------------------------------");
-        Sets.SetView<String> difference2 = Sets.difference(toSets, formSets);
-        difference2.forEach(set2 -> System.out.println(set2));*/
-
         Set<String> diff = difference.stream().map(entity -> StrUtil.subBefore(entity, MigrationConstant.SPLITER_UNION, true)).collect(Collectors.toSet());
         Map<String, Object> results = getValueForMapByKeys(diff, from);
         return results;
@@ -385,22 +383,40 @@ public class MigrationAbstractServiceImpl<T> implements IMigrationAbstractServic
             syncData.setTableName(tableName);
             syncData.setTargetId("error");
             syncData.setError(msg);
-            syncData.setSign(1);
+            syncData.setSign(3);//异常
             syncDataList.add(syncData);
         }
         return syncDataList;
     }
 
+    /**
+     * 调用中台接口,保存迁移日志
+     * 日志量 > MigrationConstant.BATCH_SUBMIT_DATA_COUNT 使用分页插入
+     *
+     * @param context
+     * @param syncDataList
+     * @return
+     */
     @Override
     public List<SyncData> addSynLog(InstanceUrlParam context, List<SyncData> syncDataList) {
         if(CollUtil.isEmpty(syncDataList)){
             return Collections.emptyList();
         }
+        //List<SyncData> syncDatasResult = new ArrayList<>(syncDataList.size());
         // 调用中台新增
-        List<SyncData> syncDatas = DigitalMigrateLogFacade.create(context.getGroupCode(),context.getProjectId(),context.getAppId(), context.getUserId(), syncDataList);
-
-        if(CollUtil.isEmpty(syncDatas)) {
-            throw new RuntimeException("调用中台更新迁移日志出错");
+        if(syncDataList.size() - MigrationConstant.BATCH_SUBMIT_DATA_COUNT < 0){
+            DigitalMigrateLogFacade.create(context.getGroupCode(),context.getProjectId(),context.getAppId(), context.getUserId(), syncDataList);
+        }else{
+            int count= syncDataList.size() / MigrationConstant.BATCH_SUBMIT_DATA_COUNT;
+            for(int k = 0; k < count + 1 ;k++){
+                int end = (k+1)  * MigrationConstant.BATCH_SUBMIT_DATA_COUNT - 1;
+                if(end > syncDataList.size()){
+                    end = syncDataList.size();
+                }
+                List syncData = syncDataList.subList(k * MigrationConstant.BATCH_SUBMIT_DATA_COUNT, end);
+                //syncDatasResult.addAll(DigitalMigrateLogFacade.create(context.getGroupCode(),context.getProjectId(),context.getAppId(), context.getUserId(), syncData));
+                DigitalMigrateLogFacade.create(context.getGroupCode(),context.getProjectId(),context.getAppId(), context.getUserId(), syncData);
+            }
         }
         return syncDataList;
     }
@@ -432,12 +448,12 @@ public class MigrationAbstractServiceImpl<T> implements IMigrationAbstractServic
                 }
                 return DataMigrationResponse.success(JsonNodeUtils.toEntity(arrayNode, clazz, null));
             }else {
-                log.error(commonResult.getMessage());
-                return DataMigrationResponse.error(commonResult.getMessage());
+                log.error(StrUtil.format("获取中台数据失败{}",commonResult.getMessage()));
+                return DataMigrationResponse.error(StrUtil.format("获取中台数据失败{}",commonResult.getMessage()));
             }
         }catch (Exception e){
-            log.error(e.getMessage());
-            return DataMigrationResponse.error(e.getMessage());
+            log.error(StrUtil.format("获取中台数据异常{}",e.getMessage()));
+            return DataMigrationResponse.error(StrUtil.format("获取中台数据异常{}",e.getMessage()));
         }
 
     }

+ 18 - 8
adm-business/adm-middleware/src/main/java/com/persagy/proxy/migration/service/Impl/ObjectDigitalMigration.java

@@ -84,9 +84,9 @@ public class ObjectDigitalMigration extends MigrationAbstractServiceImpl<ObjectD
             log.info("######################### dt_object "+objType.getCode()+"同步开始 #########################");
 
             QueryCriteria queryCriteria = getQueryCriteria(objType.getCode());
-            List<SyncData> syncDataList = startMigrateForLog(context,migrationInfo,queryCriteria);
+            startMigrateForLog(context,migrationInfo,queryCriteria);
 
-            log.info("######################### dt_object "+objType.getCode()+"同步结束 共计:"+syncDataList.size()+"条 #########################");
+            log.info("######################### dt_object "+objType.getCode()+"同步结束 #########################");
         }
         long end = System.currentTimeMillis();
         log.info("######################### dt_object 数据迁移已结束 时间:"+(end-start)+" #########################");
@@ -190,7 +190,7 @@ public class ObjectDigitalMigration extends MigrationAbstractServiceImpl<ObjectD
      * 迁移数据,记录日志
      *
      */
-    private List<SyncData> startMigrateForLog(InstanceUrlParam context, MigrationInfo migrationInfo, QueryCriteria queryCriteria) {
+    private void startMigrateForLog(InstanceUrlParam context, MigrationInfo migrationInfo, QueryCriteria queryCriteria) {
         List<SyncData> syncDataList = new ArrayList<>();
         List<ObjectNode> admData = getAdmData(context,queryCriteria);
 
@@ -202,10 +202,17 @@ public class ObjectDigitalMigration extends MigrationAbstractServiceImpl<ObjectD
             log.error(" ######################### dt_object adm已交付:"+ ResponseCode.C0320.getDesc() +" 同步结束 #########################");
         }
 
-        String insertUrl = requestUrl(context, migrationInfo, MigrationType.CREATE.getCode());
+        //因获取的数据均有主键 使用更新
+        String insertUrl = requestUrl(context, migrationInfo, MigrationType.UPDATE.getCode());
         if(CollUtil.isEmpty(projObjectNodeList)){
+            //调用中台验证待新增的数据
+            List<ObjectDigital> digitalList = validateInfoCode(admData, context);
+            //处理并保存日志
+            syncDataList.addAll(processDataForLog(DataMigrationResponse.success(digitalList), MigrationType.CREATE.getCode()));
+
             DataMigrationResponse dataMigrationResponse = insertBatch(admData, ObjectDigital.class, insertUrl);
-            syncDataList = processDataForLog(dataMigrationResponse, MigrationType.CREATE.getCode());
+            syncDataList.addAll(processDataForLog(dataMigrationResponse, MigrationType.CREATE.getCode()));
+
         }
         Map<String,Object> projectMap = toEntityMap(projObjectNodeList, ObjectDigital.class);
         Map<String,Object> admMap = toEntityMap(admData, ObjectDigital.class);
@@ -220,6 +227,7 @@ public class ObjectDigitalMigration extends MigrationAbstractServiceImpl<ObjectD
 
             //插入数据
             DataMigrationResponse dataMigrationResponse = insertBatch(insertData, ObjectDigital.class, insertUrl);
+            //处理并保存日志
             syncDataList.addAll(processDataForLog(dataMigrationResponse, MigrationType.CREATE.getCode()));
         }
 
@@ -233,6 +241,7 @@ public class ObjectDigitalMigration extends MigrationAbstractServiceImpl<ObjectD
             List<String> successIds = (List<String>) dataMigrationResponse.getData();
             List<ObjectNode> delObjs = toListByIds(successIds, projObjectNodeList);
             dataMigrationResponse.setData(delObjs);
+            //处理并保存日志
             syncDataList.addAll(processDataForLog(dataMigrationResponse, MigrationType.DELETE.getCode()));
         }
 
@@ -246,16 +255,18 @@ public class ObjectDigitalMigration extends MigrationAbstractServiceImpl<ObjectD
                 List<ObjectNode> updateData = toList(compareData, admData);
                 //调用中台验证待更新的数据
                 List<ObjectDigital> digitalList = validateInfoCode(updateData, context);
-                //将验证结果放到日志
+                //将验证结果放到日志并保存
                 syncDataList.addAll(processDataForLog(DataMigrationResponse.success(digitalList), MigrationType.UPDATE.getCode()));
 
                 //更新
                 String updateUrl = requestUrl(context, migrationInfo, MigrationType.UPDATE.getCode());
                 DataMigrationResponse dataMigrationResponse = updateBatch(updateData, ObjectDigital.class, updateUrl);
+                //处理并保存日志
                 syncDataList.addAll(processDataForLog(dataMigrationResponse, MigrationType.UPDATE.getCode()));
             }
         }
-       return super.addSynLog(context, syncDataList);
+        //处理并保存日志
+        super.addSynLog(context, syncDataList);
     }
 
     /**
@@ -271,7 +282,6 @@ public class ObjectDigitalMigration extends MigrationAbstractServiceImpl<ObjectD
         List<ObjectNode> objectNodeList = JsonNodeUtils.toListNode(projectData, null, null);
 
         if(CollUtil.isEmpty(admData)){
-            log.error(" ######################### dt_object adm已交付:"+ ResponseCode.C0320.getDesc() +" 同步结束 #########################");
             return Collections.emptyList();
         }
 

+ 11 - 33
adm-business/adm-middleware/src/main/java/com/persagy/proxy/migration/service/Impl/ObjectRelationMigration.java

@@ -101,36 +101,18 @@ public class ObjectRelationMigration extends MigrationAbstractServiceImpl<Object
         log.info("######################### dt_relation 同步开始 #########################");
         long start = System.currentTimeMillis();
         ExecutorService service = getExcecutor();
-        List<SyncData> syncDataList = new ArrayList<>();
-        List<Future<List<SyncData>>> list = new ArrayList<>();
 
         for (MiGrationRelCode miGrationRelCode: MiGrationRelCode.values()){
             log.info("######################### dt_relation "+miGrationRelCode.getCode()+"数据迁移开始 #########################");
 
-            Future<List<SyncData>> future = service.submit(new Callable<List<SyncData>>(){
+            service.submit(new Runnable() {
                 @Override
-                public List<SyncData> call() throws Exception {
-                    return startMigrateForLog(context, migrationInfo, miGrationRelCode.getCode());
+                public void run() {
+                    startMigrateForLog(context, migrationInfo, miGrationRelCode.getCode());
                 }
             });
-            list.add(future);
         }
         service.shutdown();
-        for (Future<List<SyncData>> future : list) {
-            try {
-                List<SyncData> syncDatas = future.get();
-                if(CollUtil.isNotEmpty(syncDatas)){
-                    syncDataList.addAll(syncDatas);
-                }
-
-            } catch (InterruptedException e) {
-                e.printStackTrace();
-                log.error("######################### dt_relation 数据迁移失败"+e.getMessage());
-            } catch (ExecutionException e) {
-                e.printStackTrace();
-                log.error("######################### dt_relation 数据迁移失败"+e.getMessage());
-            }
-        }
         long end = System.currentTimeMillis();
         log.info("######################### dt_relation 同步结束 "+(end-start)+"#########################");
         return AdmResponse.success();
@@ -146,15 +128,6 @@ public class ObjectRelationMigration extends MigrationAbstractServiceImpl<Object
     public String migrateForSql(InstanceUrlParam context) {
         StringBuffer sqls = new StringBuffer(" \n -- 数据迁移  dt_relation ------ \n");
         //获取已经采集的数据
-        /* StringBuffer sqls_temp = new StringBuffer();
-        for (MiGrationRelCode miGrationRelCode: MiGrationRelCode.values()){
-            QueryCriteria queryCriteria = getQueryCriteria(miGrationRelCode.getCode());
-            List<ObjectRelation> admData = getAdmData(context,queryCriteria);
-            if(CollUtil.isEmpty(admData)){
-                continue;
-            }
-        }*/
-
         String sqls_temp = "";
         ExecutorService service = getExcecutor();
         List<Future<StringBuffer>> futureList = new ArrayList<>();
@@ -345,9 +318,9 @@ public class ObjectRelationMigration extends MigrationAbstractServiceImpl<Object
         return dataMigrationExcels;
     }
 
-    private List<SyncData> startMigrateForLog(InstanceUrlParam context, MigrationInfo migrationInfo, String code){
-        QueryCriteria queryCriteria = getQueryCriteria(code);
+    private void startMigrateForLog(InstanceUrlParam context, MigrationInfo migrationInfo, String code){
         List<SyncData> syncDataList = new ArrayList<>();
+        QueryCriteria queryCriteria = getQueryCriteria(code);
         List<ObjectRelation> admRelations = getAdmData(context, queryCriteria);
 
         String queryUrl = requestUrl(context, migrationInfo, MigrationType.QUERY.getCode());
@@ -360,6 +333,7 @@ public class ObjectRelationMigration extends MigrationAbstractServiceImpl<Object
         if(CollUtil.isEmpty(projectRelations)){
             DataMigrationResponse dataMigrationResponse = insertBatch(admRelations, ObjectRelation.class, insertUrl);
             syncDataList = processDataForLog(dataMigrationResponse, MigrationType.CREATE.getCode());
+
         }
         List<ObjectNode> objectNodeListPro = JsonNodeUtils.toListNode(projectRelations, null, null);
         Map<String,Object> projectDefineMap = toEntityMap(objectNodeListPro, ObjectRelation.class);
@@ -371,6 +345,7 @@ public class ObjectRelationMigration extends MigrationAbstractServiceImpl<Object
         if(!CollUtil.isEmpty(doSubtractFromInsert)){
             List<ObjectRelation> insertData = toList(doSubtractFromInsert, admRelations);
             DataMigrationResponse dataMigrationResponse = insertBatch(insertData, ObjectRelation.class, insertUrl);
+            //处理并保存日志
             syncDataList.addAll(processDataForLog(dataMigrationResponse, MigrationType.CREATE.getCode()));
         }
 
@@ -381,6 +356,7 @@ public class ObjectRelationMigration extends MigrationAbstractServiceImpl<Object
             String delUrl = requestUrl(context, migrationInfo, MigrationType.DELETE.getCode());
             //处理删除的数据
             DataMigrationResponse dataMigrationResponse = deleteBatch(deleteIds, delUrl);
+            //处理并保存日志
             syncDataList.addAll(processDataForLog(dataMigrationResponse, MigrationType.DELETE.getCode()));
         }
 
@@ -393,10 +369,12 @@ public class ObjectRelationMigration extends MigrationAbstractServiceImpl<Object
                 List<ObjectRelation> updateData = toList(compareData, admRelations);
                 String updateUrl = requestUrl(context, migrationInfo, MigrationType.UPDATE.getCode());
                 DataMigrationResponse dataMigrationResponse = updateBatch(updateData, ObjectRelation.class, updateUrl);
+                //处理并保存日志
                 syncDataList.addAll(processDataForLog(dataMigrationResponse, MigrationType.UPDATE.getCode()));
             }
         }
-        return super.addSynLog(context, syncDataList);
+        //处理并保存日志
+        super.addSynLog(context,syncDataList);
     }
 
 

+ 9 - 8
adm-business/adm-middleware/src/main/java/com/persagy/proxy/object/controller/AdmSpaceController.java

@@ -18,6 +18,7 @@ import com.persagy.proxy.adm.request.*;
 import com.persagy.proxy.adm.service.IAdmRelationService;
 import com.persagy.proxy.adm.utils.AdmContextUtil;
 import com.persagy.proxy.adm.utils.ObjectNameUtil;
+import com.persagy.proxy.common.entity.DmpResult;
 import com.persagy.proxy.common.entity.RelationDTO;
 import com.persagy.proxy.object.model.AdmBuilding;
 import com.persagy.proxy.object.model.AdmFloor;
@@ -200,11 +201,6 @@ public class AdmSpaceController {
         AdmQueryCriteria criteriaFloor = new AdmQueryCriteria();
         criteriaFloor.setName(AdmFloor.OBJ_TYPE);
 
-        AdmQueryCriteria criteriaSpace = new AdmQueryCriteria();
-        criteriaSpace.setName("spaceList");
-        criteriaSpace.setFilters("state = 1");
-
-        criteriaFloor.setCascade(CollUtil.newArrayList(criteriaSpace));
         criteriaFloor.setOrders("floorSequenceID desc");
         request.setCascade(CollUtil.newArrayList(criteriaFloor));
         AdmResponse response = buildingService.doQueryBuildingFloor(AdmContextUtil.toDmpContext(), request);
@@ -213,9 +209,14 @@ public class AdmSpaceController {
             if(CollUtil.isNotEmpty(building.getFloor())){
                 List<AdmFloor> floors = building.getFloor();
                 floors.forEach(floor -> {
-                    if(CollUtil.isNotEmpty(floor.getSpaceList())){
-                        floor.setCount(floor.getSpaceList().size());
-                        floor.setSpaceList(null);
+                    AdmQueryCriteria criteriaSpace = new AdmQueryCriteria();
+                    criteriaSpace.setName(AdmSpace.OBJ_TYPE);
+                    criteriaSpace.setFilters("state = 1");
+                    criteriaSpace.addFilters("floorId = '" + floor.getId()+"'");
+                    criteriaSpace.setOnlyCount(true);
+                    AdmResponse admResponseSpace = service.query(criteriaSpace);
+                    if(admResponseSpace.getResult().equals(DmpResult.SUCCESS) && admResponseSpace.getCount() > 0){
+                        floor.setCount(admResponseSpace.getCount().intValue());
                     }else{
                         floor.setCount(0);
                     }

+ 0 - 36
adm-business/adm-server/pom.xml

@@ -44,40 +44,4 @@
             <version>1.16.1</version>
         </dependency>
     </dependencies>
-
-
-<!--    <build>-->
-<!--        <plugins>-->
-<!--            <plugin>-->
-<!--                <groupId>org.mybatis.generator</groupId>-->
-<!--                <artifactId>mybatis-generator-maven-plugin</artifactId>-->
-<!--                <version>1.3.2</version>-->
-<!--                <configuration>-->
-<!--                    <configurationFile>src/main/resources/mybatis-generator/generatorConfig.xml</configurationFile>-->
-<!--                    <verbose>true</verbose>-->
-<!--                    <overwrite>true</overwrite>-->
-<!--                </configuration>-->
-<!--                <executions>-->
-<!--                    <execution>-->
-<!--                        <id>Generate MyBatis Artifacts</id>-->
-<!--                        <goals>-->
-<!--                            <goal>generate</goal>-->
-<!--                        </goals>-->
-<!--                    </execution>-->
-<!--                </executions>-->
-<!--                <dependencies>-->
-<!--                    <dependency>-->
-<!--                        <groupId>mysql</groupId>-->
-<!--                        <artifactId>mysql-connector-java</artifactId>-->
-<!--                        <version>8.0.15</version>-->
-<!--                    </dependency>-->
-<!--                    <dependency>-->
-<!--                        <groupId>org.mybatis.generator</groupId>-->
-<!--                        <artifactId>mybatis-generator-core</artifactId>-->
-<!--                        <version>1.3.2</version>-->
-<!--                    </dependency>-->
-<!--                </dependencies>-->
-<!--            </plugin>-->
-<!--        </plugins>-->
-<!--    </build>-->
 </project>

+ 0 - 36
adm-business/adm-server/src/main/java/com/persagy/adm/server/custom/common/AdmResult.java

@@ -1,36 +0,0 @@
-package com.persagy.adm.server.custom.common;
-
-import com.persagy.dmp.common.constant.ResponseCode;
-import com.persagy.dmp.common.model.response.CommonResult;
-import lombok.Data;
-
-@Data
-public class AdmResult<T> {
-
-	private String code;
-
-	private String message;
-
-	private T data;
-
-	public AdmResult(String code, String message) {
-		this(code, message, null);
-	}
-
-	public AdmResult(String code, String message, T data) {
-		this.code = code;
-		this.message = message;
-		this.data = data;
-	}
-
-	public AdmResult(CommonResult<T> commonResult) {
-		this.code = commonResult.getResult();
-		this.message = commonResult.getMessage();
-		this.data = commonResult.getData();
-	}
-
-	public static <T> AdmResult<T> success(T data){
-		return new AdmResult<>(ResponseCode.A00000.getCode(), null, data);
-	}
-
-}

+ 9 - 11
adm-business/adm-server/src/main/java/com/persagy/adm/server/custom/controller/AdmFileController.java

@@ -3,11 +3,11 @@ package com.persagy.adm.server.custom.controller;
 
 import com.baomidou.mybatisplus.core.conditions.Wrapper;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.persagy.adm.server.custom.common.AdmResult;
-import com.persagy.adm.server.custom.dao.AdmFileMapper;
-import com.persagy.adm.server.custom.entity.db.AdmCad;
 import com.persagy.adm.server.custom.entity.CadFileQueryParam;
+import com.persagy.adm.server.custom.entity.db.AdmCad;
 import com.persagy.adm.server.custom.service.IAdmCadService;
+import com.persagy.dmp.common.model.response.CommonResult;
+import com.persagy.dmp.common.utils.ResultHelper;
 import org.apache.commons.lang.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
@@ -25,31 +25,29 @@ public class AdmFileController {
 
     @Autowired
     IAdmCadService iAdmCadService;
-    @Autowired
-    AdmFileMapper admFileMapper;
 
     /**
      * CAD文件查询接口
      */
 
     @PostMapping("/queryCadFiles")
-    public AdmResult<List<AdmCad>> queryCadFiles(@RequestBody CadFileQueryParam queryParam){
+    public CommonResult<List<AdmCad>> queryCadFiles(@RequestBody CadFileQueryParam queryParam){
         Wrapper<AdmCad> eq = new LambdaQueryWrapper<AdmCad>()
                 .eq(StringUtils.isNotBlank(queryParam.getProjectId()), AdmCad::getProjectId, queryParam.getProjectId())
                 .eq(StringUtils.isNotBlank(queryParam.getBuildingId()),AdmCad::getBuildingId,queryParam.getBuildingId())
                 .eq(StringUtils.isNotBlank(queryParam.getFloorId()),AdmCad::getFloorId,queryParam.getFloorId())
                 .eq(StringUtils.isNotBlank(queryParam.getFileKey()),AdmCad::getFileKey,queryParam.getFileKey())
                 .eq(StringUtils.isNotBlank(queryParam.getMajorCode()),AdmCad::getMajorCode,queryParam.getMajorCode());
-        return AdmResult.success(iAdmCadService.list(eq));
+        return ResultHelper.multi(iAdmCadService.list(eq));
     }
 
     /**
      * 保存CAD文件信息
      */
     @PostMapping("/saveCadFileInfo")
-    public AdmResult<Void> saveCadFileInfo(@RequestBody List<AdmCad> admFiles){
+    public CommonResult<Void> saveCadFileInfo(@RequestBody List<AdmCad> admFiles){
         iAdmCadService.saveOrUpdateBatch(admFiles);
-        return AdmResult.success(null);
+        return ResultHelper.success();
     }
 
     /**
@@ -57,8 +55,8 @@ public class AdmFileController {
      * @param id 文件信息表主键ID
      */
     @PostMapping("/delete")
-    public AdmResult<Void> delete(@RequestParam("id") String id){
+    public CommonResult<Void> delete(@RequestParam("id") String id){
         iAdmCadService.removeById(id);
-        return AdmResult.success(null);
+        return ResultHelper.success();
     }
 }

+ 14 - 20
adm-business/adm-server/src/main/java/com/persagy/adm/server/custom/controller/AppController.java

@@ -1,9 +1,7 @@
 package com.persagy.adm.server.custom.controller;
 
 import cn.hutool.core.util.StrUtil;
-import com.persagy.adm.server.custom.client.ImageServiceClient;
 import com.persagy.adm.server.custom.common.AdmRequest;
-import com.persagy.adm.server.custom.common.AdmResult;
 import com.persagy.adm.server.custom.datatx.DataTxHandler;
 import com.persagy.adm.server.custom.entity.ConfigData;
 import com.persagy.adm.server.custom.entity.Dict;
@@ -11,17 +9,13 @@ import com.persagy.adm.server.custom.entity.DownLoadData;
 import com.persagy.adm.server.custom.entity.UploadRtn;
 import com.persagy.adm.server.custom.service.ISyncApp;
 import com.persagy.adm.server.custom.service.ServiceUtil;
-import feign.Response;
+import com.persagy.dmp.common.model.response.CommonResult;
+import com.persagy.dmp.common.utils.ResultHelper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -40,42 +34,42 @@ public class AppController {
 	private DataTxHandler dataTxHandler;
 
 	@RequestMapping("/clientId")
-	public AdmResult<Map<String, Object>> clientId(@RequestBody AdmRequest req){
+	public CommonResult<Map<String, Object>> clientId(@RequestBody AdmRequest req){
 		HashMap<String, Object> rtn = new HashMap<>();
 		rtn.put("clientId", syncApp.getClientId(req.getUserId()));
-		return AdmResult.success(rtn);
+		return ResultHelper.single(rtn);
 	}
 
 	@RequestMapping("/dict")
-	public AdmResult<Dict> dict(@RequestBody AdmRequest req){
-		return AdmResult.success(syncApp.downloadDict(req.getGroupCode(), req.getProjectId(), req.getUserId()));
+	public CommonResult<Dict> dict(@RequestBody AdmRequest req){
+		return ResultHelper.single(syncApp.downloadDict(req.getGroupCode(), req.getProjectId(), req.getUserId()));
 	}
 
 	@RequestMapping("/config")
-	public AdmResult<ConfigData> config(@RequestBody AdmRequest req){
-		return AdmResult.success(syncApp.downloadConfig(req.getGroupCode(), req.getProjectId(), req.getUserId()));
+	public CommonResult<ConfigData> config(@RequestBody AdmRequest req){
+		return ResultHelper.single(syncApp.downloadConfig(req.getGroupCode(), req.getProjectId(), req.getUserId()));
 	}
 
 	@RequestMapping("/frame")
-	public AdmResult<Map<String, Object>> frame(@RequestBody AdmRequest req){
-		return AdmResult.success(syncApp.downloadFrameData(req.getGroupCode(), req.getProjectId(), req.getUserId()));
+	public CommonResult<Map<String, Object>> frame(@RequestBody AdmRequest req){
+		return ResultHelper.single(syncApp.downloadFrameData(req.getGroupCode(), req.getProjectId(), req.getUserId()));
 	}
 
 	@RequestMapping("/download")
-	public AdmResult<DownLoadData> download(@RequestBody AdmRequest req){
+	public CommonResult<DownLoadData> download(@RequestBody AdmRequest req){
 		DownLoadData data;
 		if(StrUtil.isNotBlank(req.getBuildingId())) {
 			data = syncApp.downloadBuildingData(req.getGroupCode(), req.getProjectId(), req.getUserId(), req.getClientId(), req.getBuildingId(), req.getBdtpDownloadTs(), req.getAdmDownloadTs());
 		} else
 			data = syncApp.downloadProjectData(req.getGroupCode(), req.getProjectId(), req.getUserId(), req.getClientId(), req.getBdtpDownloadTs(), req.getAdmDownloadTs());
-		return AdmResult.success(data);
+		return ResultHelper.single(data);
 	}
 
 
 	@RequestMapping("/upload")
-	public AdmResult<UploadRtn> upload(HttpServletRequest request){
+	public CommonResult<UploadRtn> upload(HttpServletRequest request){
 		AdmRequest admRequest = dataTxHandler.handleRequest(request);
-		return AdmResult.success(syncApp.uploadData(admRequest.getUploadData(), admRequest.getGroupCode(), admRequest.getProjectId(), admRequest.getUserId(), admRequest.getClientId()));
+		return ResultHelper.single(syncApp.uploadData(admRequest.getUploadData(), admRequest.getGroupCode(), admRequest.getProjectId(), admRequest.getUserId(), admRequest.getClientId()));
 	}
 
 }

+ 4 - 3
adm-business/adm-server/src/main/java/com/persagy/adm/server/custom/controller/ManageController.java

@@ -1,8 +1,9 @@
 package com.persagy.adm.server.custom.controller;
 
 import com.persagy.adm.server.custom.common.AdmRequest;
-import com.persagy.adm.server.custom.common.AdmResult;
 import com.persagy.adm.server.custom.service.ISyncSpace;
+import com.persagy.dmp.common.model.response.CommonResult;
+import com.persagy.dmp.common.utils.ResultHelper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.CrossOrigin;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -18,9 +19,9 @@ public class ManageController {
 	@Autowired
 	private ISyncSpace syncSpace;
 	@RequestMapping("/syncSpace")
-	public AdmResult<Object> syncSpace(@RequestBody AdmRequest req){
+	public CommonResult<Object> syncSpace(@RequestBody AdmRequest req){
 		Map<String, Object> syncResult = syncSpace.sync(req.getGroupCode(), req.getProjectId(), req.getUserId(), req.getFloorId(), "GeneralZone");
-		return AdmResult.success(syncResult);
+		return ResultHelper.single(syncResult);
 	}
 
 }

+ 18 - 17
adm-business/adm-server/src/main/java/com/persagy/adm/server/custom/controller/ToolController.java

@@ -11,7 +11,6 @@ import com.fasterxml.jackson.databind.node.ObjectNode;
 import com.persagy.adm.server.custom.client.RwdClient;
 import com.persagy.adm.server.custom.common.AdmConst;
 import com.persagy.adm.server.custom.common.AdmRequest;
-import com.persagy.adm.server.custom.common.AdmResult;
 import com.persagy.adm.server.custom.dao.*;
 import com.persagy.adm.server.custom.entity.Dict;
 import com.persagy.adm.server.custom.entity.InfoDef;
@@ -23,6 +22,8 @@ import com.persagy.adm.server.custom.service.ServiceUtil;
 import com.persagy.dmp.basic.model.QueryCriteria;
 import com.persagy.dmp.common.constant.ResponseCode;
 import com.persagy.dmp.common.exception.BusinessException;
+import com.persagy.dmp.common.model.response.CommonResult;
+import com.persagy.dmp.common.utils.ResultHelper;
 import com.persagy.dmp.define.entity.GraphDefine;
 import com.persagy.dmp.define.entity.RelationDefine;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -54,12 +55,12 @@ public class ToolController {
 	private AdmM2dEquipMapper m2dEquipMapper;
 
 	@GetMapping("/hello")
-	public AdmResult<Integer> hello(){
-		return AdmResult.success(configService.queryCommonConfig(null).size());
+	public CommonResult<Integer> hello(){
+		return ResultHelper.single(configService.queryCommonConfig(null).size());
 	}
 
 	@RequestMapping("/dict")
-	public AdmResult<Dict> dict(@RequestBody AdmRequest req, @RequestParam(required = false) String module){
+	public CommonResult<Dict> dict(@RequestBody AdmRequest req, @RequestParam(required = false) String module){
 		Dict map = syncApp.queryDict(req.getGroupCode(), req.getProjectId(), req.getUserId(), !"infos".equals(module), false);
 
 		List<Map<String, Object>> majorList = map.getMajor();
@@ -119,7 +120,7 @@ public class ToolController {
 			map.setRelation(rels);
 		}
 
-		return AdmResult.success(map);
+		return ResultHelper.single(map);
 	}
 
 	private <T> void distinct(List<T> list){
@@ -154,7 +155,7 @@ public class ToolController {
 	}
 
 	@RequestMapping("/cfgs")
-	public AdmResult<Object> cfgs(@RequestBody AdmRequest req, @RequestParam(required = false) String module){
+	public CommonResult<Object> cfgs(@RequestBody AdmRequest req, @RequestParam(required = false) String module){
 		String projectId = req.getProjectId();
 		HashMap<String, Object> data = new HashMap<>();
 
@@ -172,11 +173,11 @@ public class ToolController {
 			data.put("containerConfig", containerConfig);
 		}
 
-		return AdmResult.success(data);
+		return ResultHelper.single(data);
 	}
 
 	@RequestMapping("/typeInfos")
-	public AdmResult<Object> typeInfos(@RequestBody AdmRequest req, @RequestParam String typeCode){
+	public CommonResult<Object> typeInfos(@RequestBody AdmRequest req, @RequestParam String typeCode){
 		QueryCriteria criteria = new QueryCriteria();
 		ObjectNode node = objectMapper.createObjectNode();
 		node.put("classCode", typeCode);
@@ -192,7 +193,7 @@ public class ToolController {
 			buildInfosTree(roots, infoDef);
 		}
 
-		return AdmResult.success(roots);
+		return ResultHelper.single(roots);
 	}
 
 	private void buildInfosTree(List<Object> roots, InfoDef infoDef){
@@ -234,7 +235,7 @@ public class ToolController {
 	private AdmContainerConfigMapper containerConfigMapper;
 
 	@PostMapping("/updateCfgItem")
-	public AdmResult<Object> updateCfgItem(@RequestBody Map<String, Object> content) {
+	public CommonResult<Object> updateCfgItem(@RequestBody Map<String, Object> content) {
 		String type = (String) content.get("type");
 		Map<String, Object> itemMap = (Map<String, Object>) content.get("item");
 		String delId = (String) content.get("delId");
@@ -253,7 +254,7 @@ public class ToolController {
 			doUpdateItem(delId, itemMap, create, AdmContainerConfig.class, containerConfigMapper);
 		}
 
-		return AdmResult.success(newId);
+		return ResultHelper.single(newId);
 	}
 	
 	private <T extends BaseAdmEntity> void doUpdateItem(String delId, Map<String, Object> itemMap, boolean create, Class<T> cls, BaseMapper<T> mapper){
@@ -282,7 +283,7 @@ public class ToolController {
 	private AdmInfosConfigMapper infosConfigMapper;
 
 	@PostMapping("/updateInfos")
-	public AdmResult<Object> updateInfos(@RequestBody AdmInfosConfig cfg) {
+	public CommonResult<Object> updateInfos(@RequestBody AdmInfosConfig cfg) {
 		String newId = null;
 		if(StrUtil.isBlank(cfg.getId())){
 			newId = IdUtil.fastSimpleUUID();
@@ -302,11 +303,11 @@ public class ToolController {
 		else
 			infosConfigMapper.updateById(cfg);
 
-		return AdmResult.success(newId);
+		return ResultHelper.single(newId);
 	}
 
 	@PostMapping("/updateM2d")
-	public AdmResult<Object> updateM2d(@RequestBody Map<String, Object> cfg){
+	public CommonResult<Object> updateM2d(@RequestBody Map<String, Object> cfg){
 		String code = (String) cfg.get("code");
 		boolean m2d = (Boolean)cfg.get("m2d");
 		AdmM2dEquip item = m2dEquipMapper.selectOne(new QueryWrapper<AdmM2dEquip>().eq("class_code", code));
@@ -321,11 +322,11 @@ public class ToolController {
 			if(item != null)
 				m2dEquipMapper.deleteById(item.getId());
 		}
-		return AdmResult.success(null);
+		return ResultHelper.success();
 	}
 
 	@PostMapping("/bdAndFls")
-	public AdmResult<List<ObjectNode>> bdAndFls(@RequestBody AdmRequest req){
+	public CommonResult<List<ObjectNode>> bdAndFls(@RequestBody AdmRequest req){
 		Map<String, Object> data = syncApp.downloadFrameData(req.getGroupCode(), req.getProjectId(), req.getUserId());
 		List<ObjectNode> bdAndFls = (List<ObjectNode>)data.get("buildingsAndFloors");
 
@@ -355,7 +356,7 @@ public class ToolController {
 			}
 		}
 
-		return AdmResult.success(bds);
+		return ResultHelper.single(bds);
 	}
 
 }

+ 4 - 4
adm-business/adm-server/src/main/java/com/persagy/adm/server/custom/entity/db/AdmCad.java

@@ -1,12 +1,12 @@
 package com.persagy.adm.server.custom.entity.db;
 
 import com.baomidou.mybatisplus.annotation.TableField;
-import java.io.Serializable;
-
-import com.persagy.adm.server.custom.entity.db.BaseAdmDataEntity;
+import com.persagy.dmp.common.model.entity.AuditableEntity;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 
+import java.io.Serializable;
+
 /**
  * <p>
  * CAD图纸信息表
@@ -17,7 +17,7 @@ import lombok.EqualsAndHashCode;
  */
 @Data
 @EqualsAndHashCode(callSuper = false)
-public class AdmCad extends BaseAdmDataEntity implements Serializable {
+public class AdmCad extends AuditableEntity<AdmCad> implements Serializable {
 
     /**
      * 存储系统的key

+ 1 - 1
adm-business/adm-server/src/main/java/com/persagy/adm/server/custom/entity/db/AdmProblem.java

@@ -47,7 +47,7 @@ public class AdmProblem extends BaseAdmDataEntity implements Serializable {
      * 1 空间 2对象
      */
     @TableField("check_type")
-    private String checkType;
+    private Integer checkType;
 
     /**
      * 问题对象类型

+ 4 - 4
adm-business/adm-server/src/main/java/com/persagy/adm/server/custom/service/CallException.java

@@ -1,17 +1,17 @@
 package com.persagy.adm.server.custom.service;
 
 
-import com.persagy.adm.server.custom.common.AdmResult;
+import com.persagy.dmp.common.model.response.CommonResult;
 
 public class CallException extends RuntimeException {
 
-	private AdmResult<Object> errorResult;
+	private CommonResult<Object> errorResult;
 
-	public CallException(AdmResult<Object> errorResult) {
+	public CallException(CommonResult<Object> errorResult) {
 		this.errorResult = errorResult;
 	}
 
-	public  AdmResult<Object> getErrorResult() {
+	public  CommonResult<Object> getErrorResult() {
 		return errorResult;
 	}
 

+ 1 - 2
adm-business/adm-server/src/main/java/com/persagy/adm/server/custom/service/ServiceUtil.java

@@ -3,7 +3,6 @@ package com.persagy.adm.server.custom.service;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.node.ArrayNode;
 import com.fasterxml.jackson.databind.node.ObjectNode;
-import com.persagy.adm.server.custom.common.AdmResult;
 import com.persagy.adm.server.custom.entity.Pagination;
 import com.persagy.dmp.basic.model.QueryCriteria;
 import com.persagy.dmp.common.model.response.CommonResult;
@@ -45,7 +44,7 @@ public class ServiceUtil {
 				pagination.setTotal(result.getCount().intValue());
 			return result.getData();
 		}
-		throw new CallException(new AdmResult<>(result.getResult(), result.getMessage()));
+		throw new CallException(new CommonResult<>(result.getResult(), result.getMessage()));
 	}
 
 	public static <T> List<T> queryAllPage(Supplier<CommonResult<List<T>>> action, QueryCriteria criteria, Pagination pagination){

+ 0 - 9
adm-business/adm-server/src/main/java/com/persagy/adm/server/custom/service/impl/SyncAppImpl.java

@@ -19,11 +19,8 @@ import com.persagy.adm.server.custom.dao.*;
 import com.persagy.adm.server.custom.datatx.ObjectMapper4Tx;
 import com.persagy.adm.server.custom.entity.*;
 import com.persagy.adm.server.custom.entity.db.*;
-import com.persagy.adm.server.custom.entity.db.AdmDefineProblemType;
 import com.persagy.adm.server.custom.service.*;
 import com.persagy.adm.server.custom.util.DataExtrasUtil;
-import com.persagy.adm.server.custom.dao.AdmDefineProblemInfoMapper;
-import com.persagy.adm.server.custom.entity.db.AdmDefineProblemInfo;
 import com.persagy.dmp.basic.model.QueryCriteria;
 import com.persagy.dmp.common.constant.ValidEnum;
 import com.persagy.dmp.define.entity.RelationDefine;
@@ -192,17 +189,11 @@ public class SyncAppImpl implements ISyncApp {
 
 	@Override
 	public Map<String, Object> downloadFrameData(String groupCode, String projectId, String userId) {
-		//TODO 项目修改为从运维平台查询
-		QueryCriteria criteria = ServiceUtil.getQueryCriteria(objectMapper, AdmConst.OBJ_TYPE_PROJECT);
-		List<ObjectNode> prjList = ServiceUtil.call(() -> objectClient.query(groupCode, null, AdmConst.APP_ID, userId, criteria));
-		packInfos(prjList);
-
 		QueryCriteria criteria2 = ServiceUtil.getQueryCriteria(objectMapper, AdmConst.OBJ_TYPE_BUILDING, AdmConst.OBJ_TYPE_FLOOR);
 		List<ObjectNode> bdAndFl = ServiceUtil.call(() -> objectClient.query(groupCode, projectId, AdmConst.APP_ID, userId, criteria2));
 		packInfos(bdAndFl);
 
 		HashMap<String, Object> data = new HashMap<>();
-		data.put("projects", prjList);
 		data.put("buildingsAndFloors", bdAndFl);
 
 		return data;

+ 163 - 1
adm-business/adm-server/src/main/resources/db/init/data.sql

@@ -1 +1,163 @@
-SHOW TABLES;
+SHOW TABLES;
+
+truncate table `adm_define_problem_type`;
+#墙
+INSERT INTO `adm_define_problem_type`(`id`, `obj_type_code`, `obj_type_name`, `problem_type_code`, `problem_type_name`) VALUES (UUID(), 'CFCSWL', '墙', 'CFCSWL_LESS', '墙体缺少');
+INSERT INTO `adm_define_problem_type`(`id`, `obj_type_code`, `obj_type_name`, `problem_type_code`, `problem_type_name`) VALUES (UUID(), 'CFCSWL', '墙', 'CFCSWL_MORE', '墙体多余');
+INSERT INTO `adm_define_problem_type`(`id`, `obj_type_code`, `obj_type_name`, `problem_type_code`, `problem_type_name`) VALUES (UUID(), 'CFCSWL', '墙', 'CFCSWL_MATERIAL_ERROR', '墙体材质错误');
+
+#楼板(地面)
+INSERT INTO `adm_define_problem_type`(`id`, `obj_type_code`, `obj_type_name`, `problem_type_code`, `problem_type_name`) VALUES (UUID(), 'CFCSFL', '楼板(地面)', 'CFCSFL_LESS', '楼板缺少');
+INSERT INTO `adm_define_problem_type`(`id`, `obj_type_code`, `obj_type_name`, `problem_type_code`, `problem_type_name`) VALUES (UUID(), 'CFCSFL', '楼板(地面)', 'CFCSFL_HOLE_LESS', '板洞缺少');
+INSERT INTO `adm_define_problem_type`(`id`, `obj_type_code`, `obj_type_name`, `problem_type_code`, `problem_type_name`) VALUES (UUID(), 'CFCSFL', '楼板(地面)', 'CFCSFL_ELEVATION_ERROR', '楼板标高错误');
+
+#柱
+INSERT INTO `adm_define_problem_type`(`id`, `obj_type_code`, `obj_type_name`, `problem_type_code`, `problem_type_name`) VALUES (UUID(), 'CFCSCL', '柱', 'CFCSCL_LESS', '柱缺少');
+INSERT INTO `adm_define_problem_type`(`id`, `obj_type_code`, `obj_type_name`, `problem_type_code`, `problem_type_name`) VALUES (UUID(), 'CFCSCL', '柱', 'CFCSCL_MORE', '柱多余');
+INSERT INTO `adm_define_problem_type`(`id`, `obj_type_code`, `obj_type_name`, `problem_type_code`, `problem_type_name`) VALUES (UUID(), 'CFCSCL', '柱', 'CFCSCL_SECTION_SHAPE_ERROR', '柱截面形状错误');
+INSERT INTO `adm_define_problem_type`(`id`, `obj_type_code`, `obj_type_name`, `problem_type_code`, `problem_type_name`) VALUES (UUID(), 'CFCSCL', '柱', 'CFCSCL_SIZE_ERROR', '柱尺寸错误');
+
+#物业空间
+INSERT INTO `adm_define_problem_type`(`id`, `obj_type_code`, `obj_type_name`, `problem_type_code`, `problem_type_name`) VALUES (UUID(), 'GeneralZone', '物业空间', 'GeneralZone_OUTLINE_ERROR', '重新绘制物业空间');
+
+#门
+INSERT INTO `adm_define_problem_type`(`id`, `obj_type_code`, `obj_type_name`, `problem_type_code`, `problem_type_name`) VALUES (UUID(), 'CFBEDR', '门', 'CFBEDR_LESS', '门缺少');
+INSERT INTO `adm_define_problem_type`(`id`, `obj_type_code`, `obj_type_name`, `problem_type_code`, `problem_type_name`) VALUES (UUID(), 'CFBEDR', '门', 'CFBEDR_MORE', '门多余');
+INSERT INTO `adm_define_problem_type`(`id`, `obj_type_code`, `obj_type_name`, `problem_type_code`, `problem_type_name`) VALUES (UUID(), 'CFBEDR', '门', 'CFBEDR_PROPERTY_ERROR', '门属性错误');
+INSERT INTO `adm_define_problem_type`(`id`, `obj_type_code`, `obj_type_name`, `problem_type_code`, `problem_type_name`) VALUES (UUID(), 'CFBEDR', '门', 'CFBEDR_POSITION_ERROR', '门位置错误');
+
+#窗
+INSERT INTO `adm_define_problem_type`(`id`, `obj_type_code`, `obj_type_name`, `problem_type_code`, `problem_type_name`) VALUES (UUID(), 'CFBEWN', '窗', 'CFBEWN_LESS', '窗缺少');
+INSERT INTO `adm_define_problem_type`(`id`, `obj_type_code`, `obj_type_name`, `problem_type_code`, `problem_type_name`) VALUES (UUID(), 'CFBEWN', '窗', 'CFBEWN_MORE', '窗多余');
+INSERT INTO `adm_define_problem_type`(`id`, `obj_type_code`, `obj_type_name`, `problem_type_code`, `problem_type_name`) VALUES (UUID(), 'CFBEWN', '窗', 'CFBEWN_PROPERTY_ERROR', '窗属性错误');
+INSERT INTO `adm_define_problem_type`(`id`, `obj_type_code`, `obj_type_name`, `problem_type_code`, `problem_type_name`) VALUES (UUID(), 'CFBEWN', '窗', 'CFBEWN_POSITION_ERROR', '窗位置错误');
+
+#停车位
+INSERT INTO `adm_define_problem_type`(`id`, `obj_type_code`, `obj_type_name`, `problem_type_code`, `problem_type_name`) VALUES (UUID(), 'CFPKPS', '停车位', 'CFPKPS_LESS', '停车位缺少');
+INSERT INTO `adm_define_problem_type`(`id`, `obj_type_code`, `obj_type_name`, `problem_type_code`, `problem_type_name`) VALUES (UUID(), 'CFPKPS', '停车位', 'CFPKPS_MORE', '停车位多余');
+
+#问题信息项记录点
+truncate table `adm_define_problem_info`;
+#墙体缺少
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'coordinate', '墙体路由', 'CFCSWL_LESS', NULL, 'STRING', 0, NULL);
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'wallHeight', '墙体高度', 'CFCSWL_LESS', 'mm', 'DOUBLE', 0, NULL);
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'materialType', '材质', 'CFCSWL_LESS', NULL, 'ENUM', 0, '[{"code": "1", "name": "钢筋混凝土结构"}, {"code": "2", "name": "砌体结构"}, {"code": "99", "name": "其他"}]');
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'wallThick', '墙厚', 'CFCSWL_LESS', 'mm', 'DOUBLE', 0, NULL);
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'senceImg', '拍摄照片', 'CFCSWL_LESS', NULL, 'STRING', 0, NULL);
+
+#墙体多余
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'coordinate', '墙体路由', 'CFCSWL_MORE', NULL, 'STRING', 0, NULL);
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'senceImg', '拍摄照片', 'CFCSWL_MORE', NULL, 'STRING', 0, NULL);
+
+#墙体材质错误
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'coordinate', '墙体路由', 'CFCSWL_MATERIAL_ERROR', NULL, 'STRING', 0, NULL);
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'materialType', '材质', 'CFCSWL_MATERIAL_ERROR', NULL, 'ENUM', 0, '[{"code": "1", "name": "钢筋混凝土结构"}, {"code": "2", "name": "砌体结构"}, {"code": "99", "name": "其他"}]');
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'wallThick', '墙厚', 'CFCSWL_MATERIAL_ERROR', 'mm', 'DOUBLE', 0, NULL);
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'senceImg', '拍摄照片', 'CFCSWL_MATERIAL_ERROR', NULL, 'STRING', 0, NULL);
+
+#楼板缺少
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'coordinate', '板轮廓', 'CFCSFL_LESS', NULL, 'STRING', 0, NULL);
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'height', '板高度(距本层标高的相对高度)', 'CFCSFL_LESS', 'mm', 'DOUBLE', 0, NULL);
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'senceImg', '拍摄照片', 'CFCSFL_LESS', NULL, 'STRING', 0, NULL);
+
+#板洞缺少
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'coordinate', '洞口轮廓', 'CFCSFL_HOLE_LESS', NULL, 'STRING', 0, NULL);
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'senceImg', '拍摄照片', 'CFCSFL_HOLE_LESS', NULL, 'STRING', 0, NULL);
+
+#楼板标高错误
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'coordinate', '板轮廓', 'CFCSFL_ELEVATION_ERROR', NULL, 'STRING', 0, NULL);
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'height', '正确的板标高(距本层标高的相对高度)', 'CFCSFL_ELEVATION_ERROR', 'mm', 'DOUBLE', 0, NULL);
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'senceImg', '拍摄照片', 'CFCSFL_ELEVATION_ERROR', NULL, 'STRING', 0, NULL);
+
+#柱缺少
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'coordinate', '标记缺少柱点', 'CFCSCL_LESS', NULL, 'STRING', 0, NULL);
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'crossShapeType', '柱样式', 'CFCSCL_LESS', NULL, 'ENUM', 0, '[{"code": "1", "name": "方柱"}, {"code": "2", "name": "圆柱"}]');
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'rectangleCrossLength', '长', 'CFCSCL_LESS', 'mm', 'DOUBLE', 0, NULL);
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'rectangleCrossWidth', '宽', 'CFCSCL_LESS', 'mm', 'DOUBLE', 0, NULL);
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'circularCrossDiameter', '直径', 'CFCSCL_LESS', 'mm', 'DOUBLE', 0, NULL);
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'columnLength', '柱高度', 'CFCSCL_LESS', 'mm', 'DOUBLE', 0, NULL);
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'senceImg', '拍摄照片', 'CFCSCL_LESS', NULL, 'STRING', 0, NULL);
+
+#柱多余
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'objectId', '标记多余柱点', 'CFCSCL_MORE', NULL, 'STRING', 0, NULL);
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'senceImg', '拍摄照片', 'CFCSCL_MORE', NULL, 'STRING', 0, NULL);
+
+#柱截面形状错误
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'objectId', '标记错误柱子', 'CFCSCL_SECTION_SHAPE_ERROR', NULL, 'STRING', 0, NULL);
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'crossShapeType', '正确的截面形状', 'CFCSCL_SECTION_SHAPE_ERROR', NULL, 'ENUM', 0, '[{"code": "1", "name": "方柱"}, {"code": "2", "name": "圆柱"}]');
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'rectangleCrossLength', '长', 'CFCSCL_SECTION_SHAPE_ERROR', 'mm', 'DOUBLE', 0, NULL);
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'rectangleCrossWidth', '宽', 'CFCSCL_SECTION_SHAPE_ERROR', 'mm', 'DOUBLE', 0, NULL);
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'circularCrossDiameter', '直径', 'CFCSCL_SECTION_SHAPE_ERROR', 'mm', 'DOUBLE', 0, NULL);
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'senceImg', '拍摄照片', 'CFCSCL_SECTION_SHAPE_ERROR', NULL, 'STRING', 0, NULL);
+
+#柱尺寸错误
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'objectId', '标记错误柱子', 'CFCSCL_SIZE_ERROR', NULL, 'STRING', 0, NULL);
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'rectangleCrossLength', '长', 'CFCSCL_SIZE_ERROR', 'mm', 'DOUBLE', 0, NULL);
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'rectangleCrossWidth', '宽', 'CFCSCL_SIZE_ERROR', 'mm', 'DOUBLE', 0, NULL);
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'circularCrossDiameter', '直径', 'CFCSCL_SIZE_ERROR', 'mm', 'DOUBLE', 0, NULL);
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'senceImg', '拍摄照片', 'CFCSCL_SIZE_ERROR', NULL, 'STRING', 0, NULL);
+
+#重新绘制物业空间
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'coordinate', '标记物业空间', 'GeneralZone_OUTLINE_ERROR', NULL, 'STRING', 0, NULL);
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'RoomLocalName', '正确的空间名称', 'GeneralZone_OUTLINE_ERROR', NULL, 'STRING', 0, NULL);
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'senceImg', '拍摄照片', 'GeneralZone_OUTLINE_ERROR', NULL, 'STRING', 0, NULL);
+
+#门缺少
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'coordinate', '标记缺少门位置', 'CFBEDR_LESS', NULL, 'STRING', 0, NULL);
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'equipmentType', '设备类', 'CFBEDR_LESS', NULL, 'ENUM', 0, '[{"code": "1", "name": "门"}, {"code": "2", "name": "防火门"}]');
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'materialType', '门材质', 'CFBEDR_LESS', NULL, 'ENUM', 0, '[{"code": "1", "name": "玻璃"}, {"code": "99", "name": "其他"}]');
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'openType', '开启方式', 'CFBEDR_LESS', NULL, 'ENUM', 0, '[{"code": "1", "name": "卷帘门"},{"code": "2", "name": "平开门"}, {"code": "3", "name": "弹簧门"},{"code": "4", "name": "折叠门"},{"code": "5", "name": "推拉门"},{"code": "6", "name": "旋转门"},{"code": "99", "name": "其他"}]');
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'doorLeafType', '门扇类型', 'CFBEDR_LESS', NULL, 'ENUM', 0, '[{"code": "1", "name": "单开"},{"code": "2", "name": "双开"},{"code": "99", "name": "其他"}]');
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'doorWidth ', '宽', 'CFBEDR_LESS', 'mm', 'STRING', 0, NULL);
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'doorHeight ', '高', 'CFBEDR_LESS', 'mm', 'STRING', 0, NULL);
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'senceImg', '拍摄照片', 'CFBEDR_LESS', NULL, 'STRING', 0, NULL);
+
+#门多余
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'objectId', '标记多余门位置', 'CFBEDR_MORE', NULL, 'STRING', 0, NULL);
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'senceImg', '拍摄照片', 'CFBEDR_MORE', NULL, 'STRING', 0, NULL);
+
+#门属性错误
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'objectId', '标记错误门', 'CFBEDR_PROPERTY_ERROR', NULL, 'STRING', 0, NULL);
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'equipmentType', '正确的设备类', 'CFBEDR_PROPERTY_ERROR', NULL, 'ENUM', 0, '[{"code": "0", "name": "保持"},{"code": "1", "name": "门"}, {"code": "2", "name": "防火门"},{"code": "3", "name": "防火卷帘"}]');
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'materialType', '门材质', 'CFBEDR_PROPERTY_ERROR', NULL, 'ENUM', 0, '[{"code": "0", "name": "保持"},{"code": "1", "name": "玻璃"},{"code": "2", "name": "常规"}]');
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'openType', '开启方式', 'CFBEDR_PROPERTY_ERROR', NULL, 'ENUM', 0, '[{"code": "1", "name": "卷帘门"},{"code": "2", "name": "平开门"}, {"code": "3", "name": "弹簧门"},{"code": "4", "name": "折叠门"},{"code": "5", "name": "推拉门"},{"code": "6", "name": "旋转门"},{"code": "99", "name": "其他"}]');
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'doorWidth ', '宽', 'CFBEDR_PROPERTY_ERROR', 'mm', 'STRING', 0, NULL);
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'doorHeight ', '高', 'CFBEDR_PROPERTY_ERROR', 'mm', 'STRING', 0, NULL);
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'senceImg', '拍摄照片', 'CFBEDR_PROPERTY_ERROR', NULL, 'STRING', 0, NULL);
+
+# 门位置错误
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'moveDirection', '移动方向', 'CFBEDR_POSITION_ERROR', NULL, 'ENUM', 0, '[{"code": "1", "name": "左"},{"code": "2", "name": "右"}, {"code": "3", "name": "上"},{"code": "4", "name": "下"}]');
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'moveDistance ', '移动距离', 'CFBEDR_POSITION_ERROR', 'mm', 'STRING', 0, NULL);
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'senceImg', '拍摄照片', 'CFBEDR_POSITION_ERROR', NULL, 'STRING', 0, NULL);
+
+#窗缺少
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'coordinate', '标记缺少窗位置', 'CFBEWN_LESS', NULL, 'STRING', 0, NULL);
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'equipmentType', '正确的设备类', 'CFBEWN_LESS', NULL, 'ENUM', 0, '[{"code": "1", "name": "窗"},{"code": "2", "name": "防火窗"}]');
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'windowWidth', '宽', 'CFBEWN_LESS', 'mm', 'STRING', 0, NULL);
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'windowHeight ', '高', 'CFBEWN_LESS', 'mm', 'STRING', 0, NULL);
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'senceImg', '拍摄照片', 'CFBEWN_LESS', NULL, 'STRING', 0, NULL);
+
+#窗多余
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'objectId', '标记多余窗位置', 'CFBEWN_MORE', NULL, 'STRING', 0, NULL);
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'senceImg', '拍摄照片', 'CFBEWN_MORE', NULL, 'STRING', 0, NULL);
+
+#窗属性错误
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'objectId', '标记错误窗', 'CFBEWN_PROPERTY_ERROR', NULL, 'STRING', 0, NULL);
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'equipmentType', '正确的设备类', 'CFBEWN_PROPERTY_ERROR', NULL, 'ENUM', 0, '[{"code": "0", "name": "窗"},{"code": "1", "name": "窗"},{"code": "2", "name": "防火窗"}]');
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'windowType', '正确的窗样式', 'CFBEWN_PROPERTY_ERROR', NULL, 'ENUM', 0, '[{"code": "0", "name": "保持"},{"code": "1", "name": "平开(推拉)窗"},{"code": "2", "name": "飘窗"},{"code": "3", "name": "百叶窗"}]');
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'windowWidth', '宽', 'CFBEWN_PROPERTY_ERROR', 'mm', 'STRING', 0, NULL);
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'windowHeight ', '高', 'CFBEWN_PROPERTY_ERROR', 'mm', 'STRING', 0, NULL);
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'senceImg', '拍摄照片', 'CFBEWN_PROPERTY_ERROR', NULL, 'STRING', 0, NULL);
+
+#窗位置错误
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'moveDirection', '移动方向', 'CFBEWN_POSITION_ERROR', NULL, 'ENUM', 0, '[{"code": "1", "name": "左"},{"code": "2", "name": "右"}, {"code": "3", "name": "上"},{"code": "4", "name": "下"}]');
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'moveDistance ', '移动距离', 'CFBEWN_POSITION_ERROR', 'mm', 'STRING', 0, NULL);
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'senceImg', '拍摄照片', 'CFBEWN_POSITION_ERROR', NULL, 'STRING', 0, NULL);
+
+#停车位缺少
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'coordinate', '标记车位位置', 'CFPKPS_LESS', NULL, 'STRING', 0, NULL);
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'senceImg', '拍摄照片', 'CFPKPS_LESS', NULL, 'STRING', 0, NULL);
+
+#停车位多余
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'objectId', '标记车位', 'CFPKPS_MORE', NULL, 'STRING', 0, NULL);
+INSERT INTO `adm_define_problem_info`(`id`, `code`, `name`, `problem_type_code`, `unit`, `data_type`, `is_multiple`, `data_source`) VALUES (UUID(), 'senceImg', '拍摄照片', 'CFPKPS_MORE', NULL, 'STRING', 0, NULL);