|
@@ -4,12 +4,11 @@ import cn.cslg.report.common.model.dto.invalidReReport.ArgumentsDTO;
|
|
|
import cn.cslg.report.common.model.dto.invalidReReport.ArgumentsQueryDTO;
|
|
|
import cn.cslg.report.common.model.vo.invalidReReport.ArgumentsVO;
|
|
|
import cn.cslg.report.common.utils.SecurityUtils.LoginUtils;
|
|
|
-import cn.cslg.report.entity.invalidReReport.Arguments;
|
|
|
-import cn.cslg.report.entity.invalidReReport.AssoArguments;
|
|
|
-import cn.cslg.report.entity.invalidReReport.Proof;
|
|
|
-import cn.cslg.report.entity.invalidReReport.Scratch;
|
|
|
+import cn.cslg.report.entity.Features;
|
|
|
+import cn.cslg.report.entity.invalidReReport.*;
|
|
|
import cn.cslg.report.mapper.InvalidReReport.ArgumentsMapper;
|
|
|
import cn.cslg.report.mapper.InvalidReReport.AssoArgumentsMapper;
|
|
|
+import cn.cslg.report.service.business.FeatureService;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import io.swagger.v3.oas.models.security.SecurityScheme;
|
|
@@ -33,6 +32,9 @@ public class ArgumentsService extends ServiceImpl<ArgumentsMapper, Arguments> {
|
|
|
private static LoginUtils loginUtils;
|
|
|
private static ScratchService scratchService;
|
|
|
private static AssoArgumentsService assoArgumentsService;
|
|
|
+ private static FeatureService featureService;
|
|
|
+ private static AssoFeatureProofService assoFeatureProofService;
|
|
|
+
|
|
|
/**
|
|
|
* 添加陈述意见
|
|
|
*
|
|
@@ -40,25 +42,25 @@ public class ArgumentsService extends ServiceImpl<ArgumentsMapper, Arguments> {
|
|
|
*/
|
|
|
public void addArguments(ArgumentsDTO argumentsDTO) {
|
|
|
// 检验参数
|
|
|
- if (argumentsDTO == null||argumentsDTO.getReportId() == null || argumentsDTO.getFeatureId() == null || argumentsDTO.getRightId() == null||argumentsDTO.getProofId()==null) {
|
|
|
+ if (argumentsDTO == null || argumentsDTO.getReportId() == null || argumentsDTO.getFeatureId() == null || argumentsDTO.getRightId() == null || argumentsDTO.getProofId() == null) {
|
|
|
return;
|
|
|
}
|
|
|
- Integer loginId=loginUtils.getId();
|
|
|
+ Integer loginId = loginUtils.getId();
|
|
|
//装载陈述意见实体类
|
|
|
Arguments arguments = new Arguments();
|
|
|
BeanUtils.copyProperties(argumentsDTO, arguments);
|
|
|
arguments.setCreateId(loginId);
|
|
|
arguments.insert();
|
|
|
//若划词不为空
|
|
|
- if(argumentsDTO.getContent()!=null){
|
|
|
- Scratch scratch =new Scratch();
|
|
|
- BeanUtils.copyProperties(argumentsDTO,scratch);
|
|
|
+ if (argumentsDTO.getContent() != null) {
|
|
|
+ Scratch scratch = new Scratch();
|
|
|
+ BeanUtils.copyProperties(argumentsDTO, scratch);
|
|
|
//根据证据类型获得证据的专利号
|
|
|
- Proof proof = proofService.getById(arguments.getProofId());
|
|
|
- String patenNo =proof.getPatentNo();
|
|
|
- scratch.setPatentNo(patenNo);
|
|
|
- scratch.setCreateId(loginId);
|
|
|
- scratch.insert();
|
|
|
+ Proof proof = proofService.getById(arguments.getProofId());
|
|
|
+ String patenNo = proof.getPatentNo();
|
|
|
+ scratch.setPatentNo(patenNo);
|
|
|
+ scratch.setCreateId(loginId);
|
|
|
+ scratch.insert();
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -69,25 +71,25 @@ public class ArgumentsService extends ServiceImpl<ArgumentsMapper, Arguments> {
|
|
|
* @param argumentsId
|
|
|
*/
|
|
|
public ArgumentsVO queryArgumentsDetail(Integer argumentsId) {
|
|
|
- //判断argumentsId是否为空
|
|
|
- if(argumentsId==null){
|
|
|
+ //判断argumentsId是否为空
|
|
|
+ if (argumentsId == null) {
|
|
|
return null;
|
|
|
}
|
|
|
- ArgumentsVO argumentsVO =new ArgumentsVO();
|
|
|
- //根据argumentsId查询陈述意见
|
|
|
- Arguments arguments =this.getById(argumentsId);
|
|
|
- BeanUtils.copyProperties(arguments,argumentsVO);
|
|
|
+ ArgumentsVO argumentsVO = new ArgumentsVO();
|
|
|
+ //根据argumentsId查询陈述意见
|
|
|
+ Arguments arguments = this.getById(argumentsId);
|
|
|
+ BeanUtils.copyProperties(arguments, argumentsVO);
|
|
|
//根据证据id获得专利号
|
|
|
- Proof proof =proofService.getById(arguments.getProofId());
|
|
|
- if(proof.getPatentNo()!=null){
|
|
|
+ Proof proof = proofService.getById(arguments.getProofId());
|
|
|
+ if (proof.getPatentNo() != null) {
|
|
|
//根据专利号和报告id获得划词内容
|
|
|
- LambdaQueryWrapper<Scratch> scratchLambdaQueryWrapper =new LambdaQueryWrapper<>();
|
|
|
- scratchLambdaQueryWrapper.eq(Scratch::getPatentNo,proof.getPatentNo());
|
|
|
- scratchLambdaQueryWrapper.eq(Scratch::getReportId,arguments.getReportId());
|
|
|
- List<Scratch> scratchList =scratchService.list(scratchLambdaQueryWrapper);
|
|
|
- if(scratchList.size()>0){
|
|
|
- Scratch scratch =scratchList.get(0);
|
|
|
- BeanUtils.copyProperties(scratch,argumentsVO);
|
|
|
+ LambdaQueryWrapper<Scratch> scratchLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ scratchLambdaQueryWrapper.eq(Scratch::getPatentNo, proof.getPatentNo());
|
|
|
+ scratchLambdaQueryWrapper.eq(Scratch::getReportId, arguments.getReportId());
|
|
|
+ List<Scratch> scratchList = scratchService.list(scratchLambdaQueryWrapper);
|
|
|
+ if (scratchList.size() > 0) {
|
|
|
+ Scratch scratch = scratchList.get(0);
|
|
|
+ BeanUtils.copyProperties(scratch, argumentsVO);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -101,35 +103,35 @@ public class ArgumentsService extends ServiceImpl<ArgumentsMapper, Arguments> {
|
|
|
*/
|
|
|
public void deleteArguments(List<Integer> argumentsIds) {
|
|
|
//判断argumentsId是否为空
|
|
|
- if(argumentsIds==null){
|
|
|
- return ;
|
|
|
+ if (argumentsIds == null) {
|
|
|
+ return;
|
|
|
}
|
|
|
//判断陈述意见方案中是否有正在使用的陈述意见
|
|
|
- LambdaQueryWrapper<AssoArguments> assoArgumentsWrapper=new LambdaQueryWrapper<>();
|
|
|
- assoArgumentsWrapper.in(AssoArguments::getArgumentId,argumentsIds);
|
|
|
- List<AssoArguments> assoArguments =assoArgumentsService.list(assoArgumentsWrapper);
|
|
|
- if(assoArguments.size()>0){
|
|
|
- return ;
|
|
|
+ LambdaQueryWrapper<AssoArguments> assoArgumentsWrapper = new LambdaQueryWrapper<>();
|
|
|
+ assoArgumentsWrapper.in(AssoArguments::getArgumentId, argumentsIds);
|
|
|
+ List<AssoArguments> assoArguments = assoArgumentsService.list(assoArgumentsWrapper);
|
|
|
+ if (assoArguments.size() > 0) {
|
|
|
+ return;
|
|
|
}
|
|
|
//根据argumentsId查询陈述意见
|
|
|
- LambdaQueryWrapper<Arguments> argumentsWrapper=new LambdaQueryWrapper<>();
|
|
|
- argumentsWrapper.in(Arguments::getId,argumentsIds);
|
|
|
- List<Arguments> arguments =this.list(argumentsWrapper);
|
|
|
- List<Integer> proofIds =arguments.stream().map(Arguments::getProofId).collect(Collectors.toList());
|
|
|
+ LambdaQueryWrapper<Arguments> argumentsWrapper = new LambdaQueryWrapper<>();
|
|
|
+ argumentsWrapper.in(Arguments::getId, argumentsIds);
|
|
|
+ List<Arguments> arguments = this.list(argumentsWrapper);
|
|
|
+ List<Integer> proofIds = arguments.stream().map(Arguments::getProofId).collect(Collectors.toList());
|
|
|
//根据proofIds获得proof
|
|
|
- LambdaQueryWrapper<Proof> proofWrapper =new LambdaQueryWrapper<>();
|
|
|
- proofWrapper.in(Proof::getId,proofIds);
|
|
|
+ LambdaQueryWrapper<Proof> proofWrapper = new LambdaQueryWrapper<>();
|
|
|
+ proofWrapper.in(Proof::getId, proofIds);
|
|
|
List<Proof> proofs = proofService.list(proofWrapper);
|
|
|
- List<String> patentNos =proofs.stream().map(Proof::getPatentNo).collect(Collectors.toList());
|
|
|
- if(patentNos.size()>0){
|
|
|
+ List<String> patentNos = proofs.stream().map(Proof::getPatentNo).collect(Collectors.toList());
|
|
|
+ if (patentNos.size() > 0) {
|
|
|
//根据专利号和报告id获得划词内容
|
|
|
- LambdaQueryWrapper<Scratch> scratchLambdaQueryWrapper =new LambdaQueryWrapper<>();
|
|
|
- scratchLambdaQueryWrapper.in(Scratch::getPatentNo,patentNos);
|
|
|
- scratchLambdaQueryWrapper.eq(Scratch::getReportId,arguments.get(0).getReportId());
|
|
|
+ LambdaQueryWrapper<Scratch> scratchLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ scratchLambdaQueryWrapper.in(Scratch::getPatentNo, patentNos);
|
|
|
+ scratchLambdaQueryWrapper.eq(Scratch::getReportId, arguments.get(0).getReportId());
|
|
|
scratchService.remove(scratchLambdaQueryWrapper);
|
|
|
}
|
|
|
- this.remove(argumentsWrapper);
|
|
|
- return ;
|
|
|
+ this.remove(argumentsWrapper);
|
|
|
+ return;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -139,13 +141,13 @@ public class ArgumentsService extends ServiceImpl<ArgumentsMapper, Arguments> {
|
|
|
*/
|
|
|
public void queryArguments(ArgumentsQueryDTO argumentsQueryDTO) {
|
|
|
//判断reportId是否为空
|
|
|
- if(argumentsQueryDTO.getReportId()==null){
|
|
|
+ if (argumentsQueryDTO.getReportId() == null) {
|
|
|
return;
|
|
|
}
|
|
|
- LambdaQueryWrapper<Arguments> argumentsLambdaQueryWrapper =new LambdaQueryWrapper<>();
|
|
|
- argumentsLambdaQueryWrapper.eq(Arguments::getReportId,argumentsQueryDTO.getReportId());
|
|
|
- if(argumentsQueryDTO.getReportId()!=null){
|
|
|
- argumentsLambdaQueryWrapper.eq(Arguments::getRightId,argumentsQueryDTO.getRightId());
|
|
|
+ LambdaQueryWrapper<Arguments> argumentsLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ argumentsLambdaQueryWrapper.eq(Arguments::getReportId, argumentsQueryDTO.getReportId());
|
|
|
+ if (argumentsQueryDTO.getReportId() != null) {
|
|
|
+ argumentsLambdaQueryWrapper.eq(Arguments::getRightId, argumentsQueryDTO.getRightId());
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -156,22 +158,22 @@ public class ArgumentsService extends ServiceImpl<ArgumentsMapper, Arguments> {
|
|
|
*/
|
|
|
public void updateArgumentsBatch(ArgumentsDTO argumentsDTO) {
|
|
|
// 检验参数
|
|
|
- if (argumentsDTO == null||argumentsDTO.getReportId() == null || argumentsDTO.getFeatureId() == null || argumentsDTO.getRightId() == null||argumentsDTO.getProofId()==null) {
|
|
|
+ if (argumentsDTO == null || argumentsDTO.getReportId() == null || argumentsDTO.getFeatureId() == null || argumentsDTO.getRightId() == null || argumentsDTO.getProofId() == null) {
|
|
|
return;
|
|
|
}
|
|
|
- Integer loginId=loginUtils.getId();
|
|
|
+ Integer loginId = loginUtils.getId();
|
|
|
//装载陈述意见实体类
|
|
|
Arguments arguments = new Arguments();
|
|
|
BeanUtils.copyProperties(argumentsDTO, arguments);
|
|
|
arguments.setCreateId(loginId);
|
|
|
arguments.insert();
|
|
|
//若划词不为空
|
|
|
- if(argumentsDTO.getContent()!=null){
|
|
|
- Scratch scratch =new Scratch();
|
|
|
- BeanUtils.copyProperties(argumentsDTO,scratch);
|
|
|
+ if (argumentsDTO.getContent() != null) {
|
|
|
+ Scratch scratch = new Scratch();
|
|
|
+ BeanUtils.copyProperties(argumentsDTO, scratch);
|
|
|
//根据证据类型获得证据的专利号
|
|
|
Proof proof = proofService.getById(arguments.getProofId());
|
|
|
- String patenNo =proof.getPatentNo();
|
|
|
+ String patenNo = proof.getPatentNo();
|
|
|
scratch.setPatentNo(patenNo);
|
|
|
scratch.setCreateId(loginId);
|
|
|
scratch.insert();
|
|
@@ -179,12 +181,26 @@ public class ArgumentsService extends ServiceImpl<ArgumentsMapper, Arguments> {
|
|
|
|
|
|
}
|
|
|
|
|
|
+
|
|
|
/**
|
|
|
- * 根据文件id和权要id查询列表
|
|
|
+ * 根据文件id和权要sort查询列表
|
|
|
*
|
|
|
* @param
|
|
|
*/
|
|
|
- public void queryPoofArguments(Integer fileId) {
|
|
|
+ public void queryPoofArguments(Integer fileId, Integer rightSort, Integer reportId) {
|
|
|
+ // 根据报告id和权要id获得所有特征
|
|
|
+ LambdaQueryWrapper<Features> wrapper = new LambdaQueryWrapper<>();
|
|
|
+ wrapper.eq(Features::getReportId, reportId)
|
|
|
+ .eq(Features::getRightId, rightSort);
|
|
|
+ List<Features> features = featureService.list(wrapper);
|
|
|
+ List<Integer> featureIds =features.stream().map(Features::getId).collect(Collectors.toList());
|
|
|
+ //根据特征和文件id获得证据
|
|
|
+ LambdaQueryWrapper<AssoFeatureProof> featureProofWrapper =new LambdaQueryWrapper<>();
|
|
|
+ featureProofWrapper.in(AssoFeatureProof::getFeature_ID,featureIds)
|
|
|
+ .eq(AssoFeatureProof::getCompareFileId,fileId);
|
|
|
+ List<AssoFeatureProof> assoFeatureProofs =assoFeatureProofService.list();
|
|
|
+ List<Integer> assoFeatureProofIds =assoFeatureProofs.stream().map(AssoFeatureProof::getID).collect(Collectors.toList());
|
|
|
+ //根据特征和证据id获得陈述意见
|
|
|
|
|
|
}
|
|
|
|