package com.kingdee.eas.custom.recuritment.handler;

import com.kingdee.bos.Context;
import com.kingdee.bos.util.BOSUuid;
import com.kingdee.eas.basedata.org.HROrgUnitInfo;
import com.kingdee.eas.custom.recuritment.ApplicantBeisenInfo;
import com.kingdee.eas.custom.recuritment.bizEnum.ExecuteResultEnum;
import com.kingdee.eas.framework.CoreBaseInfo;
import com.kingdee.eas.hr.base.HRBillBaseInfo;
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 javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author qingwu
 * @date 2025/7/2
 * @apiNote
 */
public class ApplicantBeisenEditHandler extends EditHandler {
    private Context ctx = SHRContext.getInstance().getContext();

    @Override
    protected void beforeSave(HttpServletRequest request, HttpServletResponse response, CoreBaseInfo model) throws SHRWebException {
        HRBillBaseInfo hrBillBaseInfo = (HRBillBaseInfo) model;
        HROrgUnitInfo hrOrgUnitInfo = new HROrgUnitInfo();
        hrOrgUnitInfo.setId(BOSUuid.read("00000000-0000-0000-0000-000000000000CCE7AED4"));
        hrBillBaseInfo.setHrOrgUnit(hrOrgUnitInfo);
        ApplicantBeisenInfo applicantBeisenInfo = (ApplicantBeisenInfo) model;
        applicantBeisenInfo.setSyncStatus(ExecuteResultEnum.UNEXECUTE);
        super.beforeSave(request, response, model);
    }
}
