package nccloud.hrkq.hrkq.monthottimevo.action;

import java.util.HashMap;

import org.apache.commons.lang3.StringUtils;

import nc.vo.pub.BusinessRuntimeException;
import nc.vo.uif2.LoginContext;
import nccloud.framework.web.container.IRequest;
import nccloud.web.hr.pub.HRCommonAction;
import nccloud.web.hr.pub.HRNccUtils;
import nccloud.web.uapbd.commons.web.ParamUtils;

public class MonthOtVOBeforeEditAction extends HRCommonAction{

	@Override
	public <T> Object execute(IRequest request, T para) throws Exception {
		ParamUtils param = new ParamUtils(request);
		LoginContext context = HRNccUtils.getLoginContext(param);
		
		String key = param.getString("key", null);
		if (StringUtils.isBlank(key)) {
			throw new BusinessRuntimeException("Parameter Error!");
		}
		String pk_org = param.getString("pk_org", null);
		HashMap result = new HashMap();
		if ("witness".equals(key)) {
			HashMap refParam = new HashMap();
			refParam.put("pk_org", pk_org);
			refParam.put("pk_group", context.getPk_group());
//			refParam.put("isIncludeKeyPsnGrp", "true");
//			refParam.put("GridRefActionExt", nccloud.web.hryf.regApply.sqlbuilder.RegPsnRefSqlBuilder.class.getName());
			result.put("refParam", refParam);
		}
		return result;
	}
}
