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
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
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
package person;
import java.util.Iterator;
import java.util.List;
import java.util.Vector;
import javax.swing.ImageIcon;
import DataBase.DatabaseManagement;
import Judge.JugeNumber;
import Method.BaoWenShow;
import Method.ControTag;
import Method.GetNowTime;
import Method.InsertData;
import PbuliClass.Music;
import PbuliClass.ShowMessage;
import PbuliClass.Systems;
import home.Open_soft_dialog;
import jiekou.display;
import tag.Tag_Dell;
import tbDataModel_Dell.Department;
import tbDataModel_Dell.Department_Dell;
import tbDataModel_Dell.Tb_Warnig_Dell;
import urt.Urt_read;
@SuppressWarnings("rawtypes")
public class person_Dell {
    static Vector<Person> person_vector=new Vector<>();//ÈËÔ±µÄ¼¯ºÏµÄ¼¯ºÏ
    static Vector<Person> noinperson_vector=new Vector<>();//ÈËÔ±µÄ¼¯ºÏµÄ¼¯ºÏ    
    static {
        Open_soft_dialog.addara("¼ÓÔØtb_person");
        Iterator iterator = DatabaseManagement.table_AandD("tb_person","DESC").iterator();        
        while (iterator.hasNext()) {//µü´úÆ÷´æÔÚÔªËØ
            List info = (List) iterator.next();//½«µü´úÆ÷ÀïÃæµÄÔªËØ¸øµ½info¼¯ºÏ
            Person person=new Person();
            String name=(String)info.get(1);
            person.setP_name(name);//ÐÕÃû
            String tagid=(String)info.get(2);
            int tagid_int=Integer.parseInt(tagid,16);
            person.setTagidint(tagid_int);
            person.setP_tagid(tagid);//id
            person.setP_sex((String)info.get(3));//ÐÔ±ð
            person.setP_minzu((String)info.get(4));//Ãñ×å
            person.setP_phone((String)info.get(5));//µç»°
            String s1 = (String) info.get(6);
            person.setP_department(s1);//²¿ÃÅ
            person.setP_ban((String)info.get(7));//°à
            person.setP_zu((String)info.get(8));//×é
            person.setP_idcardnum((String)info.get(9));//Éí·ÝÖ¤ºÅ
            person.setP_adress((String)info.get(10));//µØÖ·
            person.setP_canin((String)info.get(11));//ÄܽøÈëÇøÓò
            String a=(String)info.get(12);
            String b=(String)info.get(13);            
            if(JugeNumber.hasLetter(a) || JugeNumber.hasLetter(b) ) {
                a="0";
                b="0";
                ShowMessage.zidingyi("´íÎ󣬱êÇ©"+(String)info.get(2)+"x="+a);
            }
            person.setP_x(Integer.parseInt((String)info.get(12)));//X×ø±ê
            person.setP_y(Integer.parseInt((String)info.get(13)));//y×ø±ê
            person.setP_floor((String)info.get(14));//ËùÔÚ²ã
            person.setP_sos((String)info.get(15));//SOS״̬
            String pwr=(String)info.get(17);
            if(pwr==null || pwr.equals("null")||pwr.equals("-1")) {
                pwr="δ֪";
            }
            person.setP_power(pwr);//±êÇ©µçÁ¿
            String infc=(String)info.get(19);
            if(infc==null || infc.length()>2) {
                infc="0";
            }
            person.setP_fence(infc);//ÊÇ·ñÔÚΧÀ¸ÇøÓò
            person.setP_fencename((String)info.get(20));//ËùÔÚΧÀ¸ÇøÓòÃû³Æ
            person.setP_kaoqqingname("");//ËùÔÚ¿¼ÇÚÇøÓòÃû³Æ
            Department dptm=Department_Dell.get_department(s1);
            if (dptm==null){                
                ShowMessage.zidingyi_24(tagid+","+name+",tb_person±í²¿ÃÅ"+s1+"²»´æÔÚ");
                break;
            }
            
            ImageIcon imgicon=dptm.getDepart_image();
            if(imgicon==null) {
                imgicon=new ImageIcon("image/targeticon/default.png");
            }
            person.setP_image(imgicon);//ͼƬ
            person.setP_addtiem((String)info.get(23));//Ìí¼Óʱ¼ä
            String s = (String) info.get(24);
            if (s==null){
                s="0";
            }
            person.setP_power_wanig(s);//±êÇ©µÍµçÁ¿¸æ¾¯×´Ì¬
            person.setP_sousuo((String)info.get(25));//±êÇ©ËÑË÷״̬             
            //·Ã¿ÍID
            String baoliu1=(String)info.get(28);
            if(baoliu1==null) {
                baoliu1="0000";
            }
            person.setBaoliu1(baoliu1); //´æ·Å·Ã¿ÍID 
            person.setBaoliu2((String)info.get(29));//´æ·Å¾­¶È 
            person.setBaoliu3((String)info.get(30));//´æ·Åγ¶È
            person.setBaoliu4((String)info.get(31)); //´æ·Å¸ß³Ì 
            String baoliu16=(String)info.get(43);//ÐÄÂÊ
            if(baoliu16==null || baoliu16.equals("null")||baoliu16.equals("-1")) {
                baoliu16="δ֪";
            }
            person.setBaoliu16(baoliu16);
            String baoliu18=(String)info.get(45);//ÊÇ·ñ¶Ô½øÈë³öÃÅÉúЧ
            if(baoliu18==null) {
                baoliu18="3";
            }
            String baoliu19=(String)info.get(46);//±êÇ©ÀàÐÍ
            if(baoliu19==null) {
                baoliu19="ϵͳĬÈÏ";
            }
            person.setBaoliu18(baoliu18);
            person.setBaoliu19(baoliu19);
            person.setNeedbaseid("0");
            personchushihuacanshu(person,0);
            person_vector.add(person); 
        }
    }
 
