|
@@ -198,7 +198,7 @@ public class ReportService extends ServiceImpl<ReportMapper, Report> {
|
|
|
} else {
|
|
|
invalidReasonFieldService.addDefault(report.getId());
|
|
|
// 当是无效应对报告时,在无效应对报告里插入信息
|
|
|
- InvalidReReport invalidReReport =new InvalidReReport();
|
|
|
+ InvalidReReport invalidReReport = new InvalidReReport();
|
|
|
invalidReReport.setReportId(report.getId());
|
|
|
invalidReReport.setCreateId(loginUtils.getId());
|
|
|
invalidReReport.setInvalidApplication(reportDto.getInvalidApplication());
|
|
@@ -300,6 +300,18 @@ public class ReportService extends ServiceImpl<ReportMapper, Report> {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ //查询报告,由分析系统调用使用
|
|
|
+ public String queryReportByPAS() {
|
|
|
+ LambdaQueryWrapper<Report> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ queryWrapper.ne(Report::getId, 0);
|
|
|
+ queryWrapper.orderByDesc(Report::getCreateTime);
|
|
|
+ SecurityUtils.startDataScope("/pcs/report/query");
|
|
|
+ List<Report> reports = this.list(queryWrapper);
|
|
|
+ List<Integer> reportIds = reports.stream().map(Report::getId).collect(Collectors.toList());
|
|
|
+ long count = this.count(queryWrapper);
|
|
|
+ return Response.success(reportIds, DataUtils.setPageColumn(0, 0, Math.toIntExact(count)));
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* @param reports
|
|
|
* @return
|
|
@@ -461,12 +473,12 @@ public class ReportService extends ServiceImpl<ReportMapper, Report> {
|
|
|
List<Integer> fileIdList = reportFileService.uploadFiles(files);
|
|
|
assoReportFileService.addAsso(reportDto.getId(), fileIdList);
|
|
|
}
|
|
|
- if(report.getType()==7){
|
|
|
- LambdaQueryWrapper<InvalidReReport> wrapper1 =new LambdaQueryWrapper<>();
|
|
|
- wrapper1.eq(InvalidReReport::getReportId,report.getId());
|
|
|
- List<InvalidReReport> invalidReReports =invalidReReportService.list(wrapper1);
|
|
|
- if(invalidReReports.size()>0){
|
|
|
- InvalidReReport invalidReReport =invalidReReports.get(0);
|
|
|
+ if (report.getType() == 7) {
|
|
|
+ LambdaQueryWrapper<InvalidReReport> wrapper1 = new LambdaQueryWrapper<>();
|
|
|
+ wrapper1.eq(InvalidReReport::getReportId, report.getId());
|
|
|
+ List<InvalidReReport> invalidReReports = invalidReReportService.list(wrapper1);
|
|
|
+ if (invalidReReports.size() > 0) {
|
|
|
+ InvalidReReport invalidReReport = invalidReReports.get(0);
|
|
|
invalidReReport.setInvalidApplication(reportDto.getInvalidApplication());
|
|
|
invalidReReport.setCaseNumber(reportDto.getCaseNumber());
|
|
|
invalidReReport.setIssueNumber(reportDto.getIssueNumber());
|
|
@@ -785,10 +797,10 @@ public class ReportService extends ServiceImpl<ReportMapper, Report> {
|
|
|
throw new XiaoShiException("未查询到无效应对报告信息");
|
|
|
}
|
|
|
//装载报告信息,无效对应报告拓展信息到ReportDeDTO并返回
|
|
|
- BeanUtils.copyProperties(report1,reportDeVO);
|
|
|
+ BeanUtils.copyProperties(report1, reportDeVO);
|
|
|
BeanUtils.copyProperties(invalidReReport, reportDeVO);
|
|
|
} else {
|
|
|
- BeanUtils.copyProperties(report1,reportDeVO);
|
|
|
+ BeanUtils.copyProperties(report1, reportDeVO);
|
|
|
}
|
|
|
reportDeVO.setId(report.getId());
|
|
|
} catch (IOException e) {
|
|
@@ -799,6 +811,7 @@ public class ReportService extends ServiceImpl<ReportMapper, Report> {
|
|
|
|
|
|
/**
|
|
|
* 查询租户报告使用报表
|
|
|
+ *
|
|
|
* @return
|
|
|
* @throws IOException
|
|
|
*/
|
|
@@ -808,13 +821,14 @@ public class ReportService extends ServiceImpl<ReportMapper, Report> {
|
|
|
String reData = this.getReportTenantVOFromPCS(tenantIds);
|
|
|
//字符串转对象集合
|
|
|
Gson gson = new Gson();
|
|
|
- Type listType = new TypeToken<List<ReportTenantVO>>(){}.getType();
|
|
|
+ Type listType = new TypeToken<List<ReportTenantVO>>() {
|
|
|
+ }.getType();
|
|
|
List<ReportTenantVO> reportTenantVOS = gson.fromJson(reData, listType);
|
|
|
//遍历
|
|
|
- for(ReportTenantVO rT : reportTenantVOS){
|
|
|
+ for (ReportTenantVO rT : reportTenantVOS) {
|
|
|
//人员ids
|
|
|
List<Integer> personnelIds = rT.getPersonnelIds();
|
|
|
- if(personnelIds.size() > 0) {
|
|
|
+ if (personnelIds.size() > 0) {
|
|
|
//查出所有人员ids名下的报告以及数量
|
|
|
LambdaQueryWrapper<Report> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
queryWrapper.in(Report::getCreatePersonId, personnelIds);
|
|
@@ -849,6 +863,7 @@ public class ReportService extends ServiceImpl<ReportMapper, Report> {
|
|
|
|
|
|
/**
|
|
|
* 调用权限系统查询租户人员ids接口
|
|
|
+ *
|
|
|
* @return
|
|
|
* @throws IOException
|
|
|
*/
|
|
@@ -869,6 +884,7 @@ public class ReportService extends ServiceImpl<ReportMapper, Report> {
|
|
|
|
|
|
/**
|
|
|
* 传入租户id,返回报告数量
|
|
|
+ *
|
|
|
* @param tenantId
|
|
|
* @return
|
|
|
* @throws IOException
|
|
@@ -880,12 +896,13 @@ public class ReportService extends ServiceImpl<ReportMapper, Report> {
|
|
|
String reData = this.getReportTenantVOFromPCS(tenantIds);
|
|
|
//字符串转对象集合
|
|
|
Gson gson = new Gson();
|
|
|
- Type listType = new TypeToken<List<ReportTenantVO>>(){}.getType();
|
|
|
+ Type listType = new TypeToken<List<ReportTenantVO>>() {
|
|
|
+ }.getType();
|
|
|
List<ReportTenantVO> reportTenantVOS = gson.fromJson(reData, listType);
|
|
|
ReportTenantVO reportTenantVO = reportTenantVOS.get(0);
|
|
|
//人员ids
|
|
|
List<Integer> personnelIds = reportTenantVO.getPersonnelIds();
|
|
|
- if(personnelIds.size() > 0) {
|
|
|
+ if (personnelIds.size() > 0) {
|
|
|
//查出所有人员ids名下的报告以及数量
|
|
|
LambdaQueryWrapper<Report> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
queryWrapper.in(Report::getCreatePersonId, personnelIds);
|