Prechádzať zdrojové kódy

Merge remote-tracking branch 'origin/develop' into develop

lijie 2 rokov pred
rodič
commit
6035eadeb8

+ 2 - 1
dmp-business/dmp-rwd/src/main/java/com/persagy/dmp/rwd/delivery/controller/ObjectInfoCollectController.java

@@ -13,6 +13,7 @@ import com.persagy.dmp.common.context.AppContext;
 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.delivery.dto.ObjectInfoCollectDTO;
 import com.persagy.dmp.delivery.entity.ObjectInfoCollect;
 import com.persagy.dmp.rwd.delivery.service.IObjectInfoCollectService;
 import org.apache.commons.lang.StringUtils;
@@ -43,7 +44,7 @@ public class ObjectInfoCollectController {
      * @return
      */
     @PostMapping("/query")
-    public CommonResult<List<ObjectInfoCollect>> query(@RequestBody QueryCriteria criteria) {
+    public CommonResult<List<ObjectInfoCollectDTO>> query(@RequestBody QueryCriteria criteria) {
         if(criteria == null) {
             throw new BusinessException(ResponseCode.A0400.getCode(), ResponseCode.A0400.getDesc());
         }

+ 0 - 2
dmp-business/dmp-rwd/src/main/java/com/persagy/dmp/rwd/delivery/controller/RelationDefineCollectController.java

@@ -50,8 +50,6 @@ public class RelationDefineCollectController {
             // deliveryType 字段预留,暂不根据此字段查询
             criteria.getCriteria().remove("deliveryType");
         }
-
-
         QueryWrapper<RelationDefineCollect> wrapper = new QueryWrapper<>();
         // 转换查询条件
         QueryCriteriaHelper.toWrapper(wrapper, criteria, RelationDefineCollect.class);

+ 49 - 3
dmp-business/dmp-rwd/src/main/java/com/persagy/dmp/rwd/delivery/service/impl/ObjectInfoCollectServiceImpl.java

@@ -5,20 +5,25 @@ import cn.hutool.core.collection.CollectionUtil;
 import cn.hutool.core.map.MapUtil;
 import com.baomidou.mybatisplus.core.conditions.Wrapper;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.persagy.dmp.codetable.entity.CodeTableData;
 import com.persagy.dmp.common.constant.ValidEnum;
 import com.persagy.dmp.common.model.entity.BaseEntity;
+import com.persagy.dmp.define.entity.ObjectInfoDefine;
+import com.persagy.dmp.delivery.dto.ObjectInfoCollectDTO;
 import com.persagy.dmp.delivery.entity.ObjectInfoCollect;
 import com.persagy.dmp.rwd.define.service.IObjectInfoService;
 import com.persagy.dmp.rwd.delivery.dao.ObjectInfoCollectMapper;
 import com.persagy.dmp.rwd.delivery.service.IObjectInfoCollectService;
 import org.apache.commons.lang.StringUtils;
+import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import java.util.List;
-import java.util.Map;
+import java.util.*;
+import java.util.stream.Collectors;
 
 /**
  * 项目,现场交付范围管理-信息点
@@ -31,6 +36,9 @@ public class ObjectInfoCollectServiceImpl extends ServiceImpl<ObjectInfoCollectM
     @Autowired
     private ObjectInfoCollectMapper objectInfoCollectMapper;
 
+    @Autowired
+    private IObjectInfoService objectInfoService;
+
     /**
      * 数量统计
      * @param queryWrapper 查询条件
@@ -59,7 +67,45 @@ public class ObjectInfoCollectServiceImpl extends ServiceImpl<ObjectInfoCollectM
      */
     @Override
     public Page queryByCondition(Page page, Wrapper<ObjectInfoCollect> queryWrapper) {
-        return objectInfoCollectMapper.selectPage(page, queryWrapper);
+        //查询交付范围内信息点
+        Page selectPage = objectInfoCollectMapper.selectPage(page, queryWrapper);
+        List<ObjectInfoCollect> records =(List<ObjectInfoCollect>)selectPage.getRecords();
+         if(CollUtil.isEmpty(records)){
+            return selectPage;
+        }
+        Map<String, ObjectInfoDefine> infoMap = queryDefineObjectInfo(records);
+        List<ObjectInfoCollectDTO> content = new ArrayList<>();
+        records.forEach(item->{
+            ObjectInfoCollectDTO collectDTO = new ObjectInfoCollectDTO();
+            String defineInfoId = item.getDefineInfoId();
+            //设置标准信息点信息
+            if(StringUtils.isNotEmpty(defineInfoId)){
+                ObjectInfoDefine objectInfoDefine = infoMap.get(defineInfoId);
+                if(objectInfoDefine != null){
+                    BeanUtils.copyProperties(objectInfoDefine,collectDTO);
+                }
+            }
+            BeanUtils.copyProperties(item,collectDTO);
+            content.add(collectDTO);
+        });
+        selectPage.setRecords(content);
+        return selectPage;
+    }
+
+    /**
+     * 查询标准信息点
+     * @return
+     */
+    private Map<String, ObjectInfoDefine> queryDefineObjectInfo(List<ObjectInfoCollect> records){
+        Set<String> ids = records.stream().map(ObjectInfoCollect::getDefineInfoId).collect(Collectors.toSet());
+        QueryWrapper<ObjectInfoDefine> queryWrapper = new QueryWrapper<>();
+        queryWrapper.in("id",ids);
+        //queryWrapper.select("id","name");
+        List<ObjectInfoDefine> objectInfoDefines = objectInfoService.queryByCondition(queryWrapper);
+        if(CollUtil.isEmpty(objectInfoDefines)){
+            return new HashMap<>();
+        }
+        return objectInfoDefines.stream().collect(Collectors.toMap(ObjectInfoDefine::getId, item->item, (k1, k2) -> k1));
     }
 
     /**

+ 52 - 3
dmp-business/dmp-rwd/src/main/java/com/persagy/dmp/rwd/delivery/service/impl/ObjectTypeCollectServiceImpl.java

@@ -5,18 +5,25 @@ import cn.hutool.core.collection.CollectionUtil;
 import cn.hutool.core.map.MapUtil;
 import com.baomidou.mybatisplus.core.conditions.Wrapper;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.persagy.dmp.common.constant.ValidEnum;
 import com.persagy.dmp.common.model.entity.BaseEntity;
+import com.persagy.dmp.define.entity.ObjectInfoDefine;
+import com.persagy.dmp.define.entity.ObjectTypeDefine;
+import com.persagy.dmp.delivery.dto.ObjectTypeCollectDTO;
 import com.persagy.dmp.delivery.entity.ObjectTypeCollect;
+import com.persagy.dmp.rwd.define.service.IObjectTypeService;
+import com.persagy.dmp.rwd.delivery.dao.ObjectTypeCollectMapper;
 import com.persagy.dmp.rwd.delivery.service.IObjectTypeCollectService;
 import org.apache.commons.lang.StringUtils;
+import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import java.util.List;
-import java.util.Map;
+import java.util.*;
+import java.util.stream.Collectors;
 
 /**
  * 项目,现场交付范围管理-对象类型
@@ -29,6 +36,9 @@ public class ObjectTypeCollectServiceImpl extends ServiceImpl<com.persagy.dmp.rw
     @Autowired
     private com.persagy.dmp.rwd.delivery.dao.ObjectTypeCollectMapper ObjectTypeCollectMapper;
 
+    @Autowired
+    private IObjectTypeService objectTypeService;
+
     /**
      * 数量统计
      * @param queryWrapper 查询条件
@@ -57,7 +67,46 @@ public class ObjectTypeCollectServiceImpl extends ServiceImpl<com.persagy.dmp.rw
      */
     @Override
     public Page queryByCondition(Page page, Wrapper<ObjectTypeCollect> queryWrapper) {
-        return ObjectTypeCollectMapper.selectPage(page, queryWrapper);
+        //查询交付范围内的对象类型信息
+        Page selectPage = ObjectTypeCollectMapper.selectPage(page, queryWrapper);
+        List<ObjectTypeCollect> records = (List<ObjectTypeCollect>)selectPage.getRecords();
+        if(CollUtil.isEmpty(records)){
+            return selectPage;
+        }
+        Map<String, ObjectTypeDefine> typeDefineMap = queryDefineObjectType(records);
+
+        List<ObjectTypeCollectDTO> result = new ArrayList<>();
+        records.forEach(item->{
+            ObjectTypeCollectDTO collectType = new ObjectTypeCollectDTO();
+            //设置标准类型定义信息
+            String defineTypeId = item.getDefineTypeId();
+            if(StringUtils.isNotEmpty(defineTypeId)){
+                ObjectTypeDefine objectTypeDefine = typeDefineMap.get(defineTypeId);
+                if(objectTypeDefine != null){
+                    BeanUtils.copyProperties(objectTypeDefine,collectType);
+                }
+            }
+            BeanUtils.copyProperties(item,collectType);
+            result.add(collectType);
+        });
+        selectPage.setRecords(result);
+        return selectPage;
+    }
+
+    /**
+     * 查询标准类型定义
+     * @return
+     */
+    private Map<String, ObjectTypeDefine> queryDefineObjectType(List<ObjectTypeCollect> records){
+        Set<String> ids = records.stream().map(ObjectTypeCollect::getDefineTypeId).collect(Collectors.toSet());
+        QueryWrapper<ObjectTypeDefine> queryWrapper = new QueryWrapper<>();
+        queryWrapper.in("id",ids);
+        //queryWrapper.select("id","name");
+        List<ObjectTypeDefine> objectTypeDefines = objectTypeService.queryByCondition(queryWrapper);
+        if(CollUtil.isEmpty(objectTypeDefines)){
+            return new HashMap<>();
+        }
+        return objectTypeDefines.stream().collect(Collectors.toMap(ObjectTypeDefine::getId, item->item, (k1, k2) -> k1));
     }
 
     /**

+ 76 - 1
dmp-business/dmp-rwd/src/main/java/com/persagy/dmp/rwd/delivery/service/impl/RelationDefineCollectServiceImpl.java

@@ -4,18 +4,30 @@ import cn.hutool.core.collection.CollUtil;
 import cn.hutool.core.collection.CollectionUtil;
 import cn.hutool.core.map.MapUtil;
 import com.baomidou.mybatisplus.core.conditions.Wrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.persagy.dmp.common.constant.ValidEnum;
 import com.persagy.dmp.common.model.entity.BaseEntity;
+import com.persagy.dmp.define.entity.GraphDefine;
+import com.persagy.dmp.define.entity.ObjectTypeDefine;
+import com.persagy.dmp.define.entity.RelationDefine;
+import com.persagy.dmp.delivery.dto.RelationDefineCollectDTO;
 import com.persagy.dmp.delivery.entity.RelationDefineCollect;
+import com.persagy.dmp.rwd.define.service.IGraphDefineService;
+import com.persagy.dmp.rwd.define.service.IRelationDefineService;
 import com.persagy.dmp.rwd.delivery.dao.RelationDefineCollectMapper;
 import com.persagy.dmp.rwd.delivery.service.IRelationDefineCollectService;
+import org.apache.commons.lang.StringUtils;
+import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.stream.Collectors;
 
 /**
  * 项目,现场交付范围管理-关系
@@ -28,6 +40,12 @@ public class RelationDefineCollectServiceImpl extends ServiceImpl<RelationDefine
     @Autowired
     private RelationDefineCollectMapper relationDefineCollectMapper;
 
+    @Autowired
+    private IRelationDefineService relationDefineService;
+
+    @Autowired
+    private IGraphDefineService graphDefineService;
+
     /**
      * 数量统计
      * @param queryWrapper 查询条件
@@ -56,7 +74,64 @@ public class RelationDefineCollectServiceImpl extends ServiceImpl<RelationDefine
      */
     @Override
     public Page queryByCondition(Page page, Wrapper<RelationDefineCollect> queryWrapper) {
-        return relationDefineCollectMapper.selectPage(page, queryWrapper);
+        Page selectPage = relationDefineCollectMapper.selectPage(page, queryWrapper);
+        List<RelationDefineCollect> records = (List<RelationDefineCollect>)selectPage.getRecords();
+        if(CollUtil.isEmpty(records)){
+            return selectPage;
+        }
+        List<RelationDefineCollectDTO> content = new ArrayList<>();
+        //获取图类型定义
+        Map<String, GraphDefine> graphDefineMap = queryAllGraphDefine();
+        //获取边类型定义
+        Map<String, RelationDefine> relationDefineMap = queryAllRelDefine();
+        records.forEach(item->{
+            RelationDefineCollectDTO collectDTO = new RelationDefineCollectDTO();
+            //设置图类型名称
+            String graphCode = item.getGraphCode();
+            if(StringUtils.isNotEmpty(graphCode)) {
+                GraphDefine graphDefine = graphDefineMap.get(graphCode);
+                if (graphDefine != null) {
+                    collectDTO.setGraphName(graphDefine.getName());
+                }
+            }
+            //设置边类型定义
+            String relCode = item.getRelCode();
+            if(StringUtils.isNotEmpty(relCode)){
+                RelationDefine relationDefine = relationDefineMap.get(relCode);
+                if(relationDefine != null){
+                    BeanUtils.copyProperties(relationDefine,collectDTO);
+                }
+            }
+            BeanUtils.copyProperties(item,collectDTO);
+            content.add(collectDTO);
+        });
+        selectPage.setRecords(content);
+        return selectPage;
+
+    }
+
+    /**
+     * 获取图类型定义
+     * @return
+     */
+    private Map<String, GraphDefine> queryAllGraphDefine(){
+        List<GraphDefine> graphDefines = graphDefineService.queryByCondition(new QueryWrapper<>());
+        if(CollUtil.isEmpty(graphDefines)){
+            return new HashMap<>();
+        }
+        return graphDefines.stream().collect(Collectors.toMap(GraphDefine::getCode, item->item, (k1, k2) -> k1));
+    }
+
+    /**
+     * 获取边类型编码
+     * @return
+     */
+    private Map<String, RelationDefine> queryAllRelDefine(){
+        List<RelationDefine> relationDefines = relationDefineService.queryByCondition(new QueryWrapper<>());
+        if(CollUtil.isEmpty(relationDefines)){
+            return new HashMap<>();
+        }
+        return relationDefines.stream().collect(Collectors.toMap(RelationDefine::getCode,item->item,(k1,k2) -> k1));
     }
 
     /**

+ 26 - 24
dmp-business/dmp-rwd/src/main/resources/db/init/schema.sql

@@ -310,28 +310,30 @@ CREATE TABLE IF NOT EXISTS `dt_sync_data` (
    PRIMARY KEY (`id`)
 ) ENGINE=InnoDB ROW_FORMAT=DYNAMIC COMMENT='adm交付数据同步到项目现场';
 
-CREATE TABLE IF NOT EXISTS `dt_define_type_collect` (
-  `id` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '1' COMMENT '主键ID',
-  `group_code` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '集团编码',
-  `project_id` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '项目ID',
-  `define_type_id` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '类型ID',
-  `code` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '对象类型编码',
-  `obj_type` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '对象类型',
-  `delivery_type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '交付类型:0-项目交付 1-现场交付',
-  `is_delivery` tinyint(1) DEFAULT NULL COMMENT '是否交付 0-否 1-是',
-  `instance_scope` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '交付范围:实例范围',
-  `association_relation` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '交付范围:依赖&关联',
-  `remark` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '交付范围:备注',
-  `creator` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '创建人',
-  `creation_time` char(14) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '创建时间',
-  `modifier` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '最后修改人',
-  `modified_time` char(14) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '最后修改时间',
-  `valid` tinyint(1) NOT NULL DEFAULT '1' COMMENT '合法标识',
-  `ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '乐观锁',
-  PRIMARY KEY (`id`) USING BTREE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='对象类型交付配置表';
+CREATE TABLE IF NOT EXISTS `dt_define_type_delivery` (
+    `id` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '1' COMMENT '主键ID',
+    `group_code` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '集团编码',
+    `project_id` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '项目ID',
+    `define_type_id` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '类型ID',
+    `code` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '对象类型编码',
+    `obj_type` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '对象类型',
+    `delivery_type` tinyint(1) DEFAULT '0' COMMENT '交付类型:0-项目交付 1-现场交付',
+    `is_delivery` tinyint(1) DEFAULT NULL COMMENT '是否交付 0-否 1-是',
+    `instance_scope` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '交付范围:实例范围',
+    `association_relation` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '交付范围:依赖&关联',
+    `delivery_way` tinyint DEFAULT NULL COMMENT '正逆向交付方式 0-逆向 1-正向 2-不确定',
+    `room_func_types` text COLLATE utf8mb4_general_ci COMMENT '交付主张不确定时,正向时设备所在物业空间的空间功能类型',
+    `remark` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '交付范围:备注',
+    `creator` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '创建人',
+    `creation_time` char(14) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '创建时间',
+    `modifier` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '最后修改人',
+    `modified_time` char(14) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '最后修改时间',
+    `valid` tinyint(1) NOT NULL DEFAULT '1' COMMENT '合法标识',
+    `ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '乐观锁',
+    PRIMARY KEY (`id`) USING BTREE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='对象类型交付表';
 
-CREATE TABLE IF NOT EXISTS `dt_define_info_collect` (
+CREATE TABLE IF NOT EXISTS `dt_define_info_delivery` (
   `id` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
   `group_code` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '集团编码',
   `project_id` varchar(40) COLLATE utf8mb4_general_ci DEFAULT NULL,
@@ -342,7 +344,7 @@ CREATE TABLE IF NOT EXISTS `dt_define_info_collect` (
   `is_delivery` tinyint DEFAULT '1' COMMENT '是否交付 0-否 1-是',
   `key_word` tinyint DEFAULT '0' COMMENT '是否为关键信息点-台账详情使用',
   `instance_scope` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '实例范围',
-  `data_source` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '交付数据来源',
+  `data_from` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '交付数据来源',
   `collect_info` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '现场收集信息',
   `remark` text COLLATE utf8mb4_general_ci COMMENT '备注',
   `creator` varchar(32) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '创建人',
@@ -354,7 +356,7 @@ CREATE TABLE IF NOT EXISTS `dt_define_info_collect` (
   PRIMARY KEY (`id`) USING BTREE
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='信息点交付配置表';
 
-CREATE TABLE IF NOT EXISTS `dt_define_relation_collect` (
+CREATE TABLE IF NOT EXISTS `dt_define_relation_delivery` (
   `id` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
   `group_code` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '集团编码',
   `project_id` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '项目ID',
@@ -363,7 +365,7 @@ CREATE TABLE IF NOT EXISTS `dt_define_relation_collect` (
   `rel_code` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '边类型编码',
   `source_type_codes` json DEFAULT NULL COMMENT '源端对象类型编码',
   `end_type_codes` json DEFAULT NULL COMMENT '末端对象类型编码',
-  `automatic_flag` tinyint(1) DEFAULT NULL COMMENT '计算方式:0-手动计算 1-自动计算',
+  `delivery_cal_flag` tinyint(1) DEFAULT NULL COMMENT '计算方式:0-手动计算 1-自动计算',
   `pipe_use` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '管道用途',
   `remark` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '备注',
   `creator` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '创建人',

+ 65 - 0
dmp-comp/dmp-digital-starter/src/main/java/com/persagy/dmp/delivery/dto/ObjectInfoCollectDTO.java

@@ -0,0 +1,65 @@
+package com.persagy.dmp.delivery.dto;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+import com.persagy.dmp.common.model.entity.AuditableEntity;
+import com.persagy.dmp.delivery.entity.ObjectInfoCollect;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.hibernate.validator.constraints.Length;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * 平台/项目级采集的信息点定义
+ * @author linhuili
+ * @date 2021-10-13
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class ObjectInfoCollectDTO extends ObjectInfoCollect {
+    /** 别名称 */
+    private String name;
+    /** 别编码 */
+    private String aliasCode;
+    /** 别名名称 */
+    private String aliasName;
+    /** 类型编码 */
+    private String classCode;
+    private String category;
+    /** 一级标签 */
+    private String firstTag;
+    /** 二级标签 */
+    private String secondTag;
+    /** 优先级 */
+    private String priority;
+    /** 输入方式 */
+    private String inputMode;
+    /** 单位 */
+    private String unit;
+    /** 数据类型 */
+    private String dataType;
+    /** 复数标识 */
+    private Boolean isMultiple = false;
+    /** 区间标识 */
+    private Boolean isRegion = false;
+    /** 数据格式 */
+    private String formater;
+    /** 取值范围 */
+    @TableField(typeHandler = JacksonTypeHandler.class)
+    private ArrayNode dataSource;
+    /** 备注 */
+    private String remark;
+    /** 子分类标记 */
+    private Boolean subFlag;
+    /** 虚点 */
+    private Boolean weakPoint;
+    /** 显示顺序 */
+    private Long showOrder;
+    /** 版本 */
+    private String version;
+    /** 信息点来源  0-common */
+    private Integer sourceFrom;
+}

+ 43 - 0
dmp-comp/dmp-digital-starter/src/main/java/com/persagy/dmp/delivery/dto/ObjectTypeCollectDTO.java

@@ -0,0 +1,43 @@
+package com.persagy.dmp.delivery.dto;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.persagy.dmp.common.model.entity.AuditableEntity;
+import com.persagy.dmp.delivery.entity.ObjectTypeCollect;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.hibernate.validator.constraints.Length;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * 平台/项目级采集的信息点定义
+ * @author linhuili
+ * @date 2021-10-13
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class ObjectTypeCollectDTO extends ObjectTypeCollect {
+    /** 类型名称 */
+    private String name;
+    private String aliasCode;
+    /** 别名名称 */
+    private String aliasName;
+    /** 对象类型 */
+    private String objType;
+    /** 项目ID */
+    private String projectId;
+    /** 集团编码 */
+    private String groupCode;
+    /** 专业编码:上级类型是系统/设备时该字段有值 */
+    private String majorCode;
+    /** 系统编码:上级类型是设备时该字段有值,值为系统类型的code */
+    private String systemCode;
+    /** 设备编码:上级类型是部件时该字段有值,值为设备类型的code */
+    private String equipmentCode;
+    /** 上级类型编码 */
+    private String parentCode;
+    /** 版本 */
+    private String version;
+    /** 类型来源  0-common */
+    private Integer sourceFrom;
+}

+ 65 - 0
dmp-comp/dmp-digital-starter/src/main/java/com/persagy/dmp/delivery/dto/RelationDefineCollectDTO.java

@@ -0,0 +1,65 @@
+package com.persagy.dmp.delivery.dto;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+import com.persagy.dmp.basic.dto.RelationCalDTO;
+import com.persagy.dmp.basic.dto.RelationCalRuleDTO;
+import com.persagy.dmp.common.model.entity.AuditableEntity;
+import com.persagy.dmp.delivery.entity.RelationDefineCollect;
+import com.persagy.dmp.typehandler.RelationCalTypeHandler;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.List;
+import java.util.Set;
+
+/**
+ * 平台/项目级采集的信息点定义
+ * @author linhuili
+ * @date 2021-10-13
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class RelationDefineCollectDTO extends RelationDefineCollect {
+    /** 图类型名称*/
+    private String graphName;
+    /** 边类型名称 */
+    private String relName;
+    /** 边方向性 */
+    private Integer directional;
+    /** 边属性 */
+    private String attribute;
+    /** 主要连接对象 */
+    private String targetObjs;
+    /** 关系处理模块提示信息,兼容数据中心而存在 */
+    private String prompting;
+    /** 备注 */
+    private String remark;
+    /** 计算关系之前需要计算的关系 */
+    private List<RelationCalDTO> beforeCalRels;
+    /** 计算器,就是计算规则 */
+    private RelationCalRuleDTO calRules;
+    /** 关系左侧的对象分类 */
+    private String fromObjType;
+    /** 关系右侧的对象分类 */
+    private String toObjType;
+    /** 自动计算类型,0-手动计算,1-自动计算,0-手动计算,1-自动计算 */
+    private Boolean automaticFlag;
+    /** 是否需要配置源末端 */
+    private Boolean sourceFlag;
+    /** 手动计算类型 1 禁用  2提示引导 3手动维护 */
+    private Integer manual;
+    /** 系统类型,风系统1,水系统0 */
+    private Integer systemType;
+    /** 机电系统类型 */
+    private Set<String> mepSystemType;
+    /** 分区类型code集合 */
+    private Set<String> zoneTypes;
+    /** 是否参与计算 */
+    private Boolean calFlag;
+
+
+
+}

+ 2 - 2
dmp-comp/dmp-digital-starter/src/main/java/com/persagy/dmp/delivery/entity/ObjectInfoCollect.java

@@ -14,7 +14,7 @@ import javax.validation.constraints.NotNull;
  */
 @Data
 @EqualsAndHashCode(callSuper = true)
-@TableName(value = "dt_define_info_collect", autoResultMap = true)
+@TableName(value = "dt_define_info_delivery", autoResultMap = true)
 public class ObjectInfoCollect extends AuditableEntity {
     /** 集团编码 */
     private String groupCode;
@@ -36,7 +36,7 @@ public class ObjectInfoCollect extends AuditableEntity {
     /** 交付实例范围 */
     private String instanceScope;
     /** 交付数据来源 */
-    private String dataSource;
+    private String dataFrom;
     /** 现场收集信息 */
     private String collectInfo;
     /** 备注 */

+ 9 - 1
dmp-comp/dmp-digital-starter/src/main/java/com/persagy/dmp/delivery/entity/ObjectTypeCollect.java

@@ -1,6 +1,9 @@
 package com.persagy.dmp.delivery.entity;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
+import com.fasterxml.jackson.databind.node.ArrayNode;
 import com.persagy.dmp.common.model.entity.AuditableEntity;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
@@ -14,7 +17,7 @@ import javax.validation.constraints.NotNull;
  */
 @Data
 @EqualsAndHashCode(callSuper = true)
-@TableName(value = "dt_define_type_collect", autoResultMap = true)
+@TableName(value = "dt_define_type_delivery", autoResultMap = true)
 public class ObjectTypeCollect extends AuditableEntity {
     /** 集团编码 */
     private String groupCode;
@@ -35,6 +38,11 @@ public class ObjectTypeCollect extends AuditableEntity {
     private String instanceScope;
     /** 交付范围:依赖&关联 */
     private String associationRelation;
+    /** 正逆向交付方式 0-逆向 1-正向 2-不确定*/
+    private Integer deliveryWay;
+    /** 交付主张不确定时,正向时设备所在物业空间的空间功能类型*/
+    @TableField(typeHandler = JacksonTypeHandler.class)
+    private ArrayNode roomFuncTypes;
     /** 备注 */
     private String remark;
 

+ 2 - 2
dmp-comp/dmp-digital-starter/src/main/java/com/persagy/dmp/delivery/entity/RelationDefineCollect.java

@@ -18,7 +18,7 @@ import java.util.List;
  */
 @Data
 @EqualsAndHashCode(callSuper = true)
-@TableName(value = "dt_define_relation_collect", autoResultMap = true)
+@TableName(value = "dt_define_relation_delivery", autoResultMap = true)
 public class RelationDefineCollect extends AuditableEntity {
     /** 集团编码 */
     private String groupCode;
@@ -37,7 +37,7 @@ public class RelationDefineCollect extends AuditableEntity {
     /** 边类型编码  */
     private String relCode;
     /** 计算方式:0-手动计算 1-自动计算 */
-    private Integer automaticFlag;
+    private Boolean deliveryCalFlag;
     /** 管道用途 */
     private String pipeUse;
     /** 备注 */