    /**ÉèÖÃÈËÔ±³õʼ»¯µÄĬÈÏÖµ*/
    public static void personchushihuacanshu(Person person,int datafrom) {
        if(person !=null) {
            String time=GetNowTime.now();
            person.setP_online("0");//³õʼ»¯ÉèÖñêÇ©ÀëÏß
            person.setP_kaoqing("0");//ÊÇ·ñÔÚ¿¼ÇÚÇøÓò
            person.setP_shipin("0");  
            person.setP_shipingname("δ½øÈë");
            person.setBaoliu5("0");//±êÇ©ÀàÐÍÈںϱêÇ©2£¬´¿UWB±êÇ©1 
            person.setBaoliu8("0"); //ÈںϱêÇ©µØÖ·
            person.setBaoliu9("0");//ÈںϱêÇ©µÄ¶Ë¿Ú
            person.setSos_state("0");//ÉèÖÃÈËÔ±µÄSOS״̬Ϊ0
            person.setIndoor_fence(3);            
            person.setOutwarning(false);//³õʼ»¯Ä¬ÈÏÈËÔ±²»ÔÚ¸æ¾¯ÇøÓòÄÚ            
            person.setGpson_off(-1);//GPSĬÈÏ´ò¿ª
            person.setTagoff("3");
            person.setGpsxinhao10("");    
            person.setHz(-1);//³õʼ»¯ÉèÖÃÆµÂÊΪN
            person.setRealhz(-1);
            person.setXiumian("3");//³õʼ»¯ÉèÖñêÇ©ÐÝÃß״̬δ֪
            person.setJingzhi("3");
            person.setPian(-2);//³õʼ»¯ÉèÖÃʱ¼äƬΪ-2
            person.setInwuxiaoqu(0);
            person.setInbaiduoutwarning(-1);
            person.setdistance_juge_indoor(-1);
            person.setJingdu("0");//ÉèÖñêÇ©³õʼµÄ¾­¶È
            person.setWeidu("0");//ÉèÖñêÇ©³õʼµÄγ¶È
            person.setGao("0");//ÉèÖñêÇ©³õʼµÄ¸ß
            person.setIschoose(0);//ÉèÖñêÇ©³õʼ»¯Ã»Óб»Ñ¡ÖÐ
            person.setGpsstate("-1");
            person.setGngga_state(-1);
            person.setPosfrom(3);//λÖÃÊý¾ÝÀ´Ô´³õʼ»¯
            person.setBaoliu10("-1");//ÉèÖóõʼ»¯Ïà¶Ôº£°Î¸ß¶È
            person.setFloortrue("0");
            person.setUwbopen(-1);
            person.setHeart_rates("-1");
            person.setSystolic_val("-1");
            person.setDiastolic_val("-1");
            person.setOxygen_val("-1");
            person.setTemp_val("-1");
            person.setSostime(time);//ÉèÖñêÇ©SOS³õʼ»¯µÄʱ¼ä
            person.setBaoliu16("-1");//³õʼ»¯ÐÄÂÊ
            person.setBaoliu17("0");//³õʼ»¯×´Ì¬ÉèÖÃÈËԱĬÈÏûÓгö×÷񵂿Óò
            person.setChaoyuanquname("");//ÉèÖÃÈËÔ±³õʼ»¯²»ÔÚ³¬Ô±ÇøÓò
            person.setChaoshiquname("");
            person.setChaoshiqutime("");
            person.setChaoshistate(0);//³õʼ»¯³¬Ê±×´Ì¬Îª0
            person.setP_fence("0");
            person.setHavexinhao(false);//³õʼ»¯Ã»ÓÐÊÕµ½ÐźÅ
            person.setXinhaotime("");//½ÓÊÕµ½ÐźŵÄʱ¼ä
            person.setIsinwaring(0);//³õʼ»¯ÉèÖò»ÔÚ½øÈë¸æ¾¯ÇøÓò
            person.setKongzhitime(time);
            person.setNowzhendong(0);//ÉèÖñêÇ©³õʼ»¯Õð¶¯×´Ì¬
            person.setJinmenstate(3);//½øÃÅ״̬£¬¶ÔÓ¦±£Áôbaoliu20
            person.setChumenstate(3);//³öÃÅ״̬£¬¶ÔÓ¦±£Áôbaoliu21
            person.setMessagerelaystate(3);//³õʼ»¯ÐÅÏ¢»Ø¸´×´Ì¬
            person.setMessagebianma("0");    
            person.setP_floor("0");    
            person.setBaoliu18("-1");
            person.setSendvoicetime(time);
            person.setP_addtiem(time);
            person.setReason_indoor_from("δ֪");
            person.setIndoor_or_outdoor(3);
            person.setReceive_gngga_time("-1");//ÊÕµ½ÓÐЧGNGGAÊý¾Ýʱ¼ä³õʼ»¯Ä¬ÈÏ-1
            person.setReceive_uwbpos_time("-1");//ÊÕµ½ÓÐЧUWBÊý¾Ýʱ¼ä³õʼ»¯Ä¬ÈÏ-1
        }
    }
 
