xuhy
2025-12-29 17a405c90f91357be223596c2a097c8d5b951e37
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TLargeResourceController.java
@@ -201,38 +201,47 @@
        for (LargeResourceImport largeResourceImport : largeResourceImports) {
            if (!StringUtils.hasLength(largeResourceImport.getTypeParentName())){
                result.append("第"+i+"行:[", "一级类型名称"+"]不能为空");
                i++;
                continue;
            }
            if (!StringUtils.hasLength(largeResourceImport.getTypeChildrenName())){
                result.append("第"+i+"行:[", "二级类型名称"+"]不能为空");
                i++;
                continue;
            }
            if (!StringUtils.hasLength(largeResourceImport.getResourceUnit())){
                result.append("第"+i+"行:[", "资源单位"+"]不能为空");
                i++;
                continue;
            }
            if (!StringUtils.hasLength(largeResourceImport.getResourceNameDesc())){
                result.append("第"+i+"行:[", "资源名称描述"+"]不能为空");
                i++;
                continue;
            }
            if (!StringUtils.hasLength(largeResourceImport.getResourceSource())){
                result.append("第"+i+"行:[", "资源来源"+"]不能为空");
                i++;
                continue;
            }
            if (!StringUtils.hasLength(largeResourceImport.getQuantityScale())){
                result.append("第"+i+"行:[", "数量规模"+"]不能为空");
                i++;
                continue;
            }
            if (!StringUtils.hasLength(largeResourceImport.getContactPerson())){
                result.append("第"+i+"行:[", "联系人"+"]不能为空");
                i++;
                continue;
            }
            if (!StringUtils.hasLength(largeResourceImport.getContactNumber())){
                result.append("第"+i+"行:[", "联系电话"+"]不能为空");
                i++;
                continue;
            }
            if (largeResourceImport.getContactNumber().matches("^1[3-9]\\\\d{9}$")){
            if (!largeResourceImport.getContactNumber().matches("^$|^1[3-9]\\d{9}$")){
                result.append("第"+i+"行:[", "联系电话"+"]格式不正确");
                i++;
                continue;
            }
            TLargeResource largeResource = new TLargeResource();
@@ -243,6 +252,7 @@
                    .last("LIMIT 1"));
            if(Objects.isNull(parent)){
                result.append("第"+i+"行:[", "一级类型名称"+"]不存在");
                i++;
                continue;
            }
            largeResource.setTypeParentId(parent.getId());
@@ -252,6 +262,7 @@
                    .last("LIMIT 1"));
            if(Objects.isNull(children)){
                result.append("第"+i+"行:[", "二级类型名称"+"]不存在");
                i++;
                continue;
            }
            largeResource.setTypeChildrenId(children.getId());