package com.app.hxqh.udpgth;

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

import java.rmi.RemoteException;

/**
 *  Ρ‘ΤρΘΛΤ±
 * createby  liuxq 2023-12-15
 */
public class FldPersonNum extends MAXTableDomain {

    public FldPersonNum(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 ORGID = mbo.getString("ORGID");
        String SITEID = mbo.getString("SITEID");
        String sql = " 1=1 and status='ACTIVE' and LOCATIONORG='"+ORGID+"' and LOCATIONSITE='"+SITEID+"'";
        setListCriteria(sql);
        return super.getList();
    }
}