zsh_root
2024-01-02 7b595546af704983dbafcd0d385c8768ddacefc2
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
package fence;
import java.awt.geom.Point2D;
import java.util.Iterator;
import java.util.List;
import java.util.Vector;
import DataBase.DatabaseManagement;
import Judge.JugeNumber;
import Method.GetNowTime;
import PbuliClass.ShowMessage;
import PbuliClass.Systems;
import home.Open_soft_dialog;
import task.Dell_task;
import tbDataModel.TbFence;
import tbDataModel.Yuan_xing;
import tbDataModel_Dell.Dell_Fenceinout;
import tbDataModel_Dell.Dell_Polygon;
 
/**ËùÓÐΧÀ¸¶ÔÏóµÄ¼¯ºÏ*/
@SuppressWarnings("rawtypes")
public class Fences {
    public static Vector<TbFence> fences=new Vector<TbFence>();//ΧÀ¸¶ÔÏóµÄ¼¯ºÏ
    static Vector<TbFence> kaoqing_fences=new Vector<TbFence>();//ËùÓп¼ÇÚÇøÓòµÄ¼¯ºÏ
    static Vector<TbFence> shiping_fences=new Vector<TbFence>();//ËùÓÐÊÓÆµÇøÓòµÄ¼¯ºÏ
    static Vector<TbFence> warning_fences=new Vector<TbFence>();//ËùÓнøÈ뾯ÓòµÄ¼¯ºÏ
    static Vector<TbFence> warning_outfences=new Vector<TbFence>();//ËùÓгöÈ¥¾¯ÓòµÄ¼¯ºÏ
    static Vector<TbFence> xunjian_fences=new Vector<TbFence>();//ËùÓÐѲ¼ìÇøÓòµÄ¼¯ºÏ
    static Vector<TbFence> outfence_baidu=new Vector<TbFence>();//°Ù¶ÈµØÍ¼³öÈ¥¸æ¾¯ÇøÓòµÄ¼¯ºÏ
    static Vector<TbFence> infence_baidu=new Vector<TbFence>();//°Ù¶ÈµØÍ¼½øÈë¸æ¾¯ÇøÓòµÄ¼¯ºÏ
    static Vector<TbFence> shinei_fences=new Vector<TbFence>();//ËùÓÐÊÒÄÚÇøÓò¼¯ºÏ
    static Vector<TbFence> outbianz_fences=new Vector<TbFence>();//ËùÓгö±äµçÕ¾ÇøÓò¼¯ºÏ
    static Vector<TbFence> zuoye_fences=new Vector<TbFence>();//×÷񵂿Óò
    static Vector<TbFence> chaoshi_numandtiem_fences=new Vector<TbFence>();//³¬Ê±³¬Ô±ÇøÓò
    static Vector<TbFence> chaoyuan_fences=new Vector<TbFence>();//³¬Ê±ÇøÓò
    static Vector<TbFence> chaoshi_fences=new Vector<TbFence>();//³¬Ô±ÇøÓò
    static Vector<TbFence> indoor_fences=new Vector<TbFence>();//½øÃŸ澯
    static Vector<TbFence> outdoor_fences=new Vector<TbFence>();//³öß澯
    static int a=0;
 
