Browse Source

项目引用标签更新时的计算修改

dev_shibei_match
wangchao 4 years ago
parent
commit
88ac6d948f
  1. 4
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTagsServiceImpl.java

4
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectTagsServiceImpl.java

@ -41,6 +41,7 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
@ -142,8 +143,9 @@ public class ProjectTagsServiceImpl extends BaseServiceImpl<ProjectTagsDao, Proj
if(null != orientIds && null == newIds) differentSet.setMinus(orientIds);
if(null == orientIds && null != newIds) differentSet.setPlus(newIds);
if(null != orientIds && null != newIds){
List<String> replaceNews = new LinkedList<>(newIds);
differentSet.setPlus(newIds.removeAll(orientIds) ? newIds : null);
differentSet.setMinus(orientIds.removeAll(newIds) ? orientIds : null);
differentSet.setMinus(orientIds.removeAll(replaceNews) ? orientIds : null);
}
Result result = issueClient.updateCitations(differentSet);
if(!result.success()) throw new RenException(result.getInternalMsg());

Loading…
Cancel
Save