zero 4 ماه پیش
والد
کامیت
ac1c7a93ee
21فایلهای تغییر یافته به همراه206 افزوده شده و 86 حذف شده
  1. 2 0
      src/main/java/cn/cslg/pas/common/dto/business/ReportAffairDTO.java
  2. 2 0
      src/main/java/cn/cslg/pas/common/dto/invalidDTO/AddInvalidDecisionFileDTO.java
  3. 2 0
      src/main/java/cn/cslg/pas/common/dto/invalidDTO/AddJudgmentDTO.java
  4. 2 0
      src/main/java/cn/cslg/pas/common/dto/invalidDTO/ReportAffairCaseDTO.java
  5. 1 0
      src/main/java/cn/cslg/pas/common/dto/invalidDTO/UpdateInvalidDecisionFileDTO.java
  6. 2 0
      src/main/java/cn/cslg/pas/common/dto/invalidDTO/UpdateJudgmentDTO.java
  7. 1 1
      src/main/java/cn/cslg/pas/common/vo/PersonSelfFieldVO.java
  8. 2 0
      src/main/java/cn/cslg/pas/common/vo/invalidVO/InvalidDecisionFileVO.java
  9. 2 0
      src/main/java/cn/cslg/pas/common/vo/invalidVO/JudgementVO.java
  10. 14 0
      src/main/java/cn/cslg/pas/common/vo/invalidVO/ReportAffairVO.java
  11. 6 0
      src/main/java/cn/cslg/pas/domain/business/CourtOrder.java
  12. 7 0
      src/main/java/cn/cslg/pas/domain/business/InvalidDecisionFile.java
  13. 6 0
      src/main/java/cn/cslg/pas/domain/business/ReportAffair.java
  14. 2 0
      src/main/java/cn/cslg/pas/mapper/ReportAffairMapper.java
  15. 4 6
      src/main/java/cn/cslg/pas/service/business/AdminProceedService.java
  16. 5 2
      src/main/java/cn/cslg/pas/service/business/InvalidDecisionFileService.java
  17. 51 47
      src/main/java/cn/cslg/pas/service/business/InvalidRequestFileService.java
  18. 21 15
      src/main/java/cn/cslg/pas/service/business/OralTrailService.java
  19. 41 15
      src/main/java/cn/cslg/pas/service/business/ReportAffairService.java
  20. 26 0
      src/main/resources/jsons/invalidReportProject.json
  21. 7 0
      src/main/resources/mapper/ReportAffairMapper.xml

+ 2 - 0
src/main/java/cn/cslg/pas/common/dto/business/ReportAffairDTO.java

@@ -39,4 +39,6 @@ public class ReportAffairDTO {
     private String caseChildPhase;
 
     private String documentType;
+
+    private String evidenceRiskResponse;
 }

+ 2 - 0
src/main/java/cn/cslg/pas/common/dto/invalidDTO/AddInvalidDecisionFileDTO.java

@@ -55,4 +55,6 @@ public class AddInvalidDecisionFileDTO {
 
     private List<ExtraEmailDTO> extraEmailDTOS;
 
+    private String invalidStageReason;
+
 }

+ 2 - 0
src/main/java/cn/cslg/pas/common/dto/invalidDTO/AddJudgmentDTO.java

@@ -32,4 +32,6 @@ public class AddJudgmentDTO {
     private Boolean ifSendEmail;
 
     private List<ExtraEmailDTO> extraEmailDTOS;
+
+    private String firstInstanceStageReason;
 }

+ 2 - 0
src/main/java/cn/cslg/pas/common/dto/invalidDTO/ReportAffairCaseDTO.java

@@ -28,4 +28,6 @@ public class ReportAffairCaseDTO {
     private Boolean ifSendEmail;
 
     private List<ExtraEmailDTO> extraEmailDTOS;
+
+    private String evidenceRiskResponse;
 }

+ 1 - 0
src/main/java/cn/cslg/pas/common/dto/invalidDTO/UpdateInvalidDecisionFileDTO.java

@@ -51,4 +51,5 @@ public class UpdateInvalidDecisionFileDTO {
 
     private List<ExtraEmailDTO> extraEmailDTOS;
 
+    private String invalidStageReason;
 }

+ 2 - 0
src/main/java/cn/cslg/pas/common/dto/invalidDTO/UpdateJudgmentDTO.java

