9 Commits bc061c3721 ... a146c3ac90

Author SHA1 Message Date
  liyang a146c3ac90 feat(adm-diagram): merge code 2 years ago
  liyang b06d1f9451 Merge remote-tracking branch 'origin/develop' into develop 2 years ago
  lvxianyun a8e71f61a2 fix 字典类型查询 交付范围 默认项目交付 2 years ago
  lvxianyun 1296fe8f7c fix 数据迁移bug 2 years ago
  lvxianyun eee70edb81 fix 信息点备注展示 2 years ago
  lvxianyun 9f4c71bd30 fix 信息点备注展示 2 years ago
  lvxianyun 901a796852 fix 信息点备注展示 2 years ago
  lijie 2caf88be07 Merge remote-tracking branch 'origin/develop' into develop 2 years ago
  lijie bd6f3b7af9 实现查询正/逆交付范围接口逻辑 2 years ago
17 changed files with 206 additions and 70 deletions
  1. 1 2
      adm-business/adm-middleware/src/main/java/com/persagy/proxy/dictionary/service/impl/AbstractAdmDictBaseServiceImpl.java
  2. 1 0
      adm-business/adm-middleware/src/main/java/com/persagy/proxy/dictionary/service/impl/AdmDictServiceImpl.java
  3. 2 1
      adm-business/adm-middleware/src/main/java/com/persagy/proxy/migration/constant/MiGrationRelCode.java
  4. 0 29
      adm-business/adm-middleware/src/main/java/com/persagy/proxy/migration/constant/MigrationObjType.java
  5. 1 2
      adm-business/adm-middleware/src/main/java/com/persagy/proxy/migration/controller/DataMigrationController.java
  6. 17 0
      adm-business/adm-middleware/src/main/java/com/persagy/proxy/migration/service/Impl/MigrationAbstractServiceImpl.java
  7. 13 16
      adm-business/adm-middleware/src/main/java/com/persagy/proxy/migration/service/Impl/ObjectDigitalMigration.java
  8. 2 0
      adm-business/adm-middleware/src/main/java/com/persagy/proxy/object/model/AdmObjectInfo.java
  9. 6 0
      adm-business/adm-server/src/main/java/com/persagy/adm/server/algorithm/constant/AdmServerConstant.java
  10. 35 0
      adm-business/adm-server/src/main/java/com/persagy/adm/server/algorithm/constant/DeliveryWayEnum.java
  11. 26 6
      adm-business/adm-server/src/main/java/com/persagy/adm/server/algorithm/controller/AdmModelController.java
  12. 1 0
      adm-business/adm-server/src/main/java/com/persagy/adm/server/algorithm/domain/DeliverPlanVo.java
  13. 25 0
      adm-business/adm-server/src/main/java/com/persagy/adm/server/algorithm/domain/QueryScopeOfDeliverVo.java
  14. 21 0
      adm-business/adm-server/src/main/java/com/persagy/adm/server/algorithm/domain/ScopeOfDeliverVo.java
  15. 10 0
      adm-business/adm-server/src/main/java/com/persagy/adm/server/algorithm/service/AdmModelService.java
  16. 41 14
      adm-business/adm-server/src/main/java/com/persagy/adm/server/algorithm/service/impl/AdmModelServiceImpl.java
  17. 4 0
      adm-business/adm-server/src/main/java/com/persagy/adm/server/auth/domain/LoginVo.java

+ 1 - 2
adm-business/adm-middleware/src/main/java/com/persagy/proxy/dictionary/service/impl/AbstractAdmDictBaseServiceImpl.java

@@ -208,7 +208,7 @@ public class AbstractAdmDictBaseServiceImpl<T> implements IAdmDictBaseService<T>
             admVO.setRegion(admVO.getIsRegion());
             admVO.setGroupCode(AppContext.getContext().getGroupCode());
             admVO.setSort(admVO.getShowOrder());
-
+            admVO.setNote(admVO.getRemark() == null ? "" :admVO.getRemark());
             //path路径处理
             handleObjectInfoPath(admVO);
             //信息点是否可见设置默认值