    static  {
        Open_soft_dialog.addara("¼ÓÔØtb_fence");
        Iterator iterator = DatabaseManagement.get_alldate_indatabase("tb_fence").iterator();
        while (iterator.hasNext()) {//µü´úÆ÷´æÔÚÔªËØ
            Vector<Point2D.Double> pts = new Vector<Point2D.Double>();            
            List info = (List) iterator.next();//½«µü´úÆ÷ÀïÃæµÄÔªËØ¸øµ½info¼¯ºÏ
            int size=info.size();
            TbFence fence=new TbFence();
            String floor=(String)info.get(1);
            fence.setFloor(floor);
            String type=(String)info.get(2);
            if(type.equals("×÷񵂿Óò")) {
                if(a==0) {                    
                    Dell_task.chushihua_tb_task_data();//³õʼ»¯ÈÎÎñ
                    a=1;
                }
            }
            fence.setType(type);
            fence.setBumen((String)info.get(3));
            String name=(String)info.get(4);
            fence.setName(name);
            fence.setZuobiao((String)info.get(5));
            String zuobiao=(String)info.get(5);//×ø±ê×Ö·û´®
            fence.setShape((String)info.get(6));
            String  shape=(String)info.get(6);//ΧÀ¸ÐÎ×´
            String ju_xing="¾ØÐÎ";
            fence.setStart((String)info.get(7));
            fence.setStop((String)info.get(8));
            fence.setAddtime((String)info.get(9));
            fence.setColor((String)info.get(10));            
            if(size<13) {
                ShowMessage.zidingyi_24("tb_fenceȱÉÙ×Ö¶Îbaoliu1");//ΧÀ¸¸ß¶È
            }
            if(type.equals("³¬Ô±±¨¾¯")||type.equals("³¬Ê±±¨¾¯")) {
                String baoliu2=(String)info.get(12);//ΧÀ¸ÏÞÖÆµÄÈËÊý
                String baoliu3=(String)info.get(13);//ΧÀ¸ÏÞÖÆÍ£ÁôµÄʱ¼ä
                if(baoliu2==null) {
                    baoliu2="ÎÞÏÞÖÆ";
                }
                if(baoliu3==null) {
                    baoliu3="ÎÞÏÞÖÆ";
                }
                fence.setBaoliu2(baoliu2);
                fence.setBaoliu3(baoliu3);
            }
 
            if(Systems.isBiandianzhan()) {
                fence.setBaoliu6((String)info.get(16));//baoliu6±äµçվģʽ³õʼº£°Î¸ß¶È                
            }
            String baoliu7=(String)info.get(17);
            if(baoliu7==null) {
                baoliu7="0";
            }
            fence.setBaoliu7(baoliu7);//ÊÇ·ñÆôÓÃΧÀ¸
            String height=(String)info.get(11);
            if(height==null || height.equals("")) {
                height="100000";
            }
 
            if(JugeNumber.hasLetter(height)) {
                ShowMessage.zidingyi_24(name+"¸ß¶È²»ÕýÈ·"+height);
            }
 
            double h=Double.parseDouble(height);
            fence.setHeight(h);
            if(ju_xing.equals(shape)) {
                String[] zb=zuobiao.split("\\,");//ÓöººÅ·Ö¸î
                double x0=Double.parseDouble(zb[0]);
                double y0=Double.parseDouble(zb[1]);
                double x2=Double.parseDouble(zb[2]);
                double y2=Double.parseDouble(zb[3]);
                double x1=x2;
                double y1=y0;
                double x3=x0;
                double y3=y2;
                Point2D.Double p0 = new Point2D.Double(x0,y0);
                Point2D.Double p1 = new Point2D.Double(x1,y1);
                Point2D.Double p2 = new Point2D.Double(x2,y2);
                Point2D.Double p3 = new Point2D.Double(x3,y3);
                pts.add(p0); 
                pts.add(p1); 
                pts.add(p2); 
                pts.add(p3); 
            }else if(shape.equals("¶à±ßÐÎ")) {
                String[] zb=zuobiao.split("\\;");//ÓöººÅ·Ö¸î
                int bian=zb.length-1;
                for(int i=0;i<=bian;i++) {
                    String zbxy=zb[i];
                    String[] xy=zbxy.split("\\,");//ÒÔ¡°,¡±·Ö¸î×Ö·û´®´Ó¶ø»ñµÃÿ¸öµãµÄxºÍy    
                    Point2D.Double p = new Point2D.Double(Double.parseDouble(xy[0]),Double.parseDouble(xy[1]));
                    pts.add(p);                    
                }
 
            }else if(shape.equals("Ô²ÐÎ")) {
                String[] zb=zuobiao.split("\\,");//ÓöººÅ·Ö¸î
                double x=Double.parseDouble(zb[0]);
                double y=Double.parseDouble(zb[1]);
                double r=Double.parseDouble(zb[2]);
                Yuan_xing yx=new Yuan_xing();
                yx.setX(x);
                yx.setY(y);
                yx.setR(r);
                fence.setYuan_x(yx);
                
            }
            fence.setPts(pts);
            String baoliu10=(String)info.get(20);
            String baoliu11=(String)info.get(21);
            String baoliu12=(String)info.get(22);
            if(baoliu10==null) {
                baoliu10="0";
            }
            if(baoliu11==null) {
                baoliu11="-1";
            }
            if(baoliu12==null) {
                baoliu12="-1";
            }
            fence.setBaoliu10(baoliu10);//ÊÇ·ñ¶ÔËùÓÐͼ²ãÉúЧ
            fence.setBaoliu11(baoliu11);//ΧÀ¸¶¥²¿¸ß
            fence.setBaoliu12(baoliu12);//ÊÇ·ñµ×²¿¸ß
            addfc(type,fence,floor);
            fences.add(fence);
        }
    }
 
 
    public static void addfc(String type,TbFence fence,String floor) {
        switch(type){
        case "¿¼ÇÚÇøÓò" :
            kaoqing_fences.add(fence);
            break; 
        case "ÊÓÆµÇøÓò" :
            shiping_fences.add(fence);
            break; 
        case "½øÈë¸æ¾¯" :
            if(floor.equals("°Ù¶ÈµØÍ¼")) {
                infence_baidu.add(fence);
            }else {
                warning_fences.add(fence);
            }
            break; 
        case "³öÈ¥¸æ¾¯" :
            if(floor.equals("°Ù¶ÈµØÍ¼")) {
                outfence_baidu.add(fence);
            }else {
                warning_outfences.add(fence);
            }
            break; 
        case "Ѳ¼ìÇøÓò" :
            xunjian_fences.add(fence);
            break;
        case "ÊÒÄÚÇøÓò" :
            shinei_fences.add(fence);
            break;
        case "±äµçÕ¾" :
            outbianz_fences.add(fence);
            break;
        case "³¬Ô±±¨¾¯":
            chaoshi_numandtiem_fences.add(fence);
            chaoyuan_fences.add(fence);
            break;
        case "³¬Ê±±¨¾¯":
            chaoshi_numandtiem_fences.add(fence);
            chaoshi_fences.add(fence);
            break;
        case "×÷񵂿Óò":
            zuoye_fences.add(fence);
            break;
        case "½øÃŸ澯":
            indoor_fences.add(fence);
            break;
        case "³öß澯":
            outdoor_fences.add(fence);
            break;
 
        default : 
 
        }
    }
 
