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;
|
}
|
}
|