    /**×Ô¶¯Ð޸ıêǩƵÂÊ*/
    public static  void  autor_alert_hz(Person person) {
        if(Systems.isZidongshijianpian()) {//Èç¹û¿ªÆô×Ô¶¯Ê±¼äƬ¹¦ÄÜÔò·µ»Ø
            return;
        }
        int hz=0;
        for(int i=0;i<person_vector.size();i++) {
            if(person_vector.get(i).getP_online().equals("1")) {
                hz=hz+person_vector.get(i).getRealhz();
            }
        }
 
        int realhz=person.getRealhz();//±êǩʵ¼ÊµÄƵÂÊ
        int tagneedhz=person.getTagneedhz();//±êÇ©ÐèÒªµÄƵÂÊ
        String tagid=person.getP_tagid();
        if(hz>199) {//Èç¹ûƵÂÊ´óÓÚ200            
            for(int i=0;i<person_vector.size();i++) {//°ÑËùÓо²Ö¹µÄ¸Ä³É1hz
                Person person1=person_vector.get(i);
                if(person1.getP_online().equals("1")) {                            
                    String jingzhi=person1.getJingzhi();
                    int realhz1=person1.getRealhz();//±êǩʵ¼ÊµÄƵÂÊ
                    if(jingzhi.equals("1")&& realhz1>1) {
                        String tagid1=person1.getP_tagid();
                        ControTag.auto_alert_taghz("1", tagid1);
                        String message="¾²Ö¹±êÇ©:"+tagid1+"ƵÂʸÄΪ1";
                        BaoWenShow.showdebug("debug", message);
                    }
                }
            }        
        }else {                        
            if(tagneedhz!=realhz && tagneedhz!=0) {
                int hz2=hz+tagneedhz-realhz;
                if(hz2<200) {
                    ControTag.auto_alert_taghz(String.valueOf(tagneedhz), tagid);                    
                }else {
                    for(int i=0;i<person_vector.size();i++) {//°ÑËùÓо²Ö¹µÄ¸Ä³É1hz
                        Person person1=person_vector.get(i);
                        if(person1.getP_online().equals("1")) {                            
                            String jingzhi=person1.getJingzhi();
                            int realhz1=person1.getRealhz();//±êǩʵ¼ÊµÄƵÂÊ
                            if(jingzhi.equals("1")&& realhz1>1) {
                                String tagid1=person1.getP_tagid();
                                ControTag.auto_alert_taghz("1", tagid1);
                                String message="¾²Ö¹±êÇ©:"+tagid1+"ƵÂʸÄΪ1";
                                BaoWenShow.showdebug("debug", message);
                            }
                        }
                    }
                }
            }
        }
        String message="×Ô¶¯¸ÄƵÂÊ,×Ü:"+hz+","+tagid+",real:"+realhz+",need:"+tagneedhz;
        BaoWenShow.showdebug("debug", message);
        
    }
 
 
    /**ͨ¹ý±êÇ©idÕÒµ½Ä³¸öÈËÔ±¶ÔÏó*/
    public static Person get_Person(String tagid) {
        Person person=null;
        if(person_vector.size() !=0) {
            Iterator<Person> it=person_vector.iterator();
            while(it.hasNext()) {
                Person person1=it.next();
                String idtag=person1.getP_tagid();
                if(idtag.equals(tagid)) {
                    person=person1;
                    break;
                }
            }
        }
        return person;
    }
 
    /**ÐÞ¸ÄÈËÔ±ÊÇ·ñ²»ÔÚ³öÈ¥¸æ¾¯ÇøÓòµÄ״̬*/
    public static void alert_outwarnig(String tagid,boolean a) {
        if(get_Person(tagid) !=null) {
            get_Person(tagid).setOutwarning(a);
        }
 
    }
 
 
    /**¸Ä±ä±êÇ©µÄËÑË÷״̬Ϊ1*/
    public static void alert_p_sousuo(String tagid) {
        if(get_Person(tagid) !=null) {
            get_Person(tagid).setP_sousuo("1");
            String updateSQL="UPDATE tb_person SET p_sousuo='1' where p_tagid='"+tagid+"'";
            DatabaseManagement.update(updateSQL);
        }
    }
 
 
    /**½«ËùÓбêÇ©ËÑË÷״̬¸ÄΪ0*/
    public static void  alert_all_sousuo() {
        int size=person_vector.size();
        for(int i=0;i<size;i++) {
            person_vector.get(i).setP_sousuo("0");
            String updateSQL="UPDATE tb_person SET p_sousuo='0'";
            DatabaseManagement.update(updateSQL);
        }
    }
 
    /**½«ËùÓбêÇ©µÄ״̬¸ÄΪδѡÖÐ*/
 
    public static void  alert_no_choose() {
        int size=person_vector.size();
        for(int i=0;i<size;i++) {
            person_vector.get(i).setIschoose(0);
        }
    }
 
    /**·¢¿¨Ê±ºòͨ¹ýÉí·ÝÖ¤ºÅÕÒµ½Ä³¸öÈËÔ±¶ÔÏó*/
    public static Person get_Person_from_idcard(String idcardnum) {
        Person person=null;
        if(person_vector.size() !=0) {
            Iterator<Person> it=person_vector.iterator();
            while(it.hasNext()) {
                Person person1=it.next();
                String idnum=person1.getP_idcardnum();
                //Èç¹ûÉí·ÝÖ¤ºÅ²»Îª¿Õ
                if(idnum !=null) {
                    if(idnum.equals(idcardnum)) {
                        person=person1;
                        break;
                    }
                }
 
            }
        }
        return person;
    }
 
 
    /**ÐÞ¸ÄÈËÔ±µÄÐÅÏ¢*/
    public static void alert_person(String tagid,String bumen,String name,String sex,String phone) {
        if(get_Person(tagid) !=null) {
            get_Person(tagid).setP_department(bumen);
            get_Person(tagid).setP_name(name);
            get_Person(tagid).setP_sex(sex);
            get_Person(tagid).setP_phone(phone);
            get_Person(tagid).setP_image(Department_Dell.get_department(bumen).getDepart_image());
        }
 
    }
 
 
 
    /**¸Ã·½·¨ÓÃÓÚ·¢¿¨Ê±ÐÞ¸ÄÈËÔ±µÄÐÅÏ¢*/
    public static void alert_person_faka(
            String tagid,
            String bumen,
            String name,
            String sex,
            String phone,
            String idcardnum) {
        if(get_Person(tagid) !=null) {
            get_Person(tagid).setP_department(bumen);
            get_Person(tagid).setP_name(name);
            get_Person(tagid).setP_sex(sex);
            get_Person(tagid).setP_phone(phone);
            get_Person(tagid).setP_image(Department_Dell.get_department(bumen).getDepart_image());
            get_Person(tagid).setP_idcardnum(idcardnum);
        }
 
    }
 
    /**ÐÞ¸ÄÈËÔ±ÐÕÃû*/
    public static void alert_person_name(String tagid,String name,String type) {
        if(get_Person(tagid) !=null) {
            get_Person(tagid).setP_name(name);
            get_Person(tagid).setBaoliu19(type);
            String[] ziduan= {"p_name","baoliu19","p_tagid"};
            String[] zhi= {name,type,tagid};            
            DatabaseManagement.fast_alert_dbase("tb_person", ziduan, zhi);
        }
    }
 
    /**ÐÞ¸ÄÈËÔ±ÐÕÃûºÍÊý¾Ý¿âÎÞ¹Ø*/
    public static void alert_person_name2(String tagid,String name) {
        if(get_Person(tagid) !=null) {
            get_Person(tagid).setP_name(name);
        }
 
    }
 
