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