xiexiang 1 년 전
부모
커밋
354ffe0662

+ 1 - 1
src/main/java/cn/cslg/pas/service/business/InvalidStatutesService.java

@@ -148,7 +148,7 @@ public class InvalidStatutesService extends ServiceImpl<InvalidStatutesMapper, I
      * @param invalidStatutesVOS
      */
     public void loadClaims(Integer projectId, List<InvalidStatutesVO> invalidStatutesVOS){
-        List<Integer> claimIds = invalidStatutesVOS.stream().map(InvalidStatutesVO::getClaimId).collect(Collectors.toList());
+        List<Integer> claimIds = invalidStatutesVOS.stream().filter(item -> item.getClaimId() != null).map(InvalidStatutesVO::getClaimId).collect(Collectors.toList());
         if (!claimIds.isEmpty()) {
             LambdaQueryWrapper<PatentClaim> queryWrapper = new LambdaQueryWrapper<>();
             queryWrapper.in(PatentClaim::getId, claimIds)

+ 3 - 4
src/main/java/cn/cslg/pas/service/business/ProofGroupService.java

@@ -52,16 +52,15 @@ public class ProofGroupService extends ServiceImpl<ProofGroupMapper, ProofGroup>
             if (projectId == null) {
                 throw new XiaoShiException("projectId不能为空");
             }
-            if (claimId == null) {
-                throw new XiaoShiException("claimId不能为空");
-            }
             if (statutesId == null) {
                 throw new XiaoShiException("invalidStatutesId不能为空");
             }
             LambdaQueryWrapper<InvalidStatutes> queryWrapper = new LambdaQueryWrapper<>();
             queryWrapper.eq(InvalidStatutes::getStatutesId, statutesId)
-                    .eq(InvalidStatutes::getClaimId, claimId)
                     .eq(InvalidStatutes::getProjectId, projectId);
+            if (claimId != null) {
+                queryWrapper.eq(InvalidStatutes::getClaimId, claimId);
+            }
             InvalidStatutes invalidStatutes = invalidStatutesService.getOne(queryWrapper, false);
             if (invalidStatutes == null) {
                 throw new XiaoShiException("查询无效法条错误");