SorterMoveOutAction.java

package com.mycim.webapp.actions.operation.run;

import com.mycim.valueobject.SystemConstant;
import com.mycim.webapp.WebUtils;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

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

/**
 * @Author: yibing.liu
 * @Date: 2022/3/17 14:29
 */
public class SorterMoveOutAction extends MoveOutAction {

    @Override
    protected ActionForward showMoveOutPage(ActionMapping mapping, HttpServletRequest request) {
        //先打开SorterJob的Manual界面
        if (request.getAttribute("sorterMoveOutFlag") != null){
            return mapping.findForward("moveout");
        } else {
            return mapping.findForward("showSorterPage");
        }
    }

    public ActionForward continueMoveOut(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
        request.setAttribute("sorterMoveOutFlag", SystemConstant.Str.NUM_TRUE);
        return super.init(mapping, form, request, response);
    }

}