package com.webclient.beans.assetdispo;

import psdi.mbo.MboRemote;
import psdi.mbo.MboSetRemote;
import psdi.util.MXException;
import psdi.webclient.system.beans.DataBean;

import java.rmi.RemoteException;

/**
 * 资产台账-执行组标签页
 */
public class ZxzDataBean extends DataBean {

    /**
     * 跳转至人员组
     * @throws MXException
     * @throws RemoteException
     */
    public void topersongr() throws MXException, RemoteException {
        MboRemote mbo=getMbo();
        MboSetRemote ryzSet=mbo.getMboSet("$PERSONGROUP", "PERSONGROUP", "PERSONGROUP='"+mbo.getString("UDZXZGH")+"' AND SITEID='"+mbo.getString("SITEID")+"'");
        if(null!=ryzSet && !ryzSet.isEmpty()){
            int prid=ryzSet.getMbo(0).getInt("PERSONGROUPID");
            String appName = "persongr";
            StringBuffer newUrl = new StringBuffer(this.clientSession.getMaximoRequestURI());
            newUrl.append("?event=gotoapp&value=" +appName+"&uniqueid="+prid);
            this.clientSession.getCurrentApp().put("forcereload", "true");
            this.clientSession.gotoApplink(newUrl.toString());
        }

    }
}
