fix: 87510 企业标准-导入-压缩包内多个Excel,提示信息需修改

This commit is contained in:
2024-07-25 11:38:01 +08:00
parent b961564c10
commit 3a60ac69b8
6 changed files with 10 additions and 6 deletions
@@ -87,6 +87,8 @@ public class ResultCommon {
public static final String IMPORT_TEMPLATE_ERROR = "import.template.error"; // 导入模板错误
public static final String ZIP_ROOT_ONE_EXCEL = "zip_root_one_excel";
public static final String ZIP_CHARSET_ERROR = "zip.charset.error"; // zip压缩包编码错误
/**字段名称太长*/
@@ -1656,13 +1656,13 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
throw new JeroBootException(MessageUtils.getMessage(ResultCommon.IMPORT_TEMPLATE_ERROR));
} else if (fileList.size() > 1) {
FileUnZip.deleteDir(saveDirectory);
throw new JeroBootException(MessageUtils.getMessage(ResultCommon.IMPORT_TEMPLATE_ERROR));
throw new JeroBootException(MessageUtils.getMessage(ResultCommon.ZIP_ROOT_ONE_EXCEL));
}
List<File> excelfilelist = FileUnZip.readImpExcelFile(saveDirectory.getPath());
System.gc();
if (excelfilelist.size() != 1) {
FileUnZip.deleteDir(saveDirectory);
throw new JeroBootException(MessageUtils.getMessage(ResultCommon.IMPORT_TEMPLATE_ERROR));
throw new JeroBootException(MessageUtils.getMessage(ResultCommon.ZIP_ROOT_ONE_EXCEL));
}
String excelName = excelfilelist.get(0).getName();
String moduleCode = "";
@@ -291,8 +291,8 @@ public class FileUnZip {
for (File fi : files) {
// 对文件进行过滤,只读取Excel文件
String name = fi.getName();
// "导入模板".equals(fi.getName()) || "导入模板.xlsx".equals(fi.getName())
if (name != null &&( fi.getName().contains(".xls") || fi.getName().contains(".xlsx") )){
if (fi.getName().contains(".xls") || fi.getName().contains(".xlsx")
|| fi.getName().contains(".xlsm")){
resultlist.add(fi);
}
}
@@ -74,4 +74,5 @@ task.urging.error.2=\u6682\u65E0\u8BE5\u6D41\u7A0B\u50AC\u529E\u6743\u9650
horizontal.transgression.select=\u6682\u65E0\u6743\u9650\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9
assess.delete.error=\u672A\u7B26\u5408\u9879\u4E2D\u6709\u6574\u6539\u4E2D\u3001\u5BA1\u6279\u4E2D\u7684\u6570\u636E\u65F6\uFF0C\u4E0D\u5141\u8BB8\u5220\u9664
assess.delete.error2=\u9879\u76EE\u4E2D\u6709\u8BC4\u4F30\u4E2D\u7684\u6570\u636E\u65F6\uFF0C\u4E0D\u5141\u8BB8\u5220\u9664
new.en.standard.number.conflict=\u8BE5\u65B0\u4F01\u6807\u7F16\u53F7\u4E0E\u5DF2\u5B58\u5728\u7684\u4F01\u6807\u7F16\u53F7\u91CD\u590D\uFF0C\u8BF7\u91CD\u65B0\u4FEE\u6539\u63D0\u4EA4
new.en.standard.number.conflict=\u8BE5\u65B0\u4F01\u6807\u7F16\u53F7\u4E0E\u5DF2\u5B58\u5728\u7684\u4F01\u6807\u7F16\u53F7\u91CD\u590D\uFF0C\u8BF7\u91CD\u65B0\u4FEE\u6539\u63D0\u4EA4
zip_root_one_excel=\u538B\u7F29\u5305\u6839\u76EE\u5F55\u4E0B\u4EC5\u80FD\u5B58\u5728\u4E00\u4E2Aexcel\u4E3A\u5BFC\u5165\u6570\u636E
@@ -83,3 +83,4 @@ new.en.standard.number.conflict=The new enterprise standard number is duplicated
process.already.distributed=The process has been distributed, do not reject!
process.not.countersignature=It is not a countersign node task!
zip_root_one_excel=The zip file contains more than one excel file
@@ -80,6 +80,6 @@ horizontal.transgression.select=\u6682\u65E0\u6743\u9650\uFF0C\u8BF7\u91CD\u65B0
assess.delete.error=\u672A\u7B26\u5408\u9879\u4E2D\u6709\u6574\u6539\u4E2D\u3001\u5BA1\u6279\u4E2D\u7684\u6570\u636E\u65F6\uFF0C\u4E0D\u5141\u8BB8\u5220\u9664
assess.delete.error2=\u9879\u76EE\u4E2D\u6709\u8BC4\u4F30\u4E2D\u7684\u6570\u636E\u65F6\uFF0C\u4E0D\u5141\u8BB8\u5220\u9664
new.en.standard.number.conflict=\u8BE5\u65B0\u4F01\u6807\u7F16\u53F7\u4E0E\u5DF2\u5B58\u5728\u7684\u4F01\u6807\u7F16\u53F7\u91CD\u590D\uFF0C\u8BF7\u91CD\u65B0\u4FEE\u6539\u63D0\u4EA4
process.already.distributed=\u6D41\u7A0B\u5DF2\u5206\u53D1,\u7981\u6B62\u9A73\u56DE!
process.not.countersignature=\u4E0D\u662F\u4F1A\u7B7E\u8282\u70B9\u4EFB\u52A1!
zip_root_one_excel=\u538B\u7F29\u5305\u6839\u76EE\u5F55\u4E0B\u4EC5\u80FD\u5B58\u5728\u4E00\u4E2Aexcel\u4E3A\u5BFC\u5165\u6570\u636E