@@ -411,7 +411,6 @@ public class AbstractAdmDictBaseServiceImpl<T> implements IAdmDictBaseService<T>
         for(AdmObjectType admObjectType : typeList){
             if(collectMap.containsKey(admObjectType.getId())){
                 ObjectTypeCollect collect = collectMap.get(admObjectType.getId());
-                admObjectType.setDeliveryType(collect.getDeliveryType());
                 admObjectType.setIsDelivery(collect.getIsDelivery());
             }
         }

+ 1 - 0
adm-business/adm-middleware/src/main/java/com/persagy/proxy/dictionary/service/impl/AdmDictServiceImpl.java

@@ -91,6 +91,7 @@ public class AdmDictServiceImpl<T> extends AbstractAdmDictBaseServiceImpl<T> imp
         //获取交付范围内的设备
         QueryCriteria criteriaCollect = new QueryCriteria();
         ObjectNode nodeCol = JsonNodeFactory.instance.objectNode();
+        nodeCol.put("deliveryType", 0);
         nodeCol.put("objType", type);
         nodeCol.put("projectId", context.getProjectId());
         criteriaCollect.setCriteria(nodeCol);

+ 2 - 1
adm-business/adm-middleware/src/main/java/com/persagy/proxy/migration/constant/MiGrationRelCode.java

@@ -66,7 +66,8 @@ public enum MiGrationRelCode {
 	Pe2Bd("Pe2Bd"),
 	Pe2Fl("Pe2Fl"),
 	Pe2Sh("Pe2Sh"),
-	Pe2Sp("Pe2Sp");
+	Pe2Sp("Pe2Sp"),
+	Sp2Si("Sp2Si");
 
 	private String code;
 	public String getCode(){

+ 0 - 29
adm-business/adm-middleware/src/main/java/com/persagy/proxy/migration/constant/MigrationObjType.java

@@ -1,29 +0,0 @@
-package com.persagy.proxy.migration.constant;
-
-/**
- * @author lvxianyun
- * @title: MigrationObjType
- * @projectName adm-middleware
- * @description: 
- * @date 2021/12/9 21:04
- */
-public enum MigrationObjType {
-
-     project("project") ,building("building") , floor("floor") ,component("component") , equipment("equipment") , shaft("shaft") , system("system") ,  /*ispace ,*/ space("space") ;
-
-     private String code;
-
-     public String getCode() {
-          return code;
-     }
-
-     MigrationObjType(String code) {
-          this.code = code;
-     }
-
-     @Override
-     public String toString() {
-          return this.code;
-     }
-
-}

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

@@ -20,7 +20,6 @@ import com.persagy.proxy.adm.utils.AdmContextUtil;
 import com.persagy.proxy.common.entity.DmpResult;
 import com.persagy.proxy.common.entity.InstanceUrlParam;
 import com.persagy.proxy.migration.constant.MigrationConstant;
-import com.persagy.proxy.migration.constant.MigrationObjType;
 import com.persagy.proxy.migration.handler.DataMigrationHandler;
 import com.persagy.proxy.migration.model.DataMigrationExcel;
 import com.persagy.proxy.migration.model.MigrationInfo;
@@ -245,7 +244,7 @@ public class DataMigrationController {
         queryCriteria.setOnlyCount(true);
         ObjectNode criteria = JsonNodeFactory.instance.objectNode();
         criteria.put("valid", 1);
-        criteria.put("objType", MigrationObjType.project.getCode());
+        criteria.put("objType", "project");
         queryCriteria.setCriteria(criteria);
 
         String requestBody = JsonHelper.toJsonStr(queryCriteria);

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

@@ -6,6 +6,7 @@ import cn.hutool.http.HttpException;
 import cn.hutool.http.HttpUtil;
 import cn.hutool.json.JSONUtil;
 import com.fasterxml.jackson.databind.node.ArrayNode;
+import com.fasterxml.jackson.databind.node.JsonNodeFactory;
 import com.fasterxml.jackson.databind.node.ObjectNode;
 import com.persagy.dmp.basic.model.QueryCriteria;
 import com.persagy.dmp.basic.utils.JsonNodeUtils;
@@ -13,6 +14,8 @@ import com.persagy.dmp.common.constant.ResponseCode;
 import com.persagy.dmp.common.model.entity.AuditableEntity;
 import com.persagy.dmp.common.model.response.CommonResult;
 import com.persagy.dmp.common.utils.JsonHelper;
+import com.persagy.dmp.define.client.DigitalDefineFacade;
+import com.persagy.dmp.define.entity.ObjectTypeDefine;
 import com.persagy.dmp.migrate.client.DigitalMigrateLogFacade;
 import com.persagy.dmp.rwd.migrate.entity.SyncData;
 import com.persagy.proxy.common.entity.DmpResult;
@@ -468,4 +471,18 @@ public class MigrationAbstractServiceImpl<T> implements IMigrationAbstractServic
         }
         return targetsMap;
     }
+
+
+    public List<String> getObjTypes(InstanceUrlParam context){
+        QueryCriteria queryCriteria = new QueryCriteria();
+        ObjectNode criteria = JsonNodeFactory.instance.objectNode();
+        criteria.put("valid", 1);
+        queryCriteria.setCriteria(criteria);
+        List<ObjectTypeDefine> types = DigitalDefineFacade.queryObjectType(context.getGroupCode(),context.getProjectId(),context.getUserId(),context.getUserId(),queryCriteria);
+        if(CollUtil.isEmpty(types)){
+            return null;
+        }
+        Map<String,List<ObjectTypeDefine>> objType = types.stream().collect(Collectors.groupingBy(ObjectTypeDefine::getObjType));
+        return objType.keySet().stream().collect(Collectors.toList());
+    }
 }

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

