认证-参数项-bug54766
This commit is contained in:
+16
-4
@@ -398,7 +398,11 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
|||||||
workbook.write(os);
|
workbook.write(os);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
log.error("发生异常,异常信息为:"+e.getMessage(), e);
|
log.error("发生异常,异常信息为:"+e.getMessage(), e);
|
||||||
throw new JeroBootException("下载文件失败,请重试");
|
if (CutEnum.CN.getValue().equals(cut)) {
|
||||||
|
throw new JeroBootException("下载文件失败,请重试!");
|
||||||
|
} else {
|
||||||
|
throw new JeroBootException("Failed to download file, please try again!");
|
||||||
|
}
|
||||||
}finally {
|
}finally {
|
||||||
IOUtils.closeQuietly(os);
|
IOUtils.closeQuietly(os);
|
||||||
try {
|
try {
|
||||||
@@ -472,9 +476,16 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
|||||||
os.flush();
|
os.flush();
|
||||||
os.close(); // 后开先关
|
os.close(); // 后开先关
|
||||||
fis.close(); // 先开后关
|
fis.close(); // 先开后关
|
||||||
|
} catch (JeroBootException e) {
|
||||||
|
log.error(e.getMessage(), e);
|
||||||
|
throw new JeroBootException(e.getMessage());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error(e.getMessage(), e);
|
log.error(e.getMessage(), e);
|
||||||
throw new JeroBootException("下载文件失败,请重试");
|
if (CutEnum.CN.getValue().equals(cut)) {
|
||||||
|
throw new JeroBootException("下载文件失败,请重试!");
|
||||||
|
} else {
|
||||||
|
throw new JeroBootException("Failed to download file, please try again!");
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
IOUtils.closeQuietly(os);
|
IOUtils.closeQuietly(os);
|
||||||
IOUtils.closeQuietly(excelOS);
|
IOUtils.closeQuietly(excelOS);
|
||||||
@@ -484,7 +495,7 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
|||||||
private List<Map<String, Object>> getCnExportSheetsList(List<ParamsInfoEO> paramsInfoEOList, String fileNowPath, String paramsTemplateId) throws IOException {
|
private List<Map<String, Object>> getCnExportSheetsList(List<ParamsInfoEO> paramsInfoEOList, String fileNowPath, String paramsTemplateId) throws IOException {
|
||||||
|
|
||||||
if (CollectionUtil.isEmpty(paramsInfoEOList)) {
|
if (CollectionUtil.isEmpty(paramsInfoEOList)) {
|
||||||
throw new JeroBootException("没有可导出的数据");
|
throw new JeroBootException("没有可导出的数据!");
|
||||||
}
|
}
|
||||||
|
|
||||||
List<OSSFile> fileTemplateList = new ArrayList<>();
|
List<OSSFile> fileTemplateList = new ArrayList<>();
|
||||||
@@ -571,7 +582,7 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
|||||||
private List<Map<String, Object>> getEnExportSheetsList(List<ParamsInfoEnExport> paramsInfoEnExportList, String fileNowPath, String paramsTemplateId) throws IOException {
|
private List<Map<String, Object>> getEnExportSheetsList(List<ParamsInfoEnExport> paramsInfoEnExportList, String fileNowPath, String paramsTemplateId) throws IOException {
|
||||||
|
|
||||||
if (CollectionUtil.isEmpty(paramsInfoEnExportList)) {
|
if (CollectionUtil.isEmpty(paramsInfoEnExportList)) {
|
||||||
throw new JeroBootException("没有可导出的数据");
|
throw new JeroBootException("No data available for export!");
|
||||||
}
|
}
|
||||||
|
|
||||||
List<OSSFile> fileTemplateList = new ArrayList<>();
|
List<OSSFile> fileTemplateList = new ArrayList<>();
|
||||||
@@ -1373,6 +1384,7 @@ public class ParamsInfoEOServiceImpl extends ServiceImpl<ParamsInfoEOMapper, Par
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
List<CertCategoryParamsInfoCnImport> listAfterDistinct = listAll.stream()
|
List<CertCategoryParamsInfoCnImport> listAfterDistinct = listAll.stream()
|
||||||
|
.filter(e->StringUtils.isNotEmpty(e.getNioNumber()) && StringUtils.isNotEmpty(e.getCertCategory()))
|
||||||
.collect(Collectors.collectingAndThen(Collectors.toCollection(() ->
|
.collect(Collectors.collectingAndThen(Collectors.toCollection(() ->
|
||||||
new TreeSet<>(Comparator.comparing(o -> o.getNioNumber() + ";" + o.getCertCategory()))), ArrayList::new));
|
new TreeSet<>(Comparator.comparing(o -> o.getNioNumber() + ";" + o.getCertCategory()))), ArrayList::new));
|
||||||
listAfterDistinct.forEach(item -> {
|
listAfterDistinct.forEach(item -> {
|
||||||
|
|||||||
Reference in New Issue
Block a user