    /**ÐÂÔöÒ»¸öÈËÔ±¶ÔÏó*/
    public static void add_person(String tagid,String bumen,String name,
            String sex,String phone,String sulv,String type) {
        if(get_Person(tagid) ==null) {    
            Person newperson=new Person();
            newperson.setP_name(name);
            newperson.setP_department(bumen);
            newperson.setP_tagid(tagid);
            int tagid_int=Integer.parseInt(tagid,16);
            newperson.setTagidint(tagid_int);
            newperson.setP_sex(sex);
            newperson.setP_phone(phone);
            if(sulv.equals("ÎÞ")) {
                sulv="10000";
            }
            newperson.setSulv(Double.parseDouble(sulv));
            newperson.setBaoliu19(type);//±êÇ©µÄÀàÐÍ
            String bumen0=bumen;
            String p_image="";
            if(Department_Dell.get_department(bumen)==null) {
                bumen0="ϵͳĬÈÏ";
            }
            if (Department_Dell.get_department(bumen0)==null){
                newperson.setP_image(new ImageIcon("image/targeticon/default.png"));
                p_image="image/targeticon/default.png";
            }else{
                newperson.setP_image(Department_Dell.get_department(bumen0).getDepart_image());
                p_image=Department_Dell.get_department(bumen0).getIconadress();
            }
            newperson.setP_x(0);
            newperson.setP_y(0);
            person_Dell.personchushihuacanshu(newperson,1);//ÉèÖñêÇ©³õʼ»¯²ÎÊý
            person_vector.add(newperson);
 
            String[]  ziduan= {
                    "p_name",     
                    "p_tagid",  
                    "p_sex",
                    "p_minzu",
                    "p_phone",
                    "p_department",
                    "p_x",
                    "p_y",     
                    "p_floor",
                    "p_sos",
                    "p_online",
                    "p_power",
                    "p_kaoqing",
                    "p_fence",
                    "p_image",
                    "baoliu19",
            "p_addtiem"};
 
            String[] zhi= {
                    name,     
                    tagid,  
                    sex,
                    "ºº",
                    phone,
                    bumen,
                    "0",
                    "0",     
                    "0",
                    "0",
                    "0",
                    "δ֪",
                    "0",
                    "0",
                    p_image,
                    type,
                    GetNowTime.now()
            };
            DatabaseManagement.insertfast("tb_person", ziduan, zhi);
 
        }
 
    }
 
    /**ÐÂÔöÒ»¸öÈËÔ±¶ÔÏóºÍÊý¾Ý¿âÎÞ¹Ø*/
    public static void add_person2(String tagid,String bumen,String name,String sex,String phone) {
        if(get_Person(tagid) ==null) {    
 
            Person newperson=new Person();
            newperson.setP_name(name);
            newperson.setP_department(bumen);
            newperson.setP_tagid(tagid);
            int tagid_int=Integer.parseInt(tagid,16);
            newperson.setTagidint(tagid_int);
            newperson.setP_sex(sex);
            newperson.setP_phone(phone);
            String bumen0=bumen;
            if(Department_Dell.get_department(bumen)==null) {
                bumen0="ϵͳĬÈÏ";
            }
            newperson.setP_image(Department_Dell.get_department(bumen0).getDepart_image());
            newperson.setP_x(0);
            newperson.setP_y(0);
            person_Dell.personchushihuacanshu(newperson,0);//ÉèÖñêÇ©³õʼ»¯²ÎÊý
            person_vector.add(newperson);
        }
 
    }
 
 
    /**ÓÃÓÚ·¢¿¨µÄʱºòÏòÈËÔ±Êý¾Ý¿â²åÈëÒ»ÌõÊý¾Ý³É¹¦·µ»Øtrue*/
    public static boolean add_person_in_database(
            String p_name,
            String p_tagid,
            String p_sex,
            String p_minzu,
            String p_phone,
            String p_department,
            String p_idcardnum,
            String p_adress) {
 
        boolean succ=false;
        String p_sos="0";
        String p_online="0";
        String p_power="100";
 
        String updateSQL="INSERT tb_person (id,"
                + "p_name,"
                + "p_tagid,"
                + "p_sex,"
                + "p_minzu,"
                + "p_phone,"
                + "p_department,"
                + "p_idcardnum,"
                + "p_adress,"
                + "p_sos,"
                + "p_online,"
                + "p_power,"
                + "p_addtiem ) VALUES (default,'"
                +p_name+"','"
                +p_tagid+"','"
                +p_sex+"','"
                +p_minzu+"','"
                +p_phone+"','"
                +p_department+"','"
                +p_idcardnum+"','"
                +p_adress+"','"
                +p_sos+"','"
                +p_online+"','"
                +p_power+"','"
                +GetNowTime.now2()+"')";
        if(DatabaseManagement.update(updateSQL) !=0) {
            Person newperson=new Person();
            newperson.setP_name(p_name);
            newperson.setP_department(p_department);
            newperson.setP_tagid(p_tagid);
            int tagid_int=Integer.parseInt(p_tagid,16);
            newperson.setTagidint(tagid_int);
            newperson.setP_sex(p_sex);
            newperson.setP_phone(p_phone);
            newperson.setP_image(Department_Dell.get_department(p_department).getDepart_image());
            newperson.setP_x(0);
            newperson.setP_y(0);
            newperson.setP_online("0");
            newperson.setP_floor("0");
            newperson.setP_kaoqing("0");
            newperson.setP_sos("0");
            newperson.setP_fence("0");
            newperson.setP_power("100");
            newperson.setSos_state("0");//ÉèÖÃÈËÔ±µÄSOS״̬Ϊ0
            person_vector.add(newperson);
            succ=true;            
        };
        return succ;
    }
 
