21 |
Map<Integer,Address> idAddressMap; |
Map<Integer,Address> idAddressMap; |
22 |
|
|
23 |
|
|
24 |
|
Map<Integer,HundredePctBean> hundredePct; |
25 |
|
|
26 |
|
|
27 |
public SearchResult search(String postnrStr, String adresse) { |
public SearchResult search(String postnrStr, String adresse) { |
28 |
int postnr=0; |
int postnr=0; |
29 |
|
|
106 |
gade.put(husnrSearch, a); |
gade.put(husnrSearch, a); |
107 |
} |
} |
108 |
|
|
|
System.out.println("Build -- stage 2"); |
|
109 |
|
|
110 |
List<ExtendedBean> extDao = DatabaseLayer.getExtendedAdresslistDao(); |
//////////////////////////////////////////////////////////////////////////////////////// |
111 |
|
System.out.println("Build -- stage 2 udvidet dækning"); |
112 |
|
|
113 |
|
List<ExtendedBean> extDao = DatabaseLayer.getExtendedAdresslist(); |
114 |
for (ExtendedBean eb : extDao) { |
for (ExtendedBean eb : extDao) { |
115 |
|
|
116 |
Address orgAddress = idAddressMap.get(eb.orgId); |
Address orgAddress = idAddressMap.get(eb.orgId); |
148 |
|
|
149 |
|
|
150 |
} |
} |
151 |
|
////////////////////////////////////////////////////////////////////////////////////// |
152 |
|
System.out.println("Build -- stage 3 - 100pct"); |
153 |
|
|
154 |
System.out.println("Build -- stage 3"); |
hundredePct = DatabaseLayer.get100PctList(); |
155 |
|
for (Address addr : alleAdresser) { |
156 |
System.out.println("Build -- stage 4"); |
if (addr.daekningsType != DaekningsType.DAEKNING_IKKEDAEKKET) { |
157 |
|
continue; |
158 |
|
} |
159 |
|
|
160 |
|
if (addr.distributor != null && addr.distributor.equals("LUKKET")) { |
161 |
|
continue; |
162 |
|
} |
163 |
|
|
164 |
|
|
165 |
|
HundredePctBean bean = hundredePct.get(addr.postnr); |
166 |
|
if (bean == null) { |
167 |
|
continue; |
168 |
|
} |
169 |
|
|
170 |
|
addr.daekningsType = DaekningsType.DAEKNING_100PCT; |
171 |
|
addr.rute = bean.rute; |
172 |
|
addr.koreliste = bean.koreliste; |
173 |
|
addr.dbkBane = bean.dbkBane; |
174 |
|
addr.distributor = bean.distributor; |
175 |
|
} |
176 |
|
|
177 |
} |
} |
178 |
|
|