package com.kingdee.eas.custom.expandassess.hadler;

import com.kingdee.bos.Context;
import com.kingdee.eas.custom.expandassess.ExpandAssessInfo;
import com.kingdee.eas.custom.expandassess.app.PeriodStatusEnum;
import com.kingdee.eas.framework.CoreBaseInfo;
import com.kingdee.shr.base.syssetting.context.SHRContext;
import com.kingdee.shr.base.syssetting.exception.SHRWebException;
import com.kingdee.shr.base.syssetting.web.handler.EditHandler;
import org.springframework.ui.ModelMap;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author qingwu
 * @date 2024/5/15
 * @apiNote
 */
public class ExpandAssessEditHandler extends EditHandler {
    private Context ctx = SHRContext.getInstance().getContext();

    /**
     * 创建页面时 初始化周期解除
     *
     * @param request
     * @param response
     * @param modelMap
     * @return
     * @throws SHRWebException
     */
    @Override
    protected CoreBaseInfo createNewModel(HttpServletRequest request, HttpServletResponse response, ModelMap modelMap) throws SHRWebException {
        ExpandAssessInfo expandAssessInfo = (ExpandAssessInfo) super.createNewModel(request, response, modelMap);
        //初始化数据
        expandAssessInfo.setPeriodStatus(PeriodStatusEnum.UNLOCK);
        return expandAssessInfo;
    }

}