    /**ͨ¹ýΧÀ¸Ãû³ÆÕÒµ½Ä³¸öΧÀ¸¶ÔÏó*/
    public static TbFence get_fence(String fence_name) {
        TbFence tbfence=null;
        if(fences.size() !=0) {
            Iterator<TbFence> iterator = fences.iterator();
            while(iterator.hasNext()) {
                TbFence tbfence1=iterator.next();
                if(tbfence1.getName().equals(fence_name)) {
                    tbfence=tbfence1;
                    break;
                }
            }
        }
        return tbfence;
    }
 
 
 
 
    /**ͨ¹ýÃû³ÆËÑË÷ΧÀ¸*/
    public static Vector<TbFence>  get_fences(String fence_name) {
        Vector<TbFence> fences1=new Vector<TbFence>();
        for(int i=0;i<fences.size();i++) {
            String name=fences.get(i).getName();
            String a1=fences.get(i).getFloor();
            String a2=fences.get(i).getType();
            if(name.equals(fence_name) || a1.equals(fence_name) ||a2.equals(fence_name)) {
                fences1.add(fences.get(i));
            }
        }        
        return fences1;
    }
 
 
    /**»ñÈ¡ËùÓеÄΧÀ¸¶ÔÏó*/
    public  static Vector<TbFence>  getFeces(){    
        return fences;
    }
 
 
 
    /**»ñȡijһ²ãµÄ¿¼ÇÚÇøÓò*/
    public static Vector<TbFence> get_kaoqing_fences(String floor){
        Vector<TbFence> kqfcm=null;
        int size=kaoqing_fences.size();
        if(size !=0) {
            kqfcm=new Vector<TbFence>();
            for(int i=0;i<size;i++) {
                TbFence tbf=kaoqing_fences.get(i);
                String floor1=tbf.getFloor();
                if(floor1.equals(floor)) {
                    kqfcm.add(tbf);
                }
            }
        }
        return kqfcm;
    }
 
    /**»ñÈ¡¿¼ÇÚÇøÓòµç×ÓΧÀ¸µÄµÄ×ÜÊý*/
    public  static int getkaoqing_fence_num() {
        int num =kaoqing_fences.size();
        return num;
    }
 
 
    /**»ñȡij¸ö¿¼ÇÚÇøÓòÃû³Æ*/
    public static String kaoqing_name(int i) {
        String kaoding_name=null;
        if(kaoqing_fences.size() !=0) {
            TbFence tb_fence=kaoqing_fences.get(i);
            kaoding_name=tb_fence.getName();
        }
        return kaoding_name;
    }
 
 
 
