package nccloud.web.hrwa.wagrade.action;

import nc.itf.hr.wa.IWaGradeQueryService;
import nc.itf.hr.wa.IWaGradeService;
import nc.vo.wa.grade.AggWaGradeVO;
import nccloud.framework.service.ServiceLocator;
import nccloud.framework.web.container.IRequest;
import nccloud.web.hr.pub.HRCommonAction;
import nccloud.web.uapbd.commons.web.ParamUtils;
/**
 * 
 * 下午4:20:50
 * msw：
 * 薪资规则点增加按钮时进行校验,若校验通过，返回true,不通过，直接抛错
 *
 */
public class WaGradeDeleteAction extends HRCommonAction {

	@Override
	public <T> Object execute(IRequest request, T para) throws Exception {
		ParamUtils param = new ParamUtils(request);	
		String pkWaGrd = param.getString("pk_wa_grd", null);
		AggWaGradeVO gradeVo = (AggWaGradeVO) ServiceLocator.find(IWaGradeQueryService.class)
				.queryAggWagradeByGrdPK(pkWaGrd);
		if (gradeVo == null) {
			return null;
		}
		ServiceLocator.find(IWaGradeService.class).deleteWaGradeVO(gradeVo);
		return true;
	}
}
