feat: There is no way the, xxxx
This commit is contained in:
@@ -80,7 +80,10 @@ public class SendStandMQService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
String sarStandAttrEOStr = infoEO.getSarStandAttrEOStr();
|
String sarStandAttrEOStr = infoEO.getSarStandAttrEOStr();
|
||||||
Map<String,Object> attrInfoMap = JSONObject.fromObject(sarStandAttrEOStr);
|
Map<String,Object> attrInfoMap = new TreeMap<>();
|
||||||
|
if(StringUtils.isNotBlank(sarStandAttrEOStr)){
|
||||||
|
attrInfoMap = JSONObject.fromObject(sarStandAttrEOStr);
|
||||||
|
}
|
||||||
Map<String,Object> infoMap = infoEO.getAttrInfoMap();
|
Map<String,Object> infoMap = infoEO.getAttrInfoMap();
|
||||||
Map<String,String> infoEOMapItems = infoEO.getMapItems();
|
Map<String,String> infoEOMapItems = infoEO.getMapItems();
|
||||||
|
|
||||||
@@ -178,15 +181,25 @@ public class SendStandMQService {
|
|||||||
|
|
||||||
// 动态存储属性字段
|
// 动态存储属性字段
|
||||||
for (String field : fieldInfoList) {
|
for (String field : fieldInfoList) {
|
||||||
saveMap.put(field,attrInfoMap.getOrDefault(field,""));
|
String fieldValue = "";
|
||||||
String fieldValue = "";
|
try {
|
||||||
if(infoMap.get(field) != null && StringUtils.isNotBlank(infoMap.get(field).toString())){
|
saveMap.put(field,attrInfoMap.getOrDefault(field,""));
|
||||||
Object json= new JSONTokener(infoMap.get(field).toString()).nextValue();
|
if(infoMap.get(field) != null && StringUtils.isNotBlank(infoMap.get(field).toString())){
|
||||||
if(!json.toString().equals("null")){
|
Object json= new JSONTokener(infoMap.get(field).toString()).nextValue();
|
||||||
fieldValue = infoMap.get(field).toString();
|
if(json instanceof org.json.JSONArray){
|
||||||
|
fieldValue = String.join(",", com.alibaba.fastjson.JSONObject.parseArray(standMap.get(field).toString(),String.class));
|
||||||
|
}else {
|
||||||
|
if(!("null").equals(json)){
|
||||||
|
fieldValue = standMap.get(field).toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
saveMap.put(field+"Name",fieldValue);
|
||||||
|
}catch (Exception e){
|
||||||
|
logger.info("国内外标准 消息队列: "+addOrUpdate+", 标准ID:"+infoEO.getId()+",问题字段:"+field);
|
||||||
|
saveMap.put(field+"Name",fieldValue);
|
||||||
}
|
}
|
||||||
saveMap.put(field+"Name",fieldValue);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(infoEOMapItems != null && !infoEOMapItems.isEmpty()){
|
if(infoEOMapItems != null && !infoEOMapItems.isEmpty()){
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ import com.adc.da.utils.util.FieldConvertUtil;
|
|||||||
import com.adc.da.utils.util.InitStandAttrUtil;
|
import com.adc.da.utils.util.InitStandAttrUtil;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.google.gson.JsonObject;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.elasticsearch.client.transport.TransportClient;
|
import org.elasticsearch.client.transport.TransportClient;
|
||||||
import org.json.JSONTokener;
|
import org.json.JSONTokener;
|
||||||
|
|||||||
Reference in New Issue
Block a user