    /**ÓÃÓÚ·¢¿¨µÄʱºòÐÞ¸ÄÊý¾Ý¿âÈËÔ±ÐÅÏ¢³É¹¦·µ»Øtrue*/
    public static boolean alert_tbperson_database(
            String p_name,
            String p_tagid,
            String p_sex,
            String p_minzu,
            String p_phone,
            String p_department,
            String p_idcardnum,
            String p_adress ) {
        boolean succ=false;
 
        String updateSQL="UPDATE tb_person SET  p_name='"+p_name+
                "', p_department='"+p_department+
                "', p_sex='"+p_sex+
                "', p_phone='"+p_phone+
                "', p_idcardnum='"+p_idcardnum+
                "', p_adress='"+p_adress+
                "', p_addtiem='"+GetNowTime.now2()+
                "'where p_tagid='"+p_tagid+"'";
        if(DatabaseManagement.update(updateSQL) !=0) {                    
            person_Dell.alert_person_faka(p_tagid, p_department, p_name, p_sex, p_phone,p_idcardnum);
 
            StringBuffer updateSQLtag=new StringBuffer("UPDATE tb_tag SET "
                    + "state='"+p_name
                    +"'where tag_id='"+p_tagid+"'");    
            DatabaseManagement.update(updateSQLtag.toString()); 
            updateSQLtag=new StringBuffer();
            succ=true;
        }
        return succ;        
    }
 
 
    /**ɾ³ýÒ»¸öÈËÔ±¶ÔÏó*/
    public  static  void remove_person(String tagid) {
        if(get_Person(tagid) != null) {            
            person_vector.remove(get_Person(tagid));
 
        }
 
    }
 
    /**ɾ³ýÒ»¸öÈËÔ±¶ÔÏó*/
    public  static  void remove_person_and_database(String tagid) {
        if(get_Person(tagid) != null) {    
            String deleteSql="DELETE FROM tb_person WHERE p_tagid='"+tagid+"'";                            
            if (DatabaseManagement.update(deleteSql)!=0) {
                person_vector.remove(get_Person(tagid));
            }else {
                ShowMessage.zidingyi_24("ɾ³ýÊý¾Ý¿âtb_personÖеÄ"+tagid+"ʧ°Ü£¡");
            }            
        }
 
    }
 
 
 
    /**ÔÚԭʼÐÅÏ¢´¦ÐÂÔöÒ»¸öÈËÔ±¶ÔÏó*/
    public static void add_person_raw(String tagid ) {
        if(get_Person(tagid) ==null) {
            String x="0";
            String y="0";
            String online="1";
            String power="100";
            String floor="0";
            String name="δ°ó¶¨";
            String bumen="ϵͳĬÈÏ";
            String sex="ÄÐ";
            String phone="01068214881";
            String kaoqing="0";
            String fence="0";
            String sos="0";
            String updateSQL="INSERT tb_person (id,p_name,p_department,p_tagid,P_sex,p_phone,p_x,p_y,"
                    + "p_online,p_power,p_floor,p_kaoqing,p_fence,p_sos,p_addtiem) VALUES (default,'"+
                    name+
                    "','"+bumen+
                    "','"+tagid+
                    "','"+sex+
                    "','"+phone+
                    "','"+x+
                    "','"+y+
                    "','"+online+
                    "','"+power+
                    "','"+floor+
                    "','"+kaoqing+
                    "','"+fence+
                    "','"+sos+
                    "','"+GetNowTime.now2()+"')";
            if(DatabaseManagement.update(updateSQL)!=0) {
                Person newperson=new Person();
                newperson.setP_name(name);
                newperson.setP_department(bumen);
                newperson.setP_tagid(tagid);
                int tagid_int=Integer.parseInt(tagid,16);
                newperson.setTagidint(tagid_int);
                newperson.setP_sex(sex);
                newperson.setP_phone(phone);
                newperson.setP_image(Department_Dell.get_department(bumen).getDepart_image());
                newperson.setP_x(0);
                newperson.setP_y(0);
                newperson.setP_online("0");
                newperson.setP_floor("0");
                newperson.setP_kaoqing(kaoqing);
                newperson.setP_sos(sos);
                newperson.setP_fence(fence);
                newperson.setSos_state("0");//ÉèÖÃÈËÔ±µÄSOS״̬Ϊ0
                person_vector.add(newperson);
            }
        }
 
    }
 
    /**ÐÞ¸ÄÈËÔ±ÊÇ·ñ´¦ÓÚÊÓÆµÇøÓòÐÅÏ¢*/
    public static void alart_shiping(String tagid,String inout,String p_shipingname) {
        if(get_Person(tagid) !=null) {
            get_Person(tagid).setP_shipin(inout);
            get_Person(tagid).setP_shipingname(p_shipingname);
        }
    }
 
    /**ɾ³ýËùÓÐÈËÔ±¶ÔÏó*/
    public  static  void removall_person() {
        if(person_vector.size()!= 0) {
            person_vector.removeAllElements();;
        }
 
    }
 
    /**ÐÞ¸ÄÈËÔ±µÄ¿¼ÇÚ״̬ÔÚ¿¼ÇÚÇøÓòΪ1²»ÔÚ¿¼ÇÚÇøÓòΪ0
     * @param state ÊÇ·ñÔÚ¿¼ÇÚÇøÓò*/
    public  static  void alert_kaoqing(String tagid,String state) {
        if(get_Person(tagid) != null) {
            get_Person(tagid).setP_kaoqing(state);
        }
    }
 
    /**ÐÞ¸ÄÈËÔ±ÊÇ·ñÔÚΧÀ¸ÖÐ״̬ÔÚΧÀ¸ÇøÓòΪ1²»ÔÚ¿¼ÇÚÇøÓòΪ0
     * Êý×Ö0£ºÃ»ÓÐÔÚÈÎºÎ¸æ¾¯ÇøÓò
     * Êý×Ö1£ºÔÚ½øÈë¸æ¸æ¾¯ÇøÓòÄÚ
     * Êý×Ö2£ºÔÚ³öÈ¥¸æ¾¯ÇøÓòÍâ³öÇøÓò±¨¾¯
     * Êý×Ö3£ºÔÚ³¬Ô±¸æ¾¯ÇøÓòÄÚ³¬Ô±±¨¾¯
     * Êý×Ö4£ºÔÚ³¬Ê±±¨¾¯ÇøÓòÄÚÍ£Áô³¬Ê±±¨¾¯
     * Êý×Ö5£ºÔÚ×÷񵂿ÓòÍⱨ¾¯£¬´ú±í³öÁË×÷񵂿Óò
     * Êý×Ö6£ºÔÚÖ¸¶¨µÄÇøÓòÍⱨ¾¯£¬´ú±í³öÁËÖ¸¶¨ÇøÓò
     */
    public  static  void alert_isin_fence(String tagid,String state,String fencename) {
        Person prs=get_Person(tagid);        
        if(prs!= null) {
            prs.setInwarningtime(GetNowTime.now());
            prs.setP_fencename(fencename);
        }
    }
 
 
    /**ÐÞ¸ÄÈËÔ±SOSÐÅÏ¢*/
    public  static  void alert_sos(String tagid,String sos) {
        if(get_Person(tagid) != null) {
            get_Person(tagid).setP_sos(sos);
            //Èç¹ûsosΪ1ÐèÒª´¥·¢ÓïÒô²¢¼Ç¼µ½¸æ¾¯Êý¾Ý¿âÖÐ
            String sosstate=get_Person(tagid).getSos_state();
            if(sos.equals("1") && sosstate.equals("0")) {
                get_Person(tagid).setSos_state("1");//SOS¸æ¾¯Î´´¦Àí
                new Music("systemFiles/voice/sos.wav").start();//µ÷ÓÃÒôƵÎļþ
                InsertData.sosInsertTbWarning(tagid,"SOS", "δ´¦Àí", "");
            }            
 
        }
    }
 