@@ -8,16 +8,12 @@ import com.fasterxml.jackson.databind.node.ObjectNode;
 import com.persagy.dmp.basic.model.QueryCriteria;
 import com.persagy.dmp.basic.utils.JsonNodeUtils;
 import com.persagy.dmp.common.constant.ResponseCode;
-import com.persagy.dmp.common.model.entity.AuditableEntity;
-import com.persagy.dmp.common.model.entity.BaseEntity;
-import com.persagy.dmp.define.entity.ObjectTypeDefine;
 import com.persagy.dmp.digital.client.DigitalObjectFacade;
 import com.persagy.dmp.digital.entity.ObjectDigital;
 import com.persagy.dmp.rwd.migrate.entity.SyncData;
 import com.persagy.proxy.adm.request.AdmResponse;
 import com.persagy.proxy.common.entity.InstanceUrlParam;
 import com.persagy.proxy.migration.constant.MigrationConstant;
-import com.persagy.proxy.migration.constant.MigrationObjType;
 import com.persagy.proxy.migration.constant.MigrationTable;
 import com.persagy.proxy.migration.constant.MigrationType;
 import com.persagy.proxy.migration.model.DataMigrationExcel;
@@ -25,7 +21,6 @@ import com.persagy.proxy.migration.model.DataMigrationResponse;
 import com.persagy.proxy.migration.model.MigrationInfo;
 import com.persagy.proxy.migration.service.IDataMigration;
 import com.persagy.proxy.migration.service.IDataMigrationProcess;
-import com.persagy.proxy.migration.service.Impl.MigrationAbstractServiceImpl;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
 
@@ -55,14 +50,14 @@ public class ObjectDigitalMigration extends MigrationAbstractServiceImpl<ObjectD
         log.info("######################### dt_object 数据迁移内容获取开始 #########################");
         long start = System.currentTimeMillis();
         List<DataMigrationExcel> dataMigrationExcels = new ArrayList<>();