    /**»ñȡijÖÖΧÀ¸ÇøÓòµÄ¼¯ºÏ
     * @param fencetypeΧÀ¸µÄÀàÐÍ*/
    public static Vector<TbFence> get_fence_vector(String fencetype){
        Vector<TbFence> inwarning_fences=new Vector<TbFence>();
        Iterator<TbFence> it= fences.iterator();//½«µü´úÆ÷ÀïÃæµÄÔªËØ¸øµ½info¼¯ºÏ
        while (it.hasNext()) {//µü´úÆ÷´æÔÚÔªËØ            
            TbFence tbfence=it.next();  
            String type=tbfence.getType();
            if(type.equals(fencetype)) {
                inwarning_fences.add(tbfence);
            }
        }
        return inwarning_fences;    
    }
 
    /**ÐÂÔöÒ»¸öµç×ÓΧÀ¸¶ÔÏó*/    
    public static void add_tbfence(String floor,String type,String bumen,String name,
            String zuobiao,String shape,String start,String stop,
            String addtime,String color,String datafrom,String allFloor) {
        if(get_fence(name)==null) {
            TbFence fence=new TbFence();
            Vector<Point2D.Double> pts1 = new Vector<Point2D.Double>();    
            if(datafrom.equals("BS")) {//Èç¹ûÊý¾ÝÀ´Ô´ÊÇBSƽ̨·¢¹ýÀ´µÄÐèÒª°Ñ£ºÌ滻Ϊ£¬ºÅ
                zuobiao=zuobiao.replaceAll(":", ",");
            }
            String[] split = zuobiao.split(";");
            int length = split.length;
            for (int i = 0; i < length; i++) {
                String[] split1 = split[i].split(",");
                if (split1.length%2!=0){
                    ShowMessage.zidingyi("BSÐÂÔöµç×ÓΧÀ¸:"+name+"¸ñʽ²»ÕýÈ·");
                    return;
                }
            }
            fence.setFloor(floor);
            fence.setType(type);
            fence.setBumen(bumen);
            fence.setName(name);
            fence.setZuobiao(zuobiao);
            fence.setShape(shape);
            fence.setStart(start);
            fence.setStop(stop);
            fence.setColor(color);
            fence.setAddtime(addtime);
            fence.setBaoliu7("1");
            fence.setBaoliu10(allFloor);
            if(shape.equals("¾ØÐÎ")) {
                String[] zb=zuobiao.split("\\,");//ÓöººÅ·Ö¸î
                double x0=Double.parseDouble(zb[0]);
                double y0=Double.parseDouble(zb[1]);
                double x2=Double.parseDouble(zb[2]);
                double y2=Double.parseDouble(zb[3]);
                double x1=x2;
                double y1=y0;
                double x3=x0;
                double y3=y2;
                Point2D.Double p0 = new Point2D.Double(x0,y0);
                Point2D.Double p1 = new Point2D.Double(x1,y1);
                Point2D.Double p2 = new Point2D.Double(x2,y2);
                Point2D.Double p3 = new Point2D.Double(x3,y3);
                pts1.add(p0); 
                pts1.add(p1); 
                pts1.add(p2); 
                pts1.add(p3); 
            }else {
                String[] zb=zuobiao.split("\\;");//Ó÷ֺŷָî
                int bian=zb.length-1;
                for(int i=0;i<bian;i++) {
                    String zbxy=zb[i];
                    String[] xy=zbxy.split("\\,");//ÒÔ¡°,¡±·Ö¸î×Ö·û´®´Ó¶ø»ñµÃÿ¸öµãµÄxºÍy    
                    Point2D.Double p = new Point2D.Double(Double.parseDouble(xy[0]),Double.parseDouble(xy[1]));
                    pts1.add(p);
                }
 
            }
            fence.setPts(pts1);
            fences.add(fence);
            addfc(type,fence,floor);
            if(datafrom.equals("BS")) {
                Dell_Polygon.add_a_fence_tomap(floor, type, bumen, name, zuobiao, shape, start, stop, color,allFloor);
                String[]  ziduan= {"floor","type","bumen","name","zuobiao","shape","start","stop","addtime","color","baoliu10"};
                String[] zhi= {floor,type,bumen,name,zuobiao,shape,start,stop,GetNowTime.now(),color,allFloor};
                DatabaseManagement.insertfast("tb_fence", ziduan, zhi);
            }
            Dell_Polygon.add_a_fence_tomap(floor,type,bumen,name,zuobiao,shape,start,stop,color,allFloor);
        }
    }
 
 
    /**ɾ³ýÒ»¸öµç×ÓΧÀ¸¶ÔÏó»òÕßÈ«²¿Î§À¸¶ÔÏó*/
    public static void delete_fence(String name) {
        if(name.equals("ALL")) {
            fences.removeAllElements();
            kaoqing_fences.removeAllElements();
            shiping_fences.removeAllElements();
            warning_fences.removeAllElements();
            warning_outfences.removeAllElements();
            xunjian_fences.removeAllElements();
            outfence_baidu.removeAllElements();
            shinei_fences.removeAllElements();
            outbianz_fences.removeAllElements();
            zuoye_fences.removeAllElements();
            chaoshi_numandtiem_fences.removeAllElements();
            chaoyuan_fences.removeAllElements();
            chaoshi_fences.removeAllElements();
            indoor_fences.removeAllElements();
            outdoor_fences.removeAllElements();
            Dell_Fenceinout.getFinout_vec().removeAllElements();
            Dell_Polygon.delete_all();
 
        }else {
            TbFence tbf=get_fence(name);
            if(tbf !=null) {
                fences.removeElement(tbf);
                kaoqing_fences.removeElement(tbf);
                shiping_fences.removeElement(tbf);
                warning_fences.removeElement(tbf);
                warning_outfences.removeElement(tbf);
                xunjian_fences.removeElement(tbf);
                outfence_baidu.removeElement(tbf);
                shinei_fences.removeElement(tbf);
                outbianz_fences.removeElement(tbf);
                zuoye_fences.removeElement(tbf);
                chaoshi_numandtiem_fences.removeElement(tbf);
                chaoyuan_fences.removeElement(tbf);
                chaoshi_fences.removeElement(tbf);
                indoor_fences.removeElement(tbf);
                outdoor_fences.removeElement(tbf);
                Dell_Fenceinout.delte(name);
                Dell_Polygon.delete_a_PolygonNew(name);
            }
        }
    }
 