    /**Ð޸ıêÇ©µÄ²ð³ý״̬*/
    public  static  void alert_tagoff(String tagid,String tagoff) {
        if(get_Person(tagid) != null) {
            //±êÇ©±»²ð³ý
            String tagoffstate=get_Person(tagid).getTagoff();            
            if(tagoff.equals("1") && tagoffstate.equals("0")) {
                ShowMessage.zidingyi(GetNowTime.now()+",±êÇ©£º"+tagid+",±»²ð³ý"+tagoff);
                get_Person(tagid).setTagoff("1");
                InsertData.sosInsertTbWarning(tagid,"±»²ð³ý", "δ´¦Àí", GetNowTime.now());//½«¸æ¾¯¼Ç¼³öÈëµ½Êý¾Ý¿â
                Tb_Warnig_Dell.add_tb_warning("±»²ð³ý", tagid, "δ´¦Àí",GetNowTime.now());
            }else {
                get_Person(tagid).setTagoff(tagoff);
            }
        }
    }
 
    /**½«ËùÓÐÈËÔ±µÄSOS״̬ÐÞ¸ÄΪ0*/
    public  static  void alert_Allperson_sos(String state) {
        if(person_vector.size() != 0) {
            Iterator it = person_vector.iterator();
            while(it.hasNext()) {
                Person person=(Person) it.next();
                person.setP_sos(state);
                person.setSos_state("0");//0±íʾÒÑ´¦ÀíSOS״̬
                person.setP_fence("0");
            }
        }
    }
 
    /**½«ËùÓÐSOSºÍËùÓеĽøÈëΧÀ¸×´Ì¬¸ÄΪ0*/
    public  static  void alert_all_sos_and_infence(String state) {
        if(person_vector.size() != 0) {
            Iterator it = person_vector.iterator();
            while(it.hasNext()) {
                Person person=(Person) it.next();
                person.setP_sos(state);
                person.setP_fence(state);
                person.setOutwarning(false);
                person.setSos_state("0");//0±íʾÒÑ´¦ÀíSOS״̬
            }
        }
    }
 
    /**ÐÞ¸ÄÈËÔ±µÄSOS״̬£¬×´Ì¬·ÖΪδ´¦Àí1£¬ÒÑ´¦ÀíΪ0*/
    public static void alert_sos_state(String tagid ,String state) {
        if(get_Person(tagid) != null) {
            get_Person(tagid).setSos_state(state);
        }
    }
 
    //
 
    public static Vector<Person> getPerson_vector() {
        return person_vector;
    }
 
    /**»ñÈ¡ËùÓÐÔÚÏßÈËÔ±×ÜÊý*/
    public static int get_online_person() {
        int online_num=0;
        if(person_vector.size() != 0) {
            Iterator it = person_vector.iterator();
            while(it.hasNext()) {
                Person person=(Person) it.next();
                String online=person.getP_online();
                if(online.equals("1")) {
                    online_num++;
                }
            }
        }        
 
        return online_num;
 
    }
 
    /**»ñÈ¡ËùÓÐÔÚÏßÀëÏß³µÁ¾×ÜÊý*/
    public static int[] get_online_car() {
        int[] num=new int[2];
        int online_num=0;
        int off_num=0;
        if(person_vector.size() != 0) {
            Iterator it = person_vector.iterator();
            while(it.hasNext()) {
                Person person=(Person) it.next();
                String online=person.getP_online();
                String type=person.getBaoliu19();//±êÇ©ÀàÐÍ
                if(online.equals("1")) {                    
                    if(type.equals("³µÔØ´øÆÁ") || type.equals("³µÔرêÇ©") ) {
                        online_num++;
                    }                    
                }else {
                    if(type.equals("³µÔØ´øÆÁ") || type.equals("³µÔرêÇ©") ) {
                        off_num++;
                    }
                }
            }
        }    
        num[0]=online_num;
        num[1]=off_num;
        return num;
    }
 
    /**»ñÈ¡ËùÓÐÔÚÏßÀëÏßwuzi×ÜÊý*/
    public static int[] get_online_wuzi() {
        int[] num=new int[2];
        int online_num=0;
        int off_num=0;
        if(person_vector.size() != 0) {
            Iterator it = person_vector.iterator();
            while(it.hasNext()) {
                Person person=(Person) it.next();
                String online=person.getP_online();
                String type=person.getBaoliu19();//±êÇ©ÀàÐÍ
                if(online.equals("1")) {                    
                    if(type.equals("Îï×ʱêÇ©")) {
                        online_num++;
                    }                    
                }else {
                    if(type.equals("Îï×ʱêÇ©")) {
                        off_num++;
                    }
                }
            }
        }    
        num[0]=online_num;
        num[1]=off_num;
        return num;
 
    }
 