@@ -33,4 +33,6 @@ public class UpdateJudgmentDTO {
     private Boolean ifSendEmail;
 
     private List<ExtraEmailDTO> extraEmailDTOS;
+
+    private String firstInstanceStageReason;
 }

+ 1 - 1
src/main/java/cn/cslg/pas/common/vo/PersonSelfFieldVO.java

@@ -37,5 +37,5 @@ public class PersonSelfFieldVO {
     private Boolean ifNotOrder;
     private Boolean editable;
     private Boolean isExport;
-
+    private Object optionValue;
 }

+ 2 - 0
src/main/java/cn/cslg/pas/common/vo/invalidVO/InvalidDecisionFileVO.java

@@ -43,4 +43,6 @@ public class InvalidDecisionFileVO {
     private List<String> cronNames;
     @Schema(description = "无效结果")
     private List<Integer> cronIds;
+
+    private String invalidStageReason;
 }

+ 2 - 0
src/main/java/cn/cslg/pas/common/vo/invalidVO/JudgementVO.java

@@ -27,4 +27,6 @@ public class JudgementVO {
     private String description;
 
     private String conclusion;
+
+    private String firstInstanceStageReason;
 }

+ 14 - 0
src/main/java/cn/cslg/pas/common/vo/invalidVO/ReportAffairVO.java

@@ -127,4 +127,18 @@ public class ReportAffairVO {
      * 文档类型
      */
     private String documentType;
+    /**
+     * 证据风险及措施
+     */
+    private String evidenceRiskResponse;
+
+    /**
+     * 是否提行政诉讼及理由
+     */
+    private String invalidStageReason;
+
+    /**
+     * 是否提行政诉讼二审及理由
+     */
+    private String firstInstanceStageReason;
 }

+ 6 - 0
src/main/java/cn/cslg/pas/domain/business/CourtOrder.java

@@ -25,4 +25,10 @@ public class CourtOrder extends BaseEntity<CourtOrder> {
      */
     @TableField(value = "conclusion")
     private String conclusion;
+
+    /**
+     * 是否提行政诉讼二审及理由
+     */
+    @TableField(value = "first_instance_stage_reason")
+    private String firstInstanceStageReason;
 }

+ 7 - 0
src/main/java/cn/cslg/pas/domain/business/InvalidDecisionFile.java

@@ -42,4 +42,11 @@ public class InvalidDecisionFile extends BaseEntity<InvalidDecisionFile> {
      */
     @TableField(value = "conclusion")
     private String conclusion;
+
+    /**
+     * 是否提行政诉讼及理由
+     */
+    @TableField(value = "invalid_stage_reason")
+    private String invalidStageReason;
+
 }

+ 6 - 0
src/main/java/cn/cslg/pas/domain/business/ReportAffair.java

@@ -64,4 +64,10 @@ public class ReportAffair extends BaseEntity<ReportAffair> {
     @TableField(value = "document_type")
     private String documentType;
 
+    /**
+     * 证据风险及措施
+     */
+    @TableField(value = "evidence_risk_response")
+    private String evidenceRiskResponse;
+
 }

+ 2 - 0
src/main/java/cn/cslg/pas/mapper/ReportAffairMapper.java

@@ -33,4 +33,6 @@ public interface ReportAffairMapper extends BaseMapper<ReportAffair> {
 
     public List<OralTrailVO> queryOralTrailList(@Param("projectId") Integer projectId, @Param("casePhaseId") Integer casePhaseId);
 
+    public List<ReportAffair> queryReportAffairList(@Param("projectId") Integer projectId);
+
 }

+ 4 - 6
src/main/java/cn/cslg/pas/service/business/AdminProceedService.java

@@ -206,12 +206,11 @@ public class AdminProceedService extends ServiceImpl<AdminProceedMapper, AdminPr
         //2.创建法院判决书
         CourtOrder courtOrder = new CourtOrder();
         courtOrder.setConclusion(addJudgmentDTO.getConclusion());
+        courtOrder.setFirstInstanceStageReason(addJudgmentDTO.getFirstInstanceStageReason());
         courtOrder.setReportAffairId(reportAffairId);
         courtOrder.insert();
         //同步报告官限
