文档库--详情(代替标准,对应标准,被代替标准)
This commit is contained in:
+76
-15
@@ -521,23 +521,84 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
|
||||
//处理被代替标准和对应标准
|
||||
for (Map<String, Object> map : mapList) {
|
||||
Map<String, Object> mapTemp = new HashMap<>();
|
||||
Map<String,Object> stringObjectMap = new HashMap<>();
|
||||
//对应标准处理
|
||||
if (StringUtils.isNotBlank(correspondingStandardId) && correspondingStandardId.contains((String) map.get("id"))) {
|
||||
correspondingStandardNameList.add((String) map.get("serial_number"));
|
||||
mapTemp.put("title", (String) map.get("serial_number"));
|
||||
mapTemp.put("id", (String) map.get("id"));
|
||||
if (ObjectUtils.isNotEmpty(mapTemp)) {
|
||||
listCorrespondingStandard.add(mapTemp);
|
||||
for (String s : correspondingStandardId.split(",")) {
|
||||
Map<String, Object> mapTemp = new HashMap<>();
|
||||
if(s.equals((String) map.get("id"))){
|
||||
correspondingStandardNameList.add((String) map.get("serial_number"));
|
||||
mapTemp.put("title", (String) map.get("serial_number"));
|
||||
mapTemp.put("id", (String) map.get("id"));
|
||||
if (ObjectUtils.isNotEmpty(mapTemp)) {
|
||||
listCorrespondingStandard.add(mapTemp);
|
||||
}
|
||||
}else{
|
||||
boolean flag = isId(s);
|
||||
if(!flag && !correspondingStandardNameList.contains(s)){
|
||||
correspondingStandardNameList.add(s);
|
||||
mapTemp.put("title", s);
|
||||
mapTemp.put("id", "");
|
||||
if (ObjectUtils.isNotEmpty(mapTemp)) {
|
||||
listCorrespondingStandard.add(mapTemp);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
if(StringUtils.isNotBlank(correspondingStandardId)){
|
||||
for (String s : correspondingStandardId.split(",")) {
|
||||
Map<String, Object> mapTemp = new HashMap<>();
|
||||
boolean flag = isId(s);
|
||||
if(!flag && !correspondingStandardNameList.contains(s)){
|
||||
correspondingStandardNameList.add(s);
|
||||
mapTemp.put("title", s);
|
||||
mapTemp.put("id", "");
|
||||
if (ObjectUtils.isNotEmpty(mapTemp)) {
|
||||
listCorrespondingStandard.add(mapTemp);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
//代替标准
|
||||
if (StringUtils.isNotBlank(replaceStandardId) && replaceStandardId.contains((String) map.get("id"))) {
|
||||
replaceStandardNameList.add((String) map.get("serial_number"));
|
||||
mapTemp.put("title", (String) map.get("serial_number"));
|
||||
mapTemp.put("id", (String) map.get("id"));
|
||||
if (ObjectUtils.isNotEmpty(mapTemp)) {
|
||||
listReplaceStandard.add(mapTemp);
|
||||
for (String s : replaceStandardId.split(",")) {
|
||||
Map<String, Object> mapTemp = new HashMap<>();
|
||||
if(s.equals((String) map.get("id"))){
|
||||
replaceStandardNameList.add((String) map.get("serial_number"));
|
||||
mapTemp.put("title", (String) map.get("serial_number"));
|
||||
mapTemp.put("id", (String) map.get("id"));
|
||||
if (ObjectUtils.isNotEmpty(mapTemp)) {
|
||||
listReplaceStandard.add(mapTemp);
|
||||
}
|
||||
}else{
|
||||
boolean flag = isId(s);
|
||||
if(!flag && !replaceStandardNameList.contains(s)){
|
||||
replaceStandardNameList.add(s);
|
||||
mapTemp.put("title", s);
|
||||
mapTemp.put("id", "");
|
||||
if (ObjectUtils.isNotEmpty(mapTemp)) {
|
||||
listReplaceStandard.add(mapTemp);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
if(StringUtils.isNotBlank(replaceStandardId)){
|
||||
for (String s : replaceStandardId.split(",")) {
|
||||
Map<String, Object> mapTemp = new HashMap<>();
|
||||
boolean flag = isId(s);
|
||||
if(!flag && !replaceStandardNameList.contains(s)){
|
||||
replaceStandardNameList.add(s);
|
||||
mapTemp.put("title", s);
|
||||
mapTemp.put("id", "");
|
||||
if (ObjectUtils.isNotEmpty(mapTemp)) {
|
||||
listReplaceStandard.add(mapTemp);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//被代替标准
|
||||
@@ -546,10 +607,10 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
replacedStandardIdList.add((String) map.get("id"));
|
||||
String serialNumber = (String) map.get("serial_number");
|
||||
replacedStandardNameList.add(serialNumber);
|
||||
mapTemp.put("title", (String) map.get("serial_number"));
|
||||
mapTemp.put("id", (String) map.get("id"));
|
||||
if (ObjectUtils.isNotEmpty(mapTemp)) {
|
||||
listReplacedStandard.add(mapTemp);
|
||||
stringObjectMap.put("title", (String) map.get("serial_number"));
|
||||
stringObjectMap.put("id", (String) map.get("id"));
|
||||
if (ObjectUtils.isNotEmpty(stringObjectMap)) {
|
||||
listReplacedStandard.add(stringObjectMap);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user