fix: 80455 企业标准-导入,导入未填写标准类型的文件,提示它是必填项

This commit is contained in:
2024-01-05 16:42:22 +08:00
parent 922e20756d
commit 23f233e14c
2 changed files with 6 additions and 5 deletions
@@ -1484,7 +1484,7 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
String tableName = TableNameEnum.getTableName(module);
List<String> 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) {
@@ -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) {