|
@@ -17,12 +17,14 @@ import cn.cslg.pas.domain.BaseEntity;
|
|
|
import cn.cslg.pas.domain.business.*;
|
|
|
import cn.cslg.pas.exception.XiaoShiException;
|
|
|
import cn.cslg.pas.mapper.InvalidRecordMapper;
|
|
|
+import cn.cslg.pas.mapper.ReportAffairCasePhaseMapper;
|
|
|
import cn.cslg.pas.service.common.FileManagerService;
|
|
|
import cn.cslg.pas.service.permissions.PermissionService;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.apache.commons.lang3.ObjectUtils;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -78,7 +80,7 @@ public class InvalidRecordService extends ServiceImpl<InvalidRecordMapper, Inval
|
|
|
private InvalidDecisionFileService invalidDecisionFileService;
|
|
|
|
|
|
@Autowired
|
|
|
- private AssoReportAffairFileService assoReportAffairFileService;
|
|
|
+ private ReportAffairCasePhaseMapper reportAffairCasePhaseMapper;
|
|
|
|
|
|
@Autowired
|
|
|
private CourtOrderService courtOrderService;
|
|
@@ -270,9 +272,16 @@ public class InvalidRecordService extends ServiceImpl<InvalidRecordMapper, Inval
|
|
|
Integer affairType = 1;
|
|
|
Date invalidTime = this.loadInvalidTime(affairType, item);
|
|
|
invalidRecordVO.setInvalidTime(invalidTime);
|
|
|
- Integer judgeType = 5;
|
|
|
- Date judgeTime = this.loadInvalidTime(judgeType, item);
|
|
|
-
|
|
|
+ Integer judgeType = 16;
|
|
|
+ Date judgeTime1 = this.loadInvalidTime(judgeType, item);
|
|
|
+ Integer judgeType1 = 26;
|
|
|
+ Date judgeTime2 = this.loadInvalidTime(judgeType1, item);
|
|
|
+ Date judgeTime = null;
|
|
|
+ if (ObjectUtils.isNotEmpty(judgeTime2)) {
|
|
|
+ judgeTime = judgeTime2;
|
|
|
+ } else {
|
|
|
+ judgeTime = judgeTime1;
|
|
|
+ }
|
|
|
invalidRecordVO.setJudgementTime(judgeTime);
|
|
|
invalidRecordVO.setCreateId(project.getCreateId());
|
|
|
invalidRecordVO.setCreateTime(project.getCreateTime());
|
|
@@ -281,10 +290,13 @@ public class InvalidRecordService extends ServiceImpl<InvalidRecordMapper, Inval
|
|
|
invalidRecordVO.setFileGuids(fileGuids);
|
|
|
invalidRecordVO.setIfAdd(false);
|
|
|
//装载结果 先查询行政判决诉讼书
|
|
|
- Integer resultType = 5;
|
|
|
+ Integer resultType = 16;
|
|
|
ReVO reVO = this.loadResult(resultType, item);
|
|
|
invalidRecordVO.setResult(reVO.getResult());
|
|
|
invalidRecordVO.setJudgementTime(reVO.getJudgementTime());
|
|
|
+ invalidRecordVO.setCasePhase(reVO.getCasePhase());
|
|
|
+ invalidRecordVO.setCaseChildPhase(reVO.getCaseChildPhase());
|
|
|
+ invalidRecordVO.setFlowType(reVO.getFlowType());
|
|
|
//带出报告信息
|
|
|
ReportVO reportVO = new ReportVO();
|
|
|
BeanUtils.copyProperties(item, reportVO);
|
|
@@ -302,7 +314,7 @@ public class InvalidRecordService extends ServiceImpl<InvalidRecordMapper, Inval
|
|
|
|
|
|
public Date loadInvalidTime(Integer type, ReportProject reportProject) {
|
|
|
LambdaQueryWrapper<ReportAffair> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
- queryWrapper.eq(ReportAffair::getAffairType, type)
|
|
|
+ queryWrapper.eq(ReportAffair::getAssoCasePhaseId, type)
|
|
|
.eq(ReportAffair::getProjectId, reportProject.getProjectId())
|
|
|
.orderByDesc(ReportAffair::getCreateTime)
|
|
|
.last("LIMIT 1");
|
|
@@ -318,9 +330,11 @@ public class InvalidRecordService extends ServiceImpl<InvalidRecordMapper, Inval
|
|
|
ReVO reVO = new ReVO();
|
|
|
String result = "";
|
|
|
LambdaQueryWrapper<ReportAffair> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
- queryWrapper.eq(ReportAffair::getAffairType, type)
|
|
|
- .eq(ReportAffair::getProjectId, reportProject.getProjectId())
|
|
|
- .orderByDesc(ReportAffair::getCreateTime)
|
|
|
+ queryWrapper.eq(ReportAffair::getProjectId, reportProject.getProjectId())
|
|
|
+ .and(item -> item.eq(ReportAffair::getAssoCasePhaseId, type)
|
|
|
+ .or()
|
|
|
+ .eq(ReportAffair::getAssoCasePhaseId,26))
|
|
|
+ .orderByDesc(ReportAffair::getAssoCasePhaseId).orderByDesc(ReportAffair::getOccurredTime)
|
|
|
.last("LIMIT 1");
|
|
|
ReportAffair reportAffair = reportAffairService.getOne(queryWrapper, false);
|
|
|
if (reportAffair != null) {
|
|
@@ -333,14 +347,21 @@ public class InvalidRecordService extends ServiceImpl<InvalidRecordMapper, Inval
|
|
|
result = courtOrder.getConclusion();
|
|
|
reVO.setResult(result);
|
|
|
reVO.setJudgementTime(reportAffair.getOccurredTime());
|
|
|
+ Integer casePhaseId = reportAffair.getAssoCasePhaseId();
|
|
|
+ ReportAffairCasePhase casePhase = reportAffairCasePhaseMapper.selectById(casePhaseId);
|
|
|
+ if (ObjectUtils.isNotEmpty(casePhase)) {
|
|
|
+ reVO.setCasePhase(casePhase.getCasePhase());
|
|
|
+ reVO.setCaseChildPhase(casePhase.getCaseChildPhase());
|
|
|
+ reVO.setFlowType(casePhase.getFlowType());
|
|
|
+ }
|
|
|
}
|
|
|
} else {
|
|
|
//无效决定书
|
|
|
- Integer affairType = 3;
|
|
|
+ Integer affairType = 7;
|
|
|
LambdaQueryWrapper<ReportAffair> invalidRecordWrapper = new LambdaQueryWrapper<>();
|
|
|
- invalidRecordWrapper.eq(ReportAffair::getAffairType, affairType)
|
|
|
+ invalidRecordWrapper.eq(ReportAffair::getAssoCasePhaseId, affairType)
|
|
|
.eq(ReportAffair::getProjectId, reportProject.getProjectId())
|
|
|
- .orderByDesc(ReportAffair::getCreateTime)
|
|
|
+ .orderByDesc(ReportAffair::getOccurredTime)
|
|
|
.last("LIMIT 1");
|
|
|
ReportAffair reportAffair1 = reportAffairService.getOne(invalidRecordWrapper, false);
|
|
|
if (reportAffair1 != null) {
|
|
@@ -359,6 +380,13 @@ public class InvalidRecordService extends ServiceImpl<InvalidRecordMapper, Inval
|
|
|
reVO.setJudgementTime(reportAffair1.getOccurredTime());
|
|
|
}
|
|
|
}
|
|
|
+ Integer casePhaseId = reportAffair1.getAssoCasePhaseId();
|
|
|
+ ReportAffairCasePhase casePhase = reportAffairCasePhaseMapper.selectById(casePhaseId);
|
|
|
+ if (ObjectUtils.isNotEmpty(casePhase)) {
|
|
|
+ reVO.setCasePhase(casePhase.getCasePhase());
|
|
|
+ reVO.setCaseChildPhase(casePhase.getCaseChildPhase());
|
|
|
+ reVO.setFlowType(casePhase.getFlowType());
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
return reVO;
|