|
@@ -67,6 +67,7 @@ public class PatentApplicantService extends ServiceImpl<PatentApplicantMapper, P
|
|
|
List<PatentApplicant> patentApplicantList = this.getPatentApplicantByIds(applicantIds);
|
|
|
return this.setPatentApplicantDataList(patentApplicantLinkList, patentApplicantList);
|
|
|
}
|
|
|
+
|
|
|
private List<PatentApplicant> setPatentApplicantDataList(List<PatentApplicantLink> patentApplicantLinkList, List<PatentApplicant> patentApplicantList) {
|
|
|
List<PatentApplicant> dataList = new ArrayList<>();
|
|
|
patentApplicantLinkList.forEach(attribute -> {
|
|
@@ -90,6 +91,7 @@ public class PatentApplicantService extends ServiceImpl<PatentApplicantMapper, P
|
|
|
});
|
|
|
return dataList;
|
|
|
}
|
|
|
+
|
|
|
public IPage<PatentApplicant> getPageList(PatentApplicantVO params) {
|
|
|
IPage<PatentApplicant> pageList = baseMapper.getPageList(new Page<>(params.getCurrent(), params.getSize()), params);
|
|
|
List<SystemDict> systemDictList = systemDictService.getSystemDictListByType(Collections.singletonList("COUNTRIES"));
|
|
@@ -232,38 +234,41 @@ public class PatentApplicantService extends ServiceImpl<PatentApplicantMapper, P
|
|
|
* @param name 权利人 通过分割符 | 分割后的List
|
|
|
* @param shortName 【标】权利人 通过分割符 | 分割后的List
|
|
|
*/
|
|
|
- public List<Integer> updatePatentApplicant(List<String> name, List<String> shortName,List<PatentApplicant> patentApplicantList) {
|
|
|
+ public List<Integer> updatePatentApplicant(List<String> name, List<String> shortName, List<PatentApplicant> patentApplicantList) {
|
|
|
//生成一个存放ID的List
|
|
|
List<Integer> ids = new ArrayList<>();
|
|
|
//判断当前名称是否为空
|
|
|
if (name != null) {
|
|
|
for (int i = 0; i < name.size(); i++) {
|
|
|
- String s = i < shortName.size() ? shortName.get(i) :"";
|
|
|
+ String s = i < shortName.size() ? shortName.get(i) : "";
|
|
|
s = s.replace((char) 12288, ' '); // 将中文空格替换为英文空格
|
|
|
- s= s.trim();
|
|
|
+ s = s.trim();
|
|
|
String nam = name.get(i);
|
|
|
- PatentApplicant temp = patentApplicantList.stream().filter(item->item.getMerge().equals(false)&&item.getName().equals(nam)).findFirst().orElse(null);
|
|
|
+ PatentApplicant temp = patentApplicantList.stream().filter(item -> item.getMerge().equals(false) && item.getName().equals(nam)).findFirst().orElse(null);
|
|
|
if (temp == null) {
|
|
|
temp = this.add(name.get(i), s);
|
|
|
- } else if (name.size()==1) {
|
|
|
+ } else if (name.size() == 1) {
|
|
|
temp.setShortName(s);
|
|
|
temp.updateById();
|
|
|
}
|
|
|
- if(!ids.contains(temp.getId()))
|
|
|
- { ids.add(temp.getId());}
|
|
|
+ if (!ids.contains(temp.getId())) {
|
|
|
+ ids.add(temp.getId());
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
} else {
|
|
|
for (String s : shortName) {
|
|
|
- List<PatentApplicant> temp = patentApplicantList.stream().filter(item->item.getMerge().equals(0)&&item.getName().equals(s)).collect(Collectors.toList());
|
|
|
+ List<PatentApplicant> temp = patentApplicantList.stream().filter(item -> item.getMerge().equals(0) && item.getName().equals(s)).collect(Collectors.toList());
|
|
|
PatentApplicant patentApplicant = new PatentApplicant();
|
|
|
if (temp.size() == 0) {
|
|
|
patentApplicant = this.add(s, s);
|
|
|
} else {
|
|
|
- patentApplicant = temp.get(0);
|
|
|
+ patentApplicant = temp.get(0);
|
|
|
}
|
|
|
|
|
|
- if(!ids.contains(patentApplicant.getId())){ids.add(patentApplicant.getId());}
|
|
|
+ if (!ids.contains(patentApplicant.getId())) {
|
|
|
+ ids.add(patentApplicant.getId());
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|