|
|
@@ -73,6 +73,14 @@ public class ImportOwnerRoomSMOImpl extends DefaultAbstractComponentSMO implemen
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
+ private boolean hasRoomSpecialCharacters(String str) {
|
|
|
+ if ( str.contains("#") || str.contains("?") || str.contains("&")) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 数据格式校验
|
|
|
*
|
|
|
@@ -91,8 +99,8 @@ public class ImportOwnerRoomSMOImpl extends DefaultAbstractComponentSMO implemen
|
|
|
if (hasSpecialCharacters(importOwnerRoomDto.getUnitNum())) {
|
|
|
throw new IllegalArgumentException((roomIndex + 1) + "行单元中包含特殊符号 - # ? & 请删除!");
|
|
|
}
|
|
|
- if (hasSpecialCharacters(importOwnerRoomDto.getRoomNum())) {
|
|
|
- throw new IllegalArgumentException((roomIndex + 1) + "行单元中包含特殊符号 - # ? & 请删除!");
|
|
|
+ if (hasRoomSpecialCharacters(importOwnerRoomDto.getRoomNum())) {
|
|
|
+ throw new IllegalArgumentException((roomIndex + 1) + "行房屋中包含特殊符号 # ? & 请删除!");
|
|
|
}
|
|
|
|
|
|
// if (!StringUtil.isNumber(importOwnerRoomDto.getLayer())) {
|