    /**ɾ³ýËùÓеĵç×ÓΧÀ¸¶ÔÏó*/
    public static void delete_all_fence() {
        int size=fences.size();
        if(size !=0) {
            fences.removeAllElements();
            kaoqing_fences.removeAllElements();
            shiping_fences.removeAllElements();
            warning_fences.removeAllElements();
            warning_outfences.removeAllElements();
            xunjian_fences.removeAllElements();
            outfence_baidu.removeAllElements();
            shinei_fences.removeAllElements();
            outbianz_fences.removeAllElements();
            zuoye_fences.removeAllElements();
            chaoshi_numandtiem_fences.removeAllElements();
            chaoyuan_fences.removeAllElements();
            chaoshi_fences.removeAllElements();
            indoor_fences.removeAllElements();
            outdoor_fences.removeAllElements();
            Dell_Fenceinout.getFinout_vec().removeAllElements();
            Dell_Polygon.delete_all();
        }
    }
 
    /**»ñȡijÖÖµç×ÓΧÀ¸ÇøÓò¼¯ºÏ*/
    public static String[] getfencesstr(String type) {
        Vector<String> a=new Vector<String>();
        String[] s=null;
        a.add("Ñ¡ÔñÇøÓò");
        int size=fences.size();
        if( size !=0) {
            for(int i=0;i<size;i++) {
                TbFence fc=fences.get(i);
                String type1=fc.getType();
                if(type.equals(type1)) {
                    String name=fc.getName();
                    a.add(name);
                }
            }
            int lenth=a.size();
            s=new String[lenth];
            for(int j=0;j<lenth;j++) {
                s[j]=a.get(j);
            }
        }else {
            s=new String[1];
            s[0]="Ñ¡ÔñÇøÓò";
        }
        return s;        
    }
 
 
 
    public static Vector<TbFence> getFences() {
        return fences;
    }
 
 
 
