package com.gaowj.system.back;

import java.io.IOException;

import com.gaowj.business.action.BasicAction;
import com.gaowj.business.exception.BusinessException;
import com.gaowj.business.util.PropUtil;

public class interimAction extends BasicAction {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String gwjURL;
    private String page_num;
    private String ls_myzd_id;
    private String ls_operate;
    private String ls_splx;
	@Override
	public String execute() throws BusinessException, IOException {
		String tempURL = request.getParameter("url");
		page_num = request.getParameter("page_num");
		ls_myzd_id = request.getParameter("ls_myzd_id");
		ls_operate = request.getParameter("operate");
		ls_splx = request.getParameter("splx");
		if(tempURL==null || tempURL.trim().length()==0){
//			gwjURL = "system/pages/frame/manage.jsp";
//			gwjURL = "system/pages/frameDojo/main.jsp";
//			gwjURL = "system/pages/frameEasyui/main.jsp";
			gwjURL = PropUtil.getValue("login_main_url", "quartz_service", "system/pages/frameEasyui/main.jsp");
			if(gwjURL.indexOf(".jsp")== -1){
				response.sendRedirect(gwjURL);
			}
			
		}else if(tempURL!=null && tempURL.trim().equals("tempjsp")){
			gwjURL = "system/pages/frame/tempJsp.jsp";
		}else if(tempURL!=null && tempURL.trim().equals("moduleType")){
			gwjURL = "system/pages/frame/moduletype.jsp";
			if(page_num!=null && page_num.trim().length()>0){ 
				gwjURL = "system/pages/frame/moduletype.jsp?page_num="+page_num;
			}
		}else if(tempURL!=null && tempURL.trim().equals("moduleTypeEdit")){
			gwjURL = "system/pages/frame/moduletypeEDIT.jsp?page_num="+page_num+"&ls_myzd_id="+ls_myzd_id+"&operate="+ls_operate;
		}else if(tempURL!=null && tempURL.trim().equals("module")){
			gwjURL = "system/pages/frame/module.jsp";
			if(page_num!=null && page_num.trim().length()>0){ 
				gwjURL = "system/pages/frame/module.jsp?page_num="+page_num;
			}
		}else if(tempURL!=null && tempURL.trim().equals("moduleEdit")){
			gwjURL = "system/pages/frame/moduleEDIT.jsp?page_num="+page_num+"&ls_myzd_id="+ls_myzd_id+"&operate="+ls_operate;
		}else if(tempURL!=null && tempURL.trim().equals("group")){
			gwjURL = "system/pages/frame/group.jsp";
			if(page_num!=null && page_num.trim().length()>0){ 
				gwjURL = "system/pages/frame/group.jsp?page_num="+page_num;
			}
		}else if(tempURL!=null && tempURL.trim().equals("groupEdit")){
			gwjURL = "system/pages/frame/groupEDIT.jsp?page_num="+page_num+"&ls_myzd_id="+ls_myzd_id+"&operate="+ls_operate;
		}else if(tempURL!=null && tempURL.trim().equals("depart")){
			gwjURL = "system/pages/frame/depart.jsp";
			if(page_num!=null && page_num.trim().length()>0){ 
				gwjURL = "system/pages/frame/depart.jsp?page_num="+page_num;
			}
		}else if(tempURL!=null && tempURL.trim().equals("departEdit")){
			gwjURL = "system/pages/frame/departEDIT.jsp?page_num="+page_num+"&ls_myzd_id="+ls_myzd_id+"&operate="+ls_operate;
		}else if(tempURL!=null && tempURL.trim().equals("user")){
			gwjURL = "system/pages/frame/user.jsp";
			if(page_num!=null && page_num.trim().length()>0){ 
				gwjURL = "system/pages/frame/user.jsp?page_num="+page_num;
			}
		}else if(tempURL!=null && tempURL.trim().equals("userEdit")){
			String ls_depart_id = request.getParameter("ls_depart_id");
			gwjURL = "system/pages/frame/userEDIT.jsp?page_num="+page_num+"&ls_myzd_id="+ls_myzd_id+"&operate="+ls_operate;
			if(ls_depart_id!=null && ls_depart_id.trim().length()>0){
				gwjURL = "system/pages/frame/userEDIT.jsp?page_num="+page_num+"&ls_myzd_id="+ls_myzd_id+"&operate="+ls_operate+"&ls_depart_id="+ls_depart_id;
			}
		}else if(tempURL!=null && tempURL.trim().equals("log")){
			gwjURL = "system/pages/frame/log.jsp";
			if(page_num!=null && page_num.trim().length()>0){ 
				gwjURL = "system/pages/frame/log.jsp?page_num="+page_num;
			}
		}else if(tempURL!=null && tempURL.trim().equals("modipass")){
			gwjURL = "system/pages/frame/modiPass.jsp";
		}else if(tempURL!=null && tempURL.trim().equals("gcm")){
			gwjURL = "system/pages/frame/groupChoiceModule.jsp?ls_myzd_id="+ls_myzd_id;
		}else if(tempURL!=null && tempURL.trim().equals("gcu")){
			gwjURL = "system/pages/frame/groupChoiceUser.jsp?ls_myzd_id="+ls_myzd_id;
		}else if(tempURL!=null && tempURL.trim().equals("qxuu")){
			gwjURL = "system/pages/frame/userScope.jsp?ls_myzd_id="+ls_myzd_id;
		}else if(tempURL!=null && tempURL.trim().equals("sobj")){
			gwjURL = "system/pages/frame/objStatus.jsp?ls_myzd_id="+ls_myzd_id;
			if(page_num!=null && page_num.trim().length()>0){ 
				gwjURL = "system/pages/frame/objStatus.jsp?ls_myzd_id="+ls_myzd_id+"&page_num="+page_num;
			}
		}else if(tempURL!=null && tempURL.trim().equals("sobjEdit")){
			gwjURL = "system/pages/frame/objStatusEDIT.jsp?page_num="+page_num+"&ls_myzd_id="+ls_myzd_id+"&operate="+ls_operate;
		}
		return SUCCESS;
	}
		
	public String getGwjURL() {
		return gwjURL;
	}
	public void setGwjURL(String gwjURL) {
		this.gwjURL = gwjURL;
	}
	public String getPage_num() {
		return page_num;
	}
	public void setPage_num(String pageNum) {
		page_num = pageNum;
	}
	public String getLs_myzd_id() {
		return ls_myzd_id;
	}
	public void setLs_myzd_id(String lsObjectId) {
		ls_myzd_id = lsObjectId;
	}
	public String getLs_operate() {
		return ls_operate;
	}
	public void setLs_operate(String lsOperate) {
		ls_operate = lsOperate;
	}
	public String getLs_splx() {
		return ls_splx;
	}
	public void setLs_splx(String lsSplx) {
		ls_splx = lsSplx;
	}

}
