Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -121,6 +121,9 @@ public class WarningLeafletVO extends BaseEntity implements Serializable{
|
||||
@ApiModelProperty("预告警单下载路径")
|
||||
private String filePath;
|
||||
|
||||
@ApiModelProperty("实际路径")
|
||||
private String absFilePath;
|
||||
|
||||
@ApiModelProperty("技术监督报告")
|
||||
private String supervisionReport;
|
||||
|
||||
|
||||
@@ -163,7 +163,9 @@ public class WarningLeafletServiceImpl extends ServiceImpl<WarningLeafletMapper,
|
||||
x.setDutyOrgName(deptMap.get(x.getDutyOrgId()));
|
||||
}
|
||||
if (!Objects.isNull(x.getFilePath())) {
|
||||
x.setAbsFilePath(x.getFilePath());
|
||||
x.setFilePath(fileStorageUtil.getFileUrl(x.getFilePath()));
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -393,6 +395,8 @@ public class WarningLeafletServiceImpl extends ServiceImpl<WarningLeafletMapper,
|
||||
record.setDutyOrgName(deptMap.get(record.getDutyOrgId()));
|
||||
}
|
||||
if (!Objects.isNull(record.getFilePath())) {
|
||||
record.setAbsFilePath(record.getFilePath());
|
||||
|
||||
record.setFilePath(fileStorageUtil.getFileUrl(record.getFilePath()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1032,11 +1032,11 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
|
||||
ExcelImportResult<SensitiveReportExcel> sensitiveUserExcelExcelImportResult = ExcelImportUtil.importExcelMore(file.getInputStream(), SensitiveReportExcel.class, params);
|
||||
log.info("Excel 解析完成,原始数据行数:{}", sensitiveUserExcelExcelImportResult.getList().size());
|
||||
//如果存在非法数据,将不合格的数据导出
|
||||
if (sensitiveUserExcelExcelImportResult.isVerifyFail()) {
|
||||
log.warn("存在校验失败的数据");
|
||||
PoiUtil.exportFileByWorkbook(sensitiveUserExcelExcelImportResult.getFailWorkbook(), "非法用户数据.xlsx", response);
|
||||
return; // 校验失败直接返回
|
||||
} else {
|
||||
// if (sensitiveUserExcelExcelImportResult.isVerifyFail()) {
|
||||
// log.warn("存在校验失败的数据");
|
||||
// PoiUtil.exportFileByWorkbook(sensitiveUserExcelExcelImportResult.getFailWorkbook(), "非法用户数据.xlsx", response);
|
||||
// return; // 校验失败直接返回
|
||||
// } else {
|
||||
// 过滤掉空行数据(projectName 为空的行)
|
||||
sensitiveUserExcels = sensitiveUserExcelExcelImportResult.getList().stream()
|
||||
.filter(x -> StringUtils.isNotBlank(x.getProjectName()))
|
||||
@@ -1046,7 +1046,7 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
|
||||
if (CollectionUtil.isEmpty(sensitiveUserExcels)) {
|
||||
throw new BusinessException(SupervisionResponseEnum.IMPORT_DEV_DATA_ERROR);
|
||||
}
|
||||
}
|
||||
// }
|
||||
} catch (Exception e) {
|
||||
log.error("导入失败,文件:{}", file.getOriginalFilename(), e);
|
||||
throw new BusinessException(SupervisionResponseEnum.IMPORT_SENSITIVE_REPORT_ERROR);
|
||||
|
||||
Reference in New Issue
Block a user