| | |
| | | package com.java110.api.importData.adapt; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.api.components.ValueUtil; |
| | | import com.java110.api.importData.DefaultImportDataAdapt; |
| | | import com.java110.api.importData.IImportDataCleaningAdapt; |
| | | import com.java110.dto.PropertyWhiteListFlowDto; |
| | |
| | | |
| | | 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()){ |
| | | if (Vtil.defaultValue(os[1]) == null && Vtil.defaultValue(os[2]) == null){ |
| | | throw new IllegalArgumentException("小区名称和小区编号均为空"); |
| | | } |
| | | if (ValueUtil.defaultValue(os[1]).isEmpty()) { |
| | | if (Vtil.defaultValue(map.get("name")).contains(ValueUtil.defaultValue(os[2]))) { |
| | | if (Vtil.defaultValue(os[1]) == null) { |
| | | if (Vtil.defaultValue(map.get("name")).contains(Vtil.defaultValue(os[2]))) { |
| | | po.setCommunityId(map.get("communityId").toString()); |
| | | return; |
| | | } |
| | | } else if (ValueUtil.defaultValue(os[2]).isEmpty()){ |
| | | if (Vtil.defaultValue(map.get("communityCode")).equals(ValueUtil.defaultValue(os[1]))) { |
| | | } else if (Vtil.defaultValue(os[2]) == null){ |
| | | if (Vtil.defaultValue(map.get("communityCode")).equals(Vtil.defaultValue(os[1]))) { |
| | | po.setCommunityId(map.get("communityId").toString()); |
| | | return; |
| | | } |
| | | } else { |
| | | if (Vtil.defaultValue(map.get("communityCode")).equals(ValueUtil.defaultValue(os[1])) && Vtil.defaultValue(map.get("name")).contains(ValueUtil.defaultValue(os[2]))) { |
| | | if (Vtil.defaultValue(map.get("communityCode")).equals(Vtil.defaultValue(os[1])) && Vtil.defaultValue(map.get("name")).contains(Vtil.defaultValue(os[2]))) { |
| | | po.setCommunityId(map.get("communityId").toString()); |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | throw new IllegalArgumentException("未查询到小区:" + Vtil.appendHyphenToRight(ValueUtil.defaultValue(os[1])) + ValueUtil.defaultValue(os[2])); |
| | | throw new IllegalArgumentException("未查询到小区:" + Vtil.appendHyphenToRight(Vtil.defaultValue(os[1])) + Vtil.defaultValue(os[2])); |
| | | } |
| | | |
| | | |
| | |
| | | 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); |
| | | } |
| | | setCommunityId(white, os, maps); |
| | | white.setSecondaryFeeTypeCd(os[13] == null ? null : os[13].toString());//收费内容 |
| | | white.setChargeAmount(os[14] == null ? null : os[14].toString());//收费金额 |