chengf
2026-02-25 64b14b0549344f13b191e2c26ed199f62655c43f
service-api/src/main/java/com/java110/api/importData/adapt/ImportRoomOwnerDataV2CleaningAdapt.java
@@ -48,23 +48,27 @@
        List<Object[]> oList = ImportExcelUtils.listFromSheet(sheet);
        ImportOwnerRoomDto importOwnerRoomDto = null;
        for (int osIndex = 0; osIndex < oList.size(); osIndex++) {
            if (osIndex < 8) {
            if (osIndex < 5) {
                continue;
            }
            if (oList.get(osIndex)[0] == null) {
                break;
            }
            Object[] os = new Object[168];
            System.arraycopy(oList.get(osIndex), 0, os, 0, oList.get(osIndex).length);
            Assert.hasValue(os[3], (osIndex + 1) + "行项目编码不能为空");
            Assert.hasValue(os[5], (osIndex + 1) + "行路不能为空");
            Assert.hasValue(os[7], (osIndex + 1) + "行门号不能为空");
            Assert.hasValue(os[8], (osIndex + 1) + "行室号不能为空");
            Assert.hasValue(os[9], (osIndex + 1) + "行门室号不能为空");
            Assert.hasValue(os[10], (osIndex + 1) + "行业主地址不能为空");
            Assert.hasValue(os[16], (osIndex + 1) + "行住宅面积不能为空");
            os[167] = result.getUserId();
            Object[] os = new Object[170];
            try {
                System.arraycopy(oList.get(osIndex), 0, os, 0, oList.get(osIndex).length);
            } catch (ArrayIndexOutOfBoundsException e) {
                throw new IllegalArgumentException("Excel长度过长!");
            }
//            Assert.hasValue(os[3], (osIndex + 1) + "行项目编码不能为空");
            Assert.hasValue("住宅物业费 导入新模板中" + os[5], (osIndex + 1) + "行路不能为空");
//            Assert.hasValue("住宅物业费 导入新模板中" + os[7], (osIndex + 1) + "行门号不能为空");
//            Assert.hasValue("住宅物业费 导入新模板中" + os[8], (osIndex + 1) + "行室号不能为空");
//            Assert.hasValue(os[9], (osIndex + 1) + "行门室号不能为空");
            Assert.hasValue("住宅物业费 导入新模板中" + os[10], (osIndex + 1) + "行业主地址不能为空");
            Assert.hasValue("住宅物业费 导入新模板中" + os[16], (osIndex + 1) + "行住宅面积不能为空");
            os[169] = result.getUserId();
            ownerRoomDtos.add(os);
@@ -72,27 +76,30 @@
        sheet = ImportExcelUtils.getSheet(workbook, " 商铺物业费 导入新模板");
        oList = ImportExcelUtils.listFromSheet(sheet);
        for (int osIndex = 0; osIndex < oList.size(); osIndex++) {
            if (osIndex < 8) {
            if (osIndex < 5) {
                continue;
            }
            if (oList.get(osIndex)[0] == null) {
                break;
            }
            Object[] os = new Object[168];
            Object[] os = new Object[170];
            System.arraycopy(oList.get(osIndex), 0, os, 0, oList.get(osIndex).length);
            Assert.hasValue(os[3], (osIndex + 1) + "行项目编码不能为空");
            Assert.hasValue(os[5], (osIndex + 1) + "行路不能为空");
            Assert.hasValue(os[7], (osIndex + 1) + "行门号不能为空");
            Assert.hasValue(os[8], (osIndex + 1) + "行室号不能为空");
            Assert.hasValue(os[9], (osIndex + 1) + "行门室号不能为空");
            Assert.hasValue(os[10], (osIndex + 1) + "行业主地址不能为空");
            Assert.hasValue(os[16], (osIndex + 1) + "行住宅面积不能为空");
            os[167] = result.getUserId();
//            Assert.hasValue(os[3], (osIndex + 1) + "行项目编码不能为空");
            Assert.hasValue("商铺物业费 导入新模板中" + os[5], (osIndex + 1) + "行路不能为空");
//            Assert.hasValue("商铺物业费 导入新模板中" + os[7], (osIndex + 1) + "行门号不能为空");
//            Assert.hasValue("商铺物业费 导入新模板中" + os[8], (osIndex + 1) + "行室号不能为空");
//            Assert.hasValue(os[9], (osIndex + 1) + "行门室号不能为空");
            Assert.hasValue("商铺物业费 导入新模板中" + os[10], (osIndex + 1) + "行业主地址不能为空");
            Assert.hasValue("商铺物业费 导入新模板中" + os[16], (osIndex + 1) + "行住宅面积不能为空");
            os[169] = result.getUserId();
            ownerRoomDtos.add(os);
        }
        if (ownerRoomDtos.size() == 0) {
            throw new IllegalArgumentException("sheet内容为空");
        }
    }