lwhhszx 2 rokov pred
rodič
commit
6c765d4b9c

+ 18 - 0
RMS/src/main/java/cn/cslg/report/common/model/dto/invalidReReport/ProofOrderDTO.java

@@ -0,0 +1,18 @@
+package cn.cslg.report.common.model.dto.invalidReReport;
+
+import cn.cslg.report.common.model.dto.CompareOrderDTO;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class ProofOrderDTO {
+    private Integer report;
+    private List<ProofOrderDTO.orders> orders;
+    @Data
+    public static class orders{
+        private Integer id;
+        private Integer order;
+    }
+
+}

+ 1 - 0
RMS/src/main/java/cn/cslg/report/common/model/vo/TaskVO.java

@@ -22,6 +22,7 @@ import java.util.List;
 @Accessors(chain = true)
 @Schema(description="任务VO",required = true)
 public class TaskVO extends BaseVO {
+
     @Schema(description = "创建人姓名")
     private String createName;
     @Schema(description = "处理人姓名")

+ 9 - 1
RMS/src/main/java/cn/cslg/report/common/model/vo/invalidReReport/ArgumentsScenarioVO.java

@@ -24,12 +24,20 @@ public class ArgumentsScenarioVO {
     private Integer rightSort;
 
     /**
+     * 权要内容
+     */
+    private String rightContent;
+
+    /**
      * 修改方案/理由
      */
     private String modifyReason;
 
+    private Integer proofId;
+    private String proofName;
+
     /**
      * 修改方案/理由
      */
-    private List<ArgumentsVO> argumentsVOList;
+    private List<ArgumentsListVO> argumentsVOList;
 }

+ 7 - 1
RMS/src/main/java/cn/cslg/report/controller/CompareFilesController.java

@@ -4,6 +4,7 @@ import cn.cslg.report.common.core.base.Constants;
 
 import cn.cslg.report.common.model.dto.CompareOrderDTO;
 import cn.cslg.report.common.model.dto.ProofAddNewDTO;
+import cn.cslg.report.common.model.dto.invalidReReport.ProofOrderDTO;
 import cn.cslg.report.common.model.dto.invalidReReport.ProofQueryDTO;
 import cn.cslg.report.common.model.vo.PatentIndexSettingVO;
 
@@ -59,7 +60,12 @@ public class CompareFilesController {
         compareFilesService.addOrder(compareOrderDTO);
         return Response.success();
     }
-
+    @PostMapping("/order/addProodOrder")
+    @Operation(summary = "给对比证据添加顺序")
+    public String addProodOrder(@RequestBody ProofOrderDTO proofOrderDTO) throws IOException {
+        compareFilesService.addProofOrder(proofOrderDTO);
+        return Response.success();
+    }
     @GetMapping("/order/query")
     @Operation(summary = "查找顺序列表")
     public String getOrder(Integer reportId) throws IOException {

+ 6 - 8
RMS/src/main/java/cn/cslg/report/controller/InvalidReReport/ArgumentsScenarioController.java

@@ -10,10 +10,7 @@ import io.swagger.v3.oas.annotations.Operation;
 import io.swagger.v3.oas.annotations.tags.Tag;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import java.io.IOException;
 import java.util.List;
@@ -46,13 +43,14 @@ public class ArgumentsScenarioController {
 
     @Operation(summary = "修改陈述意见方案")
     @PostMapping("/update")
-    public String update(@RequestBody ShareReportDTO shareReportDTO) throws IOException {
+    public String update(@RequestBody ArgumentsScenarioDTO argumentsScenarioDTO) throws IOException {
+        argumentsScenarioService.updateArgumentsScenario(argumentsScenarioDTO);
         return Response.success();
     }
 
     @Operation(summary = "查询陈述意见方案")
-    @PostMapping("/query")
-    public String query(@RequestBody ShareReportDTO shareReportDTO) throws IOException {
-        return Response.success();
+    @GetMapping("/query")
+    public String query(Integer reportId) throws IOException {
+        return Response.success(argumentsScenarioService.queryArgumentsScenario(reportId));
     }
 }

+ 2 - 2
RMS/src/main/java/cn/cslg/report/controller/InvalidReReport/InvalidProcessController.java

@@ -64,9 +64,9 @@ public class InvalidProcessController {
 
     @Operation(summary = "查询无效事务")
     @GetMapping("/query")
-    public String query(Integer reportId, Integer orderBy) throws IOException {
+    public String query(Integer reportId, Integer orderBy,Integer type) throws IOException {
         if(reportId != null && reportId != 0){
-            return Response.success(invalidProcessService.queryInvalidProcess(reportId, orderBy));
+            return Response.success(invalidProcessService.queryInvalidProcess(reportId, orderBy,type));
         } else {
             return Response.error("传入报告id不可为空");
         }

+ 1 - 1
RMS/src/main/java/cn/cslg/report/controller/ReportController.java

@@ -45,7 +45,7 @@ public class ReportController {
             ReportDTO report1 = JSONObject.parseObject(report, ReportDTO.class);
             //新建报告并返回报告Id
             Integer reportId = reportService.addReport(report1, files);
-            return Response.success("添加成功");
+            return Response.success(reportId);
         } else {
             return Response.error("网络异常");
         }

+ 6 - 0
RMS/src/main/java/cn/cslg/report/entity/invalidReReport/ArgumentsScenarios.java

@@ -33,6 +33,12 @@ public class ArgumentsScenarios extends BaseEntity<ArgumentsScenarios> {
     /**
      * 修改方案/理由
      */
+    @TableField("PROOF_ID")
+    private Integer proofId;
+
+    /**
+     * 修改方案/理由
+     */
     @TableField("MODIFY_REASON")
     private String modifyReason;
 

+ 25 - 0
RMS/src/main/java/cn/cslg/report/service/business/CompareFilesService.java

@@ -5,6 +5,7 @@ import cn.cslg.report.common.model.dto.CompareOrderDTO;
 import cn.cslg.report.common.model.dto.CustomFieldLabelDTO;
 
 import cn.cslg.report.common.model.dto.ProofAddNewDTO;
+import cn.cslg.report.common.model.dto.invalidReReport.ProofOrderDTO;
 import cn.cslg.report.common.model.dto.invalidReReport.ProofQueryDTO;
 import cn.cslg.report.common.model.vo.CompareFilesVO;
 import cn.cslg.report.common.model.vo.PatentIndexSettingVO;
@@ -533,6 +534,30 @@ public class CompareFilesService extends ServiceImpl<CompareFilesMapper, Compare
         return 1;
     }
 
+    public Integer addProofOrder(ProofOrderDTO proofOrderDTO) {
+        //根据报告ID 和专利号 查询对比文件
+        LambdaQueryWrapper<CompareFiles> wrapper = new LambdaQueryWrapper<>();
+        wrapper.eq(CompareFiles::getReportId, proofOrderDTO.getReport());
+        List<CompareFiles> compareFiles = this.list(wrapper);
+        //如果未查到则返回-1
+        if (compareFiles.size() == 0) {
+            return -1;
+        }
+        // 判断该顺序是否被使用过
+        compareFiles.forEach(item -> {
+            proofOrderDTO.getOrders().forEach(
+                    item2 -> {
+                        if (item2.getId().equals(item.getId())) {
+                            item.setSysOrder(item2.getOrder());
+                        }
+                    }
+            );
+        });
+        this.saveOrUpdateBatch(compareFiles);
+        return 1;
+    }
+
+
     public List<Integer> getOrder(Integer reportId) {
         List<Integer> orders = new ArrayList<>();
         int i = 1;

+ 139 - 52
RMS/src/main/java/cn/cslg/report/service/business/InvalidReReport/ArgumentsScenarioService.java

@@ -1,26 +1,33 @@
 package cn.cslg.report.service.business.InvalidReReport;
 
 import cn.cslg.report.common.model.dto.invalidReReport.ArgumentsScenarioDTO;
+import cn.cslg.report.common.model.vo.invalidReReport.ArgumentsListVO;
 import cn.cslg.report.common.model.vo.invalidReReport.ArgumentsScenarioVO;
 import cn.cslg.report.common.model.vo.invalidReReport.ArgumentsVO;
 import cn.cslg.report.common.utils.Response;
 import cn.cslg.report.common.utils.SecurityUtils.LoginUtils;
-import cn.cslg.report.entity.Template;
+import cn.cslg.report.entity.*;
 import cn.cslg.report.entity.invalidReReport.Arguments;
 import cn.cslg.report.entity.invalidReReport.ArgumentsScenarios;
 import cn.cslg.report.entity.invalidReReport.AssoArguments;
+import cn.cslg.report.entity.invalidReReport.AssoFeatureProof;
 import cn.cslg.report.mapper.InvalidReReport.ArgumentsScenarioMapper;
 import cn.cslg.report.mapper.TemplateMapper;
+import cn.cslg.report.service.business.CompareFilesService;
+import cn.cslg.report.service.business.FeatureService;
+import cn.cslg.report.service.business.ReportService;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import io.swagger.v3.oas.models.security.SecurityScheme;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.BeanUtils;
 import org.springframework.context.annotation.Lazy;
 import org.springframework.stereotype.Service;
 
+import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
@@ -34,9 +41,14 @@ public class ArgumentsScenarioService extends ServiceImpl<ArgumentsScenarioMappe
     private final LoginUtils loginUtils;
     private final AssoArgumentsService assoArgumentsService;
     private final ArgumentsService argumentsService;
+    private final FeatureService featureService;
+    private final AssoFeatureProofService assoFeatureProofService;
+    private final ReportService reportService;
+    private final CompareFilesService compareFilesService;
 
     /**
      * 添加陈述意见方案
+     *
      * @param argumentsScenarioDTO
      * @return
      */
@@ -48,16 +60,22 @@ public class ArgumentsScenarioService extends ServiceImpl<ArgumentsScenarioMappe
         Integer reportId = argumentsScenarioDTO.getReportId();
         //权要排序
         Integer rightSort = argumentsScenarioDTO.getRightSort();
-        if(argumentIds == null || argumentIds.size() == 0 || reportId == null || rightSort == null){
+        if (argumentIds == null || argumentIds.size() == 0 || reportId == null || rightSort == null) {
             return Response.error("请按要求输入参数");
         }
+        //查询陈述意见
+        LambdaQueryWrapper<Arguments> argumentsLambdaQueryWrapper = new LambdaQueryWrapper<>();
+        argumentsLambdaQueryWrapper.in(Arguments::getId, argumentIds);
+        List<Arguments> arguments = argumentsService.list(argumentsLambdaQueryWrapper);
+        //装载陈述意见方案
         ArgumentsScenarios argumentsScenarios = new ArgumentsScenarios();
-        BeanUtils.copyProperties(argumentsScenarioDTO,argumentsScenarios);
+        BeanUtils.copyProperties(argumentsScenarioDTO, argumentsScenarios);
         argumentsScenarios.setCreateId(loginId);
+        argumentsScenarios.setProofId(arguments.get(0).getProofId());
         argumentsScenarios.insert();
         //添加陈述意见方案和陈述意见关联关系
         List<AssoArguments> assoArguments = new ArrayList<>();
-        argumentIds.forEach(item->{
+        argumentIds.forEach(item -> {
             AssoArguments assoArgument = new AssoArguments();
             assoArgument.setArgumentId(item);
             assoArgument.setCreateId(loginId);
@@ -70,17 +88,18 @@ public class ArgumentsScenarioService extends ServiceImpl<ArgumentsScenarioMappe
 
     /**
      * 删除陈述意见方案
+     *
      * @param scenarioIds
      * @return
      */
     public String deleteArgumentsScenario(List<Integer> scenarioIds) {
         //若ids为空或者size=0则返回请至少选择一个方案进行删除
-        if(scenarioIds == null || scenarioIds.size() == 0){
+        if (scenarioIds == null || scenarioIds.size() == 0) {
             return Response.error("请至少选择一个方案");
         }
         //根据陈述意见方案id批量删除陈述意见方案和陈述意见关联关系
         LambdaQueryWrapper<AssoArguments> wrapper = new LambdaQueryWrapper<>();
-        wrapper.in(AssoArguments::getScenarioId,scenarioIds);
+        wrapper.in(AssoArguments::getScenarioId, scenarioIds);
         assoArgumentsService.remove(wrapper);
         //根据陈述意见方案id批量删除陈述意见方案
         this.removeByIds(scenarioIds);
@@ -88,71 +107,139 @@ public class ArgumentsScenarioService extends ServiceImpl<ArgumentsScenarioMappe
     }
 
     //查询陈述意见方案
-    public List<ArgumentsScenarioVO> queryArgumentsScenario(Integer reportId) {
+    public List<ArgumentsScenarioVO> queryArgumentsScenario(Integer reportId) throws IOException {
         //新建需要返回的陈述意见方案集合
         List<ArgumentsScenarioVO> argumentsScenarioVOS = new ArrayList<>();
         //判断传入报告id是否为空
-        if(reportId != null && reportId > 0){
+        if (reportId != null && reportId > 0) {
+            //根据报告id查询标的专利号
+            Report report = reportService.getById(reportId);
+            String patentNo = report.getSignPatentNo();
             //根据报告id查询表中多个陈述意见方案实体类的集合
             LambdaQueryWrapper<ArgumentsScenarios> wrapper = new LambdaQueryWrapper<>();
-            wrapper.eq(ArgumentsScenarios::getReportId,reportId);
+            wrapper.eq(ArgumentsScenarios::getReportId, reportId);
             List<ArgumentsScenarios> argumentsScenariosList = this.list(wrapper);
-            //判断查出来的集合是否为空,不为空则遍历查询陈述意见和装载
-            if(argumentsScenariosList != null && argumentsScenariosList.size() > 0){
-                for(ArgumentsScenarios argumentsScenarios:argumentsScenariosList){
-                    //新建陈述意见方案返回VO类
-                    ArgumentsScenarioVO argumentsScenarioVO = new ArgumentsScenarioVO();
-                    //复制,装载陈述意见方案基本信息
-                    BeanUtils.copyProperties(argumentsScenarios, argumentsScenarioVO);
-                    //调用查询装载陈述意见信息接口
-                    List<ArgumentsVO> argumentsVOList = this.loadArguments(argumentsScenarios.getId());
-                    argumentsScenarioVO.setArgumentsVOList(argumentsVOList);
-                    argumentsScenarioVOS.add(argumentsScenarioVO);
-                }
-            }
+            argumentsScenarioVOS = this.loadArguments(argumentsScenariosList, patentNo);
+
         }
         return argumentsScenarioVOS;
     }
 
-    public List<ArgumentsVO> loadArguments(Integer scenariosId){
-        //新建需要返回的陈述意见返回VO类
-        List<ArgumentsVO> argumentsVOList = new ArrayList<>();
-        //判断传入陈述意见方案id是否为空
-        if(scenariosId != null && scenariosId > 0) {
-            //根据陈述意见方案id查询关联关系
-            LambdaQueryWrapper<AssoArguments> wrapper = new LambdaQueryWrapper<>();
-            wrapper.eq(AssoArguments::getScenarioId, scenariosId);
-            List<AssoArguments> assoArgumentsList = assoArgumentsService.list(wrapper);
-            //获取关联表中陈述意见方案对应的陈述意见ids
-            List<Integer> argumentsIds = assoArgumentsList.stream().map(AssoArguments::getArgumentId).collect(Collectors.toList());
-            //根据陈述意见ids查询出所有的陈述意见对象的集合
-            LambdaQueryWrapper<Arguments> wrapper1 = new LambdaQueryWrapper<>();
-            wrapper1.in(Arguments::getId, argumentsIds);
-            List<Arguments> argumentsList = argumentsService.list(wrapper1);
-            //遍历陈述意见对象集合,装载到VO类集合
-            for(Arguments arguments:argumentsList){
-                ArgumentsVO argumentsVO = new ArgumentsVO();
-                BeanUtils.copyProperties(arguments, argumentsVO);
-                argumentsVOList.add(argumentsVO);
+    public List<ArgumentsScenarioVO> loadArguments(List<ArgumentsScenarios> argumentsScenariosList, String patentNo) throws IOException {
+        //获得权要
+        List<PatentRight> patentRights = featureService.getRightNames(patentNo);
+        List<Integer> scenariosIds = argumentsScenariosList.stream().map(ArgumentsScenarios::getId).collect(Collectors.toList());
+        List<Integer> proofIds = argumentsScenariosList.stream().map(ArgumentsScenarios::getProofId).collect(Collectors.toList());
+        //根据证据id查询证据文献
+        List<CompareFiles> compareFiles = new ArrayList<>();
+        if (proofIds.size() != 0) {
+            LambdaQueryWrapper<CompareFiles> compareFilesLambdaQueryWrapper =new LambdaQueryWrapper<>();
+            compareFilesLambdaQueryWrapper.eq(CompareFiles::getId,proofIds);
+            compareFiles = compareFilesService.list(compareFilesLambdaQueryWrapper);
+        }
+        //根据方案id获得陈述意见列表
+        List<AssoArguments> assoArguments = new ArrayList<>();
+        if (scenariosIds.size() > 0) {
+            LambdaQueryWrapper<AssoArguments> argumentsLambdaQueryWrapper = new LambdaQueryWrapper<>();
+            argumentsLambdaQueryWrapper.in(AssoArguments::getScenarioId, scenariosIds);
+            assoArguments = assoArgumentsService.list(argumentsLambdaQueryWrapper);
+        }
+        //获得陈述意见id
+        List<Integer> argumentIds = assoArguments.stream().map(AssoArguments::getArgumentId).collect(Collectors.toList());
+
+        //根据陈述意见id查询陈述意见
+        List<Arguments> arguments = new ArrayList<>();
+        if (argumentIds.size() > 0) {
+            LambdaQueryWrapper<Arguments> argumentsQueryWrapper = new LambdaQueryWrapper<>();
+            argumentsQueryWrapper.in(Arguments::getId, argumentIds);
+            arguments = argumentsService.list(argumentsQueryWrapper);
+        }
+        //根据陈述意见获得特征id
+        List<Integer> featureIds = arguments.stream().map(Arguments::getFeatureId).collect(Collectors.toList());
+        List<Features> features = new ArrayList<>();
+        //根据特征id获得相关证据
+        List<AssoFeatureProof> assoFeatureProofs = new ArrayList<>();
+        if (featureIds.size() > 0) {
+            LambdaQueryWrapper<Features> featuresLambdaQueryWrapper = new LambdaQueryWrapper<>();
+            featuresLambdaQueryWrapper.in(Features::getId, featureIds);
+            features = featureService.list(featuresLambdaQueryWrapper);
+            LambdaQueryWrapper<AssoFeatureProof> assoFeatureWrapper = new LambdaQueryWrapper<>();
+            assoFeatureWrapper.in(AssoFeatureProof::getFeatureId, featureIds);
+            assoFeatureProofs = assoFeatureProofService.list(assoFeatureWrapper);
+        }
+        List<ArgumentsScenarioVO> argumentsScenarioVOS = new ArrayList<>();
+        //遍历陈述意见方案
+        for (ArgumentsScenarios item : argumentsScenariosList) {
+            Integer scenarioId = item.getId();
+            Integer rightSort = item.getRightSort();
+            PatentRight patentRight = patentRights.stream().filter(tem -> tem.getSort().equals(rightSort)).findFirst().orElse(new PatentRight());
+            ArgumentsScenarioVO argumentsScenarioVO = new ArgumentsScenarioVO();
+            argumentsScenarioVO.setRightContent(patentRight.getContent());
+            //装载文件信息
+          CompareFiles compareFile=  compareFiles.stream().filter(tem->tem.getId().equals(item.getProofId())).findFirst().orElse(new CompareFiles());
+            argumentsScenarioVO.setProofId(compareFile.getId());
+            argumentsScenarioVO.setProofName("D"+compareFile.getSysOrder());
+            //复制,装载陈述意见方案基本信息
+            BeanUtils.copyProperties(item, argumentsScenarioVO);
+            // 根据方案id 获得陈述意见id列表
+            List<Integer> partArgumentIds = assoArguments.stream().filter(tem -> tem.getScenarioId().equals(scenarioId)).map(AssoArguments::getArgumentId).collect(Collectors.toList());
+            //根据陈述意见列表获得特征id
+            List<Integer> partFeatureIds = arguments.stream().filter(tem -> partArgumentIds.contains(tem.getId())).map(Arguments::getFeatureId).collect(Collectors.toList());
+            List<Features> partFeatures = features.stream().filter(tem -> partFeatureIds.contains(tem.getId())).collect(Collectors.toList());
+            List<ArgumentsListVO> argumentsListVOs = new ArrayList<>();
+            for (Features tem : partFeatures) {
+                AssoFeatureProof partProof = assoFeatureProofs.stream().filter(te -> te.getFeatureId().equals(tem.getId()) && te.getCompareFileId().equals(item.getProofId())).findFirst().orElse(null);
+                ArgumentsListVO argumentsListVO = new ArgumentsListVO();
+                argumentsListVO.setProofId(item.getProofId());
+                argumentsListVO.setRightSort(item.getRightSort());
+                argumentsListVO.setRightName("权要" + (item.getRightSort() + 1));
+                argumentsListVO.setFeatureId(tem.getId());
+                argumentsListVO.setFeatureName("特征" + tem.getFeaturesOrder());
+                argumentsListVO.setFeatureContent(tem.getContent());
+                if (partProof != null) {
+                    argumentsListVO.setProofStrId(partProof.getId());
+                    argumentsListVO.setProofStr(partProof.getProofStr());
+                }
+                //装载陈述意见
+                //获得陈述意见
+                List<Arguments> partArguments = arguments.stream().filter(te -> te.getFeatureId().equals(tem.getId()) && te.getProofId().equals(item.getProofId())).collect(Collectors.toList());
+                List<ArgumentsListVO.ArgumentIn> argumentIns = new ArrayList<>();
+
+                partArguments.forEach(te -> {
+                    ArgumentsListVO.ArgumentIn argumentIn = new ArgumentsListVO.ArgumentIn();
+                    argumentIn.setId(te.getId());
+                    argumentIn.setArgumentStr(te.getArgumentStr());
+                    argumentIns.add(argumentIn);
+                });
+                argumentsListVO.setArguments(argumentIns);
+                argumentsListVOs.add(argumentsListVO);
             }
+            argumentsScenarioVO.setArgumentsVOList(argumentsListVOs);
+            argumentsScenarioVOS.add(argumentsScenarioVO);
         }
-        return argumentsVOList;
+        return argumentsScenarioVOS;
     }
 
     /**
      * 更新陈述意见方案
+     *
      * @param argumentsScenarioDTO
      * @return
      */
     public String updateArgumentsScenario(ArgumentsScenarioDTO argumentsScenarioDTO) {
-        if(argumentsScenarioDTO.getId() == null){
+        if (argumentsScenarioDTO.getId() == null) {
             return Response.error("请选择陈述意见方案");
         }
+        //需要更新入关联表的陈述意见ids
+        List<Integer> argumentIds = argumentsScenarioDTO.getArgumentIds();
+        LambdaQueryWrapper<Arguments> argumentsLambdaQueryWrapper = new LambdaQueryWrapper<>();
+        //查询陈述意见
+        argumentsLambdaQueryWrapper.in(Arguments::getId, argumentIds);
+        List<Arguments> arguments = argumentsService.list(argumentsLambdaQueryWrapper);
         ArgumentsScenarios argumentsScenarios = this.getById(argumentsScenarioDTO.getId());
         BeanUtils.copyProperties(argumentsScenarioDTO, argumentsScenarios);
+        argumentsScenarios.setProofId(arguments.get(0).getProofId());
         argumentsScenarios.updateById();
-        //需要更新入关联表的陈述意见ids
-        List<Integer> argumentIds = argumentsScenarioDTO.getArgumentIds();
         //关联表中所有的陈述意见ids
         LambdaQueryWrapper<AssoArguments> wrapper = new LambdaQueryWrapper<>();
         wrapper.eq(AssoArguments::getScenarioId, argumentsScenarioDTO.getId());
@@ -160,12 +247,12 @@ public class ArgumentsScenarioService extends ServiceImpl<ArgumentsScenarioMappe
         List<Integer> oldArgumentIds = assoArguments.stream().map(AssoArguments::getArgumentId).collect(Collectors.toList());
         //需要删除的陈述意见ids在关联表中
         List<Integer> needDeleteIds = new ArrayList<>();
-        for(Integer id:oldArgumentIds){
-            if(!argumentIds.contains(id)){
+        for (Integer id : oldArgumentIds) {
+            if (!argumentIds.contains(id)) {
                 needDeleteIds.add(id);
             }
         }
-        if(needDeleteIds != null && needDeleteIds.size() > 0){
+        if (needDeleteIds != null && needDeleteIds.size() > 0) {
             //删除
             LambdaQueryWrapper<AssoArguments> wrapper1 = new LambdaQueryWrapper<>();
             wrapper1.in(AssoArguments::getArgumentId, needDeleteIds);
@@ -173,12 +260,12 @@ public class ArgumentsScenarioService extends ServiceImpl<ArgumentsScenarioMappe
         }
         //需要新增的陈述意见ids
         List<Integer> needInsertIds = new ArrayList<>();
-        for(Integer insertId:argumentIds){
-            if(!oldArgumentIds.contains(insertId)){
+        for (Integer insertId : argumentIds) {
+            if (!oldArgumentIds.contains(insertId)) {
                 needInsertIds.add(insertId);
             }
         }
-        if(needInsertIds != null && needDeleteIds.size() > 0){
+        if (needInsertIds != null && needDeleteIds.size() > 0) {
             //新增
             assoArgumentsService.add(argumentsScenarioDTO.getId(), needInsertIds);
         }

+ 5 - 2
RMS/src/main/java/cn/cslg/report/service/business/InvalidReReport/InvalidProcessService.java

@@ -204,12 +204,15 @@ public class InvalidProcessService extends ServiceImpl<InvalidProcessMapper, Inv
      * @param orderBy
      * @return
      */
-    public List<InvalidProcessVO> queryInvalidProcess(Integer reportId, Integer orderBy) {
+    public List<InvalidProcessVO> queryInvalidProcess(Integer reportId, Integer orderBy,Integer type) {
         //根据报告id,根据时间排序返回所有的无效事务。
         LambdaQueryWrapper<InvalidProcess> LW = new LambdaQueryWrapper<>();
         LW.eq(InvalidProcess::getReportId, reportId);
+        if(type!=null){
+            LW.eq(InvalidProcess::getProcessType,type);
+        }
         //根据时间排序
-        if(orderBy==1) {
+        if(orderBy!=null&&orderBy==1) {
             LW.orderByAsc(InvalidProcess::getOccuredTime);
         } else {
             LW.orderByDesc(InvalidProcess::getOccuredTime);

+ 3 - 5
RMS/src/main/java/cn/cslg/report/service/business/InvalidReReport/ProofGroupService.java

@@ -91,15 +91,15 @@ public class ProofGroupService extends ServiceImpl<ProofGroupMapper,ProofGroup>
 
     /**
      *批量删除证据组合
-     * @param  invalidId
+     * @param
      * @return
      */
     public void deleteProofGroupByInvalid(Integer invalidId) {
         //根据无效理由id获得证据组合
         LambdaQueryWrapper<ProofGroup> wrapper =new LambdaQueryWrapper<>();
         wrapper.eq(ProofGroup::getInvalidReasonId,invalidId);
-        List<ProofGroup> proofGroups = this.list(wrapper);
-        List<Integer> ids =  proofGroups.stream().map(ProofGroup::getId).collect(Collectors.toList());
+        List<ProofGroup> proofGroups =this.list(wrapper);
+        List<Integer> ids =proofGroups.stream().map(ProofGroup::getId).collect(Collectors.toList());;
         if(ids != null && ids.size() != 0) {
             //根据证据组合id批量删除证据组合-证据关联
             LambdaQueryWrapper<AssoProofGroup> queryWrapper = new LambdaQueryWrapper<>();
@@ -107,8 +107,6 @@ public class ProofGroupService extends ServiceImpl<ProofGroupMapper,ProofGroup>
             assoProofGroupService.remove(queryWrapper);
             //根据ids批量删除证据组合
             this.removeByIds(ids);
-        } else {
-            throw new XiaoShiException("删除错误");
         }
     }
     /**

+ 1 - 1
RMS/src/main/java/cn/cslg/report/service/business/ReportService.java

@@ -128,7 +128,7 @@ public class ReportService extends ServiceImpl<ReportMapper, Report> {
     @Transactional(rollbackFor = Exception.class)
     public Integer addReport(ReportDTO reportDto, List<MultipartFile> files) throws IOException {
         //侵权/回避报告,若状态不是审核/完成,则直接将报告状态置为2(处理中)
-        if (reportDto.getType().equals(4) || reportDto.getType().equals(5)) {
+        if (reportDto.getType().equals(4) || reportDto.getType().equals(5)||reportDto.getType().equals(7)) {
             if (reportDto.getStatus() != null && reportDto.getStatus() != 0 && reportDto.getStatus() != 3) {
                 reportDto.setStatus(2);
             }

+ 21 - 4
RMS/src/main/java/cn/cslg/report/service/business/TaskService.java

@@ -223,9 +223,21 @@ public class TaskService extends ServiceImpl<TaskMapper, Task> {
     @Transactional(rollbackFor = Exception.class)
     public String addTask(String taskVOStr, List<MultipartFile> file) throws ParseException, IOException {
         TaskVO taskVO = JSONObject.parseObject(taskVOStr, TaskVO.class);
-        taskVO.getReport().setStatus(0);
-        //先添加一个报告
-        Integer reportId = reportService.addReport(taskVO.getReport(), file);
+        if (taskVO.getPersonIds() == null||taskVO.getPersonIds().size()==0) {
+            return  Response.error("请选择参与人");
+        }
+        Integer reportId =taskVO.getReportId();
+        if(reportId!=null){
+            Report report =reportService.getById(reportId);
+            report.setStatus(0);
+            report.updateById();
+        }
+        else{
+            taskVO.getReport().setStatus(0);
+            //先添加一个报告
+             reportId = reportService.addReport(taskVO.getReport(), file);
+        }
+
 
         //数据库导入task
 
@@ -301,7 +313,12 @@ public class TaskService extends ServiceImpl<TaskMapper, Task> {
         Date date = new Date();
         task.setFinishTime(date);
         task.updateById();
-        report.setStatus(auditTaskVO.getReportStatus());
+        if(report.getType().equals(7)){
+            report.setStatus(2);
+        }
+        else {
+            report.setStatus(auditTaskVO.getReportStatus());
+        }
         report.updateById();
 
         return Response.success();