feat: 标准入库流程 带入 逻辑

This commit is contained in:
super_liu
2021-07-15 17:14:54 +08:00
parent 9930cbae9b
commit de97f459fd
2 changed files with 28 additions and 0 deletions
@@ -154,6 +154,8 @@ public class SarStandardsInfo extends BaseEntity {
@TableField(exist = false)
private Map<String, Object> attrInfoMap = new LinkedHashMap<>(); //属性表字段与值
@TableField(exist = false)
private Map<String, Object> attrInfoCaseMap = new LinkedHashMap<>(); //属性表字段与值小写前端带入渲染
@TableField(exist = false)
private String sarStandAttrEOStr; //新增修改时属性表信息
@TableField(exist = false)
private String menuId; //目录ID
@@ -286,10 +286,36 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
}
getAttrMap.putAll(newMap);
}
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<>();
for (Map.Entry<String, Object> entry : orgMap.entrySet()) {
String newKey = entry.getKey().toLowerCase();
resultMap.put(newKey, orgMap.get(entry.getKey()));
if (entry.getValue() != null && InitStandAttrUtil.fileFieldList != null && !InitStandAttrUtil.fileFieldList.isEmpty() && InitStandAttrUtil.fileFieldList.contains(entry.getKey())) {
String value = entry.getValue().toString();
if (StringUtils.isNotBlank(value)) {
List<AttFileEO> fileObj = attFileEOService.getMultiFileInfos(value);
if(!fileObj.isEmpty()){
resultMap.put(newKey + "Name", fileObj.get(0).getOldFileName());
}
}
}
}
return resultMap;
}
public void attrInfoShow(List<SarStandardsInfo> sarlist) throws Exception {
for (SarStandardsInfo row : sarlist) {
attrInfoDetails(row);