判断是否存在下游单据
2013-09-28 13:55
141 查看
com.kingdee.eas.base.btp.client.BTPRelationNavUI 1. /* 661 */ IBOTRelation iBOTRelation = BOTRelationFactory.getRemoteInstance(); /* 662 */ EntityViewInfo viewInfo = new EntityViewInfo(); /* 663 */ FilterInfo filter = new FilterInfo(); /* 664 */ filter.getFilterItems().add(new FilterItemInfo("destObjectID", this.billInfoID, CompareType.EQUALS)); /* */ /* 667 */ viewInfo.setFilter(filter); /* */ /* 669 */ BOTRelationCollection relations = iBOTRelation.getCollection(viewInfo); /* 670 */ Vector srcBillIDs = new Vector(); /* */ /* 672 */ if ((relations == null) || (relations.size() == 0)) { /* 673 */ throw new BTPException(BTPException.SRCBILLTYPENULL); /* */ } 2. /* * 单据是否存在下游单据 */ @Override protected boolean _isExistDownstreamBill(Context ctx, String id) throws BOSException, EASBizException { String sql = "select * from T_BOT_Relation where fsrcobjectid='"+id+"'"; IRowSet rowSet = DbUtil.executeQuery(ctx, sql); if(rowSet.size()>0)return true; else return false; } 3. IBTPManager iBTPManager = BTPManagerFactory.getLocalInstance(ctx); String billIdString = billInfo.getId().toString(); if (iBTPManager.ifHaveDestBills(billIdString)) { throw new SCMBillException(SCMBillException.HASDESTBILL_CANNOTUNAUDIT, new Object[] { billInfo.getNumber() }); } 3. IBTPManager iBTPManager = BTPManagerFactory.getRemoteInstance(); if (iBTPManager.ifHaveDestBills(editData.getId().toString())) { MsgBox.showError(this, "该单据已关联生成目标单据,不能反审核!"); SysUtil.abort(); }
相关文章推荐
- eas判断单据是否存在下游单
- SQL删除字段及判断字段是否存在的方法
- 判断数组中是否存在重复元素
- JQuery 判断某个属性是否存在 hasAttr
- 判断指定的进程或程序是否存在方法
- Python 判断文件是否存在的三种方法
- ssh登录时根据用户名判断是否存在
- 图结构练习——判断给定图是否存在合法拓扑序列(sdutoj)
- 两个数组判断某一元素是否存在
- PHP判断远程文件是否存在
- js判断一个字符串是否在另一个字符串中存在 indexOf
- C++ 判断vector中是否存在特定值的方法
- poj 3259 bellman-ford判断是否存在负权回路
- js判断对象是否存在的三种方法
- C#判断远程文件是否存在
- jQuery中判断元素是否存在的方法
- 判断单链表是否存在环,判断两个链表是否相交问题详解
- 判断表中是否存在该记录
- sql 判断数据库,表,存储过程等是否存在的代码
- 判断文件是否存在 shell 脚本