jiazx0107@163.com
2023-12-14 231cdeb9b7a55ba08fb8cffda35f5535b9292873
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
package com.fzzy.protocol.zldz.cmd;
 
 
import com.fzzy.api.utils.BytesUtil;
import com.fzzy.io.request.BaseRequest;
import com.fzzy.protocol.zldz.data.Message;
import com.fzzy.protocol.zldz.server.ZldzServerUtil;
 
/**
 * 粮情信息命令
 *
 * @author Andy
 */
public class CommandBuilder8815 extends CommandBuilder {
 
 
    private final static CommandBuilder8815 instance = new CommandBuilder8815();
 
    private CommandBuilder8815() {
 
    }
 
    public static CommandBuilder8815 getInstance() {
        return instance;
    }
 
 
    public void buildHeader(Message message, BaseRequest request) {
        String hexCompanyId = BytesUtil.getTargetId(request.getCompanyId(), true);
        hexCompanyId = BytesUtil.tran_LH(hexCompanyId);
 
        message.setSourceId(hexCompanyId);
        message.setSendId(hexCompanyId);
        message.setCompanyId(hexCompanyId);
 
        message.setTargetId(BytesUtil.tran_LH(BytesUtil.getTargetId(request.getSerId(), true)));
 
        message.setMessageType(BytesUtil.tran_LH(ZldzServerUtil.MSG_TYPE_8815));
    }
 
}