修改搜索中心重构后出现问题
This commit is contained in:
@@ -27,6 +27,7 @@ import com.adc.da.slrs.sarStandardsInfo.entity.SarBussionessStandEOPage;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfo;
|
||||
import com.adc.da.slrs.sarStandardsInfo.entity.SarStandardsInfoEOPage;
|
||||
import com.adc.da.slrs.sarStandardsInfo.service.ISarStandardsInfoService;
|
||||
import com.adc.da.slrs.standardSplit.service.SarStandardsInfoEOService;
|
||||
import com.adc.da.sys.dao.DicTypeEODao;
|
||||
import com.adc.da.sys.entity.DicTypeEO;
|
||||
import com.adc.da.util.http.ResponseMessage;
|
||||
@@ -37,6 +38,7 @@ import com.adc.da.utils.util.InitStandAttrUtil;
|
||||
import com.adc.da.utils.util.Utils;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.elasticsearch.client.transport.TransportClient;
|
||||
@@ -107,6 +109,9 @@ public class ResetSearchCenterService {
|
||||
@Autowired
|
||||
private SarBussStandAttrInfoDao sarBussStandAttrInfoEODao;
|
||||
|
||||
@Autowired
|
||||
private ISarStandardsInfoService sarStandardsInfoEOService;
|
||||
|
||||
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
@@ -854,36 +859,39 @@ public class ResetSearchCenterService {
|
||||
getAttrMap.put(clobField, fieldValue);
|
||||
}
|
||||
}
|
||||
|
||||
getAttrMap.put("updateAuth","1");
|
||||
row.setAttrInfoMap(getAttrMap);
|
||||
}
|
||||
|
||||
Map<String, Object> getAttrMap = row.getAttrInfoMap();
|
||||
if (getAttrMap != null && getAttrMap.size() > 0) {
|
||||
for (Map.Entry<String, Object> entry : getAttrMap.entrySet()) {
|
||||
String name = entry.getKey();
|
||||
String value = "";
|
||||
List<String> valArr = new ArrayList<>();
|
||||
if (entry.getValue() != null && InitStandAttrUtil.selectionFieldList != null && InitStandAttrUtil.selectionFieldList.size() > 0 && InitStandAttrUtil.selectionFieldList.contains(name)) {
|
||||
if (StringUtils.isNotBlank(entry.getValue().toString())) {
|
||||
Object json = null;
|
||||
if(Utils.isJson(entry.getValue().toString())){
|
||||
json = new JSONTokener(entry.getValue().toString()).nextValue();
|
||||
}
|
||||
if (json instanceof org.json.JSONArray) {
|
||||
valArr = com.alibaba.fastjson.JSONObject.parseArray(entry.getValue().toString(), String.class);
|
||||
} else {
|
||||
value = entry.getValue().toString();
|
||||
valArr = Arrays.asList(value.split(","));
|
||||
}
|
||||
if (!valArr.isEmpty()) {
|
||||
value = dicTypeEODao.getDicNamesByCodes(valArr, "");
|
||||
}
|
||||
}
|
||||
entry.setValue(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Map<String, Object> getAttrMap = row.getAttrInfoMap();
|
||||
// if (getAttrMap != null && getAttrMap.size() > 0) {
|
||||
// for (Map.Entry<String, Object> entry : getAttrMap.entrySet()) {
|
||||
// String name = entry.getKey();
|
||||
// String value = "";
|
||||
// List<String> valArr = new ArrayList<>();
|
||||
// if (entry.getValue() != null && InitStandAttrUtil.selectionFieldList != null && InitStandAttrUtil.selectionFieldList.size() > 0 && InitStandAttrUtil.selectionFieldList.contains(name)) {
|
||||
// if (StringUtils.isNotBlank(entry.getValue().toString())) {
|
||||
// Object json = null;
|
||||
// if(Utils.isJson(entry.getValue().toString())){
|
||||
// json = new JSONTokener(entry.getValue().toString()).nextValue();
|
||||
// }
|
||||
// if (json instanceof org.json.JSONArray) {
|
||||
// valArr = com.alibaba.fastjson.JSONObject.parseArray(entry.getValue().toString(), String.class);
|
||||
// } else {
|
||||
// value = entry.getValue().toString();
|
||||
// valArr = Arrays.asList(value.split(","));
|
||||
// }
|
||||
// if (!valArr.isEmpty()) {
|
||||
// value = dicTypeEODao.getDicNamesByCodes(valArr, "");
|
||||
// }
|
||||
// }
|
||||
// entry.setValue(value);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// if (getAttrMap != null) {
|
||||
// row.setSarStandAttrEOStr(JSONObject.toJSONString(getAttrMap));
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user