3.7
fxl
2023-03-07 632a18ee7c83441a6036b90577424d2daad8d19c
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
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;
    }
 
}