feat:There is no way the
This commit is contained in:
@@ -9,6 +9,7 @@ import com.adc.da.utils.util.InitStandAttrUtil;
|
||||
import com.rabbitmq.client.Channel;
|
||||
import net.sf.json.JSONObject;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.json.JSONTokener;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.amqp.rabbit.annotation.Exchange;
|
||||
@@ -72,6 +73,7 @@ public class SendStandMQService {
|
||||
SarStandardsInfo infoEO = (SarStandardsInfo) JSONObject.toBean(jsonobject,SarStandardsInfo.class);
|
||||
String sarStandAttrEOStr = infoEO.getSarStandAttrEOStr();
|
||||
Map<String,Object> attrInfoMap = JSONObject.fromObject(sarStandAttrEOStr);
|
||||
Map<String,Object> infoMap = infoEO.getAttrInfoMap();
|
||||
|
||||
// 往索引表中插入数据
|
||||
String getCodeName = "";
|
||||
@@ -111,6 +113,7 @@ public class SendStandMQService {
|
||||
}
|
||||
saveMap.put("issueTime",dateFormatToStr(infoEO.getIssueTime()));
|
||||
|
||||
saveMap.put("standNature",infoEO.getStandNature());
|
||||
saveMap.put("synopsis",infoEO.getSynopsis());
|
||||
saveMap.put("standType",infoEO.getStandType());
|
||||
saveMap.put("textStatus",infoEO.getTextStatus());
|
||||
@@ -134,6 +137,12 @@ public class SendStandMQService {
|
||||
// 动态存储属性字段
|
||||
for (String field : fieldInfoList) {
|
||||
saveMap.put(field,attrInfoMap.getOrDefault(field,""));
|
||||
Object json= new JSONTokener(infoMap.get(field).toString()).nextValue();
|
||||
String fieldValue = "";
|
||||
if(!json.toString().equals("null")){
|
||||
fieldValue = infoMap.get(field).toString();
|
||||
}
|
||||
saveMap.put(field+"Name",fieldValue);
|
||||
}
|
||||
|
||||
|
||||
|
||||
+45
-1
@@ -382,6 +382,30 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
}
|
||||
}
|
||||
|
||||
public void attrInfoSearchDetails(SarStandardsInfo row) throws Exception {
|
||||
String fieldInfo = InitStandAttrUtil.queryField;
|
||||
String collectId = personCollectEOService.queryCollectByUserAndId(row.getId());
|
||||
row.setCollectId(collectId);
|
||||
// 查询属性表数据
|
||||
if (StringUtils.isNotBlank(fieldInfo)) {
|
||||
Map<String, Object> getAttrMap = sarStandAttrInfoEODao.selectStandFieldAndData(fieldInfo, row.getId());
|
||||
if (InitStandAttrUtil.clobFieldList != null && !InitStandAttrUtil.clobFieldList.isEmpty()) {
|
||||
// 遍历修改所有clob类型的值
|
||||
for (String clobField : InitStandAttrUtil.clobFieldList) {
|
||||
Clob clobValue = (Clob) getAttrMap.get(clobField);
|
||||
String fieldValue = FieldConvertUtil.ClobToString(clobValue);
|
||||
getAttrMap.put(clobField, fieldValue);
|
||||
}
|
||||
}
|
||||
|
||||
if (getAttrMap != null && !getAttrMap.isEmpty()) {
|
||||
row.setAttrInfoCaseMap(transformUpperCase(getAttrMap));
|
||||
}
|
||||
|
||||
row.setAttrInfoMap(getAttrMap);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private Map<String, Object> transformUpperCase(Map<String, Object> orgMap) {
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
@@ -428,6 +452,25 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
}
|
||||
}
|
||||
|
||||
public void attrInfoShowSearchDetails(SarStandardsInfo row) throws Exception {
|
||||
if (row != null) {
|
||||
attrInfoSearchDetails(row);
|
||||
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 = "";
|
||||
if (entry.getValue() != null && InitStandAttrUtil.selectionFieldList != null && InitStandAttrUtil.selectionFieldList.size() > 0 && InitStandAttrUtil.selectionFieldList.contains(name)) {
|
||||
value = entry.getValue().toString();
|
||||
List<String> valArr = Arrays.asList(value.split(","));
|
||||
value = dicTypeEODao.getDicNamesByCodes(valArr);
|
||||
entry.setValue(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void attrInfoShow(List<SarStandardsInfo> sarlist) throws Exception {
|
||||
for (SarStandardsInfo row : sarlist) {
|
||||
attrInfoDetails(row);
|
||||
@@ -1099,7 +1142,8 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
|
||||
// replaseStandState(sarStandardsInfoEO);
|
||||
// 记录修改日志
|
||||
saveUpdateLog(sarStandardsInfoEO, beforeSarStandardsInfo);
|
||||
if(elasflag) {
|
||||
if(elasflag) { //what?
|
||||
attrInfoShowSearchDetails(sarStandardsInfoEO);
|
||||
createStandMQService.sendStandMQ(sarStandardsInfoEO,"update");
|
||||
List<String> bhs = new ArrayList<>(Arrays.asList(String.valueOf(map.get("DTBJH")).split(",")));
|
||||
for (String bh :bhs) {
|
||||
|
||||
Reference in New Issue
Block a user