CommandInfoAnalysis.java 1.2 KB
package com.sy.bwAnalysis;

import com.sy.bwAssist.commandInfo.CommandInfo;
import com.sy.bwAssist.Message;
import com.sy.bwAssist.Meta;
import com.sy.model.commandInfo;


public class CommandInfoAnalysis {

	public commandInfo toJavaBean(Message msg) {
		commandInfo bean = new commandInfo();
		CommandInfo info = msg.getComInfo();
		Meta meta = msg.getMeta();
		bean.setSender(meta.getSender());
		bean.setReceiver(meta.getReceiver());
		bean.setSeqn(meta.getSeqn());
		bean.setSendtime(meta.getSendTime());
		bean.setBtype(meta.getType());
		bean.setStype(meta.getSmType());
		bean.setAreaId(info.getAREA_ID());
		bean.setChnlNo(info.getCHNL_NO());
		bean.setiEType(info.getI_E_TYPE());
		bean.setSeqNo(info.getSEQ_NO());
		bean.setCheckResult(info.getCheckResult());
		bean.setEsealId(info.getSeal().getEsealId());
		bean.setSealKey(info.getSeal().getSealKey());
		if(info.getGps()!=null){
			bean.setVeName(info.getGps().getVeName());
			bean.setGpsId(info.getGps().getGpsId());
			bean.setDestCustoms(info.getGps().getDestCostoms());
			bean.setOriginCustoms(info.getGps().getOpiginCostoms());
		}
		bean.setFormId(info.getFormId());
		bean.setOpHint(info.getOpHint());

		return bean;
	}

}