package com.kingdee.shr.customer.gtiit.handler;

import com.kingdee.bos.BOSException;
import com.kingdee.bos.Context;
import com.kingdee.eas.common.EASBizException;
import com.kingdee.eas.util.app.DbUtil;
import com.kingdee.jdbc.rowset.IRowSet;
import com.kingdee.shr.base.syssetting.MSFServiceFacadeFactory;
import com.kingdee.shr.base.syssetting.context.SHRContext;
import com.kingdee.shr.base.syssetting.exception.SHRWebException;
import com.kingdee.shr.cmpdesign.web.handler.fix.FixAdjustSalaryHandler;
import org.springframework.ui.ModelMap;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
import java.sql.SQLException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.YearMonth;
import java.time.temporal.ChronoUnit;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * description: FixAdjustSalaryHandlerExV2 <br>
 * date: 2025/4/14 10:36 <br>
 * author: lhbj <br>
 * version: 1.0 <br>
 */
public class FixAdjustSalaryHandlerExV2 extends FixAdjustSalaryHandler{

    /**
     * 添加员工薪酬追溯信息
     * @param request
     * @param response
     * @param modelMap
     * @return
     * @throws SHRWebException
     */
    public String addReviewDataAction(HttpServletRequest request, HttpServletResponse response, ModelMap modelMap)
            throws SHRWebException {
        Context ctx = SHRContext.getInstance().getContext();
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        //生效日期
        String effectDay = request.getParameter("effectDay");
        //追溯发放月份
        String retroactiveDate = request.getParameter("retroactiveDate");
        //人员id
        String personId = request.getParameter("personId");
        //金额
        String money = request.getParameter("money");

        try {
            HashMap<String,Object> map = new HashMap();
            map.put("effectDay",effectDay);
            map.put("retroactiveDate",retroactiveDate);
            map.put("personId",personId);
            map.put("money",money);
            //追溯发放日期
            MSFServiceFacadeFactory.getLocalInstance(ctx).processService("retMoneyService", map);
        } catch (BOSException e) {
            e.printStackTrace();
        } catch (EASBizException e) {
            e.printStackTrace();
        }
        return null;
    }
}