    /**»ñÈ¡ËùÓп¼ÇÚÇøÓòµÄ¼¯ºÏ*/
    public static Vector<TbFence> getKaoqing_fences() {
        return kaoqing_fences;
    }
 
 
    /**ÊÓÆµÇøÓò¼¯ºÏ*/
    public static Vector<TbFence> getShiping_fences() {
        return shiping_fences;
    }
 
 
    /**½øÈëÇøÓò¼¯ºÏ*/
    public static Vector<TbFence> getWarning_fences() {
        return warning_fences;
    }
 
 
    /**³öÈ¥¸æ¾¯ÇøÓò¼¯ºÏ*/
    public static Vector<TbFence> getWarning_outfences() {
        return warning_outfences;
    }
 
 
    /**Ѳ¼ìÇøÓò¼¯ºÏ*/
    public static Vector<TbFence> getXunjian_fences() {
        return xunjian_fences;
    }
 
 
    /**°Ù¶ÈµØÍ¼³öÇøÓò¸æ¾¯¼¯ºÏ*/
    public static Vector<TbFence> getOutfence_baidu() {
        return outfence_baidu;
    }
 
 
 
    public static Vector<TbFence> getShinei_fences() {
        return shinei_fences;
    }
 
 
 
    public static void setShinei_fences(Vector<TbFence> shinei_fences) {
        Fences.shinei_fences = shinei_fences;
    }
 
 
 
    public static Vector<TbFence> getOutbianz_fences() {
        return outbianz_fences;
    }
 
 
 
    public static void setOutbianz_fences(Vector<TbFence> outbianz_fences) {
        Fences.outbianz_fences = outbianz_fences;
    }
 
 
 
 
    public static Vector<TbFence> getZuoye_fences() {
        return zuoye_fences;
    }
 
 
 
 
    public static void setZuoye_fences(Vector<TbFence> zuoye_fences) {
        Fences.zuoye_fences = zuoye_fences;
    }
 
 
    /**ͨ¹ýΧÀ¸Ãû³ÆÕÒµ½×÷񵂿ÓòÖеÄΧÀ¸*/
    public static TbFence getzuoyefence(String fencename) {
        TbFence a=null;
        int size= zuoye_fences.size();
        for(int i=0;i<size;i++) {
            TbFence b=zuoye_fences.get(i);
            String name=b.getName();
            if(fencename.equals(name)) {
                a=b;
                break;
            }
        }
        return a;
    }
 
    /**³¬Ê±³¬Ô±ÇøÓò¼¯ºÏ*/
    public static Vector<TbFence> getChaoshi_numandtiem_fences() {
        return chaoshi_numandtiem_fences;
    }
 
    public static void setChaoshi_numandtiem_fences(Vector<TbFence> chaoshi_numandtiem_fences) {
        Fences.chaoshi_numandtiem_fences = chaoshi_numandtiem_fences;
    }
 
    /**Ð޸ij¬Ô±³¬Ê±Êý¾Ý*/
    public static int alert_num_timefence(String name,String baoliu2,String baoliu3) {
        int a=0;
        TbFence tbfence=get_fence(name);
        if(tbfence !=null) {
            String[] ziduan= {"baoliu2","baoliu3","name"};
            String[] zhi= {baoliu2,baoliu3,name};
            DatabaseManagement.fast_alert_dbase("tb_fence", ziduan, zhi);
            tbfence.setBaoliu2(baoliu2);
            tbfence.setBaoliu3(baoliu3);
            a=1;        
        }
        return a;
    }
 
    public static Vector<TbFence> getChaoyuan_fences() {
        return chaoyuan_fences;
    }
 
    public static Vector<TbFence> getChaoshi_fences() {
        return chaoshi_fences;
    }
 
    public static Vector<TbFence> getIndoor_fences() {
        return indoor_fences;
    }
 
    public static Vector<TbFence> getOutdoor_fences() {
        return outdoor_fences;
    }
 
    public static void setIndoor_fences(Vector<TbFence> indoor_fences) {
        Fences.indoor_fences = indoor_fences;
    }
 
    public static void setOutdoor_fences(Vector<TbFence> outdoor_fences) {
        Fences.outdoor_fences = outdoor_fences;
    }
 
    /**ÐÞ¸ÄΧÀ¸*/
    public static void alertfence(String name,String bumen,String start ,
            String stop,String zuobiao,String baoliu11,String baoliu12) {
        TbFence fc=get_fence(name);
        if(fc !=null) {
            fc.setBumen(bumen);
            fc.setStart(start);
            fc.setStop(stop);
            fc.setZuobiao(zuobiao);
            fc.setBaoliu11(baoliu11);
            fc.setBaoliu12(baoliu12);
        }
    }
 
    public static Vector<TbFence> getInfence_baidu() {
        return infence_baidu;
    }
 
    public static void setInfence_baidu(Vector<TbFence> infence_baidu) {
        Fences.infence_baidu = infence_baidu;
    }
}