feat:There is no way the

This commit is contained in:
super_liu
2021-08-09 17:31:32 +08:00
parent 04f0f1f3f8
commit 9c32571868
4 changed files with 109 additions and 35 deletions
@@ -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) {