import java.awt.event.*;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.Vector;
import javax.swing.JTree;
import javax.swing.tree.DefaultTreeModel;
import javax.swing.tree.ExpandVetoException;
import javax.swing.tree.TreeModel;
import javax.swing.tree.TreePath;
import org.apache.log4j.Logger;
import com.kingdee.bos.BOSException;
import com.kingdee.bos.ui.face.CoreUIObject;
import com.kingdee.bos.ui.face.IUIWindow;
import com.kingdee.bos.ui.face.ItemAction;
import com.kingdee.bos.ui.face.UIFactory;
import com.kingdee.bos.util.BOSUuid;
import com.kingdee.bos.ctrl.swing.tree.DefaultKingdeeTreeNode;
import com.kingdee.bos.dao.ormapping.ObjectUuidPK;
import com.kingdee.bos.dao.query.IQueryExecutor;
import com.kingdee.bos.dao.query.QueryExecutorFactory;
import com.kingdee.eas.framework.*;
import com.kingdee.eas.gzw.basedata.CentralCorporationInfo;
import com.kingdee.eas.gzw.basedata.IIndustry;
import com.kingdee.eas.gzw.basedata.IndustryFactory;
import com.kingdee.eas.gzw.basedata.IndustryInfo;
import com.kingdee.bos.metadata.IMetaDataPK;
import com.kingdee.bos.metadata.MetaDataPK;
import com.kingdee.bos.metadata.entity.EntityViewInfo;
import com.kingdee.bos.metadata.entity.FilterInfo;
import com.kingdee.bos.metadata.entity.FilterItemInfo;
import com.kingdee.bos.metadata.query.util.CompareType;
import com.kingdee.eas.base.commonquery.client.CommonQueryDialog;
import com.kingdee.eas.base.commonquery.client.CommonQueryProcessor;
import com.kingdee.eas.basedata.org.AdminOrgUnitFactory;
import com.kingdee.eas.basedata.org.AdminOrgUnitInfo;
import com.kingdee.eas.basedata.org.CtrlUnitInfo;
import com.kingdee.eas.basedata.org.IAdminOrgUnit;
import com.kingdee.eas.basedata.org.OUException;
import com.kingdee.eas.basedata.org.OrgConstants;
import com.kingdee.eas.common.EASBizException;
import com.kingdee.eas.common.client.OprtState;
import com.kingdee.eas.common.client.SysContext;
import com.kingdee.eas.common.client.UIContext;
import com.kingdee.jdbc.rowset.IRowSet;
/**
* 任期指标体系的List界面
*/
public class TerIndSysListUI extends AbstractTerIndSysListUI
{
private static final Logger logger = CoreUIObject.getLogger(TerIndSysListUI.class);
//用于显示中央企业ID的集合
private Vector conCops=new Vector();
/**
* output class constructor
*/
public TerIndSysListUI() throws Exception
{
super();
}
//定位
protected String[] getLocateNames(){
logger.info("定位");
String[] locateNames = new String[5];
locateNames[0] = "tenurePeriod.name";
locateNames[1] = "cenCop.name";
locateNames[2] = "indexName.name";
locateNames[3] = "industry";
locateNames[4] = "basePoint";
return locateNames;
}
/**
* output getBizInterface method
*/
protected com.kingdee.eas.framework.ICoreBase getBizInterface() throws Exception
{
return com.kingdee.eas.gzw.indexsysman.TerIndSysFactory.getRemoteInstance();
}
/**
* output getTreeInterface method
*/
protected ITreeBase getTreeInterface() throws Exception
{
return com.kingdee.eas.gzw.indexsysman.TerIndSysTreeFactory.getRemoteInstance();
}
/**
* output getGroupEditUIName method
*/
protected String getGroupEditUIName()
{
return com.kingdee.eas.gzw.indexsysman.client.TerIndSysTreeEditUI.class.getName();
}
/**
* output getQueryFieldName method
*/
protected String getQueryFieldName()
{
return "treeid.id";
}
/**
* output getKeyFieldName method
*/
protected String getKeyFieldName()
{
return "id";
}
/**
* output getRootName method
*/
protected String getRootName()
{
return "任期指标体系";
}
/**
* output createNewData method
*/
protected com.kingdee.bos.dao.IObjectValue createNewData()
{
com.kingdee.eas.gzw.indexsysman.TerIndSysInfo objectValue = new com.kingdee.eas.gzw.indexsysman.TerIndSysInfo();
return objectValue;
}
/**
* 描述:继承父类选中节点的事件。
* 该方法是响应选中左边树形菜单节点的事件。
* 具体:选中树形菜单节点后,把符合该节点的数据的显示在右边的表格上。
* @author:yell
* @see com.kingdee.eas.framework.client.AbstractTreeDetailListUI#treeMain_valueChanged(javax.swing.event.TreeSelectionEvent)
*/
protected void treeMain_valueChanged(javax.swing.event.TreeSelectionEvent e) throws Exception
{
logger.info("树菜单选中的节点已经改变");
logger.info("选中的路径为:"+e.getNewLeadSelectionPath());//新的路径
/*
* 根据选中节点所对应的对象更新右边的表数据
* 1.获取选中节点的对象
* 2.获取选中节点的对象的类型及其ID
* 3.根据选中节点的对象的类型、ID以及登陆用户所对应的组织信息查询数据库,更新右边的数据表.
*/
DefaultKingdeeTreeNode selectTreeNode=getSelectedTreeNode1();
if( selectTreeNode!= null){
logger.info("选中一节点");
//获取用户的组织信息
//CtrlUnitInfo cu=getCtrlUnitInfo();
EntityViewInfo viewInfo = super.getDefaultEntityViewInfo();//获取原来的查询条件,不进行改变;
FilterInfo filter=null;
if(viewInfo==null){
logger.info("没有默认过滤条件,直接new 创建新的过滤条件。");
viewInfo=new EntityViewInfo();
filter= new FilterInfo();
}else{
filter=new FilterInfo();//viewInfo.getFilter();
//logger.info("默认过滤条件添加完毕,共"+filter.getFilterItems().size()+"条;");
}
Object selectObject=selectTreeNode.getUserObject();//获取选中节点的对象
//选中处室节点(即选中根节点)
if(selectObject instanceof com.kingdee.eas.basedata.org.CtrlUnitInfo){
com.kingdee.eas.basedata.org.CtrlUnitInfo cui=(com.kingdee.eas.basedata.org.CtrlUnitInfo)selectObject;
logger.info("选中根节点:"+cui.getName()+",查询出所有的指标");
getFilterInfobyCenCoP(filter);
}
//选中行业节点(即选中二级菜单节点)
if(selectObject instanceof com.kingdee.eas.gzw.basedata.IndustryInfo){
com.kingdee.eas.gzw.basedata.IndustryInfo industryInfo=(com.kingdee.eas.gzw.basedata.IndustryInfo)selectObject;
logger.info("选中行业节点:"+industryInfo.getId()+industryInfo.getName()+",查询出该行业下的所有企业的指标");
filter.getFilterItems().add(
new FilterItemInfo("industry", industryInfo.getName(), CompareType.EQUALS));
getFilterInfobyCenCoP(filter);
}
//选中企业的节点(选中叶子节点)
if(selectObject instanceof com.kingdee.eas.gzw.basedata.CentralCorporationInfo){
com.kingdee.eas.gzw.basedata.CentralCorporationInfo cenCorInfo=(com.kingdee.eas.gzw.basedata.CentralCorporationInfo)selectObject;
logger.info("选中企业节点:"+cenCorInfo.getId()+":"+cenCorInfo.getName()+",查询出该企业的所有指标");
filter.getFilterItems().add(
new FilterItemInfo("cenCop.id", cenCorInfo.getId(), CompareType.EQUALS));
}
//logger.info("过滤的条件的SQL语句是:"+filter.toSql());
viewInfo.setFilter(filter);
this.mainQuery = viewInfo;
}
setLocatePre(false);
execQuery();
tblMain.setRefresh(true);
tblMain.reLayoutAndPaint();
setSelectFirstRow(this.tblMain);
this.setLocatePre(true);
}
/**
* 描述:获得所有需要查询的企业编号,并将其生成过滤项.
* @param FilterInfo
* @return 无
*
* @author:yell
* 创建时间:2009-3-19 <p>
* @throws BOSException
*
* @see <相关的类>
*/
private void getFilterInfobyCenCoP(FilterInfo _filter) throws BOSException{
StringBuffer sb=new StringBuffer();
/*
* 无行业或默认的过滤项,
* 则判断如果没有企业的话直接查询一个不存在的指标,
* 否则添加一个能满足的过滤项。
*/
if(_filter.getFilterItems().size()<1){
if(conCops.size()<1){
logger.info("用户选中树根,而且树根下没有企业节点,因此直接查询一个不存在的企业的指标");
_filter.getFilterItems().add(new FilterItemInfo("cenCop.id","yell",CompareType.EQUALS));
return;
}else{
_filter.getFilterItems().add(new FilterItemInfo("cenCop.id","yell",CompareType.NOTEQUALS));
}
}
// 先将filter中的原有的过滤条件进行SQL逻辑转换;
int _j=0;
for(;_j<_filter.getFilterItems().size();_j++){
if(_j>0){
sb.append(" and #"+_j);
}else{
sb.append(" #0 ");
}
}
//给过滤filter添加企业的条件的过滤项;
for(int i=0;i<conCops.size();i++){
_filter.getFilterItems().add(new FilterItemInfo("cenCop.id",conCops.get(i),CompareType.EQUALS));
if(i>0){
sb.append(" or #"+_j);
}else{
sb.append(" and (#"+_j);
}
_j++;
//logger.info("企业的id:"+conCops.get(i));
}
sb.append(")");
_filter.setMaskString(sb.toString());
logger.info("共有"+_filter.getFilterItems().size()+"个过滤项");
logger.info("企业编号之间的关系的过滤条件是:"+_filter.toSql());
}
public DefaultKingdeeTreeNode getSelectedTreeNode1()
{
return (DefaultKingdeeTreeNode) treeMain.getLastSelectedPathComponent();
}
/**
* 获取当前用户的组织信息;
*/
private CtrlUnitInfo getCtrlUnitInfo()throws Exception{
logger.info("获取用户组织信息开始:");
CtrlUnitInfo cu = SysContext.getSysContext().getCurrentCtrlUnit();//先获得当前用户的组织信息;
/*
* 判断用户的合法性,及cu是否为空,不为空则获取组织编号.
*/
if (cu == null) {
logger.info("用户组织信息为空,抛出异常");
throw new OUException(OUException.MUST_ENTER_CU);
}
if (cu.getId().toString().equals(OrgConstants.SYS_CU_ID)) {
logger.info("用户组织信息是系统的,抛出异常");
throw new OUException(OUException.CAN_NOT_SYS_CU);
}
logger.info("当前用户组织信息已经成功获取完毕");
return cu;
}
protected void beforeExcutQuery(EntityViewInfo ev) {
FilterInfo filter = ev.getFilter();
try {
logger.info("所有的关系的过滤条件是(之前):"+ev.getFilter().toSql());
getFilterInfobyCenCoP(filter);
ev.setFilter(filter);
} catch (Exception e) {
e.printStackTrace();
}
logger.info("所有的关系的过滤条件是:"+ev.getFilter().toSql());
super.beforeExcutQuery(ev);
}
/**
* 构造左边树形菜单,菜单项是中央企业
* 描述:
* @author:yell
* @see com.kingdee.eas.framework.client.TreeDetailListUI#initTree()
*/
protected void initTree() throws Exception {
logger.info("开始构建树");
/*
* 先获得该用户的当前组织信息;
*/
CtrlUnitInfo cu =getCtrlUnitInfo();
/*
* 获得该用户所属的处室的中央企业的信息
*/
EntityViewInfo viewInfo = new EntityViewInfo();
FilterInfo filterInfo = new FilterInfo();
//如果是综合局的,则不设置过滤条件,查出所有的企业,
if(cu.getLevel()==1){
//filterInfo.getFilterItems().add(new FilterItemInfo("ChuShi.id",cu.getId().toString(), CompareType.EQUALS));
}else{
//不是综合局的各个处室,进行组织隔离,获得属于自己处室的企业;
filterInfo.getFilterItems().add(new FilterItemInfo("ChuShi.id",cu.getId().toString(), CompareType.EQUALS));
}
viewInfo.setFilter(filterInfo);
IMetaDataPK queryPK = new MetaDataPK("com.kingdee.eas.gzw.basedata.app.CentralCorpobyOrgQuery");
IQueryExecutor queryExcutor = QueryExecutorFactory.getRemoteInstance(queryPK);
queryExcutor.setObjectView(viewInfo);
IRowSet rows=queryExcutor.executeQuery();//查询出所有满足条件的集合;
logger.info("数据已经获取完毕,共有"+rows.size()+"条的记录的中央企业满足条件,准备构建树型菜单;");
DefaultKingdeeTreeNode root =buildOUTreebyRowSet(cu,rows);
treeMain.setModel(new DefaultTreeModel(root));
treeMain.setRootVisible(true);//设置根节点可见
treeMain.setShowsRootHandles(true);
logger.info("树的初始化结束");
}
/**
*
* 描述:根据查询的结果集创建树,把每一条记录都封装成一个对象。
* @param cu是所属处室;
* @param rowset是查询的结果.
* @return 返回值是树根节点.
* @author:yell
* 创建时间:2009-3-16
*
* @see NewOrgViewHelper类中buildOUTreeByRowSet方法
*/
private DefaultKingdeeTreeNode buildOUTreebyRowSet(CtrlUnitInfo cu,IRowSet rowset) throws BOSException {
/*
* 先检验查询的数据是否存在,不存在返回空值或返回空的根节点.
*/
if (rowset == null) {
return null;
}
if (rowset.size() == 0) {
return new DefaultKingdeeTreeNode(cu);
}
logger.info("---------------------开始构建树菜单---------------------");
DefaultKingdeeTreeNode rootTreeNode = null;
HashMap nodeMap = new HashMap();
conCops.removeAllElements();
conCops.clear();
try {
while (rowset.next()) {
CentralCorporationInfo fullInfo = createFullOrgUnitInfo2(rowset);
if (rootTreeNode == null) {
/*
* 如果根节点为空则说明是首次添加中央企业信息
* 1.先创建根节点
* 2.创建行业节点作为根节点下的子节点
* 3.把企业叶子添加到行业子节点下;
*/
logger.info("树根为空,先创建一树根,并把该节点的行业作为一个树根的子节点,棵树");
rootTreeNode = new DefaultKingdeeTreeNode(cu);
nodeMap.put(cu.getId(),rootTreeNode);//先根据用户所在的处室创建一个根节点;
DefaultKingdeeTreeNode subTreeNodeType = new DefaultKingdeeTreeNode(fullInfo.getType());//根据行业也创建一个子节点
rootTreeNode.add(subTreeNodeType);//把行业子节点添加到根节点下;
nodeMap.put(fullInfo.getType().getId(),subTreeNodeType);//一个行业的二级节点存放到map中;
DefaultKingdeeTreeNode subTreeLeaf = new DefaultKingdeeTreeNode(fullInfo);//给行业也创建一个叶子节点
subTreeNodeType.add(subTreeLeaf);
conCops.add(fullInfo.getId());
logger.info("首个中央企业信息添加完毕");
} else {
logger.info("树根不为空,添加一个企业");
//如果当前中央企业所在的行业的节点不存在,则新建一个行业为节点
DefaultKingdeeTreeNode tempNode=(DefaultKingdeeTreeNode) nodeMap.get(fullInfo.getType().getId());
if(tempNode==null){//当前中央企业所在的行业节点不存在;
logger.info("当前中央企业所在的行业节点不存在,先创建一个新行业节点,并添加到根节点下");
DefaultKingdeeTreeNode subTreeNode = new DefaultKingdeeTreeNode(fullInfo.getType());//创建一个行业节点
rootTreeNode.add(subTreeNode);
logger.info("行业节点已经添加到根节点下");
nodeMap.put(fullInfo.getType().getId(),subTreeNode);
logger.info("行业节点已经添加集合中");
DefaultKingdeeTreeNode subTreeLeaf = new DefaultKingdeeTreeNode(fullInfo);//创建一个叶子节点,存放企业信息
subTreeNode.add(subTreeLeaf);
conCops.add(fullInfo.getId());
logger.info("企业已经添加到行业节点下");
}else{
//该企业所在的行业节点已经存在,直接添加到该行业节点下;
logger.info("当前中央企业的上级行业节点已经存在,直接添加到该节点下");
DefaultKingdeeTreeNode subTreeLeaf = new DefaultKingdeeTreeNode(fullInfo);//创建一个叶子节点,存放企业信息
tempNode.add(subTreeLeaf);
conCops.add(fullInfo.getId());
logger.info("企业已经添加到行业节点下");
}
}
}
logger.info("---------------------树菜单已经成功完成---------------------");
} catch (Exception e) {
throw new BOSException(e);
}
return rootTreeNode;
}
/**
*
* 描述:根据查询的结果构建中央企业信息的实体类
* @param <参数描述>
* @return <返回值描述>
*
* @author:yell
* 创建时间:2009-3-16 <p>
* @throws BOSException
* @throws EASBizException
*
* @see <相关的类>
*/
private CentralCorporationInfo createFullOrgUnitInfo2(IRowSet row) throws SQLException, BOSException, EASBizException {
logger.info("开始构建一个中央企业实体");
CentralCorporationInfo centralCorInfo=new CentralCorporationInfo();
centralCorInfo.setId(BOSUuid.read(row.getString("id")));//获取id
centralCorInfo.setNumber(row.getString("number"));//获取中央企业的编码
centralCorInfo.setName(row.getString("name"));//获取中央企业的名称
//System.out.println("类型:"+row.getObject("Type.id").getClass());//测试Type.id所对应的类型,为String类
ObjectUuidPK PK=new ObjectUuidPK(row.getString("Type.id"));//根据行业编号获得一个ObjectUuidPK;
IIndustry iIndustry=IndustryFactory.getRemoteInstance();
IndustryInfo industryInfo=(IndustryInfo) iIndustry.getValue(PK);//获得行业PK
centralCorInfo.setType(industryInfo);//获取中央企业所属的行业;
PK=new ObjectUuidPK(row.getString("ChuShi.id"));//根据所属组织编号获得一个ObjectUuidPK;
IAdminOrgUnit iAdminOrgUnit=AdminOrgUnitFactory.getRemoteInstance();
AdminOrgUnitInfo adminOrgUnitInfo=(AdminOrgUnitInfo)iAdminOrgUnit.getValue(PK);
centralCorInfo.setChuShi(adminOrgUnitInfo);//获取中央企业所属的处室;
logger.info("完成一个中央企业实体构建");
/*
* 以下属性值没用,因此不添加,如果需要其他字段,必须先在com.kingdee.eas.gzw.basedata.app.CentralCorpobyOrgQuery中添加所需要的属性。
*/
// centralCorInfo.setAdress(row.getString("address"));//获取地址;
// centralCorInfo.setTel(row.getString("tel"));//获取电话
// centralCorInfo.setGreatoperat(row.getString("greatoperat"));//获取国资委认定的主业
// centralCorInfo.setRemark(row.getString("remark"));//获取备注
// centralCorInfo.setBriefIntro(row.getString("briefIntro"));//获取简介及历史改革
// centralCorInfo.setStratagem(row.getString("stratagem"));//获取发展战略
// centralCorInfo.setSetupfram(row.getString("setupfram"));//获取组织结构及重要子企业名称
return centralCorInfo;
}
/**
* 继承父类的方法,将要传递的参数存放到上下文HashMap中。
*/
protected void prepareUIContext(UIContext uiContext, ActionEvent e){
ItemAction action = getActionFromActionEvent(e);
if (!action.equals(actionAddNew)){
super.prepareUIContext(uiContext,e);
return;
}else{//是新增事件
logger.info("新增一个任期考核指标事件");
DefaultKingdeeTreeNode treeNode = (DefaultKingdeeTreeNode) treeMain.getLastSelectedPathComponent();
//判断节点中的对象是否为企业,如果是企业的话则自动将新增中的企业和行业填写上,如果不是则不处理.
if (treeNode != null &&
treeNode.getUserObject() instanceof com.kingdee.eas.gzw.basedata.CentralCorporationInfo){
uiContext.put("cenCop", treeNode.getUserObject());//本企业节点
//添加上级行业节点到上下文,可不用
//uiContext.put("industry", ((DefaultKingdeeTreeNode)(treeNode.getParent())).getUserObject());
logger.info("企业信息的参数已经传递到上下文中;");
}else{
uiContext.put("cenCop", null);//本企业节点
}
}
if (action.equals(actionEdit)){
uiContext.put("ObjectUpdateLockId", this.getObjectUpdateLockId());
}
}
/**
*
*/
/**
*
* 描述:重写父类刷新事件,当事件是List页面上的刷新事件时,而非增删改查后的刷新,则调用
* @param ActionEvent
* @return 无返回值
*
* @author:yell
* 创建时间:2009-3-19 <p>
* @throws Exception
*
* @see super.refresh
*/
protected void refresh(ActionEvent e) throws Exception {
ItemAction action = null;
if (e != null){
// action = ( (AbstractButton) e.getSource()).getAction();
action = getActionFromActionEvent(e);
}
if (action == null){
return;
}
if (action.equals(actionRefresh)){
TreePath oldPath = treeMain.getSelectionPath();
initTree();
treeMain.setSelectionPath(getNewTreePath2(treeMain, treeMain.getModel(), oldPath));
}else{
super.refresh(e);
}
}
/**
* 在新构建的TreeModel中寻找旧的treePath对应的新treePath,如果找不到,则返回null
* 约定:treeModel和treePath包含的结点都必须是KDTreeNode类型,
* 除根结点外,其它结点的userObject都应该是TreeBaseInfo类型
* 实际上这个类建议仅供应用框架本身的TreeListUI和TreeDetailListUI使用
* 详细可见:com.kingdee.eas.framework.client.TreePathUtil类中的getNewTreePath()方法。
* @param treeModel
* @param oldTreePath
* @return
*/
private TreePath getNewTreePath2(JTree tree, TreeModel treeModel,TreePath oldTreePath){
if(oldTreePath == null){
return null;
}
Object[] oldPaths = oldTreePath.getPath();
Object[] newPaths = new Object[oldPaths.length];
DefaultKingdeeTreeNode root = (DefaultKingdeeTreeNode)treeModel.getRoot();
DefaultKingdeeTreeNode[] treeNodes = new DefaultKingdeeTreeNode[]{ root };
DefaultKingdeeTreeNode curNode = null;
for(int i = 0; i < oldPaths.length; i++){
DefaultKingdeeTreeNode oldTreeNode = (DefaultKingdeeTreeNode)oldPaths[i];
int j;
for(j = 0; j < treeNodes.length; j++){
if(equalTreeNode(oldTreeNode, treeNodes[j])){
break;
}
}
if(j >= treeNodes.length){
return null;
}else{
newPaths[i] = treeNodes[j];
//找下级的时候首先要确定是否需要再次取数,该方法需要增加参数JTree
Object[] currentPaths = new Object[i + 1];
for(int k = 0; k < currentPaths.length; k++){
currentPaths[k] = newPaths[k];
}
try{
tree.fireTreeWillExpand(new TreePath(currentPaths));
} catch (ExpandVetoException e) {
e.printStackTrace();
return null;
}
curNode = treeNodes[j];
treeNodes = new DefaultKingdeeTreeNode[curNode.getChildCount()];
for (int k = 0; k < curNode.getChildCount(); k++) {
treeNodes[k] = (DefaultKingdeeTreeNode) curNode.getChildAt(k);
}
}
}
return new TreePath(newPaths);
}
/**
* 判断树状结构中两次构建过程中的结点是否相等
* 详细可见:com.kingdee.eas.framework.client.TreePathUtil类中的equalTreeNode()方法。
* @param treeNode1
* @param treeNode2
* @return
*/
private boolean equalTreeNode(DefaultKingdeeTreeNode treeNode1, DefaultKingdeeTreeNode treeNode2) {
Object value1 = treeNode1.getUserObject();
Object value2 = treeNode2.getUserObject();
if (treeNode1 == treeNode2 || value1 == value2 || value1.equals(value2)) {
return true;
} else if ((value1 instanceof TreeBaseInfo && value2 instanceof TreeBaseInfo) && ((TreeBaseInfo) value1).getId().equals(((TreeBaseInfo) value2).getId())) {
return true;
} else {
return false;
}
}
public void actionInitialize_actionPerformed(ActionEvent e) throws Exception {
getUIContext().put(TerIndSysListUI.class,this);
IUIWindow uiWindow = UIFactory.createUIFactory(getEditUIModal()).create("com.kingdee.eas.gzw.indexsysman.client.TerIndSysInitUI", getUIContext(), null, OprtState.VIEW);
uiWindow.show();
}
protected CommonQueryProcessor getQueryProcessor() {
CtrlUnitInfo cu;
try {
cu = getCtrlUnitInfo();
} catch (Exception e) {
cu=null;
}
if(cu!=null&&cu.getLevel()!=1){
return new IndexSystemQueryProcess(this,"cenCop.name","ChuShi.id",cu.getId().toString(),CompareType.EQUALS);
}else{
return new IndexSystemQueryProcess(this,"cenCop.name","ChuShi.id","YELL",CompareType.NOTEQUALS);
}
}
protected CommonQueryDialog initCommonQueryDialog() {
CommonQueryDialog queryDlg = super.initCommonQueryDialog();
queryDlg.setProcessor(getQueryProcessor());
return queryDlg;
}
}
左树右表
最新推荐文章于 2023-07-21 17:54:23 发布