fix: 77892
企业标准--导入--必填字段未填写,错误提示语行数不对应
This commit is contained in:
+7
-1
@@ -1471,7 +1471,13 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
||||
// 按照实际顺序创建headerList
|
||||
List<LawsTag> headerList = new ArrayList<>();
|
||||
for (Cell cell : hearderRow) {
|
||||
headerList.add(headerMap.get(cell.toString().replace("*", "")));
|
||||
LawsTag tag = headerMap.get(cell.toString().replace("*", ""));
|
||||
if (tag == null && !cell.toString().equals("稽查内容")) {
|
||||
FileUnZip.deleteDir(saveDirectory);
|
||||
throw new JeroBootException(MessageUtils.getMessage(ResultCommon.IMPORT_TEMPLATE_ERROR));
|
||||
} else {
|
||||
headerList.add(tag);
|
||||
}
|
||||
}
|
||||
// 如果是企标的话手动添加稽查内容字段
|
||||
if (TableNameEnum.ENTERPRISE_STANDARDS.getTableName().equals(tableName)) {
|
||||
|
||||
@@ -102,7 +102,7 @@ public class ImportUtil {
|
||||
if (YesOrNoEnum.YES.getValue().equals(tag.getFieldMustInput())) {
|
||||
if (!this.mustInputValid(cell)) {
|
||||
log.error("第" + row + "列" + tag.getDbFieldTxt() + "为必填 ");
|
||||
errMsg.append("第").append(i).append("行第").append(row).append("列").append(tag.getDbFieldTxt()).append("为必填 ");
|
||||
errMsg.append("第").append(row).append("列").append(tag.getDbFieldTxt()).append("为必填 ");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -293,7 +293,7 @@ public class ImportUtil {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (errMsg.toString().contains("填写错误")) {
|
||||
if (errMsg.toString().contains("列")) {
|
||||
errMsgList.add(errMsg.toString());
|
||||
} else {
|
||||
insertDataList.add(parameterMap);
|
||||
|
||||
Reference in New Issue
Block a user