Bladeren bron

优化对象下载

zhyk18 2 jaren geleden
bovenliggende
commit
3aec81683b
1 gewijzigde bestanden met toevoegingen van 11 en 0 verwijderingen
  1. 11 0
      src/main/java/com/persagy/bdtp/adm/service/impl/SyncAppImpl.java

+ 11 - 0
src/main/java/com/persagy/bdtp/adm/service/impl/SyncAppImpl.java

@@ -21,6 +21,7 @@ import com.persagy.bdtp.adm.entity.db.*;
 import com.persagy.bdtp.adm.service.*;
 import com.persagy.bdtp.adm.util.DataExtrasUtil;
 import com.persagy.dmp.basic.model.QueryCriteria;
+import com.persagy.dmp.basic.model.QueryOperator;
 import com.persagy.dmp.common.constant.ValidEnum;
 import com.persagy.dmp.define.entity.RelationDefine;
 import com.persagy.dmp.digital.client.DigitalObjectClient;
@@ -261,10 +262,20 @@ public class SyncAppImpl implements ISyncApp {
 		QueryCriteria criteria = ServiceUtil.getQueryCriteria(objectMapper, AdmConst.OBJ_TYPE_SPACE, AdmConst.OBJ_TYPE_SHAFT, AdmConst.OBJ_TYPE_SYSTEM, AdmConst.OBJ_TYPE_EQUIPMENT, "ispace");
 		buildDownloadQueryCriteria(criteria, operator, bdtpDownloadTs);
 		criteria.getCriteria().put("buildingId", buildingId);
+		criteria.getCriteria().putObject("classCode").put(QueryOperator.NOT_LIKE.getIndex(), "__PP__");
 
 		List<ObjectNode> objs = ServiceUtil.queryAllPage(() -> objectClient.query(groupCode, projectId, AdmConst.APP_ID, userId, criteria), criteria, new Pagination(500));
 		if(objs == null)
 			objs = new ArrayList<>(0);
+		else {
+			objs.removeIf(objNode -> {
+				if (objNode.get("classCode") != null) {
+					String clsCode = objNode.get("classCode").asText();
+					return clsCode.startsWith("CF");
+				}
+				return true;
+			});
+		}
 
 		packInfos(objs);
 		test4Ts(objs);