-        if (addJudgmentDTO.getAssoCasePhaseId().equals(16)) {
-            invalidRequestFileService.getCommonMethod(projectId);
-        }
+        invalidRequestFileService.getCommonMethod(projectId, addJudgmentDTO.getAssoCasePhaseId());
         //3. 添加报告事务与文件关联
         List<String> fileGuids = addJudgmentDTO.getFileGuids();
         if (fileGuids != null && !fileGuids.isEmpty()) {
@@ -258,6 +257,7 @@ public class AdminProceedService extends ServiceImpl<AdminProceedMapper, AdminPr
             CourtOrder courtOrder = courtOrders.get(0);
             CourtOrder court = courtOrderService.getById(courtOrder.getId());
             court.setConclusion(updateJudgmentDTO.getConclusion());
+            court.setFirstInstanceStageReason(updateJudgmentDTO.getFirstInstanceStageReason());
             court.updateById();
         }
 
@@ -271,9 +271,7 @@ public class AdminProceedService extends ServiceImpl<AdminProceedMapper, AdminPr
         reportAffair.setAssoCasePhaseId(updateJudgmentDTO.getAssoCasePhaseId());
         reportAffair.updateById();
         //同步报告官限
-        if (updateJudgmentDTO.getAssoCasePhaseId().equals(16)) {
-            invalidRequestFileService.getCommonMethod(projectId);
-        }
+        invalidRequestFileService.getCommonMethod(projectId, updateJudgmentDTO.getAssoCasePhaseId());
         //3. 更新报告事务与文件关联
         List<String> fileGuids = updateJudgmentDTO.getFileGuids();
         assoReportAffairFileService.updateAffairFile(reportAffairId, fileGuids);

+ 5 - 2
src/main/java/cn/cslg/pas/service/business/InvalidDecisionFileService.java

@@ -88,12 +88,13 @@ public class InvalidDecisionFileService extends ServiceImpl<InvalidDecisionFileM
         invalidDecisionFile.setDecisionKey(addInvalidDecisionFileDTO.getDecisionKey());
         invalidDecisionFile.setConclusion(addInvalidDecisionFileDTO.getConclusion());
         invalidDecisionFile.setLegalBase(addInvalidDecisionFileDTO.getLegalBase());
+        invalidDecisionFile.setInvalidStageReason(addInvalidDecisionFileDTO.getInvalidStageReason());
         invalidDecisionFile.setReportAffairId(reportAffairId);
         invalidDecisionFile.insert();
         //同步无效决定号
         this.updateReportIssueNum(projectId, addInvalidDecisionFileDTO.getFileNo());
         //同步报告官限