    /**ÐÞ¸ÄÈËÔ±µÄX,Y,FLOOR,jingdu,weidu,gaoduÔÚÏß״̬ÐÅÏ¢*/
    public static void alert_person_UWBxyfpo(
            String tagid,
            int x,
            int y,
            String z,
            String floor,
            String time
            ) {
        Person person=get_Person(tagid);        
        if(person!= null) {    
            if(Systems.isShow0ceng()) {
                person.setFloortrue(floor);
                floor="0";                
            }
            person.setP_floor(floor);
            person.setP_online("1");
            person.setUwb_x(x);
            person.setUwb_y(y);
            int zz=Integer.parseInt(z);
            person.setUwb_z(zz);
            person.setP_addtiem(time);
            person.setBaoliu4(floor);
        }
    }
 
 
    /**ÐÞ¸ÄÈËÔ±µÄµçÁ¿£¬±êÇ©ÏÖÔںͻùÕ¾²â¾àid*/
    public static void alert_person_power(String tagid,String power,String anchorid) {
        if(get_Person(tagid) != null) {
            get_Person(tagid).setP_power(power);
            get_Person(tagid).setNow_ceju_anchorid(anchorid);
        }
 
    }
    
    /**´¦ÀíËùÓе͵çÁ¿×´Ì¬*/
    public static void alert_person_power_lowpowerstate(String tagid) {
        Person person=get_Person(tagid);
        if( person!= null) {
            person.setP_power_wanig("0");
            String sql="update tb_person set p_power_wanig=0 where p_tagid='"+tagid+"';";
            DatabaseManagement.update(sql);
        }else if(tagid.equals("ËùÓбêÇ©")) {
            if(person_vector.size() != 0) {
                Iterator it = person_vector.iterator();
                while(it.hasNext()) {
                    Person person1=(Person) it.next();    
                    person1.setP_power_wanig("0");
                }
                String sql="update tb_person set p_power_wanig=0;";
                DatabaseManagement.update(sql);
            }    
        }
    }
 
    /**ÐÞ¸ÄÈËԱ״̬ΪÀëÏß*/
    public static void alert_person_offline(String tagid) {
        if(get_Person(tagid) != null) {
            get_Person(tagid).setP_online("0");
            get_Person(tagid).setP_kaoqing("0");
            get_Person(tagid).setP_kaoqqingname("");
        }
 
    }
 
 
    /**ÐÞ¸ÄÈËÔ±µçÁ¿£¬Ê±¼ä£¬sos£¬×´Ì¬*/
    public static void alert_gps(String tagid,String power) {
        if(get_Person(tagid) != null) {
            get_Person(tagid).setP_power(power);            
        }
 
    }
 
    /**δ¼ÈëϵͳµÄ±êÇ©¼ÓÈëÒ»¸ö¼¯ºÏ*/
    public static void noinaddperson(String tagid,String anchorid) {
        Person person=get_noinPerson(tagid);
        if(person==null) {
            person=new Person();
            person.setNow_ceju_anchorid(anchorid);
            noinperson_vector.add(person);
        }else {
            person.setNow_ceju_anchorid(anchorid);
        }
 
    }
 
    /**GPSģʽϸıäÈËÔ±µÄÔÚÏß״̬ºÍʱ¼ä*/
    public static void have_ok_gnggan_alertperson(String tagid) {
        Person person=get_Person(tagid);
        if( person!= null) {
            person.setP_addtiem(GetNowTime.now());
            person.setP_online("1");
        }
    }
 
    /**ÐÞ¸ÄÈËÔ±ÐÅÏ¢*/
    public static void alert3_person_tb_person(
            String p_name, 
            String p_tagid,
            String p_sex,
            String p_phone,
            String p_department) {
 
        if(get_Person(p_tagid) != null) {    
            String bumen=p_department;
            if(Department_Dell.get_department(p_department)==null) {
                bumen="ϵͳĬÈÏ";
            }            
            get_Person(p_tagid).setP_department(bumen);
            get_Person(p_tagid).setP_name(p_name);
            get_Person(p_tagid).setP_sex(p_sex);
            get_Person(p_tagid).setP_phone(p_phone);        
            get_Person(p_tagid).setP_image(Department_Dell.get_department(bumen).getDepart_image());        
            String imageAdress=Department_Dell.get_department(bumen).getIconadress();        
            String[] ziduan= {"p_name","p_sex", "p_phone","p_department","p_image","p_tagid"};
            String[] zhi= {p_name,p_sex, p_phone,p_department,imageAdress,p_tagid};    
            DatabaseManagement.fast_alert_dbase("tb_person", ziduan, zhi);
        }
    }
 
 
    /**»ñÈ¡ËùÓеÄÔÚÏßÈËÔ±¼¯ºÏ
     * String in=1ÔÚÏßÈËÔ±
     * String in=0ÀëÏßÈËÔ±*/
    public static  Vector<Person> get_oline_personvc(String in){
        Vector<Person> person_vector1=new Vector<>();
        int size=person_vector.size();
        if(size !=0) {
            for(int i=0;i<size;i++) {
                Person ps=person_vector.get(i);
                String online=ps.getP_online();                
                if(online.equals(in)) {
                    person_vector1.add(ps);
                }
            }
        }
        return person_vector1;
    }
 
    /**ËÑË÷ÈËÔ±*/
    public static Vector<Person> serch(String tagid) {
        Vector<Person> person_vector1=new Vector<>();
        int size=person_vector.size();
        if(size !=0) {
            for(int i=0;i<size;i++) {
                Person ps=person_vector.get(i);
                String tg=ps.getP_tagid();
                String name=ps.getP_name();
                String bumen=ps.getP_department();
                if(tg.equals(tagid) || name.equals(tagid)  || bumen.equals(tagid)) {
                    person_vector1.add(ps);
                }
            }
        }
 
        int a=person_vector1.size();
        if(a==0) {
            ShowMessage.zidingyi("ÄãËÑË÷µÄ"+tagid+"²»´æÔÚ...");
        }
 
        return person_vector1;
    }
 
