chengf
2026-03-11 b88a288f4f787b509463678e3cd9ccfa3f37014b
service-api/src/main/java/com/java110/api/importData/adapt/ImportPropertyWhiteListfFlowAdapt.java
@@ -52,9 +52,6 @@
        //获取车辆信息
        getPropertyWhiteListFlowDtos(workbook, whiteLists);
        for (PropertyWhiteListFlowDto whiteList : whiteLists){
            whiteList.setCommunityId(paramIn.getString("communityId"));
        }
        return whiteLists;
    }
@@ -62,18 +59,21 @@
    public void setCommunityId(PropertyWhiteListFlowDto po, Object[] os, List<Map<String, Object>> maps) {
        for (Map<String, Object> map : maps) {
            if (ValueUtil.defaultValue(os[1]).isEmpty() && ValueUtil.defaultValue(os[2]).isEmpty()){
                throw new IllegalArgumentException("小区名称和小区编号均为空");
            }
            if (ValueUtil.defaultValue(os[1]).isEmpty()) {
                if (ValueUtil.defaultValue(os[2]).equals(map.get("name"))) {
                if (Vtil.defaultValue(map.get("name")).contains(ValueUtil.defaultValue(os[2]))) {
                    po.setCommunityId(map.get("communityId").toString());
                    return;
                }
            } else if (ValueUtil.defaultValue(os[2]).isEmpty()){
                if (ValueUtil.defaultValue(os[1]).equals(map.get("communityCode"))) {
                if (Vtil.defaultValue(map.get("communityCode")).equals(ValueUtil.defaultValue(os[1]))) {
                    po.setCommunityId(map.get("communityId").toString());
                    return;
                }
            } else {
                if (ValueUtil.defaultValue(os[1]).equals(map.get("communityCode")) && ValueUtil.defaultValue(os[1]).equals(map.get("name"))) {
                if (Vtil.defaultValue(map.get("communityCode")).equals(ValueUtil.defaultValue(os[1])) && Vtil.defaultValue(map.get("name")).contains(ValueUtil.defaultValue(os[2]))) {
                    po.setCommunityId(map.get("communityId").toString());
                    return;
                }
@@ -92,6 +92,7 @@
        sheet = ImportExcelUtils.getSheet(workbook, "白单流水  导入新模板");
        List<Object[]> oList = ImportExcelUtils.listFromSheet(sheet);
        PropertyWhiteListFlowDto white = null;
        List<Map<String, Object>> maps = BeanConvertUtil.beanCovertMapListC(communityInnerServiceSMOImpl.queryCommunitys(new CommunityDto()));
        for (int osIndex = 0; osIndex < oList.size(); osIndex++) {
            Object[] os = oList.get(osIndex);
            if (osIndex == 0) { // 第一行是 头部信息 直接跳过
@@ -113,14 +114,13 @@
                inputTime = Vtil.defaultValueToDate(os[24]);
            }
            white.setChargeTime(chargeTime);//收费时间
            white.setInvoiceReceiptNo(Vtil.defaultValueToDate(os[4]));//发票
            white.setInvoiceReceiptNo(Vtil.defaultValue(os[4]));//发票
            white.setRoomId(os[5] == null ? null : os[5].toString());//房号
            white.setPropertyAddress(os[5] == null ? null : os[5].toString());//业主地址
            white.setDoorRoomNum((os[6] == null ? "" : os[6].toString() + "-") + (os[7] == null ? "" : os[7].toString() + "-") + (os[8] == null ? "" : os[8].toString()) );//门市号
            if (white.getDoorRoomNum().isEmpty()){
                white.setDoorRoomNum(null);
            }
            List<Map<String, Object>> maps = BeanConvertUtil.beanCovertMapListC(communityInnerServiceSMOImpl.queryCommunitys(new CommunityDto()));
            setCommunityId(white, os, maps);
            white.setSecondaryFeeTypeCd(os[13] == null ? null : os[13].toString());//收费内容
            white.setChargeAmount(os[14] == null ? null : os[14].toString());//收费金额