package com.app.hxqh.udmeter;


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-6-16
 */
public class FldUdmeterName2 extends MAXTableDomain{

	public FldUdmeterName2(MboValue mbv) {
		super(mbv);
		String thisAttr = getMboValue().getAttributeName();
		setRelationship("ASSET","");//从哪个表查询
		String[] source = {"ASSETNUM"};//查询的字段
		String[] target = {thisAttr};//插入的字段
		setLookupKeyMapInOrder(target, source);
	}

	@Override
	public MboSetRemote getList() throws MXException, RemoteException {
		MboRemote mbo = getMboValue().getMbo();
		String ORGID = mbo.getString("ORGID");
		String SITEID = mbo.getString("SITEID");
		String sql = " 1=1 AND ORGID='"+ORGID+"' and SITEID='"+SITEID+"'  and ATYPE='4'";
		setListCriteria(sql);
		return super.getList();
	}
}

 



