package com.ld.igds.protocol.zldz.command.builder;
|
|
import com.ld.igds.io.request.BaseRequest;
|
import com.ld.igds.protocol.zldz.command.message.Message;
|
import com.ld.igds.protocol.zldz.util.ServerUtils;
|
import com.ld.igds.util.BytesUtil;
|
|
|
/**
|
* 粮情信息命令
|
*
|
* @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(ServerUtils.MSG_TYPE_8815));
|
}
|
|
}
|