版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、搭建开发环境工具:Eclipse数据库:Oracle安装NC模块并建立帐套用户1.1 安装和配置插件首先下载nc.uap.mde系列插件,然后安装,安装即把插件直接考贝Eclipse的plugin目录下,由于Eclipse的bug,如果曾经安装过,请把configuration目录下的内容除了config.ini外其他文件都删除,在此启动Eclipse即可。设置Window->Prefreence->MDEDevelopmentNCHome:基础技术平台的运行环境根目录。复选框<Includeclientclass/jarinBuildClasspath漆示是否把模块的cli
2、ent下的类加入到构件路径。如果你的模块不依赖别的模块的客户端代码,请取消该选择。DatasourseSetthebftsicinformationformoduled«vIapfriantSettingNCHomeB:,ProFileufoftitchomeBrowst.Cli4Tti Connection Credite 5d ThanksEati.xoiirc«i|»dul«Sil«cti&ndesiDatatSoiu-ceSttinjDriverList designTestConnctionJDBC1521*电卓|Asdefi
3、g&;CopytiJDriverList:开发环境的配置信息(在配置时,要把其他的配置信息删除掉,只留下design)关联文件在NCHome的ierpbinprop.xml。DatabaseType数据库类型,选择的是ORACLE11G。ModuleSelectionNC模块勾选。ClientConnection客户端连接配置,对应机器ip和端口。启动客户端时根据此处配置连接1.2 新建MDE项目直接创建:FileNewProjectMDEDevelopmentModuleproject,按照Wizard进行工作,开发一个新的工程项目转化:方式为在一个非MDE工程中,右击工程,在弹出菜
4、单中点击<ConverttoModuleProject)。src/public:存放服务接口和实体类(VO),前台调用后台文件的接口。src/private:后台实现类。src/client:前台UIMETA-INF:配置文件针对上面的卡法模式,我们规范一下代码的包结构:nc.itf.模块名:表示该模块定义的接口(public)nc.impl.模块名:表示该模块定义的接口实现(private)nc.vo模块名:表示VO的实现(public)nc.bs.模块名:普通的后台应用(private)nc.ui.模块名.*:客户端代码(client)1.3 建立数据表命名规则表名:模块名_XXX主
5、键:pk_XXX(必须是20位的字符)建立PDM文件,表字段:pk_group:所属集团char(20)pk_corp:公司char(4)creator:创建人char(20)createtime:创建时间char(19)modifier:修改人char(20)modifytime:修改时间char(19)dr:删除标识int默认值:default0ts:时间戳char(19)默认值:defaultto_char(sysdate'/yyy-mm-ddhh24:mi:ss)建立完成后将相应sql复制并生成到相应数据库中1.4 生成VO启动中间件:项目右键启动客户端:项目右键步骤如下图所示
6、:-Debug As NC Middleware-Debug As NC Client导入数据字典:进入 NC,客户化 二次开发工具 系统管理工具 数据字典管理选中对应模块(没有就新建一个)工具导入数据字典UF1DA A根据向导导入即可,导入完成后检查每个表的各个字段和类型是否正确或者是否为空确认无误后则可以根据数据表生成VO了生成VO文件:二次开发工具UAP集成开发工具UAP集成开发工具根据数据源生成 VO工具和选项Rd)丁 H如酒瓶 Mill动就节点干喟有第校爸+ 供应憎*-J平白坦王宣理平匐I应收应付(篇耍营瞠I'BBS就生成目录:选择对应的项目VO目录选择数据表:对应要生成VO
7、的数据表1.5功能注册注册菜单结点二次开发工具系统管理工具功能注册在对应的菜单结构下建立结点:步骤如下图所示扁王册刷新辅助校监快捷渡虚功能节点Tl功葭漏码可执行功能节点一功髭名称tool书借阅10101功赣性庸.虚功能节否1001010101BeanConfigF对应文件名或控件名1002嬖数设置1004基砒班提1006建公司琛1008基本档案1009工程基弑数据1010模板管I里1012身程平台1 014会计平台1015任务中心1016权限管理1017里据黑管睥对应帮助文件名|自定义项属性类型集团完全控制匚公司查看组级类型|是否启用楂用金日志:I启用拔钮权限潴是否启用7可执行功能节点对应文件
8、名或控件名:nc.ui.uif2.ToftPanelAdaptor增hu修改删际刷司融助校箱快挂渔功能在的310客户化310Q1图书借阅100101档案10010101字生11001010101BeanConftgRa*>1002釜数设置1的)1。04基砧数据+1006建公司好+fJ1008基本档案的81009工程基赧敕据村j1oio模板管理至J1012流程平台+J1014会计平白*1015任务中心+1_1016枚限管理SJI1017甲提号管理*111020系统维护*1077次共嗡丁旦功能编码10010101功能名称学生功能性既可执行功能节点5fl至文件名或控件名nc.ui.urf2To
9、flPnelAdapfc自51页1属性奥教1K团完全I空制,公司查看俎税类理公司是否启用段钮级日志启用按出校用控制口是否启用句2功需薪逑I参数参数编码:BeanConfigFilePath参数值:对应目录下的xml路径修改JM杀刷勒牖助校蛉快捷健功能生册10客户化二1001图书借阅m 1 100101B o 10010101 学生功能编码1001010101BeanConfigFilePath1001010101 BeanConfig卷数编码功能性质对应帮助文件名100210041006100810091010卷数设置初激据建公司账基本档案工程基础数据 模板管理自定义I页1后在对应目属性类型录
10、下找到组织类型公司xml的路径,然后再填写1.6 配模板单据模板二次开发工具模板管理单据模板初始化清且中心切能在模板I功岬点默认AM设置事好穆瓦版选中表拖动到左边范皂中心辛荏字/管理功戢:注阳学兔模检切蛤化图书二为g/F_b口口自创也人创湮时同空司最后修改人选中模板选项之做后修改时旧后,在高级属性和显示属性这里可以进行些相应的配置。口风性交件第埠指第到下一行录入长度卡片是否星示列羲是著星示能否编殖是否必输顼是否钳t1.7 分配默认模板菜单结点关联模板二次开发工具系统管理工具功能结点默认模板选择单据模板,查找到之前配置好的单据模板分配给对应菜单节点就可以To查询、打印模板同理。具体步骤如下图:1
11、7接口(src/public)src/public/student/port/IStudentManageService.javaimportnc.vo.StudentVO;importnc.vo.pub.BusinessException;publicinterfaceIStudentManageService/*增加-*/publicStudentVOinsertInfo(StudentVOVO)throwsBusinessException;/*修改-*/publicStudentVOupdateInfo(StudentVOVO)throwsBusinessException;/*删除-
12、*/publicvoiddeleteInfo(StudentVOVO)throwsBusinessException;src/public/student/port/IStudentQueryService.javaimportnc.vo.StudentVO;importnc.vo.pub.BusinessException;publicinterfaceIStudentQueryService/*sql查询-*/publicStudentVO口queryInfoByCondtion(StringsqlWhere)throwsBusinessException;/*pk查询*/publicSt
13、udentVOqueryInfoByPK(Stringpk)throwsBusinessException;18实现接口(src/private)StudentManageServiceImpl实现接口IStudentManageServiceimportnc.bs.dao.BaseDAO;cessor.ColumnProcessor;importnc.vo.StudentVO;importnc.vo.pub.BusinessException;importstudent.port.IStudentManageService;publicc
14、lassStudentManageServiceImplimplementsIStudentManageServicepublicStudentVOinsertInfo(StudentVOvo)throwsBusinessExceptionStringsql="selectcount(*)frombl_studentwherestucode="+"'"+vo.getStucode()+"'"intnum=(Integer)newBaseDAO().executeQuery(sql,newColumnProcessor(
15、l);if(num>0)thrownewBusinessException("学号重复!");Stringpk=newBaseDAO().insertVO(vo);return(StudentVO)newBaseDAO().retrieveByPK(StudentVO.class,pk);publicStudentVOupdateInfo(StudentVOvo)throwsBusinessExceptionStringsql="selectcount(*)frombl_studentwherestucode='"+vo.getStucod
16、e()+"'andpk_student<>'"+vo.getPk_student()+"”'intnum=(Integer)newBaseDAO().executeQuery(sql,newColumnProcessor(1);if(num>0)thrownewBusinessException("学号重复!");newBaseDAO().updateVO(vo);return(StudentVO)newBaseDAO().retrieveByPK(StudentVO.class,vo.getPk_st
17、udent();publicvoiddeleteInfo(StudentVOvo)throwsBusinessExceptionnewBaseDAO().deleteVO(vo);StudentQueryServiceImpl实现IStudentQueryServiceimportjava.util.Collection;importnc.bs.dao.BaseDAO;importnc.vo.StudentVO;importnc.vo.jcom.lang.StringUtil;importnc.vo.pub.BusinessException;importstudent.port.IStude
18、ntQueryService;publicclassStudentQueryServicelmplimplementsIStudentQueryServicepublicStudentVO口queryInfoByCondtion(StringsqlWhere)throwsBusinessExceptionif(StringUtil.isEmpty(sqlWhere)sqlWhere="isnull(dr,0)=0”;SuppressWarnings("unchecked")Collection<StudentVO>list=newBaseDAO().r
19、etrieveByClause(StudentVO.class,sqlWhere);returnlist=null?null:list.toArray(newStudentVOlist.size();publicStudentVOqueryInfoByPK(Stringpk)throwsBusinessExceptionif(StringUtil.isEmpty(pk)returnnull;returnqueryDataByPK(pk);publicStudentVOqueryDataByPK(Stringpk)throwsBusinessExceptionreturn(StudentVO)n
20、ewBaseDAO().retrieveByPK(StudentVO.class,pk);19配置前台文件(src/client)BookTypeAppModelService应用服务类,负责进行模型操作的处理,如:增、删、改mon.NCLocator;importnc.ui.uif2.model.IAppModelService;importnc.vo.StudentVO;importnc.vo.uif2.LoginContext;importstudent.port.IStudentManageService;publicclassStudentAppModelServiceimpleme
21、ntslAppModelServicepublicvoiddelete(Objectarg0)throwsException/调用实现类的方法NCLocator.getInstance().lookup(IStudentManageService.class).deleteInfo(StudentVO)arg0);publicObjectinsert(Objectarg0)throwsExceptionreturnNCLocator.getInstance().lookup(IStudentManageService.class).insertInfo(StudentVO)arg0);publ
22、icObject口queryByDataVisibilitySetting(LoginContextarg0)throwsExceptionreturnnull;publicObjectupdate(Objectarg0)throwsExceptionreturnNCLocator.getInstance().lookup(IStudentManageService.class).updateInfo(StudentVO)arg0);BookTypeModelDataManager数据模型管理器,主要负责各种方式的模型初始化,单据初始化所用到的函数mon.NCLocator;importnc.
23、bs.logging.Logger;importnc.ui.uif2.model.BillManageModel;importnc.ui.uif2.model.IAppModelDataManager;importnc.vo.StudentVO;importstudent.port.IStudentQueryService;publicclassStudentModelDataManagerimplementsIAppModelDataManagerprivateBillManageModelmodel;publicvoidinitModel()StudentVO口datas=null;try
24、datas=NCLocator.getInstance().lookup(IStudentQueryService.class).queryInfoByCondtion(null);catch(Exceptionex)Logger.error("",ex);getModel().initModel(datas);publicBillManageModelgetModel()returnmodel;publicvoidsetModel(BillManageModeltreeModel)this.model=treeModel;Student.xml<?xmlversio
25、n="1.0"encoding="UTF-8"?><!DOCTYPEbeansPUBLIC"-SPRING/DTDBEAN/EN""/dtd/spring-beans.dtd"><beans><!-环境变量-><beanid="context"class="nc.vo.uif2.LoginContext"/><!-并发异常的处理-><beanid=
26、"exceptionHandler“class="nc.ui.uif2.DefaultExceptionHanler"><propertyname="context"ref="context"/></bean><!-应用服务类,负责进行模型操作的处理-><beanid="modelService"class="com.ui.student.StudentAppModelService>"</bean><!-层次应用
27、模型-><beanid="model"class="mon.model.GxyyBillManageModel<propertyname="service"<refbean="modelService"/>/property<propertyname="context"><refbean="context"/>/propertypropertyname="pkField"value="pkstudent
28、"/></bean><!-数据模型管理器,主要负责各种方式的模型初始化-><beanid="modelDataManager"class="com.ui.student.StudentModelDataManage>r”<propertyname="model"ref="model"/></bean><!-卡控件-><beanid="editor"class="nc.ui.uif2.editor.Bil
29、lForm"init-method="initUI"><propertyname="model"ref="model"/><propertyname="nodekey"value="10010101"/><propertyname="componentValueManager>"<beanclass="nc.ui.uif2.editor.value.BillCardPanelHeadVOValueAdapte
30、>r"<propertyname="headVOName"value="nc.vo.StudentVO"/></bean></property></bean><!-列表控件-><beanid="listView"class="nc.ui.uif2.editor.BillListView"init-method="initUI"><propertyname="model"ref=&qu
31、ot;model"/><propertyname="nodekey"value="10010101"/></bean><beanid="saveAction"class="nc.ui.uif2.actions.SaveAction>"<propertyname="model"ref="model"/><propertyname="editor"ref="editor"
32、/><propertyname="exceptionHandler"ref="exceptionHandler"/></bean><beanid="editAction"class="nc.ui.uif2.actions.EditAction"><propertyname="model"ref="model"/><propertyname="exceptionHandler"ref="e
33、xceptionHandler"/></bean><beanid="addAction"class="nc.ui.uif2.actions.AddAction"><propertyname="model"ref="model"/><propertyname="exceptionHandler"ref="exceptionHandler"/></bean><beanid="deleteA
34、ction"class="com.ui.student.StudentDeleteAction><propertyname=modelref=model/><propertyname="exceptionHandler"ref="exceptionHandler"/></bean><beanid="refreshAction"class="nc.ui.uap.bd.bdactions.RefreshAction>"<propertyna
35、me="model"ref="model"/><propertyname="modelDataManager"ref="modelDataManager"/><propertyname="exceptionHandler"ref="exceptionHandler"/></bean><beanid="cancelAction"class="nc.ui.uif2.actions.CancelActio
36、n>"<propertyname="model"ref="model"/><propertyname="editor"ref="editor"/><propertyname="exceptionHandler"ref="exceptionHandler"/></bean><!-界面布局总装-><beanid="container"class="nc.ui.uif2.
37、TangramContainer"init-method="initUI"><propertyname="constraints"><list><beanclass="ponents.TangramLayoutConstrain>t<propertyname="newComponent"><refbean="listView"/></property><propertyname="newComponen
38、tName"><value>歹!J表</value></property></bean><beanclass="ponents.TangramLayoutConstrain>t<propertyname="newComponent"><refbean="editor"/></property><propertyname="targetComponent"><refbean="listVi
39、ew"/></property><propertyname="newComponentName"><value>卡片</value></property><propertyname="direction"><value>center</value></property><!-<propertyname="dividerLocation"><value>250f</value></property>-></bean></list></property><property name= "actions" ><list><ref bean="addAction" /><ref bean="saveA
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2024年临沧辅警协警招聘考试备考题库附答案详解(培优b卷)
- 2023年邵阳辅警协警招聘考试备考题库完整参考答案详解
- 2024年六盘水辅警招聘考试题库含答案详解(a卷)
- 2024年四川辅警协警招聘考试真题附答案详解(培优)
- 2024年嘉峪关辅警协警招聘考试真题附答案详解(培优b卷)
- 2023年达州辅警招聘考试题库附答案详解(能力提升)
- 2024年中山辅警协警招聘考试备考题库及1套参考答案详解
- 2024年宝鸡辅警协警招聘考试真题及答案详解(名校卷)
- 2024年城口县辅警协警招聘考试真题及1套参考答案详解
- 2024年咸阳辅警招聘考试题库及答案详解(易错题)
- 2025年北京事业单位招聘考试(水务基本常识)历年参考题库含答案详解(5套)
- 2025年工行招聘笔试真题及答案
- 租赁公司员工绩效规范规定
- 2025广西公需科目培训考试答案(90分)一区两地一园一通道建设人工智能时代的机遇与挑战
- 联合体协议书
- 搅拌车作业安全管理制度
- 公路隧道火灾:成因、危害分析与科学救灾预案构建
- 摩托车研发项目管理办法
- 安全检查检查制度
- 生产安全生产事故案例
- 电气线路的安全技术课件
评论
0/150
提交评论