package nccloud.web.mmbd.bchange.bchangemaster.action;
import java.util.HashMap;
import java.util.Map;
import nccloud.web.codeplatform.framework.action.base.BaseAction;
import nccloud.web.codeplatform.framework.action.base.RequstParamWapper;
import nccloud.web.codeplatform.framework.action.base.RequestDTO;
import nccloud.web.codeplatform.framework.action.base.VOTransform;
import nccloud.framework.service.ServiceLocator;
import nccloud.framework.web.container.IRequest;
import nc.vo.bchange.bchange.BchangeMasterVO;
import nc.itf.mmbd.bchange.bchangemaster.IBchangeMasterVOService;


/**
 * 新增Action
 */
public class AddBchangeMasterVOAction extends BaseAction{

	@Override
	public Object doAction(IRequest request, RequstParamWapper paramWapper) throws Throwable{
		//json数据转换
		RequestDTO param = VOTransform.toVO(paramWapper.requestString,RequestDTO.class);
		//获取参数
		Map<String,Object> userJson = param.getUserJson();
		if(userJson == null){
			userJson = new HashMap<>();
		}
		BchangeMasterVO[] vos = this.getVOs(param, BchangeMasterVO.class);
		
		//获得实体VO
		IBchangeMasterVOService service = ServiceLocator.find(IBchangeMasterVOService.class);
		BchangeMasterVO vo = service.preAddBchangeMasterVO(vos[0],userJson);
		return buildResult(param,true,null,vo);
		
	}
}


