|
|
@@ -0,0 +1,1525 @@
|
|
|
+1 ............................................................................................................... 3
|
|
|
+
|
|
|
+ 1.1 ................................................... 3
|
|
|
+
|
|
|
+ 1.2 .......................................................................................................... 5
|
|
|
+ MAIN Q UERY
|
|
|
+ 1.3 ................................................................... 5
|
|
|
+ 1.4
|
|
|
+ 1.5 ....................................................................................................... 6
|
|
|
+ 1.6
|
|
|
+ 1.7 ........................................................................................................................... 6
|
|
|
+ 1.8
|
|
|
+ 1.9 UI UI .................................................................. 7
|
|
|
+ 1.10
|
|
|
+ 1.11 ................................................................................................................... 7
|
|
|
+ 1.12
|
|
|
+ ID .............................................................................................. 8
|
|
|
+
|
|
|
+ ....................................................................................................... 9
|
|
|
+
|
|
|
+ ................................................................................................. 10
|
|
|
+
|
|
|
+ ......................................................................... 11
|
|
|
+
|
|
|
+ ..................................................................................................... 11
|
|
|
+
|
|
|
+2 ............................................................................................................. 11
|
|
|
+
|
|
|
+ 2.1 ................................................................................................................. 11
|
|
|
+
|
|
|
+ 2.2 ......................................................................................................... 11
|
|
|
+
|
|
|
+ 2.3 ......................................................................................................... 12
|
|
|
+
|
|
|
+ 2.4 ..................................................................................................... 12
|
|
|
+
|
|
|
+ 2.5 ......................................................................................................................... 12
|
|
|
+
|
|
|
+ 2.6 ................................................................................................................. 12
|
|
|
+
|
|
|
+ 2.7 ............................................................................................................................. 13
|
|
|
+
|
|
|
+ 2.8 SYS UTIL .ABORT () ............................................................................................................ 13
|
|
|
+
|
|
|
+ 2.9 COM .KINGDEE .EAS.BASE .UIFRAME .UIF ACTORY HELPER ................................................. 13
|
|
|
+
|
|
|
+ 2.10 TREE ....................................................................................................................... 14
|
|
|
+
|
|
|
+ 2.11 ..................................................................................................................... 14
|
|
|
+
|
|
|
+ 2.12 ..................................................................................................................... 15
|
|
|
+
|
|
|
+ 2.13 ............................................................................................................. 15
|
|
|
+
|
|
|
+ 2.14 ............................................................................................................. 15
|
|
|
+
|
|
|
+ 2.15 ......................................................................................... 16
|
|
|
+
|
|
|
+ 2.16 ............................................................................. 16
|
|
|
+
|
|
|
+ 2.17 BIGDECIMAL ................................................................................... 17
|
|
|
+
|
|
|
+ 2.18 OBJECT UUID PK.................................................................................................. 17
|
|
|
+
|
|
|
+ 2.19 ..................................................................................................................... 17
|
|
|
+
|
|
|
+ 2.20 ......................................................................................... 17
|
|
|
+
|
|
|
+ 2.21 F7 ...................................................................................................... 18
|
|
|
+3 F7 QUERY................................................................................................................... 19
|
|
|
+
|
|
|
+ 3.1 F7 ........................................................................................................................... 19
|
|
|
+
|
|
|
+ 3.2 ............................................................................................................................. 19
|
|
|
+
|
|
|
+ 3.3 F7 ........................................................................................................................... 19
|
|
|
+
|
|
|
+ 3.4 F7 ....................................................................................................................... 19
|
|
|
+
|
|
|
+ 3.5 F7 ............................................................................................................... 19
|
|
|
+
|
|
|
+ 3.6 F7 ........................................................................................................................... 19
|
|
|
+
|
|
|
+ 3.7 F7 ................................................................................................................... 19
|
|
|
+
|
|
|
+ 3.8 F7 ........................................................................................................................... 20
|
|
|
+
|
|
|
+ 3.9 F7 ........................................................................................................... 20
|
|
|
+
|
|
|
+ 3.10 F7 ....................................................................................................................... 20
|
|
|
+
|
|
|
+ 3.11 F7 ............................................................................................................... 20
|
|
|
+
|
|
|
+ 3.12 F7 ....................................................................................................................... 20
|
|
|
+
|
|
|
+ 3.13 F7 ....................................................................................................................... 20
|
|
|
+
|
|
|
+ 3.14 F7 ....................................................................................................................... 20
|
|
|
+
|
|
|
+4 ............................................................................................................................. 20
|
|
|
+
|
|
|
+ 4.1 ................................................................................................................. 20
|
|
|
+
|
|
|
+ 4.2 ................................................................................................................. 22
|
|
|
+
|
|
|
+ 4.3 ................................................................................................................. 22
|
|
|
+
|
|
|
+ 4.4 ......................................................................................................................... 22
|
|
|
+
|
|
|
+ 4.5 ..................................................................................................................... 23
|
|
|
+
|
|
|
+ 4.6 ......................................................................................................... 23
|
|
|
+
|
|
|
+ 4.7 Q UERY ................................................................................................... 24
|
|
|
+
|
|
|
+ 4.8 ..................................................................................................... 25
|
|
|
+
|
|
|
+ 4.9 ................................................................................. 25
|
|
|
+
|
|
|
+ 4.10 ............................................................................................................. 25
|
|
|
+
|
|
|
+ 4.11 F7 ........................................................................................................................... 26
|
|
|
+
|
|
|
+ 4.12 ......................................................................................... 28
|
|
|
+
|
|
|
+ 4.13 ..................................................................................................... 28
|
|
|
+
|
|
|
+ 4.14 ......................................................................................................................... 29
|
|
|
+
|
|
|
+ 4.15 F7 ................................................................................................ 29
|
|
|
+
|
|
|
+ 4.16 ......................................................................................... 31
|
|
|
+
|
|
|
+ 4.17 ..................................................................................................... 31
|
|
|
+
|
|
|
+ 4.18 ......................................................................... 31
|
|
|
+
|
|
|
+ 4.19 ......................................................................................... 32
|
|
|
+
|
|
|
+ 4.20 TREE- L IST 1 ................................................................................................... 32
|
|
|
+
|
|
|
+ 4.21 TREE-L IST ................................................... 32
|
|
|
+
|
|
|
+ 4.22 TREE- [OPTIONAL ] ................................................................. 33
|
|
|
+
|
|
|
+ 4.23 TREE- [ OPTIONAL ] ............................................................... 33
|
|
|
+
|
|
|
+ 4.24 TREE- ....................................................................................... 33
|
|
|
+
|
|
|
+ 4.25 TREE- ( ) ........................................................................ 33
|
|
|
+
|
|
|
+ 4.26 TREE- ....................................................................................................... 34
|
|
|
+
|
|
|
+ 4.26.1 ..................................................................................................... 34
|
|
|
+ 4.26.2 ................................................................................................. 35
|
|
|
+ 4.26.3 ..................................................................................................... 35
|
|
|
+ 4.26.4
|
|
|
+ 4.26.5 .............35
|
|
|
+ 4.26.6 ..................................................................................................... 36
|
|
|
+ 4.26.7
|
|
|
+ 4.27 ............................................................. 36
|
|
|
+ ................................. 3 6
|
|
|
+
|
|
|
+ ............................................................................................................. 37
|
|
|
+
|
|
|
+1
|
|
|
+
|
|
|
+ tblMain list kdTable
|
|
|
+
|
|
|
+1.1
|
|
|
+
|
|
|
+ dialog bos CustomerQueryPanel UI
|
|
|
+ Bos
|
|
|
+
|
|
|
+ dialog getFilterInfo()
|
|
|
+ dialog
|
|
|
+
|
|
|
+ ListUI initCommonQueryDialog
|
|
|
+
|
|
|
+protected CommonQueryDialog initCommonQueryDialog()
|
|
|
+
|
|
|
+{
|
|
|
+
|
|
|
+ dialog = super.initCommonQueryDialog();
|
|
|
+
|
|
|
+ try
|
|
|
+
|
|
|
+ {
|
|
|
+
|
|
|
+ dialog.addUserPanel(getUsierPanel());
|
|
|
+
|
|
|
+ dialog.setShowFilter(true);
|
|
|
+
|
|
|
+ dialog.setShowSorter(true);
|
|
|
+
|
|
|
+ dialog.setHeight(380);
|
|
|
+
|
|
|
+ dialog.setWidth(500);
|
|
|
+
|
|
|
+ dialog.setTitle( );
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ catch (Exception e)
|
|
|
+
|
|
|
+ {
|
|
|
+
|
|
|
+ handUIException(e);
|
|
|
+ }
|
|
|
+ return dialog;
|
|
|
+ }
|
|
|
+ protected CustomerQueryPanel getUserPanel() throws Exception
|
|
|
+ {
|
|
|
+
|
|
|
+ if (this.userPanel == null)
|
|
|
+ this.userPanel = new PurOrderQueryUI();
|
|
|
+
|
|
|
+ userPanel.onLoad();
|
|
|
+ return this.userPanel;
|
|
|
+ }
|
|
|
+
|
|
|
+1.2
|
|
|
+
|
|
|
+ mainQuery
|
|
|
+
|
|
|
+ protected EntityViewInfo getInitDefaultSolution()
|
|
|
+ {
|
|
|
+
|
|
|
+ EntityViewInfo ev = new EntityViewInfo();
|
|
|
+ FilterInfo filter = new FilterInfo();
|
|
|
+ // filter
|
|
|
+ ev.setFilter(filter);
|
|
|
+ return ev;
|
|
|
+ }
|
|
|
+
|
|
|
+1.3
|
|
|
+
|
|
|
+ protected boolean initDefaultFilter()
|
|
|
+ {
|
|
|
+
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+1.4
|
|
|
+
|
|
|
+ actionAuditing
|
|
|
+ public void actionAuditing_actionPerformed(ActionEvent e) throws Exception
|
|
|
+ {
|
|
|
+
|
|
|
+ //
|
|
|
+ if (!checkStatus(tblMain, BillStatusEnum.SUBMITED))
|
|
|
+ {
|
|
|
+
|
|
|
+ MsgBox.showInfo(this,
|
|
|
+ Day4Resource.getStrResource("isNotSubmitStatus"));
|
|
|
+ //
|
|
|
+ SysUtil.abort();
|
|
|
+ }
|
|
|
+ IPurOrder purorder = (IPurOrder) getBizInterface();
|
|
|
+ String[] billIdlist = getSelectedListId();
|
|
|
+
|
|
|
+ //
|
|
|
+ int i = MsgBox.showConfirm2(this, "sureAudit");
|
|
|
+ if (i == MsgBox.OK)
|
|
|
+ {
|
|
|
+
|
|
|
+ //
|
|
|
+ purOrder.audit(new ObjectStringPK(bill));
|
|
|
+ //
|
|
|
+ //
|
|
|
+ actionRefresh_actionPerformed(null);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+1.5
|
|
|
+
|
|
|
+ public void actionCreateTo_actionPerformed(ActionEvent e) throws Exception {
|
|
|
+ checkSelected();
|
|
|
+ //
|
|
|
+ if (!checkStatus(tblMain, BillStatusEnum.AUDITED)) {
|
|
|
+
|
|
|
+ MsgBox.showInfo(this, "billIsUnAudited");
|
|
|
+
|
|
|
+ SysUtil.abort();
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ // botp
|
|
|
+
|
|
|
+ super.actionCreateTo_actionPerformed(e);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+1.6 UI UI
|
|
|
+
|
|
|
+ private void makePurOrderUI(PurOrderInfo srcBillInfo)
|
|
|
+
|
|
|
+ throws EASBizException, UIException,
|
|
|
+
|
|
|
+ BOSException, Exception {
|
|
|
+
|
|
|
+ String destBillEditUIClassName = com.kingdee .PurOrderEditUI ;
|
|
|
+
|
|
|
+ Map map = new UIContext(this);
|
|
|
+
|
|
|
+ map.put("srcBillID", srcBillInfo.getId().toString());
|
|
|
+
|
|
|
+ map.put(UIContext.OWNER, this);
|
|
|
+
|
|
|
+ map.put("srcBillBOSTypeString", destBillInfo.getBOSType());
|
|
|
+
|
|
|
+ IUIWindow uiWindow = null ;
|
|
|
+
|
|
|
+ // UIFactoryName.MODEL
|
|
|
+
|
|
|
+ uiWindow = UIFactory.createUIFactory(UIFactoryName.MODEL).
|
|
|
+
|
|
|
+ create(destBillEditUIClassName, map, null,
|
|
|
+
|
|
|
+ OprtState.ADDNEW);
|
|
|
+
|
|
|
+ // ui
|
|
|
+
|
|
|
+ //((CoreBillEditUI).uiWindow.getUIObject()).
|
|
|
+
|
|
|
+ //setMakeRelations(btpResult.getBOTRelationCollection());
|
|
|
+
|
|
|
+ // UI
|
|
|
+
|
|
|
+ uiWindow.show();
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+1.7
|
|
|
+ //
|
|
|
+ protected boolean isCodeRuleEnable(IObjectValue objValue)
|
|
|
+
|
|
|
+ throws EASBizException, BOSException {
|
|
|
+ String companyId = OrgInnerUtils.getCurCompany();
|
|
|
+ ICodingRuleManager codeRuleMgr = null
|
|
|
+ codeRuleMgr = CodingRuleManagerFactory.getRemoteInstance();
|
|
|
+ return codeRuleMgr.isExist(objValue, companyId);
|
|
|
+ }
|
|
|
+
|
|
|
+ //
|
|
|
+ protected String getAutoCode(IObjectValue objValue)
|
|
|
+
|
|
|
+ throws EASBizException, BOSException {
|
|
|
+ String companyId = OrgInnerUtils.getCurCompany();
|
|
|
+ ICodingRuleManager codeRuleMgr = null
|
|
|
+
|
|
|
+ codeRuleMgr = CodingRuleManagerFactory.getRemoteInstance();
|
|
|
+ if (codeRuleMgr.isUseIntermitNumber(objValue, companyId)) {
|
|
|
+
|
|
|
+ return codeRuleMgr.readNumber(objValue, companyId);
|
|
|
+ } else {
|
|
|
+
|
|
|
+ return codeRuleMgr.getNumber(objValue, companyId);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+1.8 id
|
|
|
+
|
|
|
+ // id
|
|
|
+
|
|
|
+ public String[] getSelectedListId() {
|
|
|
+
|
|
|
+ checkSelected();
|
|
|
+
|
|
|
+ // SelectManager kdtable
|
|
|
+ ArrayList blocks = tblMain.getSelectManager().getBlocks();
|
|
|
+ ArrayList idList = new ArrayList();
|
|
|
+ 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 = tblMain.getRow(rowIndex).
|
|
|
+ getCell(getKeyFieldName());
|
|
|
+
|
|
|
+ if (!idList.contains(cell.getValue())) {
|
|
|
+ idList.add(cell.getValue());
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ String[] listId = null;
|
|
|
+ if (idList != null && idList.size() > 0) {
|
|
|
+ Iterator iterat = idList.iterator();
|
|
|
+ listId = new String[idList.size()];
|
|
|
+ int index = 0;
|
|
|
+ while (iterat.hasNext()) {
|
|
|
+
|
|
|
+ listId[index] = (String) iterat.next();
|
|
|
+ index++;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return listId;
|
|
|
+ }
|
|
|
+
|
|
|
+1.9
|
|
|
+
|
|
|
+ private void changeShowData(int fistRow, int lastRow)
|
|
|
+ throws EASBizException, BOSException
|
|
|
+
|
|
|
+ {
|
|
|
+ for (int i = fistRow; i <= lastRow; i++)
|
|
|
+ {
|
|
|
+ IRow row = tblMain.getRow(i);
|
|
|
+ //
|
|
|
+ ICell cell = row.getCell( columnName );
|
|
|
+
|
|
|
+ // 2
|
|
|
+
|
|
|
+ int precision = 2;
|
|
|
+
|
|
|
+ if (cell != null && cell.getValue() != null) {
|
|
|
+
|
|
|
+ try {
|
|
|
+
|
|
|
+ precision = Integer.parseInt(cell.getValue().toString());
|
|
|
+ } catch (Exception e) {
|
|
|
+ precision = 2;
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //
|
|
|
+ if (precision != basePrecision) {
|
|
|
+
|
|
|
+ for (int j = 0; j <rowcount; j++) {
|
|
|
+
|
|
|
+ tblMain.getColumn("billDate").getStyleAttributes().setNumberFormat(
|
|
|
+ "%{yyyy-MM-dd}t");
|
|
|
+
|
|
|
+ tblMain.getColumn("debitFor").getStyleAttributes().setNumberFormat(
|
|
|
+ "%r{#,##0.00}f");
|
|
|
+
|
|
|
+ tblMain.getColumn("debitFor").getStyleAttributes().setHorizontalAlign(
|
|
|
+ HorizontalAlignment.RIGHT);
|
|
|
+
|
|
|
+ tblMain.getColumn("endBalanceFor").getStyleAttributes()
|
|
|
+ .setNumberFormat("%r{#,##0.00}f");
|
|
|
+
|
|
|
+ tblMain.getColumn("endBalanceFor").getStyleAttributes()
|
|
|
+ .setHorizontalAlign(HorizontalAlignment.RIGHT);
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+1.10
|
|
|
+
|
|
|
+ protected String getKeyFieldName() {
|
|
|
+ return "id";
|
|
|
+
|
|
|
+ }
|
|
|
+1.11
|
|
|
+
|
|
|
+ protected String getEditUIName() {
|
|
|
+ return client.PurOrderEditUI.class.getName();
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+1.12
|
|
|
+
|
|
|
+ protected com.kingdee.eas.framework.ICoreBase getBizInterface()
|
|
|
+ throws Exception {
|
|
|
+
|
|
|
+ return PurOrderFactory.getRemoteInstance();
|
|
|
+ }
|
|
|
+
|
|
|
+2
|
|
|
+
|
|
|
+2.1
|
|
|
+
|
|
|
+ getUIContext().get("UIClassParam")
|
|
|
+
|
|
|
+2.2
|
|
|
+
|
|
|
+ com.kingdee.eas.common.client.SysContext
|
|
|
+
|
|
|
+ (ContextUtil )
|
|
|
+
|
|
|
+ Context ctx = SysContext.getSysContext()
|
|
|
+
|
|
|
+ SysContext.getSysContext().getCurrentFIUnit()
|
|
|
+ SysContext.getSysContext().getCurrentUserInfo()
|
|
|
+2.3
|
|
|
+
|
|
|
+ ICompanyOrgUnit comOrg =null;
|
|
|
+
|
|
|
+ comOrg = com.kingdee.eas.basedata.org.CompanyOrgUnitFactory.getRemoteInstance();
|
|
|
+
|
|
|
+ CompanyOrgUnitInfo comOu =ICompanyOrgUnit.getCompanyOrgUnitInfo(***)
|
|
|
+
|
|
|
+2.4
|
|
|
+
|
|
|
+ companyOrgUnitInfo.getBaseCurrency()
|
|
|
+
|
|
|
+2.5
|
|
|
+
|
|
|
+ com.kingdee.eas.basedata.assistant.PeriodUtils
|
|
|
+
|
|
|
+2.6
|
|
|
+EASResource.getString("com.kingdee.eas.base.TestResource","periodName")
|
|
|
+TestResource bos
|
|
|
+
|
|
|
+2.7 message
|
|
|
+
|
|
|
+ com.kingdee.eas.util.client.MsgBox.showWarning("***")
|
|
|
+ msgbox
|
|
|
+
|
|
|
+2.8 SysUtil.abort()
|
|
|
+
|
|
|
+ UI
|
|
|
+
|
|
|
+2.9 com.kingdee.eas.base.uiframe.UIFactoryHelper
|
|
|
+
|
|
|
+UI UI java panel
|
|
|
+
|
|
|
+com.kingdee.eas.base.uiframe.UIFactory.initUIObject(XXXXX)
|
|
|
+
|
|
|
+UI UI
|
|
|
+2.10 Tree
|
|
|
+
|
|
|
+ com.kingdee.eas.basedata.org.client.tree.NewOrgTreeHelper
|
|
|
+
|
|
|
+ com.kingdee.eas.basedata.org.client.f7.*
|
|
|
+ :
|
|
|
+ KDTree tree.setModel(new DefaultTreeModel(nodes));
|
|
|
+ TreePath path = new TreePath(rootNode.getPath());
|
|
|
+ tree.expandPath(path);
|
|
|
+ tree.setSelectionPath(path);
|
|
|
+
|
|
|
+2.11
|
|
|
+
|
|
|
+ ICodingRuleManager iCodingRuleManager = null;
|
|
|
+ iCodingRuleManager = CodingRuleManagerFactory.getRemoteInstance();
|
|
|
+ //
|
|
|
+ iCodingRuleManager.isExist(billInfo, companyID)
|
|
|
+ //
|
|
|
+ iCodingRuleManager.isUseIntermitNumber(billInfo, companyID)
|
|
|
+ //
|
|
|
+ String sysNumber = iCodingRuleManager.readNumber(billInfo, companyID);
|
|
|
+ //
|
|
|
+String sysNumber = iCodingRuleManager.getNumber(billInfo, companyID);
|
|
|
+
|
|
|
+2.12
|
|
|
+
|
|
|
+IExchangRate iexchangRate = ExchangeRateFactory.getRemoteInstance();
|
|
|
+
|
|
|
+companyOrgUnitInfo.getBaseExchangeTable().getId();
|
|
|
+
|
|
|
+//
|
|
|
+
|
|
|
+ExchangeRateInfo erInfo = iexchangRate.getExchangeRate(exchangeTableID,
|
|
|
+
|
|
|
+sourceCurrencyID, destCurrencyID, Calendar.getInstance().getTime());
|
|
|
+
|
|
|
+2.13
|
|
|
+
|
|
|
+com.kingdee.eas.util.app.DbUtil ,
|
|
|
+
|
|
|
+ ( )
|
|
|
+
|
|
|
+ executeQuery execute
|
|
|
+
|
|
|
+2.14
|
|
|
+
|
|
|
+ tblMain.getColumn("billDate" ).getStyleAttributes().setNumberFormat("%{yyyy-MM-dd}t");
|
|
|
+tblMain.getColumn("creditFor").getStyleAttributes().setNumberFormat("%r{#,##0.00}f");
|
|
|
+
|
|
|
+tblMain.getColumn("debitFor" ).getStyleAttributes().setHorizontalAlign(HorizontalAlignme
|
|
|
+nt.RIGHT);
|
|
|
+
|
|
|
+2.15
|
|
|
+
|
|
|
+ protected IObjectV alue createNewDetailData(KDTable table)
|
|
|
+
|
|
|
+{
|
|
|
+
|
|
|
+ PurOrderEntryInfo t2 = new PurOrderEntryInfo();
|
|
|
+
|
|
|
+ t2.set***(*); //
|
|
|
+
|
|
|
+ return t2;
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+2.16
|
|
|
+
|
|
|
+ protected com.kingdee.bos.dao.IObjectValue createNewData()
|
|
|
+ {
|
|
|
+
|
|
|
+ //new
|
|
|
+ PurOrderInfo objectValue = new PurOrderInfo();
|
|
|
+
|
|
|
+ objectValue.getEntrys().add(new PurOrderEntryInfo());
|
|
|
+ objectValue.setCompany((CompanyOrgUnitInfo)( SysContext.getSysContext().getCurre
|
|
|
+ ntFIUnit()));
|
|
|
+ objectValue.setCreator((UserInfo)( SysContext.getSysContext().getCurrentUser()));
|
|
|
+
|
|
|
+ return objectValue;
|
|
|
+ }
|
|
|
+2.17 BigDecimal
|
|
|
+
|
|
|
+ BigDecimal amounts = new BigDecimal(String.valueOf(0.00));
|
|
|
+
|
|
|
+2.18 ObjectUuidPK
|
|
|
+
|
|
|
+ObjectUuidPK pk = new ObjectUuidPK(paymentInfo.getId());
|
|
|
+
|
|
|
+2.19
|
|
|
+
|
|
|
+ SysContext.getSysContext().getCurrentFIUnit().castToFullOrgUnitInfo()
|
|
|
+
|
|
|
+2.20
|
|
|
+
|
|
|
+ OrgViewF7 orgF7 = new OrgViewF7(this);
|
|
|
+ orgF7.setCurrentCUID(company.getId().toString());
|
|
|
+ orgF7.setMultiSelect(false);
|
|
|
+ orgF7.setOrgViewTypes(new OrgViewType[]{OrgViewType.COMPANY});
|
|
|
+ orgF7.setIsShowSub(true);
|
|
|
+ prmptCompany.setSelector(orgF7);
|
|
|
+2.21 F7
|
|
|
+
|
|
|
+ KDCommonPromptDialog dlg = (KDCommonPromptDialog) selector;
|
|
|
+
|
|
|
+ if (dlg==null)
|
|
|
+ {
|
|
|
+
|
|
|
+ dlg = new KDCommonPromptDialog() ;
|
|
|
+ if(dlg.getQueryInfo()==null)
|
|
|
+ {
|
|
|
+
|
|
|
+ dlg.setQueryInfo(boxBizEle.getQueryAgent().getQueryInfo() );
|
|
|
+
|
|
|
+ try
|
|
|
+ {
|
|
|
+
|
|
|
+ dlg.setEntityViewInfo(new
|
|
|
+EntityViewInfo(boxBizEle.getQueryAgent().getRuntimeEntityView().toString()));
|
|
|
+
|
|
|
+ }
|
|
|
+ catch (com.kingdee.bos.sql.ParserException e)
|
|
|
+ {
|
|
|
+
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+
|
|
|
+ dlg.setSelectorCollection(boxBizEle.getQueryAgent().getSelectorCollection());
|
|
|
+
|
|
|
+ dlg.setQueryExecutor(boxBizEle.getQueryAgent().getQueryExecutor());
|
|
|
+
|
|
|
+ dlg.setEnabledMultiSelection(boxBizEle.getQueryAgent().isEnabledMultiSelection());
|
|
|
+
|
|
|
+ dlg.setReturnValueType(boxBizEle.getQueryAgent().getReturnValueType());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ dlg.show();
|
|
|
+
|
|
|
+ if (!dlg.isCanceled())
|
|
|
+ {
|
|
|
+
|
|
|
+ boxBizEle.setValue( ((Object[])dlg.getData())[0]);
|
|
|
+
|
|
|
+ ICell cell = pnlTables.getFoucusCell();
|
|
|
+
|
|
|
+ if(cell!=null)
|
|
|
+ cell.setValue(((BgContractInfo)((Object[])dlg.getData())[0]).getContractNum());
|
|
|
+ }
|
|
|
+
|
|
|
+3 F7 Query
|
|
|
+
|
|
|
+3.1 F7
|
|
|
+
|
|
|
+ com.kingdee.eas.basedata.master.account.app.F7AccountViewQuery
|
|
|
+
|
|
|
+3.2
|
|
|
+
|
|
|
+ com.kingdee.eas.basedata.master.account.app.AccountTableQuery
|
|
|
+
|
|
|
+3.3 F7
|
|
|
+
|
|
|
+ com.kingdee.eas.basedata.master.cssp.app.F7CustomerQuery
|
|
|
+
|
|
|
+3.4 F7
|
|
|
+
|
|
|
+ com.kingdee.eas.basedata.master.cssp.app.F7SupplierQuery
|
|
|
+
|
|
|
+3.5 F7
|
|
|
+
|
|
|
+ com.kingdee.eas.basedata.master.cssp.app.F7BizAnalysisCodeQuery
|
|
|
+
|
|
|
+3.6 F7
|
|
|
+
|
|
|
+ com.kingdee.eas.basedata.master.material.app.F7MaterialQuery
|
|
|
+
|
|
|
+3.7 F7
|
|
|
+
|
|
|
+ com.kingdee.eas.basedata.master.auxacct.app.F7AsstAccountQuery
|
|
|
+3.8 F7
|
|
|
+
|
|
|
+ com.kingdee.eas.basedata.assistant.app.F7CurrencyQuery
|
|
|
+
|
|
|
+3.9 F7
|
|
|
+
|
|
|
+ com.kingdee.eas.basedata.master.auxacct.app.F7AsstActTypeQuery
|
|
|
+
|
|
|
+3.10 F7
|
|
|
+
|
|
|
+ com.kingdee.eas.basedata.assistant.app.F7ExchangeRateQuery
|
|
|
+
|
|
|
+3.11 F7
|
|
|
+
|
|
|
+ com.kingdee.eas.basedata.assistant.app.F7AccountBankQuery
|
|
|
+
|
|
|
+3.12 F7
|
|
|
+
|
|
|
+ com.kingdee.eas.basedata.assistant.app.F7BankQuery
|
|
|
+
|
|
|
+3.13 F7
|
|
|
+
|
|
|
+ com.kingdee.eas.base.permission.app.F7UserQuery
|
|
|
+
|
|
|
+3.14 F7
|
|
|
+
|
|
|
+ com.kingdee.eas.basedata.assistant.app.F7BankQuery
|
|
|
+
|
|
|
+4
|
|
|
+
|
|
|
+4.1
|
|
|
+//
|
|
|
+
|
|
|
+PaymentBillInfo payInfo = new PaymentBillInfo();
|
|
|
+
|
|
|
+payInfo.setNumber( 1);001
|
|
|
+
|
|
|
+//
|
|
|
+UserInfo userInfo = new UserInfo();
|
|
|
+
|
|
|
+userInfo.setId(BOSUuid.read("867d5df6-00f8-1000-e000-0009c0a81089sysu")); //
|
|
|
+
|
|
|
+BOSUuid
|
|
|
+
|
|
|
+userInfo.setName( John );
|
|
|
+
|
|
|
+userInfo.setNumber( 2000 );
|
|
|
+
|
|
|
+BigDecimal ex = new BigDecimal("343434.445");//
|
|
|
+
|
|
|
+BigDecimal ex2 = new BigDecimal(12345678901234567.8);//
|
|
|
+
|
|
|
+payInfo.setExchangeRate(ex);
|
|
|
+
|
|
|
+payInfo.setCreator(userInfo);
|
|
|
+
|
|
|
+payInfo.setAuditDate(new Date(System.currentTimeMillis()));//
|
|
|
+
|
|
|
+Timestamp createdate = new Timestamp(System.currentTimeMillis());
|
|
|
+
|
|
|
+payInfo.setCreateDate(createdate);
|
|
|
+
|
|
|
+payInfo.setBizState(BillBizState.create);//
|
|
|
+
|
|
|
+payInfo.setSave(true);//Boolean
|
|
|
+
|
|
|
+PaymentBillItemInfo itemInfo new PaymentBillItemInfo();//
|
|
|
+
|
|
|
+itemInfo.setLineNo(34);
|
|
|
+
|
|
|
+itemInfo.setAmounts(ex2);
|
|
|
+
|
|
|
+payInfo.getEntries().add(itemInfo);//
|
|
|
+
|
|
|
+payInfo.getEntries().add(new ErrandTaskItemInfo());//
|
|
|
+ IPaymentBill iPayBill = PaymentBillFactory.getRemoteInstance();//
|
|
|
+ IObjectPK pk = iPayBill.addnew(payInfo);//
|
|
|
+
|
|
|
+4.2
|
|
|
+
|
|
|
+ IPaymentBill iPayBill = PaymentBillFactory.getRemoteInstance();
|
|
|
+ String id="8b35b903-00f8-1000-e000-0008c0a81089errt";
|
|
|
+ ObjectUuidPK pk = new ObjectUuidPK(BOSUuid.read(id));//
|
|
|
+ PaymentBillInfo payInfo = iPayBill.getValue(pk);//
|
|
|
+ System.out.println("this:"+ payInfo.getExchangeRate());//
|
|
|
+ payInfo.setExchangeRate(ex);//
|
|
|
+ iPayBill.update(pk, payInfo);//
|
|
|
+
|
|
|
+4.3
|
|
|
+
|
|
|
+ iPayBill.remove(pk);//
|
|
|
+
|
|
|
+4.4
|
|
|
+
|
|
|
+ CurrencyInfo cur = new CurrencyInfo();
|
|
|
+ ICurrency c = CurrencyFactory.getRemoteInstance();//
|
|
|
+ EntityViewInfo evi = new EntityViewInfo();//
|
|
|
+ FilterInfo i = new FilterInfo();//
|
|
|
+ i.getFilterItems().add(new FilterItemInfo("number", "ddff", CompareType.EQUELS));
|
|
|
+ i.getFilterItems().add(new FilterItemInfo("id", "ddff", CompareType.EQUELS));
|
|
|
+ i. setMaskString(" (#0 and #1)");
|
|
|
+ evi.setFilter(i);//
|
|
|
+ evi.getSelector().add(new SelectorItemInfo("id"));//
|
|
|
+ evi.getSelector().add(new SelectorItemInfo("*"));
|
|
|
+ evi.getSelector().add(new SelectorItemInfo("company.id"));
|
|
|
+ evi.getSelector().add(new SelectorItemInfo("company.name"));
|
|
|
+ //
|
|
|
+ 1
|
|
|
+ CurrencyCollection co = c. getCurrencyCollection ();//
|
|
|
+
|
|
|
+ 2
|
|
|
+ CurrencyCollection co = c.getCurrencyCollection(evi);//
|
|
|
+
|
|
|
+ 3 oql
|
|
|
+
|
|
|
+ CurrencyCollection co = c. getCurrencyCollection (evi);//
|
|
|
+
|
|
|
+4.5
|
|
|
+
|
|
|
+ CurrencyInfo cur = new CurrencyInfo();
|
|
|
+
|
|
|
+ ICurrency c = CurrencyFactory.getRemoteInstance();//
|
|
|
+
|
|
|
+ String id="8b35b903-00f8-1000-e000-0008c0a81089errt";
|
|
|
+
|
|
|
+ ObjectUuidPK pk = new ObjectUuidPK(BOSUuid.read(id));//
|
|
|
+
|
|
|
+ c.getValue(pk); : c.getCurrencyInfo(pk);
|
|
|
+
|
|
|
+4.6 UI UI
|
|
|
+
|
|
|
+ 1
|
|
|
+ HashMap map = new HashMap();
|
|
|
+
|
|
|
+ map.put("Owner", this); //
|
|
|
+ map.put("EASMode", new Integer(this.EASMode));
|
|
|
+ map.put("table", this.accountTablePrompBox.getData());
|
|
|
+ map.put("cu", currentCtrlUnit);
|
|
|
+ map.put("auxAccount", this.asstAccountPromptBox.getData());
|
|
|
+
|
|
|
+ IUIFactory uiFactory = null;
|
|
|
+ uiFactory = UIFactory
|
|
|
+ .createUIFactory("com.kingdee.eas.base.uiframe.client.UIModelDialogFactory"); //
|
|
|
+
|
|
|
+IUIWindow uiWindow =
|
|
|
+
|
|
|
+uiFactorycreate("com.kingdee.eas.basedata.master.auxacct.client.AccountSelectUI", /*
|
|
|
+ */
|
|
|
+
|
|
|
+ map);
|
|
|
+
|
|
|
+ uiWindow.show();
|
|
|
+
|
|
|
+ 2
|
|
|
+
|
|
|
+private void loadContext()
|
|
|
+
|
|
|
+{
|
|
|
+ int mode = ((Integer)this.getUIContext().get("EASMode")).intValue();
|
|
|
+
|
|
|
+ AccountTableInfo accountTableInfo = (AccountTableInfo) this.getUIContext().get("table");
|
|
|
+
|
|
|
+ CtrlUnitInfo cuInfo = (CtrlUnitInfo) this.getUIContext().get("cu");
|
|
|
+
|
|
|
+AsstAccountInfo asstAccountInfo = (AsstAccountInfo) this.getUIContext().get("auxAccount");
|
|
|
+
|
|
|
+ AuxAccountEditUI ui = (AuxAccountEditUI) this.getUIContext().get("Owner");
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+4.7 Query
|
|
|
+
|
|
|
+ EntityViewInfo evi = new EntityViewInfo();
|
|
|
+ FilterInfo filterInfo = new FilterInfo(); //
|
|
|
+ filterInfo.getFilterItems().add(
|
|
|
+ new FilterItemInfo("typelink.id", info.getId(),
|
|
|
+ CompareType.EQUALS));
|
|
|
+ filterInfo.getFilterItems().add(
|
|
|
+ new FilterItemInfo("currencyCompany.id", companyID,
|
|
|
+ CompareType.EQUALS));
|
|
|
+ filterInfo.setMaskString("#0 and #1 ");
|
|
|
+ evi.setFilter(filterInfo);
|
|
|
+
|
|
|
+ if (mainQuery == null) {
|
|
|
+ mainQuery = new EntityViewInfo();
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ mainQuery.setFilter(filterInfo); //
|
|
|
+ this.execQuery();
|
|
|
+
|
|
|
+4.8
|
|
|
+
|
|
|
+ 3
|
|
|
+ CurrencyInfo cur = new CurrencyInfo();
|
|
|
+ ICurrency c = CurrencyFactory.getRemoteInstance();//
|
|
|
+ c. getCurrencyCollection();
|
|
|
+ 4
|
|
|
+ CurrencyInfo cur = new CurrencyInfo();
|
|
|
+ ICurrency c = CurrencyFactory. getLocalInstance (ctx);//
|
|
|
+ c. getCurrencyCollection();
|
|
|
+
|
|
|
+4.9
|
|
|
+
|
|
|
+ PurOrderInfo cur = new PurOrderInfo();
|
|
|
+ IPurOrder c = PurOrderFactory. getRemoteInstanceWithObjectContext(ctx);//
|
|
|
+
|
|
|
+ c. getPurOrderCollection();
|
|
|
+
|
|
|
+ query
|
|
|
+ IQueryExecutor exec = QueryExecutorFactory.getRemoteInstance(queryPK,ctx);
|
|
|
+
|
|
|
+4.10
|
|
|
+
|
|
|
+ 1 ComboBox
|
|
|
+
|
|
|
+ public void setReceiveType()
|
|
|
+
|
|
|
+ {
|
|
|
+
|
|
|
+ this.kDComboBox2.removeAllItems();
|
|
|
+
|
|
|
+ List list = new List();
|
|
|
+
|
|
|
+ Iterator it = ReceiveType.iterator();
|
|
|
+
|
|
|
+ while (it.hasNext())
|
|
|
+
|
|
|
+ {
|
|
|
+
|
|
|
+ list.add(ReceiveType.getEnum(it.toString()).toString());
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ 2 ComboBox
|
|
|
+
|
|
|
+ //
|
|
|
+ IAsstActTypeDefault iAsstActType = AsstActTypeDefaultFactory.getRemoteInstance();
|
|
|
+
|
|
|
+ AsstActTypeDefaultCollectioni asstActTypeColl = iAsstActType
|
|
|
+
|
|
|
+ .getAsstActTypeDefaultCollection(" where isAccountCussent = 1");
|
|
|
+
|
|
|
+ AsstActTypeDefaultInfo defaultVal = null;
|
|
|
+
|
|
|
+ int count = asstActTypeColl.size();
|
|
|
+
|
|
|
+ Object[] typeValue = new Object[count];
|
|
|
+
|
|
|
+ for (int i = 0; i < count; i++)
|
|
|
+
|
|
|
+ {
|
|
|
+
|
|
|
+ AsstActTypeDefaultInfo value = (AsstActTypeDefaultInfo) asstActTypeColl.get(i);
|
|
|
+
|
|
|
+ if (value.isIsDefaultAccountPayable())
|
|
|
+
|
|
|
+ {
|
|
|
+
|
|
|
+ defaultVal = value;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ ObjectUuidPK pk = new
|
|
|
+
|
|
|
+ ObjectUuidPK(BOSUuid.read(value.getAsstActType().getString("id")));
|
|
|
+
|
|
|
+ AsstActTypeInfo asstInfo =
|
|
|
+
|
|
|
+AsstActTypeFactory.getRemoteInstance().getAsstActTypeInfo(pk);
|
|
|
+
|
|
|
+ //cbi[i] = new ComBoxInfo(asstInfo, asstInfo.getName(), true);
|
|
|
+
|
|
|
+ String typeName = asstInfo.getName();
|
|
|
+
|
|
|
+ String typeId = asstInfo.getId().toString();
|
|
|
+
|
|
|
+ String typeQueryName = asstInfo.getDefaultQueryName();
|
|
|
+
|
|
|
+ String typeTableName = asstInfo.getRealtionDataObject();
|
|
|
+
|
|
|
+ int csType = 0; //asstActTypeInfo.getCsType().getValue();
|
|
|
+
|
|
|
+ asstActType = new AsstActTypeUtils(typeName, typeId, typeTableName,
|
|
|
+
|
|
|
+typeQueryName, csType);
|
|
|
+
|
|
|
+ typeValue[i] = (Object) asstActType;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ ///String strQueryName = "F7SupplierQuery";
|
|
|
+ this.kDComAccountCussentType.removeAllItems();
|
|
|
+ this.kDComAccountCussentType.addItems(typeValue);
|
|
|
+ this.kDComAccountCussentType.setSelectedIndex(0);
|
|
|
+
|
|
|
+4.11 F7
|
|
|
+
|
|
|
+ ObjectUuidPK pk = new ObjectUuidPK(id);
|
|
|
+
|
|
|
+ IObjectValue objVal =
|
|
|
+
|
|
|
+ DynamicObjectFactory.getRemoteInstance().getValue(pk.getObjectTypei(), pk);
|
|
|
+
|
|
|
+ bizPrompt.setData(objVal);
|
|
|
+
|
|
|
+private void setCompanyF7()
|
|
|
+
|
|
|
+{
|
|
|
+ // F7
|
|
|
+
|
|
|
+ OrgType[] CompanyType = { OrgType.Company };
|
|
|
+
|
|
|
+ //
|
|
|
+
|
|
|
+ // F7 PromptBox
|
|
|
+
|
|
|
+ this.bizPromptCompany.setEditFormat("$number$");
|
|
|
+
|
|
|
+ this.bizPromptCompany.setDisplayFormat("$name$");
|
|
|
+
|
|
|
+ this.bizPromptCompany.setEditable(true);
|
|
|
+
|
|
|
+ this.bizPromptCompany.setCommitFormat("$number$");
|
|
|
+
|
|
|
+ OrgUnitTreePromptBox boxCompany = new OrgUnitTreePromptBox(this,
|
|
|
+ CompanyType, null,
|
|
|
+
|
|
|
+ OrgSelect.OnlySelectCompanyEntity, false, false, false);
|
|
|
+ bizPromptCompany.setSelector(boxCompany);
|
|
|
+ bizPromptCompany.setData(currentCompany);
|
|
|
+ bizPromptCompany.setEnabled(false);
|
|
|
+}
|
|
|
+
|
|
|
+//
|
|
|
+
|
|
|
+ private void setCurrency() throws EASBizException, BOSException
|
|
|
+
|
|
|
+ {
|
|
|
+
|
|
|
+ ICurrency iCurrency = null;
|
|
|
+
|
|
|
+ CurrencyCollection con = null;
|
|
|
+
|
|
|
+ try
|
|
|
+
|
|
|
+ {
|
|
|
+
|
|
|
+ iCurrency = CurrencyFactory.getRemoteInstance();
|
|
|
+
|
|
|
+ con = iCurrency.getCurrencyCollection(true);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ catch (Exception e)
|
|
|
+
|
|
|
+ {
|
|
|
+
|
|
|
+ // TODO catch
|
|
|
+
|
|
|
+ MsgBox.showError(this, EASResource.getString(resClassName, "currencyFail"));
|
|
|
+
|
|
|
+ SysUtil.abort();
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ if (con != null)
|
|
|
+
|
|
|
+ {
|
|
|
+
|
|
|
+ Object[] typeValue = new Object[con.size()];
|
|
|
+
|
|
|
+ int j = 0;
|
|
|
+
|
|
|
+ for (int i = 0; i < con.size(); i++)
|
|
|
+
|
|
|
+ {
|
|
|
+
|
|
|
+ CurrencyInfo currencyInfo = (CurrencyInfo) con.get(i);
|
|
|
+
|
|
|
+ String typeName = currencyInfo.getName();
|
|
|
+
|
|
|
+ String typeId = currencyInfo.getId().toString();
|
|
|
+
|
|
|
+ String typeQueryName = currencyInfo.getNumber();
|
|
|
+ asstActType = new AsstActTypeUtils(typeName, typeId, typeQueryName);
|
|
|
+ if (asstActType != null)
|
|
|
+ {
|
|
|
+ typeValue[i] = (Object) asstActType;
|
|
|
+
|
|
|
+if(typeId.equalsIgnoreCase(((CurrencyInfo)currentCompany.getBaseCurrency()).getId().toString()
|
|
|
+))
|
|
|
+
|
|
|
+ {
|
|
|
+ j = i;
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ this.bizPromptcurrency.removeAllItems();
|
|
|
+ this.bizPromptcurrency.addItems(typeValue);
|
|
|
+ //
|
|
|
+ this.bizPromptcurrency.setSelectedIndex(j);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ MsgBox.showError(this, EASResource.getString(resClassName, "currencyFail"));
|
|
|
+ SysUtil.abort();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+4.12
|
|
|
+
|
|
|
+ //
|
|
|
+ getDetailTable().getColumn(TB_RELABILL).setWidth(100);
|
|
|
+ getDetailTable().getColumn(TB_ORGUNIT).setWidth(180);
|
|
|
+ getDetailTable().getColumn(TB_BIZMAN).setWidth(100);
|
|
|
+ getDetailTable().getColumn(TB_PAY AMOUNT).setEditor(number_CellEditor);
|
|
|
+
|
|
|
+ getDetailTable().getColumn(TB_PAYAMOUNT).getStyleAttributes().setNumberFormat("%r-
|
|
|
+ [=]{#.00}f");
|
|
|
+ getDetailTable().getColumn(TB_PAYAMOUNT).getStyleAttributes().setHorizontalAlign(Hor
|
|
|
+ izontalAlignment.RIGHT);
|
|
|
+
|
|
|
+4.13
|
|
|
+
|
|
|
+for (int i = 0; i < kdtEntrys.getRowCount(); i++)
|
|
|
+{
|
|
|
+ kdtEntrys.getRow(i).getCell("orgUnit").getStyleAttributes().setLocked(false);
|
|
|
+ kdtEntrys.getRow(i).getCell("bizMan").getStyleAttributes().setLocked(false);
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+// null 0
|
|
|
+
|
|
|
+if (kdtEntrys.getRow(i).getCell("discountAmount").getValue() == null)
|
|
|
+
|
|
|
+{
|
|
|
+
|
|
|
+ kdtEntrys.getRow(i).getCell("discountAmount").setValue(new BigDecimal("0.0"));
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+//
|
|
|
+BigDecimal amount = new BigDecimal("0");
|
|
|
+for (int i = 0, n = kdtEntrys.getRowCount(); i < n; i++)
|
|
|
+{
|
|
|
+amount = amount.add(UIRuleUtil.getBigDecimal(UIRuleUtil.getBigDecimalValue
|
|
|
+(kdtEntrys.getCell(i,TB_PAYAMOUNT).getValue())));
|
|
|
+}
|
|
|
+this.txtTotalAmounts.setText(null);
|
|
|
+this.txtTotalAmounts.setEnable(false);
|
|
|
+this.txtTotalAmounts.setText(amount);
|
|
|
+
|
|
|
+//
|
|
|
+if (amount.compareTo(new BigDecimal("0.00")) == 0)
|
|
|
+
|
|
|
+4.14
|
|
|
+
|
|
|
+public void actionDeleteLine_actionPerformed(ActionEvent e)throws Exception {
|
|
|
+ IRow row = getSelectedRow();
|
|
|
+ if (row != null) {
|
|
|
+ kDTable1.removeRow(row.getRowIndex());
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+4.15 F7
|
|
|
+
|
|
|
+public void setF7Selector() throws Exception
|
|
|
+ {
|
|
|
+KDBizPromptBox bizPromptBox = new KDBizPromptBox();// F7
|
|
|
+
|
|
|
+CoreUIObject ui = null;//
|
|
|
+
|
|
|
+CompanyOrgUnitInfo companyInfo = null; //
|
|
|
+
|
|
|
+ //
|
|
|
+ bizPromptBox.setSelector(new GeneralKDPromptSelectorAdaptor(bizPromptBox, new
|
|
|
+F7CustomerTreeDetailListUI(), ui));
|
|
|
+
|
|
|
+ //
|
|
|
+ bizPromptBox.setSelector(new GeneralKDPromptSelectorAdaptor(bizPromptBox, new
|
|
|
+F7SupplierTreeDetailListUI(), ui));
|
|
|
+
|
|
|
+ //
|
|
|
+ bizPromptBox.setSelector(new GeneralKDPromptSelectorAdaptor(bizPromptBox, new
|
|
|
+F7MaterialTreeListUI(), ui));
|
|
|
+
|
|
|
+//
|
|
|
+HashMap map = new HashMap();
|
|
|
+map.put(PersonF7UI.ALL_ADMIN, "YES");
|
|
|
+bizPromptBox.setSelector(new PersonPromptBox(ui, map));
|
|
|
+
|
|
|
+//
|
|
|
+CompanyF7 org = new CompanyF7(ui);
|
|
|
+org.setRootUnitID("");
|
|
|
+bizPromptBox.setSelector(new CompanyF7(ui));
|
|
|
+
|
|
|
+//
|
|
|
+bizPromptBox.setSelector(new CostCenterF7(ui));
|
|
|
+
|
|
|
+//
|
|
|
+bizPromptBox.setSelector(new AdminF7(ui));
|
|
|
+
|
|
|
+//
|
|
|
+bizPromptBox.setSelector(new PurchaseF7(ui));
|
|
|
+
|
|
|
+//
|
|
|
+bizPromptBox.setSelector(new StorageF7(ui));
|
|
|
+
|
|
|
+//
|
|
|
+bizPromptBox.setSelector(new SaleF7(ui));
|
|
|
+
|
|
|
+//
|
|
|
+bizPromptBox.setSelector(new ProfitCenterF7(ui));
|
|
|
+ //
|
|
|
+ bizPromptBox.setSelector(new ProfitCenterF7(ui));
|
|
|
+
|
|
|
+ //
|
|
|
+ bizPromptBox.setSelector(new AccountPromptBox(ui, companyInfo, new FilterInfo()));
|
|
|
+ }
|
|
|
+
|
|
|
+4.16
|
|
|
+
|
|
|
+public void getSystemStatue() throws EASBizException, BOSException
|
|
|
+ {
|
|
|
+ CompanyOrgUnitInfo companyInfo = null; //
|
|
|
+ // SystemStatusCtrolUtils
|
|
|
+
|
|
|
+ SystemStatusCtrolUtils.getCurrentPeriod(null/*
|
|
|
+null */, SystemEnum.ACCOUNTSPAY ABLE, companyInfo/**/);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+4.17
|
|
|
+
|
|
|
+public void getSystemInfo()
|
|
|
+ {
|
|
|
+ // SysContext
|
|
|
+ //
|
|
|
+ SysContext.getSysContext().getCurrentUserInfo();//
|
|
|
+ SysContext.getSysContext().getCurrentFIUnit();//
|
|
|
+ }
|
|
|
+
|
|
|
+4.18
|
|
|
+
|
|
|
+public void getParam() throws EASBizException, BOSException
|
|
|
+ {
|
|
|
+ CompanyOrgUnitInfo companyInfo = null; //
|
|
|
+ ObjectUuidPK orgPk = new ObjectUuidPK(companyInfo.getId());
|
|
|
+
|
|
|
+ // ParamManager
|
|
|
+
|
|
|
+ //
|
|
|
+ ParamManager.getParamValue(null/* null */, orgPk,
|
|
|
+"AR_INIT_CHECK_TYPE");
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+4.19
|
|
|
+
|
|
|
+public void doMutexService()
|
|
|
+{
|
|
|
+
|
|
|
+ IMutexServiceControl mutex = MutexServiceControlFactory.getRemoteInstance();
|
|
|
+
|
|
|
+ UserInfo user = null; //
|
|
|
+
|
|
|
+ String billId = null; // / Id
|
|
|
+
|
|
|
+ //
|
|
|
+ mutex.requestObjIDForUpdate(billId, user.getString("id"));
|
|
|
+
|
|
|
+ //
|
|
|
+ mutex.releaseObjIDForUpdate(billId);
|
|
|
+}
|
|
|
+
|
|
|
+Tree:TreeBase parentid
|
|
|
+
|
|
|
+Data:DataBase BillBase Tree
|
|
|
+
|
|
|
+4.20 Tree- List 1
|
|
|
+
|
|
|
+protected ITreeBase getTreeInterface() throws Exception
|
|
|
+{
|
|
|
+
|
|
|
+ return com.kingdee.eas.custom.TreeGroupTestTreeFactory.getRemoteInstance();
|
|
|
+}
|
|
|
+
|
|
|
+4.21 Tree-List
|
|
|
+
|
|
|
+ protected String getQueryFieldName()
|
|
|
+{
|
|
|
+return "treeid.id";
|
|
|
+}
|
|
|
+4.22 Tree- [optional]
|
|
|
+
|
|
|
+protected int getTreeInitialLevel()
|
|
|
+{
|
|
|
+
|
|
|
+ return TreeBuilderFactory.DEFAULT_INITIAL_LEVEL;
|
|
|
+}
|
|
|
+
|
|
|
+4.23 Tree- [optional]
|
|
|
+
|
|
|
+protected int getTreeExpandLevel()
|
|
|
+{
|
|
|
+
|
|
|
+ return TreeBuilderFactory.DEFAULT_EXPAND_LEVEL;
|
|
|
+}
|
|
|
+
|
|
|
+4.24 Tree-
|
|
|
+
|
|
|
+protected String getRootName()
|
|
|
+{
|
|
|
+return "TreeGroupTest";
|
|
|
+}
|
|
|
+
|
|
|
+4.25 Tree- ( )
|
|
|
+
|
|
|
+getDefaultFilterForTree() cu
|
|
|
+4.26 Tree-
|
|
|
+
|
|
|
+4.26.1
|
|
|
+
|
|
|
+//treeMain
|
|
|
+
|
|
|
+protected void initTree() throws Exception
|
|
|
+{
|
|
|
+
|
|
|
+TreeSelectionListener[] listeners = treeMain.getTreeSelectionListeners();
|
|
|
+
|
|
|
+TreeSelectionListener treeSelectionListener = listeners[0];
|
|
|
+
|
|
|
+treeMain.removeTreeSelectionListener(treeSelectionListener);
|
|
|
+
|
|
|
+ITreeBuilder treeBuilder
|
|
|
+
|
|
|
+ = TreeBuilderFactory.createTreeBuilder(getLNTreeNodeCtrl(),getTreeInitialLevel() ,
|
|
|
+
|
|
|
+getTreeExpandLevel(),getDefaultFilterForTree());
|
|
|
+
|
|
|
+if (getRootName() != null)
|
|
|
+{
|
|
|
+
|
|
|
+ KDTreeNode rootNode = new KDTreeNode(getRootObject());
|
|
|
+
|
|
|
+ ( (DefaultTreeModel) treeMain.getModel()).setRoot(rootNode);
|
|
|
+
|
|
|
+}
|
|
|
+else
|
|
|
+{
|
|
|
+
|
|
|
+ ( (DefaultTreeModel) treeMain.getModel()).setRoot(null);
|
|
|
+}
|
|
|
+
|
|
|
+//
|
|
|
+treeBuilder.buildTree(treeMain);
|
|
|
+
|
|
|
+//
|
|
|
+treeMain.addTreeSelectionListener(treeSelectionListener);
|
|
|
+
|
|
|
+}
|
|
|
+4.26.2
|
|
|
+
|
|
|
+public KDTreeNode getSelectedTreeNode()
|
|
|
+{
|
|
|
+
|
|
|
+ return (KDTreeNode) treeMain.getLastSelectedPathComponent();
|
|
|
+}
|
|
|
+
|
|
|
+4.26.3
|
|
|
+
|
|
|
+return (TreeBaseInfo) ((KDTreeNode)
|
|
|
+ treeMain.getLastSelectedPathComponent()).getUserObject();
|
|
|
+
|
|
|
+4.26.4
|
|
|
+
|
|
|
+ KDTreeNode treeNode = (KDTreeNode) treeMain
|
|
|
+ .getLastSelectedPathComponent();
|
|
|
+
|
|
|
+ if (treeNode != null && treeNode.getParent() != null)
|
|
|
+ {
|
|
|
+
|
|
|
+ TreePath parentPath = treeMain.getSelectionPath().getParentPath();
|
|
|
+ KDTreeNode parentNode = (KDTreeNode) treeNode.getParent();
|
|
|
+ parentNode.remove(treeNode);
|
|
|
+ treeMain.updateUI();
|
|
|
+ treeMain.setSelectionPath(parentPath);
|
|
|
+ treeBuilder.refreshTreeNode(treeMain , parentNode ,this.getDefaultFilterForTree());
|
|
|
+ treeMain.expandPath(parentPath);
|
|
|
+ }
|
|
|
+// Query
|
|
|
+
|
|
|
+CacheServiceFactory.getInstance().discardQuery(this.mainQueryPK);
|
|
|
+
|
|
|
+4.26.5
|
|
|
+
|
|
|
+treeMain.setSelectionRow(0);
|
|
|
+
|
|
|
+4.26.6
|
|
|
+
|
|
|
+ KDTreeNode treeNode = (KDTreeNode) treeMain
|
|
|
+ .getLastSelectedPathComponent();
|
|
|
+
|
|
|
+ if (treeNode != null && treeNode.getParent() == null)
|
|
|
+ {
|
|
|
+
|
|
|
+ TreePath oldPath = treeMain.getSelectionPath();
|
|
|
+ treeBuilder.refreshTreeNode(treeMain , treeNode,this.getDefaultFilterForTree());
|
|
|
+ treeMain.setSelectionPath(oldPath);
|
|
|
+ treeMain.expandPath(oldPath);
|
|
|
+ }
|
|
|
+
|
|
|
+4.26.7
|
|
|
+
|
|
|
+ KDTreeNode treeNode = (KDTreeNode) treeMain.getLastSelectedPathComponent();
|
|
|
+ if (treeNode != null && treeNode.getParent() != null)
|
|
|
+ {
|
|
|
+
|
|
|
+ TreePath oldPath = treeMain.getSelectionPath();
|
|
|
+ TreePath parentPath = treeMain.getSelectionPath().getParentPath();
|
|
|
+ KDTreeNode parentNode = (KDTreeNode) treeNode.getParent();
|
|
|
+ treeBuilder.refreshTreeNode(treeMain , parentNode ,this.getDefaultFilterForTree());
|
|
|
+
|
|
|
+ treeMain.setSelectionPath(TreePathUtil.getNewTreePath(treeMain ,
|
|
|
+ treeMain.getModel() , oldPath));
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+4.27
|
|
|
+
|
|
|
+// receiver
|
|
|
+ ID
|
|
|
+
|
|
|
+SenderAgent senderAgent = SenderAgent.getSenderAgent();
|
|
|
+
|
|
|
+Message message;
|
|
|
+
|
|
|
+Locale[] lcla = getContextLocales(ctx);// ctx
|
|
|
+
|
|
|
+Locale locale = null;
|
|
|
+
|
|
|
+message = MessageFactory.newMessage("kingdee.workflow");//
|
|
|
+
|
|
|
+for (int j = 0, m = lcla.length; j < m; j++) {
|
|
|
+
|
|
|
+ //
|
|
|
+
|
|
|
+ locale = lcla[j];
|
|
|
+
|
|
|
+ message.setLocaleStringHeader("title"," ", locale);//
|
|
|
+
|
|
|
+ message.setLocaleStringHeader("sender"," " , locale);//
|
|
|
+ID ",Locale);//
|
|
|
+
|
|
|
+ message.setLocaleStringHeader("body", "
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+message.setIntHeader("type", MsgType.NOTICE_VALUE);//
|
|
|
+message.setIntHeader("bizType", MsgBizType.WORKFLOW_V ALUE);//
|
|
|
+
|
|
|
+message.setIntHeader("sourceStatus", MsgSourceStatus.EMPTY_V ALUE);//
|
|
|
+
|
|
|
+message.setIntHeader("priority", MsgPriority.MIDDLE_V ALUE);//
|
|
|
+
|
|
|
+message.setStringHeader("databaseCenter", ctx.getAIS());//
|
|
|
+message.setStringHeader("solution", ctx.getSolution());//
|
|
|
+
|
|
|
+message.setStringHeader("receiver",
|
|
|
+'4ff9eebb-0108-1000-e000-15acc0a813c813B7DE7F;4ff9eebb-0108-1000-e000-1db0c0a813c813
|
|
|
+
|
|
|
+B7DE7F'); // ID ID ";"
|
|
|
+
|
|
|
+senderAgent.sendMessage(message); //
|
|
|
+
|
|
|
+/**
|
|
|
+
|
|
|
+* ctx
|
|
|
+
|
|
|
+*
|
|
|
+
|
|
|
+* @param ctx
|
|
|
+
|
|
|
+* @return
|
|
|
+
|
|
|
+*/
|
|
|
+
|
|
|
+public static Locale[] getContextLocales(Context ctx) {
|
|
|
+
|
|
|
+ Locale[] locales = null;
|
|
|
+
|
|
|
+ SolutionInfo solu = MetaDataLoaderFactory.getLocalMetaDataLoader(ctx)
|
|
|
+
|
|
|
+ .getSolution();
|
|
|
+
|
|
|
+ if (solu != null) {
|
|
|
+ LanguageCollection langs = solu.getLanguages();
|
|
|
+ if (langs != null) {
|
|
|
+
|
|
|
+ locales = new Locale[langs.size()];
|
|
|
+
|
|
|
+ for (int i = 0; i < langs.size(); i++) {
|
|
|
+ locales[i] = langs.get(i).getLocale();
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return locales;
|
|
|
+}
|
|
|
+
|
|
|
+ <>
|
|
|
+
|