feat: 标准导入字段长度校验改为根据标签管理表配置判断
This commit is contained in:
@@ -237,16 +237,18 @@ public class ImportUtil {
|
||||
if (FieldShowTypeEnum.TEXT_BOX.getValue().equals(tag.getFieldShowType()) &&
|
||||
!FieldCommon.STANDARD_ENGLISH_NAME.equals(tag.getDbFieldName()) &&
|
||||
!FieldCommon.STANDARD_NAME.equals(tag.getDbFieldName())) {
|
||||
if (cellValue.length() > 50) {
|
||||
log.error("第" + row + "列输入的" + tag.getDbFieldTxt() + "超过50字 ");
|
||||
errMsg.append("第").append(row).append("列输入的").append(tag.getDbFieldTxt()).append("超过50字 ");
|
||||
if (cellValue.length() > tag.getDbLength()) {
|
||||
log.error("第" + row + "列输入的" + tag.getDbFieldTxt() + "超过" + tag.getDbLength() + "字 ");
|
||||
errMsg.append("第").append(row).append("列字段").append(tag.getDbFieldTxt()).append("超过")
|
||||
.append(tag.getDbLength()).append("字 ");
|
||||
}
|
||||
}
|
||||
|
||||
if (FieldShowTypeEnum.MULTI_TEXT.getValue().equals(tag.getFieldShowType())) {
|
||||
if (cellValue.length() > 500) {
|
||||
log.error("第" + row + "列字段" + tag.getDbFieldTxt() + "超过500字 ");
|
||||
errMsg.append("第").append(row).append("列字段").append(tag.getDbFieldTxt()).append("超过500字 ");
|
||||
if (cellValue.length() > tag.getDbLength()) {
|
||||
log.error("第" + row + "列字段" + tag.getDbFieldTxt() + "超过" + tag.getDbLength() + "字 ");
|
||||
errMsg.append("第").append(row).append("列字段").append(tag.getDbFieldTxt()).append("超过")
|
||||
.append(tag.getDbLength()).append("字 ");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user