`
sanyecao2314
  • 浏览: 131274 次
  • 性别: Icon_minigender_1
  • 来自: 西安
社区版块
存档分类
最新评论

EAS开发杂记

EAS 
阅读更多

EAS textfeild去掉原有监听:

txtremark.setFocusTraversalKeysEnabled(false);

EAS 发送消息中心消息

//发送普通消息
IBMCMessage i = BMCMessageFactory.getLocalInstance(ctx);

                BMCMessageInfo info = new BMCMessageInfo();

                info.setType(MsgType.NOTICE);// 消息类型,例如通知消息,任务消息,状态更新消息

                info.setBizType(MsgBizType.ASYNCHRONISM);// 业务类型,例如工作流,预警平台

                info.setPriority(MsgPriority.HIGH); // 优先级

                info.setStatus(MsgStatus.UNREADED); // 消息状态

                info.setReceiver(userId.toString()); // 接收人ID (User的ID,不是Person的ID)

                info.setSender("系统管理员");// 消息发送人

                info.setTitle("自动生成或提交特价报销单出错"); // 消息标题

                info.setBody(message);// 消息内容

                try {
                        i.submit(info);
                } catch (EASBizException e) {
                        logger.info("specialaccountbillcontrollerbean newsSend error", e);
                } catch (BOSException e) {
                        logger.info("specialaccountbillcontrollerbean newsSend error", e);
                }


//发送工作流消息
                // // 消息发送
                // SenderAgent senderAgent = SenderAgent.getSenderAgent();
                // Message messageWF = MessageFactory.newMessage();
                // messageWF.setIntHeader("type", 0);
                // messageWF.setIntHeader("bizType", 0);
                // messageWF.setIntHeader("sourceStatus", 0);
                // messageWF.setIntHeader("priority", 10);
                // messageWF.setStringHeader("databaseCenter", ctx.getAIS());
                // messageWF.setStringHeader("solution", ctx.getSolution());
                // Locale lcla[] = getContextLocales(ctx);
                // Locale locale = null;
                //
                // String title = "决裁报销单自动生成出错消息";
                // for (int m = lcla.length, j = 0; j < m; j++) {
                // locale = lcla[j];
                // messageWF.setLocaleStringHeader("title", title, locale);
                // messageWF.setLocaleStringHeader("sender", "系统管理员", locale);
                // if (pk != null) {
                // messageWF.setLocaleStringHeader("body", pk.toString() + "报销单"
                // + message.toString() + "\r\n" + " 若有打扰之处,敬请您的谅解。谢谢!",
                // locale);
                // }
                // }
                //
                // if (userIds == null) {
                // return;
                // }
                //
                // messageWF.setStringHeader("receiver", userIds.toString());
                // senderAgent.sendMessage(messageWF);

 系统菜单

启用系统菜单快捷键:shift+ctrl+alt+K 

系统菜单导出:geninsert select  * from T_BAS_SysMenuItem  where 1=1 

 

 

客户化菜单

客户化菜单导出:geninsert select * from T_PM_MainMenuItem   where 1=1

 

在“参数设置”界面按 "F12" 调出新增参数界面新增即可,新增后的记录可以用"geninsert"导出

 

脚本导出工具

 

 

在上面提到的geninsert可用于导出SQL脚本,另提供一个导出脚本的工具,例如:

导出编码规则的脚本,进入编码规则设置界面,按 "F11"调出工具界面即可使用。

 

Eclipse EAS客户端启动参数

-DEAS_HOME=W:\eas\Client

-DEAS_SERVER=tcp://localhost:11034

-Dlog4j.configuration=file:W:\eas\Client\client\deploy\client\log4j.properties

-Xms512m

-Xmx1024m

说明:最后两行可以根据自己机器的情况进行配置,参数含义请参阅JDK文档。

EAS客户端Main Class:

com.kingdee.eas.base.uiframe.client.LoginFrame

 

Oracle数据库错误信息快捷查询

http://ora-03113.ora-code.com/

红色部分直接替换为Oracle的错误代码,输入网址,即可得到错误的详细信息和解决方案。

 

 

获取Query执行接口的方法

IQueryExecutor 

com.kingdee.eas.framework.client.ListUI.getQueryExecutor(IMetaDataPK queryPK, EntityViewInfo viewInfo)

可以在此设置断点,跟踪ListUI查询的条件。

 

截获SQL语句

KDPreparedStatement 可在此类的构造方法中设置断点,可以截获到SQL,如果要截获本系统的SQL,

则可以设置条件断点,ksq.indexOf(“T_CSL_”) != -1

 

查看带参数值的SQL :        

String aaa=PsSql.getSqlWithParams(tempBuf,param.toArray(),1,false);

此语句返回的结果,将SQL语句中的问号替换成具体的值,便于跟踪SQL。

 

 

根据BOSType查询实体

select * from T_PF_BOSObject where fbostype = '559B02FC'

 

 

后台事务定义表:

t_wfr_procdef  创建的后台事务保存在此表中

 

 

常用工具类:

日期处理:              com.kingdee.util.DateTimeUtils

字符串处理:            com.kingdee.util.StringUtils

时间类型处理成如下格式:{ts'2010-10-10 10:10:10'}

 

执行查询语句的方法:

 

ISQLExecutor iSQLExecutor = SQLExecutorFactory.getRemoteInstance(sql);

IRowSet rs = iSQLExecutor.executeSQL();

 

执行Update语句的方法:

 

    sql = "UPDATE T_PF_EvalWFObjects SET FStatus = ? WHERE FEvalWorkFlowID = ? AND  FEvaluObjectID = ? ";

    conn = null;

    pstmt = null;

    try

    {        

        conn = (Connection) getConnection(ctx);

        pstmt = conn.prepareStatement(sql);

        pstmt.setInt(1, 30);

        DbUtil.prepareVarcharParam(pstmt, 2, wfParam.getEvalWorkFlowID().toString());

        DbUtil.prepareVarcharParam(pstmt, 3, evaluObjectID);

        pstmt.executeUpdate();

    }

客户端获取ctx的方式和下句类似:

        Context ctx = SaleIssueBillFactory.getRemoteInstance().getContext();

 

服务端  DbUtil.ExecuteSQL(ctx,StrSQL);

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics