package com.app.hxqh.udbudgetqs;

import psdi.mbo.MAXTableDomain;
import psdi.mbo.MboRemote;
import psdi.mbo.MboSetRemote;
import psdi.mbo.MboValue;
import psdi.util.MXException;

import java.rmi.RemoteException;

/**
 * 项目管理-问题清单选择责任人
 * edit 2023-04-27
 */
public class FldDUTY extends MAXTableDomain {

    public FldDUTY(MboValue mbv) throws MXException,RemoteException {
        super(mbv);
        String thisAttr = getMboValue().getAttributeName();
        setRelationship("PERSON", "");
        String[] FromStr = { "PERSONID" };
        String[] ToStr = { thisAttr };
        setLookupKeyMapInOrder(ToStr, FromStr);
    }

    public void init() throws RemoteException, MXException {
        super.init();
    }
    public void action() throws RemoteException, MXException {
        super.action();
    }

    public MboSetRemote getList() throws RemoteException, MXException {
        MboRemote mbo = getMboValue().getMbo();
        String sql = "STATUS='ACTIVE' AND LOCATIONSITE='"+mbo.getString("SITEID")+"' ";
        setListCriteria(sql);
        return super.getList();
    }
}