    /**GPS¿ª¹Ø×´Ì¬*/
    public static void alert_gpsonoff(String tagid,int a) {
        if(get_Person(tagid) != null) {
            get_Person(tagid).setGpson_off(a);
        }
    }
 
 
    /**ÊÖ»·±»²ð³ýµÄ´¦Àí·½·¨*/
    public static void dell_tagtakeoff(String nowstate,String tagid) {
        Person per=get_Person(tagid);
        boolean now=nowstate.equals("1");        
        if(per !=null) {
            //±êǩ֮ǰµÄ״̬            
            String before=per.getTagoff();
            boolean befr=before.equals("0");            
            //Èç¹û֮ǰÊÇ´øÉϵÄÏÖÔÚÊDzðжµÄ״̬
            if( befr&& now) {
                String time=GetNowTime.now();
                ShowMessage.zidingyi(tagid+"±»²ð³ý"+time);
                per.setTagoff("1");
                String[] ziduan = { "type", "objectid", "status", "time" };
                String[] zhi = { "±»²ð³ý", tagid, "δ´¦Àí",time};
                DatabaseManagement.insertfast("tb_warning", ziduan, zhi);
            }else {
                befr=before.equals("1");
                if(befr && !now) {
                    //±êÇ©±»´øÉÏ
                    per.setTagoff("0");
                }else {
                    per.setTagoff(nowstate);
                }
            }
        }
    }
 
    /**ÀëÏßת·¢Î»ÖÃÊý¾Ý*/
    public static void person_off_zhuanfa(int lixinazhuanfa) {
        int size=person_vector.size();
        if(size !=0) {
            for(int i=0;i<size;i++) {
                Person ps=person_vector.get(i);
                String online=ps.getP_online();    
                String tagid=ps.getP_tagid();
                String intime=ps.getP_addtiem();
                String ceng=ps.getP_floor();
                String xx=String.valueOf(ps.getP_x());
                String yy=String.valueOf(ps.getP_y());
                String zz=String.valueOf(ps.getP_z());
                String batarry=ps.getP_power();
                String xiumian=ps.getXiumian();
                if(lixinazhuanfa==1) {//ÀëÏßת·¢×îºóλÖÃÐÅÏ¢
                    if(online.equals("1")) {
                        display.out(tagid,"1", intime, ceng, xx, yy,zz, batarry,"1","0");
                    }
                    if(online.equals("0")) {                        
                        display.out(tagid,"65536", intime, ceng, xx, yy,zz, batarry,"1","0");
                    }                    
                }else if(lixinazhuanfa==2) {//ÐÝÃßת·¢×îºóλÖÃÐÅÏ¢
                    if(xiumian.equals("1") && online.equals("1")) {    
                        display.out(tagid,"65537", intime, ceng, xx, yy,zz, batarry,"1","0");
                    }
                }else if(lixinazhuanfa==3) {//ÐÝÃßÀëÏß¶¼×ª·¢×îºóλÖÃÐÅÏ¢
                    if(online.equals("0")) {                        
                        display.out(tagid,"65536", intime, ceng, xx, yy,zz, batarry,"1","0");
                    }else {
                        if(xiumian.equals("1")) {
                            display.out(tagid,"65537", intime, ceng, xx, yy,zz, batarry,"1","0");
                        }
                    }    
                }
            }
        }
    }
 
    /**¸Ä±ä±êÇ©µÄÔÚÏß״̬ΪÔÚÏß*/
    public static void change_person_online(Person person,String tagid) {
        if(person==null) {
            return;
        }
        String on=person.getP_online();
        if(Systems.isWuxian()) {//Èç¹û¿ªÆôÎÞÏßģʽ            
            if(on.equals("0")) {//Èç¹û±êÇ©²»ÔÚÏß
                Urt_read.read_tag(tagid, "14", "1",0);// 14¾²Ö¹Åж¨Ê±³¤
            }
        }
        person.setP_online("1");
    }
 
 
 
    public static Vector<Person> getNoinperson_vector() {
        return noinperson_vector;
    }
 
 
 
    public static void setNoinperson_vector(Vector<Person> noinperson_vector) {
        person_Dell.noinperson_vector = noinperson_vector;
    }
 
    /**ͨ¹ý±êÇ©idÕÒµ½Ä³¸öÈËÔ±¶ÔÏó*/
    public static Person get_noinPerson(String tagid) {
        Person person=null;
        if(noinperson_vector.size() !=0) {
            Iterator<Person> it=noinperson_vector.iterator();
            while(it.hasNext()) {
                Person person1=it.next();
                String idtag=person1.getP_tagid();
                if(idtag.equals(tagid)) {
                    person=person1;
                    break;
                }
            }
        }
        return person;
    }
 
    /**»ñÈ¡ÐèÒª·ÖÅäʱ¼äƬµÄÉ豸¼¯ºÏ*/
    public static Vector<Person> needpianvc(){
        Vector<Person> needpian=new Vector<Person>();
        int size=person_vector.size();
        if (size != 0) {
            for (int i = 0; i <size; i++) {
                Person prs = person_vector.get(i);
                int pian=prs.getPian();                
                if(pian==(-1)) {
                    needpian.add(prs);
                }
            }
        }
        return needpian;
    }
 
    /**°ëСʱ¸üÐÂÐÄÂÊÊý¾Ý*/
    public static void gegnxinheart() {
        int size=person_vector.size();
        for(int i=0;i<size;i++) {
            Person pr=person_vector.get(i);
            String online=pr.getP_online();
            if(online.equals("1")) {
                String tagid=pr.getP_tagid();
                String tagtype=Tag_Dell.get_tag(tagid).getTagtype();
                if(tagtype.equals("ÐÄÂÊ´øÆÁ")) {
                    String heart=pr.getBaoliu16();
                    String name=pr.getP_name();
                    String time=GetNowTime.now();
                    String okheart="60~70";
                    String state="Õý³£";
                    int hearta=Integer.parseInt(heart);
                    if(hearta<60) {
                        state="³¬µÍ";
                    }else if(hearta>70) {
                        state="³¬¸ß";
                    }
                    String[] ziduan= {"tagid","name","heart","okheart","state","time"};
                    String[] zhi= {tagid,name,heart,okheart,state,time};        
                    DatabaseManagement.insertfast("tb_heart_record", ziduan, zhi);
                }
            }
        }
    }
 
    /**ÐÞ¸ÄËùÓбêÇ©µÄƵÂÊ*/
    public static void alert_all_tag_hz(int hz,int needhz) {
        int size=person_vector.size();
        for(int i=0;i<size;i++) {
            Person pr=person_vector.get(i);
            pr.setHz(hz);
            pr.setTagneedhz(needhz);
        }
        String sql="UPDATE tb_tag SET pinglv='"+hz+"'";
        DatabaseManagement.update(sql);
    }
}