|
@@ -40,25 +40,26 @@ import java.util.stream.Collectors;
|
|
|
@Slf4j
|
|
|
@RequiredArgsConstructor(onConstructor_ = {@Lazy})
|
|
|
public class ArgumentsService extends ServiceImpl<ArgumentsMapper, Arguments> {
|
|
|
- private final ProofService proofService;
|
|
|
private final LoginUtils loginUtils;
|
|
|
private final ScratchService scratchService;
|
|
|
private final AssoArgumentsService assoArgumentsService;
|
|
|
private final FeatureService featureService;
|
|
|
- private final AssoFeatureProofService assoFeatureProofService;
|
|
|
+ private final ProofStrService assoFeatureProofService;
|
|
|
private final ArgumentsService argumentsService;
|
|
|
private final ReportService reportService;
|
|
|
private final CompareFilesService compareFilesService;
|
|
|
-
|
|
|
-
|
|
|
+ private final ProofStrService proofStrService;
|
|
|
+ private final AssoProofGroupStrService assoProofGroupStrService;
|
|
|
/**
|
|
|
* 添加陈述意见
|
|
|
*
|
|
|
* @param argumentsDTO
|
|
|
*/
|
|
|
public String addArguments(ArgumentsDTO argumentsDTO) throws IOException {
|
|
|
+ Integer proofStrId = argumentsDTO.getProofStrId();
|
|
|
+ Integer argumentId =argumentsDTO.getArgumentId();
|
|
|
// 检验参数
|
|
|
- if (argumentsDTO == null || argumentsDTO.getReportId() == null || argumentsDTO.getRightId() == null || argumentsDTO.getProofId() == null) {
|
|
|
+ if (argumentsDTO == null || argumentsDTO.getReportId() == null || argumentsDTO.getRightId() == null || argumentsDTO.getProofId() == null || argumentsDTO.getProofStr() == null) {
|
|
|
return Response.error("参数不正确");
|
|
|
}
|
|
|
if (argumentsDTO.getFeatureId() == null) {
|
|
@@ -74,43 +75,53 @@ public class ArgumentsService extends ServiceImpl<ArgumentsMapper, Arguments> {
|
|
|
argumentsDTO.setFeatureId(Integer.parseInt(response.getData().toString()));
|
|
|
}
|
|
|
}
|
|
|
- AssoFeatureProof assoFeatureProof = new AssoFeatureProof();
|
|
|
- //根据特征id和文件id查询
|
|
|
- LambdaQueryWrapper<AssoFeatureProof> wrapper = new LambdaQueryWrapper<>();
|
|
|
- wrapper.eq(AssoFeatureProof::getCompareFileId, argumentsDTO.getProofId())
|
|
|
- .eq(AssoFeatureProof::getFeatureId, argumentsDTO.getFeatureId());
|
|
|
- List<AssoFeatureProof> assoFeatureProofs = assoFeatureProofService.list(wrapper);
|
|
|
- //添加相关证据文本
|
|
|
- if (assoFeatureProofs.size() <= 0) {
|
|
|
- assoFeatureProof.setFeatureId(argumentsDTO.getFeatureId());
|
|
|
- assoFeatureProof.setCompareFileId(argumentsDTO.getProofId());
|
|
|
- assoFeatureProof.setProofStr(argumentsDTO.getProofStr());
|
|
|
- assoFeatureProof.insert();
|
|
|
- } else if (assoFeatureProofs.size() > 0) {
|
|
|
- assoFeatureProof = assoFeatureProofs.get(0);
|
|
|
- assoFeatureProof.setProofStr(argumentsDTO.getProofStr());
|
|
|
- assoFeatureProof.updateById();
|
|
|
+ //添加或更新无效证据
|
|
|
+ ProofStr proof = new ProofStr();
|
|
|
+ if (proofStrId == null) {
|
|
|
+ proof.setFeatureId(argumentsDTO.getFeatureId());
|
|
|
+ proof.setCompareFileId(argumentsDTO.getProofId());
|
|
|
+ proof.setProofStr(argumentsDTO.getProofStr());
|
|
|
+ proof.setReportId(argumentsDTO.getReportId());
|
|
|
+ proof.setRightSort(argumentsDTO.getRightId());
|
|
|
+ proof.insert();
|
|
|
+ } else {
|
|
|
+ proof = proofStrService.getById(proofStrId);
|
|
|
+ proof.setProofStr(argumentsDTO.getProofStr());
|
|
|
+ proof.updateById();
|
|
|
}
|
|
|
- Integer loginId = loginUtils.getId();
|
|
|
- //装载陈述意见实体类
|
|
|
- Arguments arguments = new Arguments();
|
|
|
- BeanUtils.copyProperties(argumentsDTO, arguments);
|
|
|
- arguments.setCreateId(loginId);
|
|
|
- arguments.setRightSort(argumentsDTO.getRightId());
|
|
|
- arguments.insert();
|
|
|
- //若划词不为空
|
|
|
- if (argumentsDTO.getContent() != null) {
|
|
|
- Scratch scratch = new Scratch();
|
|
|
- BeanUtils.copyProperties(argumentsDTO, scratch);
|
|
|
- //根据证据类型获得证据的专利号
|
|
|
- CompareFiles proof = compareFilesService.getById(arguments.getProofId());
|
|
|
- String patenNo = proof.getPatentNo();
|
|
|
- scratch.setPatentNo(patenNo);
|
|
|
- scratch.setCreateId(loginId);
|
|
|
- scratch.setArgumentId(arguments.getId());
|
|
|
- scratch.setReportId(argumentsDTO.getReportId());
|
|
|
- scratch.setScratchColor(argumentsDTO.getColor());
|
|
|
- scratch.insert();
|
|
|
+ if (argumentsDTO.getArgumentStr() != null) {
|
|
|
+ Integer loginId = loginUtils.getId();
|
|
|
+ //装载陈述意见实体类
|
|
|
+ Arguments arguments = new Arguments();
|
|
|
+ if ( argumentId== null) {
|
|
|
+ BeanUtils.copyProperties(argumentsDTO, arguments);
|
|
|
+ arguments.setCreateId(loginId);
|
|
|
+ arguments.setProofStrId(proof.getId());
|
|
|
+ arguments.setRightSort(argumentsDTO.getRightId());
|
|
|
+ arguments.insert();
|
|
|
+ } else {
|
|
|
+ arguments = this.getById(argumentId);
|
|
|
+ BeanUtils.copyProperties(argumentsDTO,arguments);
|
|
|
+ arguments.setProofStrId(proof.getId());
|
|
|
+ arguments.setRightSort(argumentsDTO.getRightId());
|
|
|
+ arguments.updateById();
|
|
|
+ }
|
|
|
+
|
|
|
+ //若划词不为空
|
|
|
+ if (argumentsDTO.getContent() != null) {
|
|
|
+ Scratch scratch = new Scratch();
|
|
|
+ BeanUtils.copyProperties(argumentsDTO, scratch);
|
|
|
+ scratch.setId(argumentsDTO.getScratchId());
|
|
|
+ //根据证据类型获得证据的专利号
|
|
|
+ CompareFiles compareFiles = compareFilesService.getById(arguments.getProofId());
|
|
|
+ String patenNo = compareFiles.getPatentNo();
|
|
|
+ scratch.setPatentNo(patenNo);
|
|
|
+ scratch.setCreateId(loginId);
|
|
|
+ scratch.setArgumentId(arguments.getId());
|
|
|
+ scratch.setReportId(argumentsDTO.getReportId());
|
|
|
+ scratch.setScratchColor(argumentsDTO.getColor());
|
|
|
+ scratch.insertOrUpdate();
|
|
|
+ }
|
|
|
}
|
|
|
return Response.success("添加成功");
|
|
|
}
|
|
@@ -174,10 +185,10 @@ public class ArgumentsService extends ServiceImpl<ArgumentsMapper, Arguments> {
|
|
|
List<Integer> featureIds = features.stream().map(Features::getId).collect(Collectors.toList());
|
|
|
|
|
|
//根据特征和文件id获得证据
|
|
|
- LambdaQueryWrapper<AssoFeatureProof> featureProofWrapper = new LambdaQueryWrapper<>();
|
|
|
- featureProofWrapper.in(AssoFeatureProof::getFeatureId, featureIds)
|
|
|
- .eq(AssoFeatureProof::getCompareFileId, fileId);
|
|
|
- List<AssoFeatureProof> assoFeatureProofs = assoFeatureProofService.list(featureProofWrapper);
|
|
|
+ LambdaQueryWrapper<ProofStr> featureProofWrapper = new LambdaQueryWrapper<>();
|
|
|
+ featureProofWrapper.in(ProofStr::getFeatureId, featureIds)
|
|
|
+ .eq(ProofStr::getCompareFileId, fileId);
|
|
|
+ List<ProofStr> proofStrs = assoFeatureProofService.list(featureProofWrapper);
|
|
|
//查询划词信息
|
|
|
LambdaQueryWrapper<Scratch> scratchLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
scratchLambdaQueryWrapper.eq(Scratch::getPatentNo, patentNo);
|
|
@@ -198,10 +209,11 @@ public class ArgumentsService extends ServiceImpl<ArgumentsMapper, Arguments> {
|
|
|
Arguments argument = arguments.stream().filter(tem -> tem.getId().equals(item.getArgumentId())).findFirst().orElse(null);
|
|
|
BeanUtils.copyProperties(argument, argumentsDetailsVO);
|
|
|
BeanUtils.copyProperties(item, argumentsDetailsVO);
|
|
|
- AssoFeatureProof assoFeatureProof = assoFeatureProofs.stream().filter(tem -> tem.getFeatureId().equals(argument.getFeatureId())).findFirst().orElse(null);
|
|
|
- if (assoFeatureProof != null) {
|
|
|
- argumentsDetailsVO.setProofStr(assoFeatureProof.getProofStr());
|
|
|
- argumentsDetailsVO.setProofStrId(assoFeatureProof.getId());
|
|
|
+ argumentsDetailsVO.setRightSort(argument.getRightSort());
|
|
|
+ ProofStr proofStr = proofStrs.stream().filter(tem -> tem.getFeatureId().equals(argument.getFeatureId())).findFirst().orElse(null);
|
|
|
+ if (proofStr != null) {
|
|
|
+ argumentsDetailsVO.setProofStr(proofStr.getProofStr());
|
|
|
+ argumentsDetailsVO.setProofStrId(proofStr.getId());
|
|
|
}
|
|
|
argumentsDetailsVOS.add(argumentsDetailsVO);
|
|
|
}
|
|
@@ -215,6 +227,7 @@ public class ArgumentsService extends ServiceImpl<ArgumentsMapper, Arguments> {
|
|
|
* @return
|
|
|
*/
|
|
|
public String updateArgument(ArgumentsDetailsDTO argumentsDTO) {
|
|
|
+ Integer proofStrId = argumentsDTO.getProofStrId();
|
|
|
// 检验参数
|
|
|
if (argumentsDTO == null || argumentsDTO.getReportId() == null || argumentsDTO.getFeatureId() == null || argumentsDTO.getRightSort() == null || argumentsDTO.getProofId() == null) {
|
|
|
return Response.error("参数不正确");
|
|
@@ -228,34 +241,20 @@ public class ArgumentsService extends ServiceImpl<ArgumentsMapper, Arguments> {
|
|
|
scratch.setScratchType(argumentsDTO.getScratchType());
|
|
|
scratch.updateById();
|
|
|
//根据陈述意见id更新陈述意见
|
|
|
- Arguments arguments = this.getById(scratch.getArgumentId());
|
|
|
- arguments.setArgumentStr(argumentsDTO.getArgumentStr());
|
|
|
- arguments.setRightSort(argumentsDTO.getRightSort());
|
|
|
- arguments.setFeatureId(argumentsDTO.getFeatureId());
|
|
|
- arguments.updateById();
|
|
|
- //装载并更新证据
|
|
|
- //根据特征和文件id获得证据
|
|
|
- LambdaQueryWrapper<AssoFeatureProof> featureProofWrapper = new LambdaQueryWrapper<>();
|
|
|
- featureProofWrapper.in(AssoFeatureProof::getFeatureId, argumentsDTO.getFeatureId())
|
|
|
- .eq(AssoFeatureProof::getCompareFileId, arguments.getProofId());
|
|
|
- List<AssoFeatureProof> assoFeatureProofs = assoFeatureProofService.list(featureProofWrapper);
|
|
|
- if (assoFeatureProofs.size() == 0) {
|
|
|
- AssoFeatureProof assoFeatureProof = new AssoFeatureProof();
|
|
|
- assoFeatureProof.setFeatureId(argumentsDTO.getFeatureId());
|
|
|
- assoFeatureProof.setFeatureId(arguments.getProofId());
|
|
|
- assoFeatureProof.setProofStr(argumentsDTO.getProofStr());
|
|
|
- assoFeatureProof.insert();
|
|
|
- } else {
|
|
|
- AssoFeatureProof assoFeatureProof = assoFeatureProofs.get(0);
|
|
|
- assoFeatureProof.setProofStr(argumentsDTO.getProofStr());
|
|
|
- assoFeatureProof.updateById();
|
|
|
-
|
|
|
+ if (scratchId != null) {
|
|
|
+ Arguments arguments = this.getById(scratch.getArgumentId());
|
|
|
+ arguments.setArgumentStr(argumentsDTO.getArgumentStr());
|
|
|
+ arguments.setRightSort(argumentsDTO.getRightSort());
|
|
|
+ arguments.setFeatureId(argumentsDTO.getFeatureId());
|
|
|
+ arguments.updateById();
|
|
|
}
|
|
|
|
|
|
+ ProofStr proofStr = proofStrService.getById(proofStrId);
|
|
|
+ proofStr.setProofStr(argumentsDTO.getProofStr());
|
|
|
+ proofStr.updateById();
|
|
|
return Response.success("修改成功");
|
|
|
}
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* 根据文件id和权要sort查询列表
|
|
|
*
|
|
@@ -271,14 +270,13 @@ public class ArgumentsService extends ServiceImpl<ArgumentsMapper, Arguments> {
|
|
|
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::getFeatureId, featureIds)
|
|
|
- .eq(AssoFeatureProof::getCompareFileId, fileId);
|
|
|
- List<AssoFeatureProof> assoFeatureProofs = assoFeatureProofService.list(featureProofWrapper);
|
|
|
+ LambdaQueryWrapper<ProofStr> featureProofWrapper = new LambdaQueryWrapper<>();
|
|
|
+ featureProofWrapper.in(ProofStr::getFeatureId, featureIds)
|
|
|
+ .eq(ProofStr::getCompareFileId, fileId);
|
|
|
+ List<ProofStr> proofStrs = assoFeatureProofService.list(featureProofWrapper);
|
|
|
//遍历装载特征和相关证据到实体类
|
|
|
- assoFeatureProofs.forEach(item -> {
|
|
|
+ proofStrs.forEach(item -> {
|
|
|
Features features1 = features.stream().filter(tem -> tem.getId().equals(item.getFeatureId())).findFirst().orElse(null);
|
|
|
-
|
|
|
ArgumentsListVO argumentsListVO = new ArgumentsListVO();
|
|
|
//装载权要
|
|
|
argumentsListVO.setRightSort(patentRight.getSort());
|
|
@@ -288,32 +286,35 @@ public class ArgumentsService extends ServiceImpl<ArgumentsMapper, Arguments> {
|
|
|
argumentsListVO.setFeatureId(features1.getId());
|
|
|
argumentsListVO.setFeatureContent(features1.getContent());
|
|
|
argumentsListVO.setFeatureName("特征" + features1.getFeaturesOrder());
|
|
|
-
|
|
|
argumentsListVO.setProofStrId(item.getId());
|
|
|
argumentsListVO.setProofStr(item.getProofStr());
|
|
|
argumentsListVO.setProofId(fileId);
|
|
|
argumentsListVOS.add(argumentsListVO);
|
|
|
});
|
|
|
|
|
|
+ List<Integer> argumentsIds = proofStrs.stream().map(ProofStr::getId).collect(Collectors.toList());
|
|
|
+ List<Arguments> arguments = new ArrayList<>();
|
|
|
//根据特征和证据id获得陈述意见
|
|
|
- List<Arguments> arguments = this.baseMapper.getArguments(argumentsListVOS);
|
|
|
+ if (argumentsIds.size() > 0) {
|
|
|
+ LambdaQueryWrapper<Arguments> argumentsWrapper = new LambdaQueryWrapper<>();
|
|
|
+ argumentsWrapper.in(Arguments::getProofStrId, argumentsIds);
|
|
|
+ arguments = this.list(argumentsWrapper);
|
|
|
+ }
|
|
|
+//装载陈述意见
|
|
|
+ for (ArgumentsListVO item:argumentsListVOS){
|
|
|
+ item.setArguments(new ArrayList<>());
|
|
|
+ List<Arguments> temArguments = arguments.stream().filter(tem -> item.getProofStrId().equals(tem.getProofStrId())).collect(Collectors.toList());
|
|
|
+ temArguments.forEach(tem -> {
|
|
|
+ ArgumentsListVO.ArgumentIn argumentIn = new ArgumentsListVO.ArgumentIn();
|
|
|
+ argumentIn.setArgumentStr(tem.getArgumentStr());
|
|
|
+ argumentIn.setId(tem.getId());
|
|
|
+ item.getArguments().add(argumentIn);
|
|
|
+ });
|
|
|
+ }
|
|
|
|
|
|
- //装载陈述意见
|
|
|
- argumentsListVOS.forEach(
|
|
|
- item -> {
|
|
|
- item.setArguments(new ArrayList<>());
|
|
|
- List<Arguments> temArguments = arguments.stream().filter(tem -> item.getFeatureId().equals(tem.getFeatureId())).collect(Collectors.toList());
|
|
|
- temArguments.forEach(tem -> {
|
|
|
- ArgumentsListVO.ArgumentIn argumentIn = new ArgumentsListVO.ArgumentIn();
|
|
|
- argumentIn.setArgumentStr(tem.getArgumentStr());
|
|
|
- argumentIn.setId(tem.getId());
|
|
|
- item.getArguments().add(argumentIn);
|
|
|
- });
|
|
|
|
|
|
- }
|
|
|
- );
|
|
|
- return argumentsListVOS;
|
|
|
|
|
|
+ return argumentsListVOS;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -348,7 +349,7 @@ public class ArgumentsService extends ServiceImpl<ArgumentsMapper, Arguments> {
|
|
|
}
|
|
|
// Integer createId = loginUtils.getId();
|
|
|
Integer createId = 1;
|
|
|
- List<AssoFeatureProof> assoFeatureProofs = new ArrayList<>();
|
|
|
+ List<ProofStr> proofStrs = new ArrayList<>();
|
|
|
List<Arguments> arguments = new ArrayList<>();
|
|
|
List<Integer> featureIds = new ArrayList<>();
|
|
|
Integer proofId = argumentsListDTOS.get(0).getProofId();
|
|
@@ -356,12 +357,12 @@ public class ArgumentsService extends ServiceImpl<ArgumentsMapper, Arguments> {
|
|
|
//获得特征ids
|
|
|
featureIds.add(item.getFeatureId());
|
|
|
//装载无效证据
|
|
|
- AssoFeatureProof assoFeatureProof = new AssoFeatureProof();
|
|
|
- assoFeatureProof.setCompareFileId(item.getProofId());
|
|
|
- assoFeatureProof.setId(item.getProofStrId());
|
|
|
- assoFeatureProof.setProofStr(item.getProofStr());
|
|
|
- assoFeatureProof.setFeatureId(item.getFeatureId());
|
|
|
- assoFeatureProofs.add(assoFeatureProof);
|
|
|
+ ProofStr proofStr = new ProofStr();
|
|
|
+ proofStr.setCompareFileId(item.getProofId());
|
|
|
+ proofStr.setId(item.getProofStrId());
|
|
|
+ proofStr.setProofStr(item.getProofStr());
|
|
|
+ proofStr.setFeatureId(item.getFeatureId());
|
|
|
+ proofStrs.add(proofStr);
|
|
|
//装载陈述意见
|
|
|
List<ArgumentsListDTO.ArgumentIn> argumentIns = item.getArguments();
|
|
|
argumentIns.forEach(tem -> {
|
|
@@ -377,7 +378,7 @@ public class ArgumentsService extends ServiceImpl<ArgumentsMapper, Arguments> {
|
|
|
});
|
|
|
});
|
|
|
this.deleteOrUpdateArguments(arguments, featureIds, proofId);
|
|
|
- if (!this.deleteOrUpdateProofStr(assoFeatureProofs, featureIds, proofId)) {
|
|
|
+ if (!this.deleteOrUpdateProofStr(proofStrs, featureIds, proofId)) {
|
|
|
return Response.error("同一特征有多个证据");
|
|
|
}
|
|
|
|
|
@@ -411,44 +412,58 @@ public class ArgumentsService extends ServiceImpl<ArgumentsMapper, Arguments> {
|
|
|
/**
|
|
|
* 批量删除或者更新证据详情
|
|
|
*
|
|
|
- * @param assoFeatureProofs
|
|
|
+ * @param proofStrs
|
|
|
* @param featureIds
|
|
|
* @param proofId
|
|
|
* @return
|
|
|
*/
|
|
|
- public boolean deleteOrUpdateProofStr(List<AssoFeatureProof> assoFeatureProofs, List<Integer> featureIds, Integer proofId) {
|
|
|
- LambdaQueryWrapper<AssoFeatureProof> wrapper = new LambdaQueryWrapper<>();
|
|
|
- wrapper.in(AssoFeatureProof::getFeatureId, featureIds)
|
|
|
- .eq(AssoFeatureProof::getCompareFileId, proofId);
|
|
|
- List<AssoFeatureProof> dbAssoFeatureProof = assoFeatureProofService.list(wrapper);
|
|
|
+ public boolean deleteOrUpdateProofStr(List<ProofStr> proofStrs, List<Integer> featureIds, Integer proofId) {
|
|
|
+ LambdaQueryWrapper<ProofStr> wrapper = new LambdaQueryWrapper<>();
|
|
|
+ wrapper.in(ProofStr::getFeatureId, featureIds)
|
|
|
+ .eq(ProofStr::getCompareFileId, proofId);
|
|
|
+ List<ProofStr> dbProofStr = assoFeatureProofService.list(wrapper);
|
|
|
//作差获得要删除的相关证据
|
|
|
- List<Integer> dbIds = dbAssoFeatureProof.stream().map(AssoFeatureProof::getId).collect(Collectors.toList());
|
|
|
- List<Integer> ids = assoFeatureProofs.stream().map(AssoFeatureProof::getId).collect(Collectors.toList());
|
|
|
+ List<Integer> dbIds = dbProofStr.stream().map(ProofStr::getId).collect(Collectors.toList());
|
|
|
+ List<Integer> ids = proofStrs.stream().map(ProofStr::getId).collect(Collectors.toList());
|
|
|
List<Integer> removeIds = dbIds;
|
|
|
removeIds.removeAll(ids);
|
|
|
//检查一个特征是否有多个陈述证据
|
|
|
- for (AssoFeatureProof item : assoFeatureProofs) {
|
|
|
+ for (ProofStr item : proofStrs) {
|
|
|
{
|
|
|
//查询是否存在多个相同
|
|
|
- List<AssoFeatureProof> assoFeatureProofs1 = assoFeatureProofs.stream().filter(tem ->
|
|
|
+ List<ProofStr> proofs1Str = proofStrs.stream().filter(tem ->
|
|
|
item.getFeatureId().equals(tem.getFeatureId())
|
|
|
&& item.getCompareFileId().equals(tem.getCompareFileId())).collect(Collectors.toList());
|
|
|
- if (assoFeatureProofs1.size() > 1) {
|
|
|
+ if (proofs1Str.size() > 1) {
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
//删除陈述意见
|
|
|
assoFeatureProofService.removeByIds(removeIds);
|
|
|
- assoFeatureProofService.saveOrUpdateBatch(assoFeatureProofs);
|
|
|
+ assoFeatureProofService.saveOrUpdateBatch(proofStrs);
|
|
|
|
|
|
return true;
|
|
|
}
|
|
|
+ public boolean deleteProofStr(List<Integer> ids ) {
|
|
|
+ LambdaQueryWrapper<ProofStr> wrapper = new LambdaQueryWrapper<>();
|
|
|
+ wrapper.in(ProofStr::getId,ids);
|
|
|
+ List<ProofStr> proofStrs =proofStrService.list(wrapper);
|
|
|
+ //根据无效理由id查询陈述意见
|
|
|
+ LambdaQueryWrapper<Arguments> argumentsLambdaQueryWrapper =new LambdaQueryWrapper<>();
|
|
|
+ argumentsLambdaQueryWrapper.in(Arguments::getProofStrId,ids);
|
|
|
+ List<Arguments> arguments =this.list(argumentsLambdaQueryWrapper);
|
|
|
+ List<Integer> argumentIds =arguments.stream().map(Arguments::getId).collect(Collectors.toList());
|
|
|
+ if(argumentIds.size()!=0){
|
|
|
+ this.deleteArguments(argumentIds);
|
|
|
+ }
|
|
|
+ //删除
|
|
|
+ LambdaQueryWrapper<AssoProofGroupStr> wrapper1 =new LambdaQueryWrapper<>();
|
|
|
+ wrapper1.in(AssoProofGroupStr::getProofStrId,ids);
|
|
|
+ assoProofGroupStrService.remove(wrapper1);
|
|
|
+ proofStrService.removeByIds(ids);
|
|
|
+ return true;
|
|
|
+ }
|
|
|
|
|
|
|
|
|
- public static void main(String[] args) {
|
|
|
- String a = Response.error();
|
|
|
- Response av = JSONObject.parseObject(a, Response.class);
|
|
|
- System.out.println(av.getCode());
|
|
|
- }
|
|
|
}
|