package com.hxzkoa.udp;
|
|
import com.hxzkoa.json.tb_tongbuanchor;
|
import com.hxzkoa.util.Config;
|
import com.hxzkoa.util.HttpUtil;
|
|
import net.sf.json.JSONObject;
|
|
public class Anchor_tongbu {
|
/*
|
* 4.基站同步设置信息anchor_tongbu
|
* anchor_tongbu,[length],[anchorid],[tongbuanchorid],[anchortype],[state],[
|
* mark]
|
*/
|
|
static String postUrl = Config.getPostUrl();
|
|
public static void anchor_tongbu(String message) {
|
postUrl = postUrl + "syncConfiguration_add.do";
|
String[] dis = message.split(",");
|
String anchorid = dis[2];
|
String tongbuanchorid = dis[3];
|
String anchortype = dis[4];
|
String state = dis[5];
|
String mark = dis[6];
|
// 更改标签的状态和电量信息
|
tb_tongbuanchor tongbuanchor = new tb_tongbuanchor();
|
tongbuanchor.setAnchorid(tongbuanchorid);
|
tongbuanchor.setType(anchortype);
|
tongbuanchor.setState(state);
|
JSONObject jsonObject = JSONObject.fromObject(tongbuanchor);
|
HttpUtil.doPost(postUrl, jsonObject.toString(), Config.getCharset());
|
dis = null;
|
}
|
|
}
|