|
@@ -10,6 +10,7 @@ import cn.cslg.pas.common.utils.LoginUtils;
|
|
|
import cn.cslg.pas.common.utils.StringUtils;
|
|
|
import cn.cslg.pas.common.vo.business.InvalidRecordVO;
|
|
|
import cn.cslg.pas.common.vo.business.ReportVO;
|
|
|
+import cn.cslg.pas.domain.BaseEntity;
|
|
|
import cn.cslg.pas.domain.business.*;
|
|
|
import cn.cslg.pas.exception.XiaoShiException;
|
|
|
import cn.cslg.pas.mapper.InvalidRecordMapper;
|
|
@@ -22,6 +23,7 @@ import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
+import org.springframework.util.CollectionUtils;
|
|
|
|
|
|
import java.io.IOException;
|
|
|
import java.util.ArrayList;
|
|
@@ -77,6 +79,9 @@ public class InvalidRecordService extends ServiceImpl<InvalidRecordMapper, Inval
|
|
|
@Autowired
|
|
|
private AssoReportAffairFileService assoReportAffairFileService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private CourtOrderService courtOrderService;
|
|
|
+
|
|
|
/**
|
|
|
* 新增or更新
|
|
|
* @param invalidRecordDTO
|
|
@@ -255,6 +260,7 @@ public class InvalidRecordService extends ServiceImpl<InvalidRecordMapper, Inval
|
|
|
invalidRecordVO.setInvalidTime(invalidTime);
|
|
|
Integer judgeType = 5;
|
|
|
Date judgeTime = this.loadInvalidTime(judgeType, item);
|
|
|
+
|
|
|
invalidRecordVO.setJudgementTime(judgeTime);
|
|
|
invalidRecordVO.setCreateId(project.getCreateId());
|
|
|
invalidRecordVO.setCreateTime(project.getCreateTime());
|
|
@@ -295,6 +301,7 @@ public class InvalidRecordService extends ServiceImpl<InvalidRecordMapper, Inval
|
|
|
}
|
|
|
|
|
|
public String loadResult(Integer type, ReportProject reportProject){
|
|
|
+ String result = "";
|
|
|
LambdaQueryWrapper<ReportAffair> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
queryWrapper.eq(ReportAffair::getAffairType, type)
|
|
|
.eq(ReportAffair::getProjectId, reportProject.getProjectId())
|
|
@@ -302,7 +309,14 @@ public class InvalidRecordService extends ServiceImpl<InvalidRecordMapper, Inval
|
|
|
.last("LIMIT 1");
|
|
|
ReportAffair reportAffair = reportAffairService.getOne(queryWrapper, false);
|
|
|
if (reportAffair != null) {
|
|
|
- return reportAffair.getDescription();
|
|
|
+ Integer reportAffairId = reportAffair.getId();
|
|
|
+ List<CourtOrder> courtOrders = courtOrderService.list(new LambdaQueryWrapper<CourtOrder>()
|
|
|
+ .eq(CourtOrder::getReportAffairId, reportAffairId)
|
|
|
+ .orderByDesc(BaseEntity::getId));
|
|
|
+ if (!CollectionUtils.isEmpty(courtOrders)) {
|
|
|
+ CourtOrder courtOrder = courtOrders.get(0);
|
|
|
+ result = courtOrder.getConclusion();
|
|
|
+ }
|
|
|
} else {
|
|
|
Integer affairType = 3;
|
|
|
LambdaQueryWrapper<ReportAffair> invalidRecordWrapper = new LambdaQueryWrapper<>();
|
|
@@ -317,14 +331,15 @@ public class InvalidRecordService extends ServiceImpl<InvalidRecordMapper, Inval
|
|
|
invalidDecisionFileWrapper.eq(InvalidDecisionFile::getReportAffairId, reportAffairId2);
|
|
|
InvalidDecisionFile invalidDecisionFile = invalidDecisionFileService.getOne(invalidDecisionFileWrapper, false);
|
|
|
if (invalidDecisionFile != null) {
|
|
|
- return invalidDecisionFile.getDecisionKey();
|
|
|
- } else {
|
|
|
- return null;
|
|
|
+ if (StringUtils.isNotEmpty(invalidDecisionFile.getConclusion())) {
|
|
|
+ result = invalidDecisionFile.getConclusion();
|
|
|
+ } else {
|
|
|
+ result = invalidDecisionFile.getDecisionKey();
|
|
|
+ }
|
|
|
}
|
|
|
- } else {
|
|
|
- return null;
|
|
|
}
|
|
|
}
|
|
|
+ return result;
|
|
|
}
|
|
|
|
|
|
|