BOS中工作流BOTP调用方法

下面是一段代码,主要是BOTP调用方法的使用,希望读者能看明白。

public void actionCreateTo_actionPerformed(ActionEvent e) throws Exception { setCanVoucher(false); checkSelected(); ArrayList idList = new ArrayList(); List entriesKey = new ArrayList(); getBillIdList(idList, entriesKey); String[] idArray = new String[idList.size()]; idList.toArray(idArray); if (this.isDAPTrans) { entriesKey.clear(); } this.billList.createTo(idArray, new String[] { getEntriesName() }, entriesKey, getBizType().toString(), getBOTPSelectors()); }
public void getBillIdList(List idList, List entriesList) { int mode = 0; List blockList = this.tblMain.getSelectManager().getBlocks(); if ((blockList != null) && (blockList.size() == 1)) { mode = ((IBlock)this.tblMain.getSelectManager().getBlocks().get(0)).getMode(); } if (mode == 8) { List selectIdList = getQueryPkList(); if (selectIdList != null) { Iterator lt = selectIdList.iterator(); while (lt.hasNext()) { Object[] idObj = (Object[])lt.next(); if (idObj == null) continue; if (!(idList.contains(idObj[0].toString()))) { idList.add(idObj[0].toString()); } if ((idObj.length == 2) && (idObj[1] != null)) entriesList.add(idObj[1]); } } } else { ArrayList blocks = this.tblMain.getSelectManager().getBlocks(); Iterator iter = blocks.iterator(); while (iter.hasNext()) { KDTSelectBlock block = (KDTSelectBlock)iter.next(); int top = block.getTop(); int bottom = block.getBottom(); for (int rowIndex = top; rowIndex <= bottom; ++rowIndex) { ICell cell = this.tblMain.getRow(rowIndex).getCell(getKeyFieldName()); if ((this.tblMain.getRow(rowIndex).getCell(getEntriesPKName()) != null) && (this.tblMain.getRow(rowIndex).getCell(getEntriesPKName()).getValue() != null)) { entriesList.add(this.tblMain.getRow(rowIndex).getCell(getEntriesPKName()).getValue().toString()); } if (!(idList.contains(cell.getValue()))) idList.add(cell.getValue()); } } } }
public void createTo(String[] idList, String[] entryNames, List entriesKey, String srcBillType, SelectorItemCollection botpSelectors) throws Exception { if ((idList == null) || (idList.length == 0)) { MsgBox.showWarning(this.billListUI, EASResource.getString("com.kingdee.eas.framework.FrameWorkResource.Msg_NoneSelect_Bill")); return; } Map uiContext = new HashMap(); uiContext.put("Owner", this.billListUI); uiContext.put("idList", idList); uiContext.put("entryNames", entryNames); uiContext.put("entriesKey", entriesKey); uiContext.put("srcBillType", srcBillType); uiContext.put("botpSelectors", null); uiContext.put("SRCBILLLIST", this.billListUI); IUIFactory uiFactory = UIFactory.createUIFactory(UIFactoryName.MODEL); IUIWindow window = uiFactory.create("com.kingdee.eas.base.btp.client.BTPMakeBillUIWithoutGrp", uiContext, null); CtrlSwingUtilities.centerWindow((UIModelDialog)window); BTPMakeBillUIWithoutGrp uiWindow = (BTPMakeBillUIWithoutGrp)window.getUIObject(); uiWindow.setBTPImplCaller(this); window.show(); Logger.info("createTo finished!"); }


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值