package com.hxzkoa.udp;
|
|
import com.hxzkoa.json.tb_achor;
|
import com.hxzkoa.json.tb_tongbuanchor;
|
import com.hxzkoa.util.Config;
|
import com.hxzkoa.util.HttpUtil;
|
import com.hxzkoa.util.ModifyConfig;
|
|
import net.sf.json.JSONObject;
|
|
public class Have_55AA02_do {
|
/** 处理标签心跳数据 */
|
|
static String postUrl = Config.getPostUrl();
|
|
public static void dellrgs(String infom) {
|
String[] hex = StringToHex.hex(infom.toString());
|
String anchorid = hex[5] + hex[4];
|
//报文显示
|
// String yuanshiMessage=postUrl+"yuanshiMessage.do";
|
String messageJson = GetNowTime.timestamp2()+ " 收:" +infom.toString() ;
|
// JSONObject json = JSONObject.fromObject(messageJson);
|
// HttpUtil.doPost(yuanshiMessage, json, "UTF-8");
|
String BaowenPath = Config.getBaowenConfig();
|
String baowenContent = ModifyConfig.readData(BaowenPath, "yuanshiMessage");
|
String baowenStatus = ModifyConfig.readData(BaowenPath, "baowenSwitch");
|
if (baowenStatus.equals("1")){
|
/* Udp_Receive.yuanshiMessage.add(messageJson); */
|
}
|
// //基站同步状态
|
StringBuffer tongbustate=new StringBuffer(String.valueOf(Integer.parseInt(hex[6],16))) ;
|
//
|
// //修改基站集合同步状态
|
String anchorurl = postUrl + "anchorManagement_heart.do";
|
tb_achor anchor = new tb_achor();
|
anchor.setAnchorid(anchorid);
|
JSONObject jsonObject = JSONObject.fromObject(anchor);
|
HttpUtil.doPost(anchorurl, jsonObject.toString(), Config.getCharset());
|
//
|
// //修改同步基站集合同步状态
|
String anchoTongbururl = postUrl + "anchorManagement_heart_tongbu.do";
|
tb_tongbuanchor tongbuanchor = new tb_tongbuanchor();
|
tongbuanchor.setState(tongbustate.toString());
|
tongbuanchor.setAnchorid(anchorid);
|
jsonObject = JSONObject.fromObject(tongbuanchor);
|
HttpUtil.doPost(anchoTongbururl, jsonObject.toString(), Config.getCharset());
|
//
|
hex=null;
|
}
|
}
|