-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCrawlManager.cs
716 lines (681 loc) · 32.7 KB
/
CrawlManager.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Net;
using System.Threading;
using System.Windows.Threading;
using Newtonsoft.Json.Linq;
using System.Linq;
using System.Text;
using System.Windows;
using PAYMAP_BACKEND.Utils;
namespace PAYMAP_BACKEND
{
public enum CrawlDataResult
{
Ready, Queue, Finish, Error
}
// ReSharper disable UnusedAutoPropertyAccessor.Global
public class CrawlData
{
public string Name { get; set; }
public string AddressSiDo { get; set; }
public string AddressSiGunGu { get; set; }
public string Address { get; set; }
public string Type { get; set; }
public int CodeSido;
public int CodeSigungu;
public CrawlDataResult Status { get; set; }
}
public class CrawlManager
{
private static CrawlManager _instance;
public static bool IsModuleRunning = false;
public static bool IsModuleHealthy = false;
private static bool _moduleRunFlag = false;
private static Thread _crawlerThread;
public enum RunStatus
{
Idle, Running, Error
}
public static Dictionary<string, int> SiDoDictionary;
public static Dictionary<int, Dictionary<string, int>> SiGunGuDictionary;
public static Dictionary<string, bool> TypeDictionary;
public static List<CrawlData> CrawlingData;
public static RunStatus ModuleStatus = RunStatus.Idle;
public static bool ModuleSync = false;
public static int FilterSiDo = 1;
public static int FilterSiGunGu = 0;
public static string FilterType = string.Empty;
public static string FilterName = string.Empty;
public static long StartTime = 0;
public static int FinishedCount = 0;
private CrawlManager()
{
SiDoDictionary = new Dictionary<string, int>();
SiGunGuDictionary = new Dictionary<int, Dictionary<string, int>>();
TypeDictionary = new Dictionary<string, bool>();
InitializeZeroPayData();
CrawlingData = new List<CrawlData>();
}
public static CrawlManager GetInstance()
{
return _instance ?? (_instance = new CrawlManager());
}
public static void StartCrawlZeroPay()
{
_moduleRunFlag = true;
_crawlerThread = new Thread(CrawlZeroPay)
{
Priority = ThreadPriority.Normal
};
if (!_crawlerThread.IsAlive)
{
_crawlerThread.Start();
}
}
public static void StopCrawlZeroPay(bool hardOff = false)
{
_moduleRunFlag = false;
if (!hardOff || _crawlerThread == null || !_crawlerThread.IsAlive) return;
try
{
_crawlerThread.Interrupt();
_crawlerThread = null;
}
catch (Exception exception)
{
LogManager.NewLog(LogType.WindowManager, LogLevel.Error, "StopDashboardMonitor", exception);
}
}
private static void CrawlZeroPay()
{
StartTime = (long)(DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1))).TotalSeconds;
int pointerIndex = 1;
WebClient crawlerClient = new WebClient {Encoding = Encoding.UTF8};
while (true)
{
if (!_moduleRunFlag)
{
LogManager.NewLog(LogType.WindowManager, LogLevel.Info, "CrawlZeroPay", "CrawlZeroPay Thread Stop : Safe");
break;
}
if (CrawlingData == null)
{
LogManager.NewLog(LogType.WindowManager, LogLevel.Info, "CrawlZeroPay", "CrawlZeroPay Thread Stop : Collection Null");
break;
}
if (CrawlingData.Count > 0)
{
for (int i = 0; i < CrawlingData.Count; i ++)
{
CrawlData data = CrawlingData[i];
if (data.Status == CrawlDataResult.Finish)
{
continue;
}
if (data.Status == CrawlDataResult.Error || data.Status == CrawlDataResult.Queue)
{
continue;
}
data.Status = CrawlDataResult.Queue;
if (DatabaseManager.GetInstance().InsertShop(data))
{
CrawlingData[i].Status = CrawlDataResult.Finish;
}
else
{
CrawlingData[i].Status = CrawlDataResult.Error;
return;
}
}
for (int i = 0; i < CrawlingData.Count; i ++)
{
CrawlData data = CrawlingData[i];
if (data.Status == CrawlDataResult.Finish)
{
CrawlingData.RemoveAt(i);
i--;
}
}
}
if (CrawlingData.Count >= 100)
{
// TODO REFRESH HOLDING DATA STATUS
LogManager.NewLog(LogType.WindowManager, LogLevel.Info, "CrawlZeroPay", "CrawlZeroPay Parse Limit");
continue;
}
string requestURL = $"https://www.zeropay.or.kr/intro/frncSrchList_json.do?firstIndex={pointerIndex}&lastIndex={pointerIndex+9}&searchCondition=&tryCode={FilterSiDo:00}";
if (FilterSiGunGu != 0) requestURL += $"&skkCode={FilterSiGunGu:00}";
if (FilterType != null && FilterType.Equals(string.Empty)) requestURL += $"&bztypName={FilterType}";
if (FilterName != null && FilterName.Equals(string.Empty)) requestURL += $"&pobsAfstrName={FilterName}";
var webResult = crawlerClient.DownloadString(requestURL);
try
{
JObject zeroJson = JObject.Parse(webResult);
JToken zeroResult;
if (!zeroJson.TryGetValue("result", out zeroResult) || zeroResult.ToString().Equals("FAIL"))
{
LogManager.NewLog(LogType.WindowManager, LogLevel.Error, "CrawlZeroPay", "CrawlZeroPay Parse Fail");
break;
}
JToken zeroTotal;
if (!zeroJson.TryGetValue("totalCnt", out zeroTotal) || pointerIndex >= zeroTotal.Value<int>())
{
LogManager.NewLog(LogType.WindowManager, LogLevel.Info, "CrawlZeroPay", "CrawlZeroPay Parse Checked",
$"Size : {zeroTotal}, SiDo : {SiDoDictionary.FirstOrDefault(x => x.Value == CrawlManager.FilterSiDo).Key}, " +
$"SiGunGu : {SiGunGuDictionary[FilterSiDo].FirstOrDefault(x => x.Value == CrawlManager.FilterSiGunGu).Key}");
break;
}
JToken zeroList;
if (!zeroJson.TryGetValue("list", out zeroList) || (zeroList as JArray).Count == 0)
{
LogManager.NewLog(LogType.WindowManager, LogLevel.Info, "CrawlZeroPay", "CrawlZeroPay Parse Empty",
$"Size : {zeroTotal}, SiDo : {SiDoDictionary.FirstOrDefault(x => x.Value == CrawlManager.FilterSiDo).Key}, " +
$"SiGunGu : {SiGunGuDictionary[FilterSiDo].FirstOrDefault(x => x.Value == CrawlManager.FilterSiGunGu).Key}");
break;
}
int zeroListCount = zeroList.Count();
for (int i = 0; i < zeroListCount; i++)
{
JToken zeroObject = zeroList[i];
CrawlData zeroData = new CrawlData();
zeroData.Name = zeroObject["pobsAfstrName"].Value<string>();
zeroData.Type = zeroObject["bztypName"].Value<string>();
string zeroAddress = zeroObject["pobsBaseAddr"].Value<string>();
zeroAddress += " " + zeroObject["pobsDtlAddr"].Value<string>();
zeroAddress = zeroAddress.Replace(" ", " ");
try
{
string[] zeroAddressArray = zeroAddress.Split(' ');
zeroData.AddressSiDo = zeroAddressArray[0];
zeroData.AddressSiGunGu = zeroAddressArray[1];
zeroData.Address = zeroAddress.Substring(zeroAddressArray[0].Length + zeroAddressArray[1].Length + 2);
}
catch (Exception exception)
{
zeroData.AddressSiDo = string.Empty;
zeroData.AddressSiGunGu = string.Empty;
zeroData.Address = zeroAddress;
}
zeroData.CodeSido = GetCodeBySido(zeroData.AddressSiDo);
zeroData.CodeSigungu = GetCodeBySigungu(zeroData.CodeSido, zeroData.AddressSiGunGu);
zeroData.Status = CrawlDataResult.Ready;
CrawlingData.Add(zeroData);
}
}
catch (Exception exception)
{
LogManager.NewLog(LogType.WindowManager, LogLevel.Error, "CrawlZeroPay", "CrawlZeroPay Parse Error", exception.StackTrace);
break;
}
pointerIndex += 10;
Application.Current.Dispatcher?.BeginInvoke(DispatcherPriority.Normal, new Action(WindowManager.UpdateCrawlData));
}
}
public static int GetCodeBySido(string sido)
{
if (sido == null || sido.Trim().Length == 0) return 0;
// CHECK 1 = PERFECT EQUALISM
foreach (var sidoData in SiDoDictionary)
{
if (sidoData.Key.Trim().Equals(sido.Trim()))
{
return sidoData.Value;
}
}
// CHECK 2 = EQUALISM WITHOUT TAG
foreach (var sidoData in SiDoDictionary)
{
string pureKey = sidoData.Key
.Replace("특별시", "")
.Replace("광역시", "")
.Replace("특별자치도", "도")
.Replace("특별자치시", "시");
if (pureKey.EndsWith("시")) pureKey = pureKey.Substring(0, pureKey.Length - 1);
if (pureKey.EndsWith("도")) pureKey = pureKey.Substring(0, pureKey.Length - 1);
string pureInput = sido
.Replace("특별시", "")
.Replace("광역시", "")
.Replace("특별자치도", "도")
.Replace("특별자치시", "시");
if (pureInput.EndsWith("시")) pureInput = pureInput.Substring(0, pureInput.Length - 1);
if (pureInput.EndsWith("도")) pureInput = pureInput.Substring(0, pureInput.Length - 1);
if (pureKey.Trim().Equals(pureInput.Trim()))
{
return sidoData.Value;
}
}
// CHECK 3 = CONTAINING CHECK
foreach (var sidoData in SiDoDictionary)
{
string pureKey = sidoData.Key
.Replace("특별시", "")
.Replace("광역시", "")
.Replace("특별자치도", "도")
.Replace("특별자치시", "시");
if (pureKey.EndsWith("시")) pureKey = pureKey.Substring(0, pureKey.Length - 1);
if (pureKey.EndsWith("도")) pureKey = pureKey.Substring(0, pureKey.Length - 1);
string pureInput = sido
.Replace("특별시", "")
.Replace("광역시", "")
.Replace("특별자치도", "도")
.Replace("특별자치시", "시");
if (pureInput.EndsWith("시")) pureInput = pureInput.Substring(0, pureInput.Length - 1);
if (pureInput.EndsWith("도")) pureInput = pureInput.Substring(0, pureInput.Length - 1);
if (pureKey.Trim().Contains(pureInput.Trim()))
{
return sidoData.Value;
}
if (pureInput.Trim().Contains(pureKey.Trim()))
{
return sidoData.Value;
}
}
return 0;
}
public static int GetCodeBySigungu(int sido, string sigungu)
{
if (sigungu == null || sigungu.Trim().Length == 0) return 0;
if (sido == 0 || sido > SiGunGuDictionary.Count) return 0;
// CHECK 1 = PERFECT EQUALISM
foreach (var sigunguData in SiGunGuDictionary[sido])
{
if (sigunguData.Key.Trim().Equals(sigungu.Trim()))
{
return sigunguData.Value;
}
}
// CHECK 2 = EQUALISM WITHOUT TAG
foreach (var sigunguData in SiGunGuDictionary[sido])
{
string pureKey = sigunguData.Key
.Replace("특별시", "")
.Replace("광역시", "")
.Replace("특별자치도", "도")
.Replace("특별자치시", "시");
if (pureKey.EndsWith("시")) pureKey = pureKey.Substring(0, pureKey.Length - 1);
if (pureKey.EndsWith("도")) pureKey = pureKey.Substring(0, pureKey.Length - 1);
string pureInput = sigungu
.Replace("특별시", "")
.Replace("광역시", "")
.Replace("특별자치도", "도")
.Replace("특별자치시", "시");
if (pureInput.EndsWith("시")) pureInput = pureInput.Substring(0, pureInput.Length - 1);
if (pureInput.EndsWith("도")) pureInput = pureInput.Substring(0, pureInput.Length - 1);
if (pureKey.Trim().Equals(pureInput.Trim()))
{
return sigunguData.Value;
}
}
// CHECK 3 = CONTAINING CHECK
foreach (var sigunguData in SiGunGuDictionary[sido])
{
string pureKey = sigunguData.Key
.Replace("특별시", "")
.Replace("광역시", "")
.Replace("특별자치도", "도")
.Replace("특별자치시", "시");
if (pureKey.EndsWith("시")) pureKey = pureKey.Substring(0, pureKey.Length - 1);
if (pureKey.EndsWith("도")) pureKey = pureKey.Substring(0, pureKey.Length - 1);
string pureInput = sigungu
.Replace("특별시", "")
.Replace("광역시", "")
.Replace("특별자치도", "도")
.Replace("특별자치시", "시");
if (pureInput.EndsWith("시")) pureInput = pureInput.Substring(0, pureInput.Length - 1);
if (pureInput.EndsWith("도")) pureInput = pureInput.Substring(0, pureInput.Length - 1);
if (pureKey.Trim().Contains(pureInput.Trim()))
{
return sigunguData.Value;
}
if (pureInput.Trim().Contains(pureKey.Trim()))
{
return sigunguData.Value;
}
}
return 0;
}
public static void InitializeZeroPayData()
{
SiDoDictionary.Add("서울특별시", 1);
SiDoDictionary.Add("부산광역시", 2);
SiDoDictionary.Add("울산광역시", 3);
SiDoDictionary.Add("인천광역시", 4);
SiDoDictionary.Add("대구광역시", 5);
SiDoDictionary.Add("대전광역시", 6);
SiDoDictionary.Add("광주광역시", 7);
SiDoDictionary.Add("경기도", 8);
SiDoDictionary.Add("강원도", 9);
SiDoDictionary.Add("충청북도", 10);
SiDoDictionary.Add("충청남도", 11);
SiDoDictionary.Add("경상북도", 12);
SiDoDictionary.Add("경상남도", 13);
SiDoDictionary.Add("전라북도", 14);
SiDoDictionary.Add("전라남도", 15);
SiDoDictionary.Add("제주특별자치도", 16);
SiDoDictionary.Add("세종특별자치시", 17);
Dictionary<string, int> subDictionary1 = new Dictionary<string, int>();
Dictionary<string, int> subDictionary2 = new Dictionary<string, int>();
Dictionary<string, int> subDictionary3 = new Dictionary<string, int>();
Dictionary<string, int> subDictionary4 = new Dictionary<string, int>();
Dictionary<string, int> subDictionary5 = new Dictionary<string, int>();
Dictionary<string, int> subDictionary6 = new Dictionary<string, int>();
Dictionary<string, int> subDictionary7 = new Dictionary<string, int>();
Dictionary<string, int> subDictionary8 = new Dictionary<string, int>();
Dictionary<string, int> subDictionary9 = new Dictionary<string, int>();
Dictionary<string, int> subDictionary10 = new Dictionary<string, int>();
Dictionary<string, int> subDictionary11 = new Dictionary<string, int>();
Dictionary<string, int> subDictionary12 = new Dictionary<string, int>();
Dictionary<string, int> subDictionary13 = new Dictionary<string, int>();
Dictionary<string, int> subDictionary14 = new Dictionary<string, int>();
Dictionary<string, int> subDictionary15 = new Dictionary<string, int>();
Dictionary<string, int> subDictionary16 = new Dictionary<string, int>();
Dictionary<string, int> subDictionary17 = new Dictionary<string, int>();
SiGunGuDictionary.Add(1, subDictionary1);
SiGunGuDictionary.Add(2, subDictionary2);
SiGunGuDictionary.Add(3, subDictionary3);
SiGunGuDictionary.Add(4, subDictionary4);
SiGunGuDictionary.Add(5, subDictionary5);
SiGunGuDictionary.Add(6, subDictionary6);
SiGunGuDictionary.Add(7, subDictionary7);
SiGunGuDictionary.Add(8, subDictionary8);
SiGunGuDictionary.Add(9, subDictionary9);
SiGunGuDictionary.Add(10, subDictionary10);
SiGunGuDictionary.Add(11, subDictionary11);
SiGunGuDictionary.Add(12, subDictionary12);
SiGunGuDictionary.Add(13, subDictionary13);
SiGunGuDictionary.Add(14, subDictionary14);
SiGunGuDictionary.Add(15, subDictionary15);
SiGunGuDictionary.Add(16, subDictionary16);
SiGunGuDictionary.Add(17, subDictionary17);
subDictionary1.Add("전체", 0);
subDictionary1.Add("강남구", 1);
subDictionary1.Add("강동구", 2);
subDictionary1.Add("강북구", 3);
subDictionary1.Add("강서구", 4);
subDictionary1.Add("관악구", 5);
subDictionary1.Add("광진구", 6);
subDictionary1.Add("구로구", 7);
subDictionary1.Add("금천구", 8);
subDictionary1.Add("노원구", 9);
subDictionary1.Add("도봉구", 10);
subDictionary1.Add("동대문구", 11);
subDictionary1.Add("동작구", 12);
subDictionary1.Add("마포구", 13);
subDictionary1.Add("서대문구", 14);
subDictionary1.Add("서초구", 15);
subDictionary1.Add("성동구", 16);
subDictionary1.Add("성북구", 17);
subDictionary1.Add("송파구", 18);
subDictionary1.Add("양천구", 19);
subDictionary1.Add("영등포구", 20);
subDictionary1.Add("용산구", 21);
subDictionary1.Add("은평구", 22);
subDictionary1.Add("종로구", 23);
subDictionary1.Add("중구", 24);
subDictionary1.Add("중랑구", 25);
subDictionary2.Add("전체", 0);
subDictionary2.Add("강서구", 1);
subDictionary2.Add("금정구", 2);
subDictionary2.Add("기장군", 3);
subDictionary2.Add("남구", 4);
subDictionary2.Add("동구", 5);
subDictionary2.Add("동래구", 6);
subDictionary2.Add("부산진구", 7);
subDictionary2.Add("북구", 8);
subDictionary2.Add("사상구", 9);
subDictionary2.Add("사하구", 10);
subDictionary2.Add("서구", 11);
subDictionary2.Add("수영구", 12);
subDictionary2.Add("연제구", 13);
subDictionary2.Add("영도구", 14);
subDictionary2.Add("중구", 15);
subDictionary2.Add("해운대구", 16);
subDictionary3.Add("전체", 0);
subDictionary3.Add("남구", 1);
subDictionary3.Add("동구", 2);
subDictionary3.Add("북구", 3);
subDictionary3.Add("울주군", 4);
subDictionary3.Add("중구", 5);
subDictionary4.Add("전체", 0);
subDictionary4.Add("강화군", 1);
subDictionary4.Add("계양구", 2);
subDictionary4.Add("남동구", 3);
subDictionary4.Add("동구", 4);
subDictionary4.Add("미추홀구", 5);
subDictionary4.Add("부평구", 6);
subDictionary4.Add("서구", 7);
subDictionary4.Add("연수구", 8);
subDictionary4.Add("옹진군", 9);
subDictionary4.Add("중구", 10);
subDictionary5.Add("전체", 0);
subDictionary5.Add("남구", 1);
subDictionary5.Add("달서구", 2);
subDictionary5.Add("달성군", 3);
subDictionary5.Add("동구", 4);
subDictionary5.Add("북구", 5);
subDictionary5.Add("서구", 6);
subDictionary5.Add("수성구", 7);
subDictionary5.Add("중구", 8);
subDictionary6.Add("전체", 0);
subDictionary6.Add("대덕구", 1);
subDictionary6.Add("동구", 2);
subDictionary6.Add("서구", 3);
subDictionary6.Add("유성구", 4);
subDictionary6.Add("중구", 5);
subDictionary7.Add("전체", 0);
subDictionary7.Add("광산구", 1);
subDictionary7.Add("남구", 2);
subDictionary7.Add("동구", 3);
subDictionary7.Add("북구", 4);
subDictionary7.Add("서구", 5);
subDictionary8.Add("전체", 0);
subDictionary8.Add("가평군", 1);
subDictionary8.Add("고양시", 2);
subDictionary8.Add("과천시", 3);
subDictionary8.Add("광명시", 4);
subDictionary8.Add("광주시", 5);
subDictionary8.Add("구리시", 6);
subDictionary8.Add("군포시", 7);
subDictionary8.Add("김포시", 8);
subDictionary8.Add("남양주시", 9);
subDictionary8.Add("동두천시", 10);
subDictionary8.Add("부천시", 11);
subDictionary8.Add("성남시", 12);
subDictionary8.Add("수원시", 13);
subDictionary8.Add("시흥시", 14);
subDictionary8.Add("안산시", 15);
subDictionary8.Add("안성시", 16);
subDictionary8.Add("안양시", 17);
subDictionary8.Add("양주시", 18);
subDictionary8.Add("양평군", 19);
subDictionary8.Add("여주시", 20);
subDictionary8.Add("연천군", 21);
subDictionary8.Add("오산시", 22);
subDictionary8.Add("용인시", 23);
subDictionary8.Add("의왕시", 24);
subDictionary8.Add("의정부시", 25);
subDictionary8.Add("이천시", 26);
subDictionary8.Add("파주시", 27);
subDictionary8.Add("평택시", 28);
subDictionary8.Add("포천시", 29);
subDictionary8.Add("하남시", 30);
subDictionary8.Add("화성시", 31);
subDictionary9.Add("전체", 0);
subDictionary9.Add("강릉시", 1);
subDictionary9.Add("고성군", 2);
subDictionary9.Add("동해시", 3);
subDictionary9.Add("삼척시", 4);
subDictionary9.Add("속초시", 5);
subDictionary9.Add("양구군", 6);
subDictionary9.Add("양양군", 7);
subDictionary9.Add("영월군", 8);
subDictionary9.Add("원주시", 9);
subDictionary9.Add("인제군", 10);
subDictionary9.Add("정선군", 11);
subDictionary9.Add("철원군", 12);
subDictionary9.Add("춘천시", 13);
subDictionary9.Add("태백시", 14);
subDictionary9.Add("평창군", 15);
subDictionary9.Add("홍천군", 16);
subDictionary9.Add("화천군", 17);
subDictionary9.Add("횡성군", 18);
subDictionary10.Add("전체", 0);
subDictionary10.Add("괴산군", 1);
subDictionary10.Add("단양군", 2);
subDictionary10.Add("보은군", 3);
subDictionary10.Add("영동군", 4);
subDictionary10.Add("옥천군", 5);
subDictionary10.Add("음성군", 6);
subDictionary10.Add("제천시", 7);
subDictionary10.Add("증평군", 8);
subDictionary10.Add("진천군", 9);
subDictionary10.Add("청주시", 10);
subDictionary10.Add("충주시", 11);
subDictionary11.Add("전체", 0);
subDictionary11.Add("계룡시", 1);
subDictionary11.Add("공주시", 2);
subDictionary11.Add("금산군", 3);
subDictionary11.Add("논산시", 4);
subDictionary11.Add("당진시", 5);
subDictionary11.Add("보령시", 6);
subDictionary11.Add("부여군", 7);
subDictionary11.Add("서산시", 8);
subDictionary11.Add("서천군", 9);
subDictionary11.Add("아산시", 10);
subDictionary11.Add("예산군", 11);
subDictionary11.Add("천안시", 12);
subDictionary11.Add("청양군", 13);
subDictionary11.Add("태안군", 14);
subDictionary11.Add("홍성군", 15);
subDictionary12.Add("전체", 0);
subDictionary12.Add("경산시", 1);
subDictionary12.Add("경주시", 2);
subDictionary12.Add("고령군", 3);
subDictionary12.Add("구미시", 4);
subDictionary12.Add("군위군", 5);
subDictionary12.Add("김천시", 6);
subDictionary12.Add("문경시", 7);
subDictionary12.Add("봉화군", 8);
subDictionary12.Add("상주시", 9);
subDictionary12.Add("성주군", 10);
subDictionary12.Add("안동시", 11);
subDictionary12.Add("영덕군", 12);
subDictionary12.Add("영양군", 13);
subDictionary12.Add("영주시", 14);
subDictionary12.Add("영천시", 15);
subDictionary12.Add("예천군", 16);
subDictionary12.Add("울릉군", 17);
subDictionary12.Add("울진군", 18);
subDictionary12.Add("의성군", 19);
subDictionary12.Add("청도군", 20);
subDictionary12.Add("청송군", 21);
subDictionary12.Add("칠곡군", 22);
subDictionary12.Add("포항시", 23);
subDictionary13.Add("전체", 0);
subDictionary13.Add("거제시", 1);
subDictionary13.Add("거창군", 2);
subDictionary13.Add("고성군", 3);
subDictionary13.Add("김해시", 4);
subDictionary13.Add("남해군", 5);
subDictionary13.Add("밀양시", 6);
subDictionary13.Add("사천시", 7);
subDictionary13.Add("산청군", 8);
subDictionary13.Add("양산시", 9);
subDictionary13.Add("의령군", 10);
subDictionary13.Add("진주시", 11);
subDictionary13.Add("창녕군", 12);
subDictionary13.Add("창원시", 13);
subDictionary13.Add("통영시", 14);
subDictionary13.Add("하동군", 15);
subDictionary13.Add("함안군", 16);
subDictionary13.Add("함양군", 17);
subDictionary13.Add("합천군", 18);
subDictionary14.Add("전체", 0);
subDictionary14.Add("고창군", 1);
subDictionary14.Add("군산시", 2);
subDictionary14.Add("김제시", 3);
subDictionary14.Add("남원시", 4);
subDictionary14.Add("무주군", 5);
subDictionary14.Add("부안군", 6);
subDictionary14.Add("순창군", 7);
subDictionary14.Add("완주군", 8);
subDictionary14.Add("익산시", 9);
subDictionary14.Add("임실군", 10);
subDictionary14.Add("장수군", 11);
subDictionary14.Add("전주시", 12);
subDictionary14.Add("정읍시", 13);
subDictionary14.Add("진안군", 14);
subDictionary15.Add("전체", 0);
subDictionary15.Add("강진군", 1);
subDictionary15.Add("고흥군", 2);
subDictionary15.Add("곡성군", 3);
subDictionary15.Add("광양시", 4);
subDictionary15.Add("구례군", 5);
subDictionary15.Add("나주시", 6);
subDictionary15.Add("담양군", 7);
subDictionary15.Add("목포시", 8);
subDictionary15.Add("무안군", 9);
subDictionary15.Add("보성군", 10);
subDictionary15.Add("순천시", 11);
subDictionary15.Add("신안군", 12);
subDictionary15.Add("여수시", 13);
subDictionary15.Add("영광군", 14);
subDictionary15.Add("영암군", 15);
subDictionary15.Add("완도군", 16);
subDictionary15.Add("장성군", 17);
subDictionary15.Add("장흥군", 18);
subDictionary15.Add("진도군", 19);
subDictionary15.Add("함평군", 20);
subDictionary15.Add("해남군", 21);
subDictionary15.Add("화순군", 22);
subDictionary16.Add("전체", 0);
subDictionary16.Add("서귀포시", 1);
subDictionary16.Add("제주시", 2);
subDictionary17.Add("전체", 0);
TypeDictionary.Add("전체", false);
TypeDictionary.Add("건어물", true);
TypeDictionary.Add("마트", true);
TypeDictionary.Add("문구", true);
TypeDictionary.Add("미용", true);
TypeDictionary.Add("병원", true);
TypeDictionary.Add("부동산", true);
TypeDictionary.Add("분식", true);
TypeDictionary.Add("생화", true);
TypeDictionary.Add("생활용품", true);
TypeDictionary.Add("수산물", true);
TypeDictionary.Add("슈퍼", true);
TypeDictionary.Add("식육", true);
TypeDictionary.Add("안경", true);
TypeDictionary.Add("약국", true);
TypeDictionary.Add("양식", true);
TypeDictionary.Add("어린이집", true);
TypeDictionary.Add("유통", true);
TypeDictionary.Add("음식", true);
TypeDictionary.Add("의류", true);
TypeDictionary.Add("일식", true);
TypeDictionary.Add("잡화", true);
TypeDictionary.Add("전자상거래", true);
TypeDictionary.Add("정비", true);
TypeDictionary.Add("제과", true);
TypeDictionary.Add("주류", true);
TypeDictionary.Add("주유", true);
TypeDictionary.Add("중식", true);
TypeDictionary.Add("치과", true);
TypeDictionary.Add("치킨", true);
TypeDictionary.Add("카페", true);
TypeDictionary.Add("커피", true);
TypeDictionary.Add("편의점", true);
TypeDictionary.Add("피자", true);
TypeDictionary.Add("학원", true);
TypeDictionary.Add("한식", true);
TypeDictionary.Add("한의원", true);
TypeDictionary.Add("호프", true);
TypeDictionary.Add("화장품", true);
TypeDictionary.Add("휴게음식", true);
}
}
}