|
@@ -57,74 +57,7 @@ public class TortCompareRecordService extends ServiceImpl<FTOCompareRecordMapper
|
|
|
|
|
|
@Autowired
|
|
|
private PatentSplitMessageService patentSplitMessageService;
|
|
|
-// /**
|
|
|
-// * 新增侵权对比结果
|
|
|
-// *
|
|
|
-// * @param tortCompareRecordDTO
|
|
|
-// * @return
|
|
|
-// */
|
|
|
-// public List<Integer> addTortCompareRecord(TortCompareRecordDTO tortCompareRecordDTO) {
|
|
|
-// //获取登录人信息
|
|
|
-// PersonnelVO personnelVO = new PersonnelVO();
|
|
|
-// try {
|
|
|
-// personnelVO = cacheUtils.getLoginUser(loginUtils.getId());
|
|
|
-// } catch (Exception e) {
|
|
|
-// throw new UnLoginException("未登录");
|
|
|
-// }
|
|
|
-// Integer projectId = tortCompareRecordDTO.getProjectId();
|
|
|
-// if (projectId == null) {
|
|
|
-// throw new XiaoShiException("projectId不能为空");
|
|
|
-// }
|
|
|
-// //根据projctId查询出专利号
|
|
|
-// String patentNo = projectTaskService.getPatentNoByProjectId(projectId);
|
|
|
-// List<TortDTO> tortDTOS = tortCompareRecordDTO.getTortDTOS();
|
|
|
-// //根据专利号和projectId,删除特征
|
|
|
-// LambdaQueryWrapper<Feature> deleteWrapper = new LambdaQueryWrapper<>();
|
|
|
-// deleteWrapper.eq(Feature::getPatentNo, patentNo)
|
|
|
-// .eq(Feature::getProjectId, projectId);
|
|
|
-// featureService.remove(deleteWrapper);
|
|
|
-// //根据报告id删除侵权对比结果数据
|
|
|
-// LambdaQueryWrapper<FTOCompareRecord> deleteWrapper2 = new LambdaQueryWrapper<>();
|
|
|
-// deleteWrapper2.eq(FTOCompareRecord::getProjectId, projectId);
|
|
|
-// this.remove(deleteWrapper2);
|
|
|
-// //新增侵权对比结果集合
|
|
|
-// List<FTOCompareRecord> ftoCompareRecords = new ArrayList<>();
|
|
|
-// //遍历传入集合
|
|
|
-// if (!tortDTOS.isEmpty()) {
|
|
|
-// for (TortDTO tortDTO : tortDTOS) {
|
|
|
-// Feature feature = new Feature();
|
|
|
-// feature.setRightSort(tortDTO.getRightSort());
|
|
|
-// feature.setPatentNo(patentNo);
|
|
|
-// feature.setProjectId(projectId);
|
|
|
-// feature.setContent(tortDTO.getContent());
|
|
|
-// feature.setExplainText(tortDTO.getExplainText());
|
|
|
-// feature.setCreateId(personnelVO.getId());
|
|
|
-// feature.setRightType(tortDTO.getRightType());
|
|
|
-// feature.insert();
|
|
|
-// //获取特征id
|
|
|
-// Integer featureId = feature.getId();
|
|
|
-// if (tortDTO.getCompareResult() != null || StringUtils.isNotBlank(tortDTO.getCompareDescription()) || StringUtils.isNotBlank(tortDTO.getTargetDescription())) {
|
|
|
-// //插入侵权分析对比结果
|
|
|
-// FTOCompareRecord ftoCompareRecord = new FTOCompareRecord();
|
|
|
-// ftoCompareRecord.setProjectId(projectId);
|
|
|
-// ftoCompareRecord.setFeatureId(featureId);
|
|
|
-// ftoCompareRecord.setCompareResult(tortDTO.getCompareResult());
|
|
|
-// ftoCompareRecord.setCompareDescription(tortDTO.getCompareDescription());
|
|
|
-// ftoCompareRecord.setTargetDescription(tortDTO.getTargetDescription());
|
|
|
-// ftoCompareRecord.setCreateId(personnelVO.getId());
|
|
|
-// ftoCompareRecords.add(ftoCompareRecord);
|
|
|
-// }
|
|
|
-// }
|
|
|
-// List<Integer> ids = new ArrayList<>();
|
|
|
-// if (!ftoCompareRecords.isEmpty()) {
|
|
|
-// this.saveBatch(ftoCompareRecords);
|
|
|
-// ids = ftoCompareRecords.stream().map(FTOCompareRecord::getId).collect(Collectors.toList());
|
|
|
-// }
|
|
|
-// return ids;
|
|
|
-// } else {
|
|
|
-// throw new XiaoShiException("未传入特征集合");
|
|
|
-// }
|
|
|
-// }
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 新增侵权对比结果
|
|
@@ -209,11 +142,9 @@ public class TortCompareRecordService extends ServiceImpl<FTOCompareRecordMapper
|
|
|
}
|
|
|
// 获取登录人信息
|
|
|
PersonnelVO personnelVO = new PersonnelVO();
|
|
|
- try {
|
|
|
+
|
|
|
personnelVO = cacheUtils.getLoginUser(loginUtils.getId());
|
|
|
- } catch (Exception e) {
|
|
|
- throw new UnLoginException("未登录");
|
|
|
- }
|
|
|
+
|
|
|
// 重新排序
|
|
|
Integer order = 1;
|
|
|
List<Integer> ftoIds = new ArrayList<>();
|
|
@@ -267,11 +198,9 @@ public class TortCompareRecordService extends ServiceImpl<FTOCompareRecordMapper
|
|
|
Integer featureId = tortDTO.getFeatureId();
|
|
|
//获取登录人信息
|
|
|
PersonnelVO personnelVO = new PersonnelVO();
|
|
|
- try {
|
|
|
+
|
|
|
personnelVO = cacheUtils.getLoginUser(loginUtils.getId());
|
|
|
- } catch (Exception e) {
|
|
|
- throw new UnLoginException("未登录");
|
|
|
- }
|
|
|
+
|
|
|
if (tortDTO.getCompareResult() != null || StringUtils.isNotBlank(tortDTO.getCompareDescription()) || StringUtils.isNotBlank(tortDTO.getTargetDescription())) {
|
|
|
//插入对比结果
|
|
|
FTOCompareRecord ftoCompareRecord = new FTOCompareRecord();
|
|
@@ -423,11 +352,10 @@ public class TortCompareRecordService extends ServiceImpl<FTOCompareRecordMapper
|
|
|
}
|
|
|
//获取登录人信息
|
|
|
PersonnelVO personnelVO = new PersonnelVO();
|
|
|
- try {
|
|
|
+
|
|
|
personnelVO = cacheUtils.getLoginUser(loginUtils.getId());
|
|
|
- } catch (Exception e) {
|
|
|
- throw new UnLoginException("未登录");
|
|
|
- }
|
|
|
+
|
|
|
+
|
|
|
List<TortDTO> tortDTOS = tortCompareRecordDTO.getTortDTOS();
|
|
|
List<Integer> ids = new ArrayList<>();
|
|
|
//传入对比结果不为空
|
|
@@ -695,11 +623,9 @@ public class TortCompareRecordService extends ServiceImpl<FTOCompareRecordMapper
|
|
|
}
|
|
|
//获取登录人信息
|
|
|
PersonnelVO personnelVO = new PersonnelVO();
|
|
|
- try {
|
|
|
+
|
|
|
personnelVO = cacheUtils.getLoginUser(loginUtils.getId());
|
|
|
- } catch (Exception e) {
|
|
|
- throw new UnLoginException("未登录");
|
|
|
- }
|
|
|
+
|
|
|
try {
|
|
|
//首先是根据projectId,以及ifOriginal为false、ifFinal为true这几个条件删除表中的最终数据(最开始的数据)
|
|
|
LambdaQueryWrapper<FTOCompareRecord> removeWrapper = new LambdaQueryWrapper<>();
|