|
@@ -1,11 +1,10 @@
|
|
|
package cn.cslg.report.service.business;
|
|
|
|
|
|
import cn.cslg.report.common.model.dto.LabelDTO;
|
|
|
+import cn.cslg.report.common.model.vo.PatentIndexSettingVO;
|
|
|
import cn.cslg.report.common.utils.SecurityUtils.LoginUtils;
|
|
|
import cn.cslg.report.common.utils.StringUtils;
|
|
|
-import cn.cslg.report.entity.ReportField;
|
|
|
-import cn.cslg.report.entity.ReportFieldPatentLink;
|
|
|
-import cn.cslg.report.entity.ReportFieldText;
|
|
|
+import cn.cslg.report.entity.*;
|
|
|
import cn.cslg.report.mapper.ReportFieldPatentLinkMapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
@@ -15,6 +14,7 @@ import org.springframework.context.annotation.Lazy;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
+import java.io.IOException;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
import java.util.stream.Collectors;
|
|
@@ -36,6 +36,8 @@ public class ReportFieldPatentLinkService extends ServiceImpl<ReportFieldPatentL
|
|
|
private final ReportFieldTreeService projectFieldTreeService;
|
|
|
private final ReportFieldService reportFieldService;
|
|
|
private final LoginUtils loginUtils;
|
|
|
+ private final ReportFieldOptionService reportFieldOptionService;
|
|
|
+ private final ReportFieldTreeService reportFieldTreeService;
|
|
|
|
|
|
public List<ReportFieldPatentLink> getProjectPatentLinkByPatentAndProId(String patentNo, Integer projectId) {
|
|
|
LambdaQueryWrapper<ReportFieldPatentLink> queryWrapper = new LambdaQueryWrapper<>();
|
|
@@ -92,32 +94,7 @@ public class ReportFieldPatentLinkService extends ServiceImpl<ReportFieldPatentL
|
|
|
return this.list(queryWrapper);
|
|
|
}
|
|
|
|
|
|
-// public void updatereportFieldPatentLink(ProjectImportPatentVO params, Integer patentId) {
|
|
|
-// if (params.getFieldList() != null && params.getFieldList().size() != 0) {
|
|
|
-// List<ReportFieldPatentLink> tempList = this.getProjectPatentLinkByPatentAndProId(patentId, params.getProjectId());
|
|
|
-// List<ReportFieldPatentLink> dataList = new ArrayList<>();
|
|
|
-// params.getFieldList().forEach(item -> {
|
|
|
-// ReportFieldPatentLink reportFieldPatentLink = new ReportFieldPatentLink();
|
|
|
-// reportFieldPatentLink.setPatentId(patentId);
|
|
|
-// reportFieldPatentLink.setProjectId(params.getProjectId());
|
|
|
-// reportFieldPatentLink.setType(item.getType());
|
|
|
-// reportFieldPatentLink.setFieldId(item.getFieldId());
|
|
|
-// reportFieldPatentLink.setCreateBy(0);
|
|
|
-// if (item.getType() == 0 || item.getType() == 1 || item.getType() == 2) {
|
|
|
-// reportFieldPatentLink.setOptionId(reportFieldTextService.add(item.getFieldId(), item.getText()));
|
|
|
-// } else {
|
|
|
-// reportFieldPatentLink.setOptionId(item.getOptionId());
|
|
|
-// }
|
|
|
-// long count = tempList.stream().filter(temp -> temp.getPatentId().equals(patentId) && temp.getFieldId().equals(ReportFieldPatentLink.getFieldId()) && temp.getOptionId().equals(reportFieldPatentLink.getOptionId())).count();
|
|
|
-// if (count == 0) {
|
|
|
-// dataList.add(reportFieldPatentLink);
|
|
|
-// }
|
|
|
-// });
|
|
|
-// if (dataList.size() != 0) {
|
|
|
-// this.saveOrUpdateBatch(dataList);
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
+
|
|
|
|
|
|
public void deleteByFieldId(Integer fieldId) {
|
|
|
this.remove(Wrappers.<ReportFieldPatentLink>lambdaQuery().eq(ReportFieldPatentLink::getFieldId, fieldId));
|
|
@@ -133,9 +110,6 @@ public class ReportFieldPatentLinkService extends ServiceImpl<ReportFieldPatentL
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-// public void deleteByPatentIdAndProjectIdAndFieldId(Integer patentId, Integer projectId, Integer fieldId) {
|
|
|
-// this.remove(Wrappers.<ReportFieldPatentLink>lambdaQuery().eq(ReportFieldPatentLink::getFieldId, fieldId).eq(ReportFieldPatentLink::getReportId, projectId).eq(ReportFieldPatentLink::getPatentId, patentId));
|
|
|
-// }
|
|
|
|
|
|
public void deleteByPatentIdsAndProjectIdAndFieldId(List<Integer> patentNos, Integer projectId, Integer fieldId) {
|
|
|
LambdaQueryWrapper<ReportFieldPatentLink> queryWrapper = new LambdaQueryWrapper<>();
|
|
@@ -144,191 +118,117 @@ public class ReportFieldPatentLinkService extends ServiceImpl<ReportFieldPatentL
|
|
|
queryWrapper.eq(ReportFieldPatentLink::getFieldId, fieldId);
|
|
|
this.remove(queryWrapper);
|
|
|
}
|
|
|
+ public void delete(Integer patentId, String patentNo, Integer fieldId) {
|
|
|
+ LambdaQueryWrapper<ReportFieldPatentLink> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ queryWrapper.eq(ReportFieldPatentLink::getPatentNo, patentNo)
|
|
|
+ .eq(ReportFieldPatentLink::getReportId, patentId)
|
|
|
+ .eq(ReportFieldPatentLink::getFieldId, fieldId);
|
|
|
+ this.remove(queryWrapper);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+ public List<LabelDTO> getPatentIndexSetting(PatentIndexSettingVO params) throws IOException {
|
|
|
+ List<ReportFieldPatentLink> projectFieldPatentLinkList = this.getProjectPatentLinkByPatentAndProjectIdAndFieldId(params.getPatentNo(), params.getReportId(), params.getFieldId());
|
|
|
+ List<Integer> optionIds = projectFieldPatentLinkList.stream().map(ReportFieldPatentLink::getOptionId).collect(Collectors.toList());
|
|
|
+ List<LabelDTO> mapList = new ArrayList<>();
|
|
|
+ switch (params.getType()) {
|
|
|
+ case 0:
|
|
|
+ case 1:
|
|
|
+ case 2:
|
|
|
+ List<ReportFieldText> projectFieldTextList = reportFieldTextService.getProjectFieldTextByIds(optionIds);
|
|
|
+ for (ReportFieldText projectFieldText : projectFieldTextList) {
|
|
|
+ LabelDTO map = new LabelDTO();
|
|
|
+ map.setValue(projectFieldText.getId());
|
|
|
+ map.setLabel(projectFieldText.getText());
|
|
|
+ mapList.add(map);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case 3:
|
|
|
+ case 4:
|
|
|
+ case 5:
|
|
|
+ List<ReportFieldOption> projectFieldOptionList = reportFieldOptionService.getFieldOptionListByIds(optionIds);
|
|
|
+ for (ReportFieldOption projectFieldOption : projectFieldOptionList) {
|
|
|
+ LabelDTO map = new LabelDTO();
|
|
|
+ map.setValue(projectFieldOption.getId());
|
|
|
+ map.setLabel(projectFieldOption.getName());
|
|
|
+ mapList.add(map);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case 6:
|
|
|
+ List<ReportFieldTree> projectFieldTreeList = reportFieldTreeService.getProjectFieldTreeOptionByIds(optionIds);
|
|
|
+ for (ReportFieldTree projectFieldTree : projectFieldTreeList) {
|
|
|
+ LabelDTO map = new LabelDTO();
|
|
|
+ map.setValue(projectFieldTree.getId());
|
|
|
+ map.setLabel(projectFieldTree.getName());
|
|
|
+ mapList.add(map);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ return mapList;
|
|
|
+ }
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
+ public void updatePatentIndexSetting(PatentIndexSettingVO params) {
|
|
|
+ this.delete(params.getReportId(), params.getPatentNo(), params.getFieldId());
|
|
|
+ List<Integer> optionIds = params.getSelected().stream().map(LabelDTO::getValue).distinct().collect(Collectors.toList());
|
|
|
+ List<String> texts = params.getSelected().stream().map(LabelDTO::getLabel).distinct().collect(Collectors.toList());
|
|
|
+ List<ReportFieldPatentLink> projectFieldPatentLinkList = new ArrayList<>();
|
|
|
+ switch (params.getType()) {
|
|
|
+ case 0:
|
|
|
+ case 1:
|
|
|
+ case 2:
|
|
|
+ List<ReportFieldText> tempList = reportFieldTextService.getProjectFieldTextByFieldId(params.getFieldId());
|
|
|
+ for (String text : texts) {
|
|
|
+ if (StringUtils.isEmpty(text)) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ ReportFieldText reportFieldText = tempList.stream().filter(item -> item.getText().equals(text)).findFirst().orElse(null);
|
|
|
+ if (reportFieldText == null) {
|
|
|
+ reportFieldText = new ReportFieldText();
|
|
|
+ reportFieldText.setFieldId(params.getFieldId());
|
|
|
+ reportFieldText.setText(text);
|
|
|
+ reportFieldText.insert();
|
|
|
+ }
|
|
|
+ ReportFieldPatentLink projectFieldPatentLink = new ReportFieldPatentLink();
|
|
|
+ projectFieldPatentLink.setPatentNo(params.getPatentNo());
|
|
|
+ projectFieldPatentLink.setReportId(params.getReportId());
|
|
|
+ projectFieldPatentLink.setType(params.getType());
|
|
|
+ projectFieldPatentLink.setFieldId(params.getFieldId());
|
|
|
+ projectFieldPatentLink.setCreateBy(loginUtils.getId());
|
|
|
+ projectFieldPatentLink.setOptionId(reportFieldText.getId());
|
|
|
+ projectFieldPatentLinkList.add(projectFieldPatentLink);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case 3:
|
|
|
+ case 4:
|
|
|
+ case 5:
|
|
|
+ case 6:
|
|
|
+ for (Integer optionId : optionIds) {
|
|
|
+ ReportFieldPatentLink projectFieldPatentLink = new ReportFieldPatentLink();
|
|
|
+ projectFieldPatentLink.setPatentNo(params.getPatentNo());
|
|
|
+ projectFieldPatentLink.setReportId(params.getReportId());
|
|
|
+ projectFieldPatentLink.setType(params.getType());
|
|
|
+ projectFieldPatentLink.setFieldId(params.getFieldId());
|
|
|
+ projectFieldPatentLink.setCreateBy(loginUtils.getId());
|
|
|
+ projectFieldPatentLink.setOptionId(optionId);
|
|
|
+ projectFieldPatentLinkList.add(projectFieldPatentLink);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ if (projectFieldPatentLinkList.size() != 0) {
|
|
|
+ this.saveOrUpdateBatch(projectFieldPatentLinkList);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ public List<ReportFieldPatentLink> get(int id) throws IOException{
|
|
|
+ LambdaQueryWrapper<ReportFieldPatentLink> linkLambdaQueryWrapper=new LambdaQueryWrapper<>();
|
|
|
+ linkLambdaQueryWrapper.eq(ReportFieldPatentLink::getReportId,id);
|
|
|
+ return this.list(linkLambdaQueryWrapper);
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
-// @Transactional
|
|
|
-// public void patentBatchIndex(PatentBatchIndexVO params) {
|
|
|
-// List<ReportFieldPatentLink> tempList;
|
|
|
-// List<ReportField> fieldList = params.getFieldList().stream().filter(ReportField::getEnabled).collect(Collectors.toList());
|
|
|
-// List<ReportFieldPatentLink> reportFieldPatentLinkList = new ArrayList<>();
|
|
|
-// for (ReportField field : fieldList) {
|
|
|
-// switch (field.getType()) {
|
|
|
-// case 0:
|
|
|
-// case 1:
|
|
|
-// case 2:
|
|
|
-// this.deleteByPatentIdsAndProjectIdAndFieldId(params.getPatentIds(), params.getProjectId(), field.getId());
|
|
|
-// tempList = this.getProjectPatentLinkByPatentIdsAndProjectId(params.getPatentIds(), params.getProjectId());
|
|
|
-// tempList = tempList.stream().filter(item -> fieldList.stream().map(ReportField::getId).collect(Collectors.toList()).contains(item.getFieldId())).collect(Collectors.toList());
|
|
|
-// ReportFieldText projectFieldText = reportFieldTextService.getReportFieldTextByNameAndFieldId(field.getText(), field.getId());
|
|
|
-// if (projectFieldText == null) {
|
|
|
-// projectFieldText = new ReportFieldText();
|
|
|
-// projectFieldText.setText(field.getText());
|
|
|
-// projectFieldText.setFieldId(field.getId());
|
|
|
-// projectFieldText.insert();
|
|
|
-// }
|
|
|
-// reportFieldPatentLinkList.addAll(this.setPatentBatchIndexDataList(tempList, params.getPatentIds(), field, projectFieldText.getId(), params.getProjectId()));
|
|
|
-// break;
|
|
|
-// case 3:
|
|
|
-// case 4:
|
|
|
-// this.deleteByPatentIdsAndProjectIdAndFieldId(params.getPatentIds(), params.getProjectId(), field.getId());
|
|
|
-// case 5:
|
|
|
-// case 6:
|
|
|
-// tempList = this.getProjectPatentLinkByPatentIdsAndProjectId(params.getPatentIds(), params.getProjectId());
|
|
|
-// tempList = tempList.stream().filter(item -> fieldList.stream().map(ReportField::getId).collect(Collectors.toList()).contains(item.getFieldId())).collect(Collectors.toList());
|
|
|
-// for (Integer optionId : field.getSelected()) {
|
|
|
-// reportFieldPatentLinkList.addAll(this.setPatentBatchIndexDataList(tempList, params.getPatentIds(), field, optionId, params.getProjectId()));
|
|
|
-// }
|
|
|
-// break;
|
|
|
-// }
|
|
|
-// }
|
|
|
-// if (reportFieldPatentLinkList.size() != 0) {
|
|
|
-// this.saveOrUpdateBatch(reportFieldPatentLinkList);
|
|
|
-// }
|
|
|
-// }
|
|
|
-// private List<ReportFieldPatentLink> setPatentBatchIndexDataList(List<ReportFieldPatentLink> tempList, List<String> patentNos, ReportField field, Integer optionId, Integer projectId) {
|
|
|
-// List<ReportFieldPatentLink> dataList = new ArrayList<>();
|
|
|
-// for (Integer patentId : patentIds) {
|
|
|
-// ReportFieldPatentLink temp = tempList.stream().filter(item -> item.getFieldId().equals(field.getId()) && item.getOptionId().equals(optionId) && item.getPatentNo().equals(patentId)).findFirst().orElse(null);
|
|
|
-// if (temp == null) {
|
|
|
-// ReportFieldPatentLink reportFieldPatentLink = new ReportFieldPatentLink();
|
|
|
-// reportFieldPatentLink.setFieldId(field.getId());
|
|
|
-// reportFieldPatentLink.setReportId(projectId);
|
|
|
-// reportFieldPatentLink.setType(field.getType());
|
|
|
-// reportFieldPatentLink.setCreateBy(loginUtils.getId());
|
|
|
-// reportFieldPatentLink.setOptionId(optionId);
|
|
|
-// reportFieldPatentLink.setPatentNo(patentNos);
|
|
|
-// dataList.add(reportFieldPatentLink);
|
|
|
-// }
|
|
|
-// }
|
|
|
-// return dataList;
|
|
|
-// }
|
|
|
|
|
|
-// public List<CustomFieldLabelDTO> getPatentIndexSetting2(Integer patentId, Integer projectId) {
|
|
|
-// List<CustomFieldLabelDTO> dataList = new ArrayList<>();
|
|
|
-// List<ReportField> projectFieldList = projectFieldService.getReportFieldByProjectId(projectId);
|
|
|
-// for (ReportField projectField : projectFieldList) {
|
|
|
-// PatentIndexSettingVO params = new PatentIndexSettingVO();
|
|
|
-// CustomFieldLabelDTO data = new CustomFieldLabelDTO();
|
|
|
-// params.setId(patentId);
|
|
|
-// params.setType(projectField.getType());
|
|
|
-// params.setFieldId(projectField.getId());
|
|
|
-// params.setProjectId(projectId);
|
|
|
-// data.setName(projectField.getName());
|
|
|
-// data.setId(projectField.getId());
|
|
|
-// data.setType(projectField.getType());
|
|
|
-// data.setSelected(this.getPatentIndexSetting(params));
|
|
|
-// dataList.add(data);
|
|
|
-// }
|
|
|
-// return dataList;
|
|
|
-// }
|
|
|
|
|
|
-// public List<LabelDTO> getPatentIndexSetting(PatentIndexSettingVO params) {
|
|
|
-// List<ReportFieldPatentLink> reportFieldPatentLinkList = this.getProjectPatentLinkByPatentAndProjectIdAndFieldId(params.getId(), params.getProjectId(), params.getFieldId());
|
|
|
-// List<Integer> optionIds = reportFieldPatentLinkList.stream().map(ReportFieldPatentLink::getOptionId).collect(Collectors.toList());
|
|
|
-// List<LabelDTO> mapList = new ArrayList<>();
|
|
|
-// switch (params.getType()) {
|
|
|
-// case 0:
|
|
|
-// case 1:
|
|
|
-// case 2:
|
|
|
-// List<ReportFieldText> projectFieldTextList = reportFieldTextService.getReportFieldTextByIds(optionIds);
|
|
|
-// for (ReportFieldText projectFieldText : projectFieldTextList) {
|
|
|
-// LabelDTO map = new LabelDTO();
|
|
|
-// map.setValue(projectFieldText.getId());
|
|
|
-// map.setLabel(projectFieldText.getText());
|
|
|
-// mapList.add(map);
|
|
|
-// }
|
|
|
-// break;
|
|
|
-// case 3:
|
|
|
-// case 4:
|
|
|
-// case 5:
|
|
|
-// List<ReportFieldOption> projectFieldOptionList = projectFieldOptionService.getFieldOptionListByIds(optionIds);
|
|
|
-// for (ReportFieldOption projectFieldOption : projectFieldOptionList) {
|
|
|
-// LabelDTO map = new LabelDTO();
|
|
|
-// map.setValue(projectFieldOption.getId());
|
|
|
-// map.setLabel(projectFieldOption.getName());
|
|
|
-// mapList.add(map);
|
|
|
-// }
|
|
|
-// break;
|
|
|
-// case 6:
|
|
|
-// List<ReportFieldTree> projectFieldTreeList = projectFieldTreeService.getReportFieldTreeOptionByIds(optionIds);
|
|
|
-// for (ReportFieldTree projectFieldTree : projectFieldTreeList) {
|
|
|
-// LabelDTO map = new LabelDTO();
|
|
|
-// map.setValue(projectFieldTree.getId());
|
|
|
-// map.setLabel(projectFieldTree.getName());
|
|
|
-// mapList.add(map);
|
|
|
-// }
|
|
|
-// break;
|
|
|
-// }
|
|
|
-// return mapList;
|
|
|
-// }
|
|
|
|
|
|
-// @Transactional
|
|
|
-// public void updatePatentIndexSetting(PatentIndexSettingVO params) {
|
|
|
-// this.deleteByPatentIdAndProjectIdAndFieldId(params.getId(), params.getProjectId(), params.getFieldId());
|
|
|
-// List<Integer> optionIds = params.getSelected().stream().map(LabelDTO::getValue).distinct().collect(Collectors.toList());
|
|
|
-// List<String> texts = params.getSelected().stream().map(LabelDTO::getLabel).distinct().collect(Collectors.toList());
|
|
|
-// List<ReportFieldPatentLink> reportFieldPatentLinkList = new ArrayList<>();
|
|
|
-// switch (params.getType()) {
|
|
|
-// case 0:
|
|
|
-// case 1:
|
|
|
-// case 2:
|
|
|
-// List<ReportFieldText> tempList = reportFieldTextService.getReportFieldTextByFieldId(params.getFieldId());
|
|
|
-// for (String text : texts) {
|
|
|
-// if (StringUtils.isEmpty(text)) {
|
|
|
-// continue;
|
|
|
-// }
|
|
|
-// ReportFieldText projectFieldText = tempList.stream().filter(item -> item.getText().equals(text)).findFirst().orElse(null);
|
|
|
-// if (projectFieldText == null) {
|
|
|
-// projectFieldText = new ReportFieldText();
|
|
|
-// projectFieldText.setFieldId(params.getFieldId());
|
|
|
-// projectFieldText.setText(text);
|
|
|
-// projectFieldText.insert();
|
|
|
-// }
|
|
|
-// ReportFieldPatentLink reportFieldPatentLink = new ReportFieldPatentLink();
|
|
|
-// reportFieldPatentLink.setProjectId(params.getProjectId());
|
|
|
-// reportFieldPatentLink.setPatentId(params.getId());
|
|
|
-// reportFieldPatentLink.setType(params.getType());
|
|
|
-// reportFieldPatentLink.setFieldId(params.getFieldId());
|
|
|
-// reportFieldPatentLink.setCreateBy(loginUtils.getId());
|
|
|
-// reportFieldPatentLink.setOptionId(projectFieldText.getId());
|
|
|
-// reportFieldPatentLinkList.add(reportFieldPatentLink);
|
|
|
-// }
|
|
|
-// break;
|
|
|
-// case 3:
|
|
|
-// case 4:
|
|
|
-// case 5:
|
|
|
-// case 6:
|
|
|
-// for (Integer optionId : optionIds) {
|
|
|
-// ReportFieldPatentLink reportFieldPatentLink = new ReportFieldPatentLink();
|
|
|
-// reportFieldPatentLink.setProjectId(params.getProjectId());
|
|
|
-// reportFieldPatentLink.setPatentId(params.getId());
|
|
|
-// reportFieldPatentLink.setType(params.getType());
|
|
|
-// reportFieldPatentLink.setFieldId(params.getFieldId());
|
|
|
-// reportFieldPatentLink.setCreateBy(loginUtils.getId());
|
|
|
-// reportFieldPatentLink.setOptionId(optionId);
|
|
|
-// reportFieldPatentLinkList.add(reportFieldPatentLink);
|
|
|
-// }
|
|
|
-// break;
|
|
|
-// }
|
|
|
-// if (reportFieldPatentLinkList.size() != 0) {
|
|
|
-// this.saveOrUpdateBatch(reportFieldPatentLinkList);
|
|
|
-// }
|
|
|
-// }
|
|
|
|
|
|
-// public void importreportFieldPatentLink(List<Patent> importPatentList, List<Patent> localPatentList, List<ReportFieldPatentLink> importProjectPatentLinkList, Integer projectId, Integer userId, Integer importReportFieldId, Integer importReportFieldOptionId, Integer localReportFieldId, Integer localReportFieldOptionId) {
|
|
|
-// List<ReportFieldPatentLink> importreportFieldPatentLinkList = importProjectPatentLinkList.stream().filter(item -> item.getFieldId().equals(importReportFieldId) && item.getOptionId().equals(importReportFieldOptionId)).collect(Collectors.toList());
|
|
|
-// for (ReportFieldPatentLink reportFieldPatentLink : importreportFieldPatentLinkList) {
|
|
|
-// Patent importPatent = importPatentList.stream().filter(item -> item.getId().equals(reportFieldPatentLink.getPatentId())).findFirst().orElse(new Patent());
|
|
|
-// Patent localPatent = localPatentList.stream().filter(item -> item.getPatentNo().equals(importPatent.getPatentNo())).findFirst().orElse(null);
|
|
|
-// if (localPatent == null) {
|
|
|
-// continue;
|
|
|
-// }
|
|
|
-// reportFieldPatentLink.setId(null);
|
|
|
-// reportFieldPatentLink.setCreateBy(userId);
|
|
|
-// reportFieldPatentLink.setProjectId(projectId);
|
|
|
-// reportFieldPatentLink.setPatentId(localPatent.getId());
|
|
|
-// reportFieldPatentLink.setFieldId(localReportFieldId);
|
|
|
-// reportFieldPatentLink.setOptionId(localReportFieldOptionId);
|
|
|
-// }
|
|
|
-// this.saveOrUpdateBatch(importreportFieldPatentLinkList);
|
|
|
-// }
|
|
|
}
|