+        List<String> objTypes = getObjTypes(context);
+        for(String objType : objTypes){
+            log.info("######################### dt_object "+objType+"数据迁移内容获取开始 #########################");
 
-        for(MigrationObjType objType : MigrationObjType.values()){
-            log.info("######################### dt_object "+objType.getCode()+"数据迁移内容获取开始 #########################");
-
-            QueryCriteria queryCriteria = getQueryCriteria(objType.getCode());
+            QueryCriteria queryCriteria = getQueryCriteria(objType);
             dataMigrationExcels.addAll(startMigrateForExcel(context,migrationInfo,queryCriteria));
 
-            log.info("######################### dt_object "+objType.getCode()+"数据迁移内容获取结束 #########################");
+            log.info("######################### dt_object "+objType+"数据迁移内容获取结束 #########################");
         }
 
         long end = System.currentTimeMillis();
@@ -80,13 +75,14 @@ public class ObjectDigitalMigration extends MigrationAbstractServiceImpl<ObjectD
     public AdmResponse migrateForLog(InstanceUrlParam context, MigrationInfo migrationInfo) {
         log.info("######################### dt_object 同步开始 #########################");
         long start = System.currentTimeMillis();
-        for(MigrationObjType objType : MigrationObjType.values()){
-            log.info("######################### dt_object "+objType.getCode()+"同步开始 #########################");
+        List<String> objTypes = getObjTypes(context);
+        for(String objType : objTypes){
+            log.info("######################### dt_object "+objType+"同步开始 #########################");
 
-            QueryCriteria queryCriteria = getQueryCriteria(objType.getCode());
+            QueryCriteria queryCriteria = getQueryCriteria(objType);
             startMigrateForLog(context,migrationInfo,queryCriteria);
 
-            log.info("######################### dt_object "+objType.getCode()+"同步结束 #########################");
+            log.info("######################### dt_object "+objType+"同步结束 #########################");
         }
         long end = System.currentTimeMillis();
         log.info("######################### dt_object 数据迁移已结束 时间:"+(end-start)+" #########################");
@@ -104,8 +100,9 @@ public class ObjectDigitalMigration extends MigrationAbstractServiceImpl<ObjectD
         StringBuffer sqls = new StringBuffer(" \n -- 数据迁移  dt_object ------ \n");
         //获取已经采集的数据
         String sqls_temp = "";
-        for(MigrationObjType objType : MigrationObjType.values()){
-            QueryCriteria queryCriteria = getQueryCriteria(objType.getCode());
+        List<String> objTypes = getObjTypes(context);
+        for(String objType : objTypes){
+            QueryCriteria queryCriteria = getQueryCriteria(objType);
             List<ObjectNode> admData = getAdmData(context,queryCriteria);
             if(CollUtil.isEmpty(admData)){
                 continue;

+ 2 - 0
adm-business/adm-middleware/src/main/java/com/persagy/proxy/object/model/AdmObjectInfo.java

@@ -68,6 +68,8 @@ public class AdmObjectInfo {
 
     /** 备注 */
     private String note;
+    /** 备注 */
+    private String remark;
 
     /** 输入类型 */
     private String origDataType;

+ 6 - 0
adm-business/adm-server/src/main/java/com/persagy/adm/server/algorithm/constant/AdmServerConstant.java

@@ -11,6 +11,12 @@ public interface AdmServerConstant {
     String BUILD_SEQUENCE_ID="buildSequenceID";
     /**建筑id的信息点key值*/
     String BUILDING_ID="buildingId";
+    /**正逆向交付方式,0-逆向,1-正向*/
+    String DELIVERY_WAY="deliveryWay";
+    /**交付类型:0-项目交付 1-现场交付*/
+    String DELIVERY_TYPE="deliveryType";
+    /**是否交付 0-否 1-是*/
+    String IS_DELIVERY="isDelivery";
 
 
 }

+ 35 - 0
adm-business/adm-server/src/main/java/com/persagy/adm/server/algorithm/constant/DeliveryWayEnum.java

@@ -0,0 +1,35 @@
+package com.persagy.adm.server.algorithm.constant;
+
+import lombok.Getter;
+
+/**
+ * 正逆向交付方式枚举类
+ * @author : lijie
+ * Update By 2022/1/20 16:05
+ */
+@Getter
+public enum DeliveryWayEnum {
+
+    /**逆向*/
+    REVERSE("0", "逆向"),
+    /**正向*/
+    POSITIVE("1", "正向");
+
+    private String value;
+    private String desc;
+
+    DeliveryWayEnum(String value, String desc) {
+        this.value = value;
+        this.desc = desc;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+    public String getDesc() {
+        return desc;
+    }
+
+
+}

+ 26 - 6
adm-business/adm-server/src/main/java/com/persagy/adm/server/algorithm/controller/AdmModelController.java

@@ -4,15 +4,15 @@ import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.collection.CollUtil;
 import cn.hutool.core.util.StrUtil;
 import com.persagy.adm.server.algorithm.constant.AdmServerConstant;
-import com.persagy.adm.server.algorithm.domain.BuildingVo;
-import com.persagy.adm.server.algorithm.domain.ModelFileVo;
-import com.persagy.adm.server.algorithm.domain.QueryModelFileVo;
+import com.persagy.adm.server.algorithm.domain.*;
 import com.persagy.adm.server.algorithm.entity.AdmModelFile;
 import com.persagy.adm.server.algorithm.service.AdmModelService;
 import com.persagy.dmp.common.constant.DigitalObjectType;
 import com.persagy.dmp.common.context.AppContext;
 import com.persagy.dmp.common.model.response.CommonResult;
 import com.persagy.dmp.common.utils.ResultHelper;
+import com.persagy.dmp.delivery.dto.ObjectTypeCollectDTO;
+import com.persagy.dmp.delivery.entity.ObjectTypeCollect;
 import com.persagy.dmp.digital.entity.ObjectDigital;
 import lombok.RequiredArgsConstructor;
 import org.springframework.validation.annotation.Validated;
@@ -135,16 +135,36 @@ public class AdmModelController {
      */
     @PostMapping(value = "/saveModelFile")
     public CommonResult<List<Void>> saveModelFile(@Validated @RequestBody ModelFileVo modelFileVo) {
-        Map<String, AdmModelFile> modelFileMap = admModelService.queryCurrentModelFileByFloorIds(CollUtil.newArrayList(modelFileVo.getFloorId()));
-        AdmModelFile admModelFile = modelFileMap.get(modelFileVo.getFloorId());
         AdmModelFile modelFile = BeanUtil.copyProperties(modelFileVo, AdmModelFile.class);
         modelFile.setGroupCode(AppContext.getContext().getGroupCode());
         modelFile.setProjectId(AppContext.getContext().getProjectId());
         modelFile.setCreator(AppContext.getContext().getAccountId());
         modelFile.setModifier(AppContext.getContext().getAccountId());
         admModelService.saveModelFile(modelFile);
-
         return ResultHelper.multi(new ArrayList<>());
     }
+    /**
+     * 010103-模型文件-查询正向/逆向交付范围
+     * @param queryVo : 查询条件
+     * @return : com.persagy.dmp.common.model.response.CommonResult<java.lang.Void>
+     * @author : lijie
+     * Update By 2022/1/12 16:54
+     * @undone
+     */
+    @PostMapping(value = "/queryScopeOfDeliver")
+    public CommonResult<List<ScopeOfDeliverVo>> queryScopeOfDeliver(@Validated @RequestBody QueryScopeOfDeliverVo queryVo) {
+        // 1.查询对象类型交付范围
+        List<ObjectTypeCollect> typeCollects = admModelService.queryObjectTypeCollectByDeliveryWay(queryVo.getDeliveryWay());
+        if (CollUtil.isEmpty(typeCollects)){
+            return ResultHelper.multi(new ArrayList<>());
+        }
+        List<ScopeOfDeliverVo> result = new ArrayList<>();
+        for (ObjectTypeCollect typeCollect : typeCollects) {
+            result.add(BeanUtil.toBean(typeCollect,ScopeOfDeliverVo.class));
+        }
+        // 2.查询对象信息点交付范围
+        // 3.查询对象关系交付范围
+        return ResultHelper.multi(result);
+    }
 
 }

+ 1 - 0
adm-business/adm-server/src/main/java/com/persagy/adm/server/algorithm/domain/DeliverPlanVo.java

@@ -33,6 +33,7 @@ public class DeliverPlanVo {
      * */
     @NotBlank
     private String deliverPlanName;
+
     /**商品编码集合*/
     @NotEmpty
     private Set<String> skuCodes;

+ 25 - 0
adm-business/adm-server/src/main/java/com/persagy/adm/server/algorithm/domain/QueryScopeOfDeliverVo.java

@@ -0,0 +1,25 @@
+package com.persagy.adm.server.algorithm.domain;
+
+import com.persagy.adm.server.algorithm.constant.DeliveryWayEnum;
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * 查询交付范围VO类
+ * @author : lijie
+ * Update By 2022/1/20 15:58
+ */
+@Data
+public class QueryScopeOfDeliverVo {
+    /**
+     * 正逆向交付方式
+     * @see DeliveryWayEnum#value
+     * @mock 1
+     */
+    @NotNull
+    private Integer deliveryWay;
+
+
+
+}

+ 21 - 0
adm-business/adm-server/src/main/java/com/persagy/adm/server/algorithm/domain/ScopeOfDeliverVo.java

@@ -0,0 +1,21 @@
+package com.persagy.adm.server.algorithm.domain;
+
+import com.persagy.dmp.delivery.dto.ObjectInfoCollectDTO;
+import com.persagy.dmp.delivery.dto.ObjectTypeCollectDTO;
+import com.persagy.dmp.delivery.dto.RelationDefineCollectDTO;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * 交付范围VO类
+ * @author : lijie
+ * Update By 2022/1/14 16:26
+ */
+@Data
+public class ScopeOfDeliverVo extends ObjectTypeCollectDTO{
+    /**对象类型下需交付的信息点.暂无,后续根据业务再调整*/
+    List<ObjectInfoCollectDTO> objectInfoDefines;
+    /**对象类型下需交付的关系数据.暂无,后续根据业务再调整*/
+    List<RelationDefineCollectDTO> relationDefines;
+}

+ 10 - 0
adm-business/adm-server/src/main/java/com/persagy/adm/server/algorithm/service/AdmModelService.java

@@ -2,6 +2,8 @@ package com.persagy.adm.server.algorithm.service;
 
 import com.persagy.adm.server.algorithm.domain.DeliverPlanVo;
 import com.persagy.adm.server.algorithm.entity.AdmModelFile;
+import com.persagy.dmp.delivery.dto.ObjectTypeCollectDTO;
+import com.persagy.dmp.delivery.entity.ObjectTypeCollect;
 import com.persagy.dmp.digital.entity.ObjectDigital;
 
 import java.util.List;
@@ -37,4 +39,12 @@ public interface AdmModelService {
      * Update By 2022/1/19 17:54
      */
     void saveModelFile(AdmModelFile modelFile);
+    /**
+     * 根据正逆向交付查询对象类型交付范围
+     * @param deliveryWay : 正逆向交付方式,0-逆向,1-正向
+     * @return : java.util.List<com.persagy.dmp.delivery.dto.ObjectTypeCollectDTO>
+     * @author : lijie
+     * Update By 2022/1/20 18:26
+     */
+    List<ObjectTypeCollect> queryObjectTypeCollectByDeliveryWay(Integer deliveryWay);
 }

+ 41 - 14
adm-business/adm-server/src/main/java/com/persagy/adm/server/algorithm/service/impl/AdmModelServiceImpl.java

@@ -18,7 +18,11 @@ import com.persagy.dmp.common.constant.RelCodeEnum;
 import com.persagy.dmp.common.context.AppContext;
 import com.persagy.dmp.common.exception.BusinessException;
 import com.persagy.dmp.common.helper.SpringHelper;
+import com.persagy.dmp.common.model.entity.AuditableEntity;
 import com.persagy.dmp.common.model.response.CommonResult;
+import com.persagy.dmp.delivery.client.DigitalObjectTypeCollectFacade;
+import com.persagy.dmp.delivery.dto.ObjectTypeCollectDTO;
+import com.persagy.dmp.delivery.entity.ObjectTypeCollect;
 import com.persagy.dmp.digital.client.DigitalObjectFacade;
 import com.persagy.dmp.digital.entity.ObjectDigital;
 import com.persagy.dmp.digital.entity.ObjectRelation;
@@ -101,23 +105,46 @@ public class AdmModelServiceImpl implements AdmModelService {
     public void saveModelFile(AdmModelFile modelFile) {
         admModelFileMapper.insertEntity(modelFile);
     }
-
     /**
-     * 创建关系查询对象
-     * @param objectMapper : objectMapper
-     * @param graphCode : 图类型编码
-     * @param relCode : 边类型编码
-     * @param buildingIds : 建筑id
-     * @return : com.fasterxml.jackson.databind.node.ObjectNode
+     * 根据正逆向交付查询对象类型交付范围
+     * @param deliveryWay : 正逆向交付方式,0-逆向,1-正向
+     * @return : java.util.List<com.persagy.dmp.delivery.dto.ObjectTypeCollectDTO>
      * @author : lijie
-     * Update By 2022/1/19 14:18
+     * Update By 2022/1/20 18:26
      */
-    private ObjectNode createRelationQueryNode(ObjectMapper objectMapper, String graphCode, String relCode,
-                                               Set<String> buildingIds) {
+    @Override
+    public List<ObjectTypeCollect> queryObjectTypeCollectByDeliveryWay(Integer deliveryWay) {
+        if (null==deliveryWay){
+            return new ArrayList<>();
+        }
+        QueryCriteria queryCriteria = new QueryCriteria();
+        ObjectMapper objectMapper = SpringHelper.getBean(ObjectMapper.class);
         ObjectNode objectNode = objectMapper.createObjectNode();
-        objectNode.put(ObjectRelation.GRAPH_CODE_HUM,graphCode);
-        objectNode.put(ObjectRelation.REL_CODE_HUM,relCode);
-        objectNode.putPOJO(ObjectRelation.OBJ_FROM_HUM,buildingIds);
-        return objectNode;
+        objectNode.put(AuditableEntity.PROP_VALID,Boolean.TRUE);
+        objectNode.put(CommonConstant.QUERY_PROJECTID,AppContext.getContext().getProjectId());
+        objectNode.put(CommonConstant.QUERY_GROUPCODE,AppContext.getContext().getGroupCode());
+        objectNode.put(AdmServerConstant.DELIVERY_WAY,deliveryWay);
+        objectNode.put(AdmServerConstant.DELIVERY_TYPE,"0");
+        objectNode.put(AdmServerConstant.IS_DELIVERY,"1");
+        queryCriteria.setCriteria(objectNode);
+        CommonResult<List<ObjectTypeCollect>> commonResult = DigitalObjectTypeCollectFacade
+                .queryPrototype(AppContext.getContext().getGroupCode(), AppContext.getContext().getProjectId(),
+                        AppContext.getContext().getAppId(), AppContext.getContext().getAccountId(), queryCriteria);
+        if (!CommonConstant.QUERY_SUCCESS.equals(commonResult.getResult())){
+            throw new BusinessException(commonResult.getResult(),commonResult.getMessage());
+        }
+        if (CollUtil.isNotEmpty(commonResult.getData())){
+            return commonResult.getData();
+        }
+        // 暂时加个逻辑,如果没有就查询0
+        objectNode.put(CommonConstant.QUERY_PROJECTID,CommonConstant.DEFAULT_ID);
+        objectNode.put(CommonConstant.QUERY_GROUPCODE,CommonConstant.DEFAULT_ID);
+        CommonResult<List<ObjectTypeCollect>> zeroCommonResult = DigitalObjectTypeCollectFacade
+                .queryPrototype(AppContext.getContext().getGroupCode(), AppContext.getContext().getProjectId(),
+                        AppContext.getContext().getAppId(), AppContext.getContext().getAccountId(), queryCriteria);
+        if (!CommonConstant.QUERY_SUCCESS.equals(zeroCommonResult.getResult())){
+            throw new BusinessException(zeroCommonResult.getResult(),zeroCommonResult.getMessage());
+        }
+        return zeroCommonResult.getData();
     }
 }

+ 4 - 0
adm-business/adm-server/src/main/java/com/persagy/adm/server/auth/domain/LoginVo.java

@@ -18,15 +18,18 @@ public class LoginVo {
     /**
      * 登录设备类型
      * @see DeviceTypeEnum#type
+     * @mock 1
      */
     private String loginDeviceType;
     /**
      * 登录方式
      * @see LoginTypeEnum#type
+     * @mock 2
      */
     private String loginType;
     /**
      * 登录密码
+     * @mock 123456
      */
     private String passWord;
     /**
@@ -35,6 +38,7 @@ public class LoginVo {
     private String dingdingCode;
     /**
      * 手机号
+     * @mock 17337681032
      */
     private String phone;
     /**