-        invalidRequestFileService.getCommonMethod(projectId);
+        invalidRequestFileService.getCommonMethod(projectId, addInvalidDecisionFileDTO.getAssoCasePhaseId());
         //3. 添加报告事务与文件关联
         List<String> fileGuids = addInvalidDecisionFileDTO.getFileGuids();
         if (fileGuids != null && !fileGuids.isEmpty()) {
@@ -133,6 +134,8 @@ public class InvalidDecisionFileService extends ServiceImpl<InvalidDecisionFileM
     public void updateReportIssueNum(Integer projectId, String num) {
         if (StringUtils.isNotEmpty(num)) {
             reportProjectMapper.updateReportField(projectId, "issue_number", num);
+        } else {
+            reportProjectMapper.updateReportField(projectId, "issue_number", null);
         }
     }
 
@@ -193,7 +196,7 @@ public class InvalidDecisionFileService extends ServiceImpl<InvalidDecisionFileM
         reportAffair.updateById();
 
         //同步报告官限
-        invalidRequestFileService.getCommonMethod(projectId);
+        invalidRequestFileService.getCommonMethod(projectId, updateInvalidDecisionFileDTO.getAssoCasePhaseId());
         //3. 更新报告事务与文件关联
         LambdaQueryWrapper<AssoReportAffairFile> queryWrapper = new LambdaQueryWrapper<>();
         queryWrapper.eq(AssoReportAffairFile::getReportAffairId, reportAffairId);

+ 51 - 47
src/main/java/cn/cslg/pas/service/business/InvalidRequestFileService.java

@@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.ObjectUtils;
 import org.apache.commons.lang3.StringUtils;
+import org.apache.poi.hssf.record.DVALRecord;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Lazy;
@@ -101,7 +102,7 @@ public class InvalidRequestFileService extends ServiceImpl<InvalidRequestFileMap
         invalidRequestFile.setReportAffairId(reportAffairId);
         invalidRequestFile.insert();
         //同步报告官限
-        this.getCommonMethod(projectId);
+        this.getCommonMethod(projectId, addInvalidRequestFileDTO.getAssoCasePhaseId());
         //3. 添加报告事务与文件关联
         List<String> fileGuids = addInvalidRequestFileDTO.getFileGuids();
         if (fileGuids != null && !fileGuids.isEmpty()) {
@@ -170,7 +171,7 @@ public class InvalidRequestFileService extends ServiceImpl<InvalidRequestFileMap
         reportAffair.setAssoCasePhaseId(updateInvalidRequestFileDTO.getAssoCasePhaseId());
         reportAffair.updateById();
         //同步报告官限
-        this.getCommonMethod(projectId);
+        this.getCommonMethod(projectId, updateInvalidRequestFileDTO.getAssoCasePhaseId());
         //3. 更新报告事务与文件关联
         List<String> fileGuids = updateInvalidRequestFileDTO.getFileGuids();
         assoReportAffairFileService.updateAffairFile(reportAffairId, fileGuids);
@@ -181,59 +182,62 @@ public class InvalidRequestFileService extends ServiceImpl<InvalidRequestFileMap
     }
 
     //计算官限
-    public void getCommonMethod(Integer projectId) {
-        List<QueryReportAffairCasePhaseVO> casePhaseVOS = reportAffairMapper.queryReportAffairCasePhase(projectId);
-        if (!CollectionUtils.isEmpty(casePhaseVOS)) {
-            QueryReportAffairCasePhaseVO casePhaseVO = casePhaseVOS.get(0);
-            if (ObjectUtils.isNotEmpty(casePhaseVO)) {
-                Date occurredTime = casePhaseVO.getOccurredTime();
-                String deadline = casePhaseVO.getCalOfficialDeadline();
-                int num = Integer.parseInt(deadline.substring(0, deadline.length() - 1));
-                String numStr = deadline.substring(deadline.length() - 1);
-                Calendar calendar = Calendar.getInstance();
-                calendar.setTime(occurredTime);
-                if (numStr.equals("月")) {
-                    calendar.add(Calendar.MONTH, num);
-                } else {
-                    calendar.add(Calendar.DAY_OF_MONTH, num);
-                }
-                Date time = calendar.getTime();
-                String casePhase = casePhaseVO.getCasePhase();
-                if (!casePhase.equals("无效")) {
-                    this.updateReportOfficialDeadline(projectId, time);
-                } else {
-                    Integer priority = casePhaseVO.getPriority();
-                    if (priority < 8) {
-                        //查询出最新口审通知书记录
-                        List<ReportAffair> list = reportAffairService.list(new LambdaQueryWrapper<ReportAffair>()
-                                .eq(ReportAffair::getProjectId, projectId)
-                                .eq(ReportAffair::getAssoCasePhaseId, 31)
-                                .orderByDesc(ReportAffair::getOccurredTime));
-                        if (!CollectionUtils.isEmpty(list)) {
-                            ReportAffair affair = list.get(0);
-                            Integer affairId = affair.getId();
-                            LambdaQueryWrapper<OralTrail> queryWrapper = new LambdaQueryWrapper<>();
-                            queryWrapper.eq(OralTrail::getReportAffairId, affairId);
-                            OralTrail oralTrail = oralTrailService.getOne(queryWrapper, false);
-                            if (ObjectUtils.isNotEmpty(oralTrail)) {
-                                Date oralDate = oralTrail.getOralDate();
-                                //官限时间在口审日期之后,以口审日期为准
-                                if (oralDate != null && time.after(oralDate)) {
-                                    this.updateReportOfficialDeadline(projectId, oralDate);
-                                } else {
-                                    this.updateReportOfficialDeadline(projectId, time);
+    public void getCommonMethod(Integer projectId,Integer casePahseId) {
+        ReportAffairCasePhase phase = reportAffairCasePhaseMapper.selectById(casePahseId);
+        if (ObjectUtils.isNotEmpty(phase) && StringUtils.isNotEmpty(phase.getCalOfficialDeadline())) {
+            List<QueryReportAffairCasePhaseVO> casePhaseVOS = reportAffairMapper.queryReportAffairCasePhase(projectId);
+            if (!CollectionUtils.isEmpty(casePhaseVOS)) {
+                QueryReportAffairCasePhaseVO casePhaseVO = casePhaseVOS.get(0);
+                if (ObjectUtils.isNotEmpty(casePhaseVO)) {
+                    Date occurredTime = casePhaseVO.getOccurredTime();
+                    String deadline = casePhaseVO.getCalOfficialDeadline();
+                    int num = Integer.parseInt(deadline.substring(0, deadline.length() - 1));
+                    String numStr = deadline.substring(deadline.length() - 1);
+                    Calendar calendar = Calendar.getInstance();
+                    calendar.setTime(occurredTime);
+                    if (numStr.equals("月")) {
+                        calendar.add(Calendar.MONTH, num);
+                    } else {
+                        calendar.add(Calendar.DAY_OF_MONTH, num);
+                    }
+                    Date time = calendar.getTime();
+                    String casePhase = casePhaseVO.getCasePhase();
+                    if (!casePhase.equals("无效")) {
+                        this.updateReportOfficialDeadline(projectId, time);
+                    } else {
+                        Integer priority = casePhaseVO.getPriority();
+                        if (priority < 8) {
+                            //查询出最新口审通知书记录
+                            List<ReportAffair> list = reportAffairService.list(new LambdaQueryWrapper<ReportAffair>()
+                                    .eq(ReportAffair::getProjectId, projectId)
+                                    .eq(ReportAffair::getAssoCasePhaseId, 31)
+                                    .orderByDesc(ReportAffair::getOccurredTime));
+                            if (!CollectionUtils.isEmpty(list)) {
+                                ReportAffair affair = list.get(0);
+                                Integer affairId = affair.getId();
+                                LambdaQueryWrapper<OralTrail> queryWrapper = new LambdaQueryWrapper<>();
+                                queryWrapper.eq(OralTrail::getReportAffairId, affairId);
+                                OralTrail oralTrail = oralTrailService.getOne(queryWrapper, false);
+                                if (ObjectUtils.isNotEmpty(oralTrail)) {
+                                    Date oralDate = oralTrail.getOralDate();
+                                    //官限时间在口审日期之后,以口审日期为准
+                                    if (oralDate != null && time.after(oralDate)) {
+                                        this.updateReportOfficialDeadline(projectId, oralDate);
+                                    } else {
+                                        this.updateReportOfficialDeadline(projectId, time);
+                                    }
                                 }
+                            } else {
+                                this.updateReportOfficialDeadline(projectId, time);
                             }
                         } else {
                             this.updateReportOfficialDeadline(projectId, time);
                         }
-                    } else {
-                        this.updateReportOfficialDeadline(projectId, time);
                     }
                 }
+            } else {
+                this.updateReportOfficialDeadline(projectId, null);
             }
-        } else {
-            this.updateReportOfficialDeadline(projectId, null);
         }
     }
 

+ 21 - 15
src/main/java/cn/cslg/pas/service/business/OralTrailService.java

@@ -10,6 +10,7 @@ import cn.cslg.pas.common.vo.invalidVO.OralTrailVO;
 import cn.cslg.pas.domain.business.*;
 import cn.cslg.pas.exception.XiaoShiException;
 import cn.cslg.pas.mapper.OralTrailMapper;
+import cn.cslg.pas.mapper.ReportAffairCasePhaseMapper;
 import cn.cslg.pas.mapper.ReportAffairMapper;
 import cn.cslg.pas.mapper.ReportProjectMapper;
 import cn.cslg.pas.service.MailSendService;
@@ -57,6 +58,9 @@ public class OralTrailService extends ServiceImpl<OralTrailMapper, OralTrail> {
     private ReportProjectMapper reportProjectMapper;
 
     @Autowired
+    private ReportAffairCasePhaseMapper reportAffairCasePhaseMapper;
+
+    @Autowired
     @Lazy
     private InvalidRequestFileService invalidRequestFileService;
 
@@ -93,10 +97,9 @@ public class OralTrailService extends ServiceImpl<OralTrailMapper, OralTrail> {
         oralTrail.setReportAffairId(reportAffairId);
         oralTrail.insert();
         //同步报告官限
-        if (addOralTrailDTO.getAssoCasePhaseId().equals(31)) {
-            invalidRequestFileService.getCommonMethod(projectId);
-            this.updateParticipator(projectId,addOralTrailDTO.getAssoCasePhaseId());
-        }
+        invalidRequestFileService.getCommonMethod(projectId,addOralTrailDTO.getAssoCasePhaseId());
+        //同步报告合议组成员
+        this.updateParticipator(projectId,addOralTrailDTO.getAssoCasePhaseId());
         //3. 添加报告事务与文件关联
         List<String> fileGuids = addOralTrailDTO.getFileGuids();
         if (fileGuids != null && !fileGuids.isEmpty()) {
@@ -117,13 +120,16 @@ public class OralTrailService extends ServiceImpl<OralTrailMapper, OralTrail> {
 
     //同步口审记录中的参与人到报告中合议组成员
     public void updateParticipator(Integer projectId, Integer casePhaseId) {
-        List<OralTrailVO> trailVOS = reportAffairMapper.queryOralTrailList(projectId, casePhaseId);
-        if (!CollectionUtils.isEmpty(trailVOS)) {
-            OralTrailVO trailVO = trailVOS.get(0);
-            String participator = trailVO.getParticipator();
-            reportProjectMapper.updateReportField(projectId, "oral_panel_members", participator);
-        } else {
-            reportProjectMapper.updateReportField(projectId, "oral_panel_members", null);
+        ReportAffairCasePhase phase = reportAffairCasePhaseMapper.selectById(casePhaseId);
+        if (ObjectUtils.isNotEmpty(phase) && phase.getFlowType().equals(31)) {
+            List<OralTrailVO> trailVOS = reportAffairMapper.queryOralTrailList(projectId, casePhaseId);
+            if (!CollectionUtils.isEmpty(trailVOS)) {
+                OralTrailVO trailVO = trailVOS.get(0);
+                String participator = trailVO.getParticipator();
+                reportProjectMapper.updateReportField(projectId, "oral_panel_members", participator);
+            } else {
+                reportProjectMapper.updateReportField(projectId, "oral_panel_members", null);
+            }
         }
     }
 
@@ -180,10 +186,10 @@ public class OralTrailService extends ServiceImpl<OralTrailMapper, OralTrail> {
         reportAffair.setDescription(updateOralTrailDTO.getDescription());
         reportAffair.setAssoCasePhaseId(updateOralTrailDTO.getAssoCasePhaseId());
         reportAffair.updateById();
-        if (updateOralTrailDTO.getAssoCasePhaseId().equals(31)) {
-            invalidRequestFileService.getCommonMethod(projectId);
-            this.updateParticipator(projectId, updateOralTrailDTO.getAssoCasePhaseId());
-        }
+        //同步报告官限
+        invalidRequestFileService.getCommonMethod(projectId, updateOralTrailDTO.getAssoCasePhaseId());
+        //同步报告合议组成员
+        this.updateParticipator(projectId, updateOralTrailDTO.getAssoCasePhaseId());
         //3. 更新报告事务与文件关联
         List<String> fileGuids = updateOralTrailDTO.getFileGuids();
         assoReportAffairFileService.updateAffairFile(reportAffairId, fileGuids);

+ 41 - 15
src/main/java/cn/cslg/pas/service/business/ReportAffairService.java

@@ -97,6 +97,9 @@ public class ReportAffairService extends ServiceImpl<ReportAffairMapper, ReportA
     @Autowired
     private ReportProjectMapper reportProjectMapper;
 
+    @Autowired
+    private ReportAffairMapper reportAffairMapper;
+
     /**
      * 创建报告事务
      *
@@ -124,6 +127,7 @@ public class ReportAffairService extends ServiceImpl<ReportAffairMapper, ReportA
             LambdaQueryWrapper<ReportAffair> queryWrapper = new LambdaQueryWrapper<>();
             queryWrapper.eq(ReportAffair::getId, id);
             ReportAffair reportAffair = this.getOne(queryWrapper, false);
+            Integer projectId = reportAffair.getProjectId();
             if (reportAffair != null) {
                 //删除事务关联的文件
                 LambdaQueryWrapper<AssoReportAffairFile> queryWrapper2 = new LambdaQueryWrapper<>();
@@ -141,12 +145,9 @@ public class ReportAffairService extends ServiceImpl<ReportAffairMapper, ReportA
                     LambdaQueryWrapper<OralTrail> queryWrapper1 = new LambdaQueryWrapper<>();
                     queryWrapper1.eq(OralTrail::getReportAffairId, id);
                     oralTrailService.remove(queryWrapper1);
-                    Integer projectId = reportAffair.getProjectId();
-                    if (assoCasePhaseId.equals(31)) {
-                        oralTrailService.updateParticipator(projectId, assoCasePhaseId);
-                    }
+                    //同步报告合议组成员
+                    oralTrailService.updateParticipator(projectId, assoCasePhaseId);
                 } else if (flowType.equals(7)) {//无效决定书
-                    Integer projectId = reportAffair.getProjectId();
                     //删除报告中的发文序号
                     ReportProject reportProject = reportProjectMapper.selectOne(new LambdaQueryWrapper<ReportProject>()
                             .eq(ReportProject::getProjectId, projectId));
@@ -177,10 +178,12 @@ public class ReportAffairService extends ServiceImpl<ReportAffairMapper, ReportA
                     otherDocumentsService.remove(queryWrapper1);
                 }
                 this.removeById(id);
+                //同步报告证据风险及措施
+                this.updateEvidenceRiskResponse(projectId, assoCasePhaseId);
                 //判断是否需要同步更新报告官限
                 String deadline = casePhase.getCalOfficialDeadline();
-                if (StringUtils.isNotEmpty(deadline) || assoCasePhaseId.equals(31)) {
-                    invalidRequestFileService.getCommonMethod(reportAffair.getProjectId());
+                if (StringUtils.isNotEmpty(deadline)) {
+                    invalidRequestFileService.getCommonMethod(reportAffair.getProjectId(),assoCasePhaseId);
                 }
             }
         }
@@ -201,7 +204,7 @@ public class ReportAffairService extends ServiceImpl<ReportAffairMapper, ReportA
         //根据报告id查询事务
         LambdaQueryWrapper<ReportAffair> queryWrapper = new LambdaQueryWrapper<>();
         queryWrapper.eq(ReportAffair::getProjectId, projectId)
-                .orderByAsc(ReportAffair::getOccurredTime);
+                .orderByDesc(ReportAffair::getOccurredTime);
         List<ReportAffair> reportAffairs = this.list(queryWrapper);
         if (reportAffairs.isEmpty()) {
             return reportAffairVOS;
@@ -528,6 +531,7 @@ public class ReportAffairService extends ServiceImpl<ReportAffairMapper, ReportA
         if (!CollectionUtils.isEmpty(courtOrders)) {
             CourtOrder courtOrder = courtOrders.get(0);
             judgementVO.setConclusion(courtOrder.getConclusion());
+            judgementVO.setFirstInstanceStageReason(courtOrder.getFirstInstanceStageReason());
         }
         reportAffairVO.setJudgementVO(judgementVO);
     }
@@ -745,7 +749,7 @@ public class ReportAffairService extends ServiceImpl<ReportAffairMapper, ReportA
     /**
      * 添加案件文档
      * 详情有以下流程案件添加接口:
-     * 添加请求人意见陈述书  添加合议组无效宣告受理通知书  添加原告意见陈述书  添加原告证据  添加第三人意见陈述
+     * 添加请求人意见陈述书  添加合议组无效宣告受理通知书 添加合议组转文 添加原告意见陈述书  添加原告证据  添加第三人意见陈述
      * 添加法院行政诉讼传票  添加法院转送文件  添加上诉人意见陈述  添加上诉人证据  添加第三人意见  添加被上诉人意见
      * 添加法院转送文件  添加法院行政诉讼传票
      * @param vo
@@ -770,15 +774,18 @@ public class ReportAffairService extends ServiceImpl<ReportAffairMapper, ReportA
         //备注
         reportAffairDTO.setDescription(vo.getDescription());
         reportAffairDTO.setAssoCasePhaseId(vo.getAssoCasePhaseId());
+        if (vo.getEvidenceRiskResponse() != null) {
+            reportAffairDTO.setEvidenceRiskResponse(vo.getEvidenceRiskResponse().trim());
+        }
         Integer reportAffairId = this.addReportAffair(reportAffairDTO);
 
         if (reportAffairId == null) {
             throw new XiaoShiException("上传报告事务失败");
         }
         //2.同步报告官限
-        if (vo.getAssoCasePhaseId().equals(29) || vo.getAssoCasePhaseId().equals(30)) {
-            invalidRequestFileService.getCommonMethod(projectId);
-        }
+        invalidRequestFileService.getCommonMethod(projectId,vo.getAssoCasePhaseId());
+        //同步报告证据风险及措施
+        this.updateEvidenceRiskResponse(projectId, vo.getAssoCasePhaseId());
         //3. 添加报告事务与文件关联
         List<String> fileGuids = vo.getFileGuids();
         if (!CollectionUtils.isEmpty(fileGuids)) {
@@ -825,12 +832,15 @@ public class ReportAffairService extends ServiceImpl<ReportAffairMapper, ReportA
         //备注
         reportAffair.setDescription(vo.getDescription());
         reportAffair.setAssoCasePhaseId(vo.getAssoCasePhaseId());
+        if (vo.getEvidenceRiskResponse() != null) {
+            reportAffair.setEvidenceRiskResponse(vo.getEvidenceRiskResponse().trim());
+        }
         reportAffair.updateById();
 
         //同步报告官限
-        if (vo.getAssoCasePhaseId().equals(29) || vo.getAssoCasePhaseId().equals(30)) {
-            invalidRequestFileService.getCommonMethod(projectId);
-        }
+        invalidRequestFileService.getCommonMethod(projectId,vo.getAssoCasePhaseId());
+        //同步报告证据风险及措施
+        this.updateEvidenceRiskResponse(projectId, vo.getAssoCasePhaseId());
         //3. 更新报告事务与文件关联
         List<String> fileGuids = vo.getFileGuids();
         assoReportAffairFileService.updateAffairFile(reportAffairId, fileGuids);
@@ -840,4 +850,20 @@ public class ReportAffairService extends ServiceImpl<ReportAffairMapper, ReportA
         return reportAffairId;
     }
 
+
+    //同步报告证据风险及措施
+    public void updateEvidenceRiskResponse(Integer projectId, Integer casePhaseId) {
+        ReportAffairCasePhase phase = reportAffairCasePhaseMapper.selectById(casePhaseId);
+        if (ObjectUtils.isNotEmpty(phase) && (phase.getFlowType().equals(29) || phase.getFlowType().equals(30))) {
+            List<ReportAffair> affairs = reportAffairMapper.queryReportAffairList(projectId);
+            if (!CollectionUtils.isEmpty(affairs)) {
+                ReportAffair affair = affairs.get(0);
+                String evidenceRiskResponse = affair.getEvidenceRiskResponse();
+                reportProjectMapper.updateReportField(projectId, "evidence_risk_response", evidenceRiskResponse);
+            } else {
+                reportProjectMapper.updateReportField(projectId, "evidence_risk_response", null);
+            }
+        }
+    }
+
 }

+ 26 - 0
src/main/resources/jsons/invalidReportProject.json

@@ -604,5 +604,31 @@
     "ifSort": "true",
     "defaultHidden": "false",
     "ifAsCondition": "true"
+  },
+  {
+    "name": "主被动类型",
+    "type": "Integer",
+    "value": "actType",
+    "field": "actType",
+    "sqlField": "t.actType",
+    "sqlClass": "getComSql",
+    "orderClass": "getComOrder",
+    "groupClass": "getComGroup",
+    "ifSearch": "true",
+    "ifGroup": "false",
+    "ifShow": "true",
+    "ifSort": "true",
+    "defaultHidden": "false",
+    "ifAsCondition": "true",
+    "optionValue": [
+      {
+        "label": "被动",
+        "value": "0"
+      },
+      {
+        "label": "主动",
+        "value": "1"
+      }
+    ]
   }
 ]

+ 7 - 0
src/main/resources/mapper/ReportAffairMapper.xml

@@ -135,4 +135,11 @@
         where b.project_id = #{projectId} and b.asso_case_phase_id = #{casePhaseId}
         ORDER BY b.occurred_time DESC,b.id DESC
     </select>
+
+    <select id="queryReportAffairList" resultType="cn.cslg.pas.domain.business.ReportAffair">
+        select *
+        from report_affair
+        where project_id = #{projectId} and evidence_risk_response != '' and evidence_risk_response is not null
+        ORDER BY occurred_time DESC,id DESC
+    </select>
 </mapper>