xiaogang
2022-08-11 4367e8ad1c9208c7c0c4cbad97874a0524a0481b
service-api/src/main/java/com/java110/api/smo/assetImport/impl/ImportOwnerRoomSMOImpl.java
@@ -73,6 +73,14 @@
        return false;
    }
    private boolean hasRoomSpecialCharacters(String str) {
        if ( str.contains("#") || str.contains("?") || str.contains("&")) {
            return true;
        }
        return false;
    }
    /**
     * 数据格式校验
     *
@@ -91,13 +99,13 @@
            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())) {
                throw new IllegalArgumentException((roomIndex + 1) + "行楼层不是有效数字");
            }
//            if (!StringUtil.isNumber(importOwnerRoomDto.getLayer())) {
//                throw new IllegalArgumentException((roomIndex + 1) + "行楼层不是有效数字");
//            }
            if (!StringUtil.isNumber(importOwnerRoomDto.getLayerCount())) {
                throw new IllegalArgumentException((roomIndex + 1) + "行总楼层不是有效数字");
@@ -138,6 +146,10 @@
                throw new IllegalArgumentException((roomIndex + 1) + "行手机号不能为空");
            }
            if (importOwnerRoomDto.getTel().length() > 11) {
                throw new IllegalArgumentException((roomIndex + 1) + "行手机号超过11位,请核实");
            }
            if (StringUtil.isEmpty(importOwnerRoomDto.getIdCard())) {
                throw new IllegalArgumentException((roomIndex + 1) + "行身份证号不能为空");
            }