yzt
2023-05-26 2f70f6727314edd84d8ec2bfe3ce832803f1ea77
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
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;
    }
}