|
@@ -4,6 +4,8 @@ import cn.hutool.core.collection.CollUtil;
|
|
|
import cn.hutool.core.map.MapUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import cn.hutool.json.JSONUtil;
|
|
|
+import com.alibaba.fastjson.JSONArray;
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
import com.fasterxml.jackson.databind.node.ObjectNode;
|
|
|
import com.persagy.dmp.basic.model.QueryCriteria;
|
|
@@ -12,6 +14,7 @@ import com.persagy.proxy.adm.constant.GraphCodeEnum;
|
|
|
import com.persagy.proxy.adm.constant.RelCodeEnum;
|
|
|
import com.persagy.proxy.adm.service.impl.AbstractAdmBaseServiceImpl;
|
|
|
import com.persagy.proxy.adm.utils.AdmContextUtil;
|
|
|
+import com.persagy.proxy.common.entity.DmpResult;
|
|
|
import com.persagy.proxy.object.model.AdmFloor;
|
|
|
import com.persagy.proxy.adm.request.AdmQueryCriteria;
|
|
|
import com.persagy.proxy.adm.request.AdmResponse;
|
|
@@ -164,6 +167,7 @@ public class AdmFloorServiceImpl extends AbstractAdmBaseServiceImpl<AdmFloor> im
|
|
|
}else{//新增或者更新
|
|
|
vos.stream().forEach(admFloor -> {
|
|
|
if(!JSONUtil.isNull(admFloor.getProperties())){
|
|
|
+ //admFloor.setPropertiesInfo(admFloor.getProperties().toString());
|
|
|
admFloor.setPropertiesInfo(admFloor.getProperties().toString());
|
|
|
admFloor.setProperties(null);
|
|
|
}
|
|
@@ -171,4 +175,32 @@ public class AdmFloorServiceImpl extends AbstractAdmBaseServiceImpl<AdmFloor> im
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ @Override
|
|
|
+ protected void processResultAfterQuery(DmpResult<JSONArray> response) {
|
|
|
+ // 2021年11月3日17:39:28 by lijie.特殊处理一下返回的properties信息点,不然转换为对象时会报转换异常
|
|
|
+ JSONArray data = new JSONArray();
|
|
|
+ List array = response.getData();
|
|
|
+ if (null!=array && array.size()>0){
|
|
|
+ data.addAll(array);
|
|
|
+ int size = data.size();
|
|
|
+ for (int i = 0; i < size; i++) {
|
|
|
+ JSONObject temp = data.getJSONObject(i);
|
|
|
+ if (temp.containsKey("infos") && temp.getJSONObject("infos").containsKey("properties")
|
|
|
+ && StrUtil.isNotBlank(temp.getJSONObject("infos").getString("properties"))
|
|
|
+ && temp.getJSONObject("infos").getString("properties").startsWith("{")){
|
|
|
+ temp.getJSONObject("infos")
|
|
|
+ .put("properties",JSONObject.parseObject(temp.getJSONObject("infos").getString("properties")));
|
|
|
+ }
|
|
|
+ if (temp.containsKey("properties")
|
|
|
+ && StrUtil.isNotBlank(temp.getString("properties"))
|
|
|
+ && temp.getString("properties").startsWith("{")){
|
|
|
+ temp.put("properties",JSONObject.parseObject(temp.getString("properties")));
|
|
|
+ }
|
|
|
+ data.set(i,temp);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ response.setData(data);
|
|
|
+ }
|
|
|
}
|