diff --git a/laws-modules/src/main/java/com/jero/modules/laws/common/service/impl/LawsCommonServiceImpl.java b/laws-modules/src/main/java/com/jero/modules/laws/common/service/impl/LawsCommonServiceImpl.java index efc21178..2cd13a5b 100644 --- a/laws-modules/src/main/java/com/jero/modules/laws/common/service/impl/LawsCommonServiceImpl.java +++ b/laws-modules/src/main/java/com/jero/modules/laws/common/service/impl/LawsCommonServiceImpl.java @@ -1484,7 +1484,7 @@ public class LawsCommonServiceImpl implements ILawsCommonService { String tableName = TableNameEnum.getTableName(module); List errorMsgsList = this.validDataFormat(insertDataList, file, tableName); // 判断如果校验有问题则返回校验错误信息,没问题则将数据转化为导入方法所需参数 - if (errorMsgsList.size() > 0) { + if (!errorMsgsList.isEmpty()) { return errorMsgsList; } else { // 执行新增功能 @@ -1564,7 +1564,7 @@ public class LawsCommonServiceImpl implements ILawsCommonService { fileList.add(file1); } } - if (fileList.size() == 0) { + if (fileList.isEmpty()) { FileUnZip.deleteDir(saveDirectory); throw new JeroBootException(MessageUtils.getMessage(ResultCommon.IMPORT_TEMPLATE_ERROR)); } else if (fileList.size() > 1) { diff --git a/laws-modules/src/main/java/com/jero/modules/laws/common/util/ImportUtil.java b/laws-modules/src/main/java/com/jero/modules/laws/common/util/ImportUtil.java index 83fd9904..a33eda66 100644 --- a/laws-modules/src/main/java/com/jero/modules/laws/common/util/ImportUtil.java +++ b/laws-modules/src/main/java/com/jero/modules/laws/common/util/ImportUtil.java @@ -122,10 +122,11 @@ public class ImportUtil { // 将国标和外标的三个标准号组成元素取出 if (!standardValidFlag) { if ((TableNameEnum.DOMESTIC_REGULATIONS.getValue().equals(tag.getIsModel()) || - TableNameEnum.FOREIGN_REGULATIONS.getValue().equals(tag.getIsModel())) && - FieldCommon.STANDARD_NUMBER_TEMP.equals(tag.getDbFieldName()) || + TableNameEnum.FOREIGN_REGULATIONS.getValue().equals(tag.getIsModel())) + && + (FieldCommon.STANDARD_NUMBER_TEMP.equals(tag.getDbFieldName()) || FieldCommon.STANDARD_CLASS.equals(tag.getDbFieldName()) || - FieldCommon.YEAR_NUMBER.equals(tag.getDbFieldName()) + FieldCommon.YEAR_NUMBER.equals(tag.getDbFieldName())) ) { if (FieldCommon.STANDARD_NUMBER_TEMP.equals(tag.getDbFieldName())) { if (cell == null) {