package com.webclient.beans.udworkorder;

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

import java.rmi.RemoteException;

/**
 * 日常维修工单-退库单子表
 * edit 2023-07-05
 */
public class UdtkdDataBean extends DataBean {

    public void toudtkd() throws MXException, RemoteException {
        MboRemote mbo=getMbo();
        String siteid=mbo.getOwner().getString("SITEID");
        String appName="";
        if("TZ01".equalsIgnoreCase(siteid) || "GH01".equalsIgnoreCase(siteid)){
            appName = "UDCLTKD";
        }else{
            appName = "UDTKD";
        }
        int udlldid=mbo.getInt("UDLLDID");

        StringBuffer newUrl = new StringBuffer(this.clientSession.getMaximoRequestURI());
        newUrl.append("?event=gotoapp&value=" +appName+"&uniqueid="+udlldid);
        this.clientSession.getCurrentApp().put("forcereload", "true");
        this.clientSession.gotoApplink(newUrl.toString());
    }


}
