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