人人范文网 范文大全

NC方法总结

发布时间:2020-03-02 20:05:04 来源:范文大全 收藏本文 下载本文 手机版

修改端口

InvocationInfoProxy.getInstance().get().getUserCode();前台

Nchome F:\\JAVA\\Projects\\ERPEHROA\\ufida\\ufsoft\\nchome\\domain\\server\\conf F:\\JAVA\\Projects\\ERPEHROA\\ufida\\ufsoft\\nchome\\conf Truncate Table [表名]menhe ftp命令

service vsftpd start

1.导入oracle数据库需要先建立用户然后在cdm下输入命令; 2.1档案 2.3单据

F5往下走会进入里面的方法里面; F6就在本方法里面走; F7跳出进入的方法;hang F8 直接倒地

公司设置公司目录(集团)就可以在集团下插入数据时集团就自动进来;

public void afterEdit(BillEditEvent e) {

// TODO Auto-generated method stub

Object pkvalue = this.getBillCardPanel().getHeadItem(\"pk_meage\").getValueObject();

String temKey = e.getKey();

if(temKey.equalsIgnoreCase(\"\")){

Object obj = e.getValue();

IUAPQueryBS iuap = (IUAPQueryBS)NCLocator.getInstance().lookup(IUAPQueryBS.cla.getName());

try {

//Object objvo = iuap.retrieveByPK(ProMeageVO.cla, \"\");

MyBillVO mvo = (MyBillVO)this.getChangedVOFromUI();

ProMeageVO hvo = (ProMeageVO)mvo.getParentVO();

mvo.getChildrenVO();

ProMeageVO vo = (ProMeageVO)HYPubBO_Client.queryByPrimaryKey(ProMeageVO.cla, pkvalue.toString());

vo.getI_number();

} catch (Exception e1) {

// TODO Auto-generated catch block

e1.printStackTrace();

}

}

super.afterEdit(e); }

1.修改时

//通过主键查询所有的vo 放到object里;

Object pkvaluemap = this.getBillCardPanel().getHeadItem(\"pk_meage\").getValueObject(); //从页面通过一个字段 获取那个值 String a = getBillCardPanelWrapper().getBillCardPanel().getHeadItem(\"state\").getValue();

2.从页面取值;

3.MyBillVO vo= (MyBillVO) getBufferData().getCurrentVO(); //通过下面的方法类的聚合VO;

MyBillVO mvo = (MyBillVO)this.getChangedVOFromUI();

//获得表头

ProMeageVO hvo = (ProMeageVO)mvo.getParentVO();

//获得标体

mvo.getChildrenVO();

//得到表体VO CbGatheringBVO[] bodyBVO = (CbGatheringBVO[])this.getBillCardPanelWrapper().getBillCardPanel().getBillModel(\"ps_cb_gathering_b\").getBodyValueVOs(CbGatheringBVO.cla.getName());

//用聚合VO得主键;只能在卡片管理下 才能获得主键 super.onBoCard();//卡片状态下

this.getBillUI().getChangedVOFromUI().getParentVO().getPrimaryKey();

3.从数据库里根据一个字段取值; //声明一个接口 IUAPQueryBS iuap = (IUAPQueryBS)NCLocator.getInstance().lookup(IUAPQueryBS.cla.getName());

//根据那个字段查询有没有这条数据

Object objvo = iuap.retrieveByPK(ProMeageVO.cla, \"\");

4,保存按钮时提示,验证在MyEventHandler //方法重写

import nc.ui.pub.beans.MeageDialog; protected void onBoSave() throws Exception {

// TODO Auto-generated method stub

this.getBillCardPanelWrapper().getBillCardPanel();

MeageDialog.showWarningDlg(null, \"提示\", \"项目编号已存在!\");

super.onBoSave(); }

6.怎么获取一个VO

SuperVO[] allProc = this.getBusiDelegator().queryByCondition(ZxProjectsetVO.cla, \"isnull(dr,0)=0\");

HashMap projectMapp = new HashMap();

if(allProc != null) {

int iLen = allProc.length;

for(int i = 0; i

projectMapp.put((String)allProc[i].getAttributeValue(\"pk_corp\"), (SuperVO)allProc[i]);

}

}

for (int i = 0; i

AggregatedValueObject aVo = (AggregatedValueObject) Cla

.forName(getUIControl().getBillVoName()[0])

.newInstance();

ZxProjectsetVO result = (ZxProjectsetVO)projectMapp.get(queryVos[i].getPrimaryKey());

在前台能获得任何VO的主键方法getPrimaryKey();

c: .xml\";

其中\\里面的第一个\\为转义符号;因为\\这个符号在java里面有特订的意思;要表示路径的话就要在加个转义符号; IX,公司间调拨 7.//通过一个sql语句(根据一个字段)查询一个VO; IUAPQueryBS queryBS = (IUAPQueryBS)NCLocator.getInstance().lookup(IUAPQueryBS.cla.getName()); 系统接口----可以查询时使用

CbGatheringVO cbGatheringVO = (CbGatheringVO) queryBS.executeQuery(sql,new BeanProceor(CbGatheringVO.cla));//可以根据sql语句来查询一个vo

queryBS.executeQuery(sql, new BeanListProceor(UserVO.cla));//得到UserVO的list ~~~~~~~~~~~~~~更新数据

nc.itf.uif.pub.IUifService srv=(nc.itf.uif.pub.IUifService)NCLocator.getInstance().lookup(\"nc.itf.uif.pub.IUifService\");

//获取增加时的当前VO;

// AggregatedValueObject this.getBillUI().getVOFromUI(); // DispatchsBillVO VO = VOS.getParentVO();

// VO.setRelatekey(relatekey);

VOS

=

(DispatchsBillVO) HYPubBO_Client.insert(VO);//把VO插到数据库里面 //给表头页面set赋值

this.getBillCardPanelWrapper().getBillCardPanel().setHeadItem(\"relatekey\", relatekey);

给表体赋值

getBillCardPanel().setBodyValueAt(值,行号,列名); //更新数据

getBillUI().getBufferData().refresh(); 8.光标移开时有验证不为空时;把当前文本清空

this.getBillCardPanel().getHeadItem(\"i_number\").setValue(null);

9.命名规范,字符型以V开头 时间以D 数字以n 自定义项:

字符:10个 20位

;5个 200位 ;3个500位 ;2 个2000位; 浮点:10个 整型:10个

10.快速查找页面节点所在的那个类

11.下拉菜单;S第一个,第二个,的三个 SX,自由态=8,审核态=1 1, 2 12.在oracle中 isnot不适用; 使用navl

13.Public里面的类都是自动生成的 Private里面的可以写一些动作脚本 Client里面主要是我们写的业务类

Public目录存放 接口和公共代码(比如VO和公共算法) Private目录存放 实现和其它实现细节 Client目录存放 客户端代码 gen 目录存放 工具生成的ejb代码 META-INF目录存放模块配置文件目录,包括module.xml文件和xxx.module接口配置文件。

14.流程的版本谁的高走谁的;用户比角色优先级高; 15.公式

有的时候公式不执行就要 强制执行公式

可以放在重写方法里面 ;如:点击添加按钮时执行添加的重写方法; //加载表头的编辑公式

getBillCardPanel().execHeadLoadFormulas(); //加载表体的公式

getBillCardPanelWrapper().getBillCardPanel().getBillModel().execLoadFormula();

// 执行模板上的编辑公式

this.getBillCardPanel().getBillModel().execEditFormulasByKey(row, \"invnum\"); 1.2.

3.

4.

5.6.16.系统中的“耗时操作”进度条是如何实现的?

/**

* 启用系统运行提示框 避免造成假死现象

*/

private void onButton_import()

{

// 该操作是耗时操作,所以启用系统运行提示框

Runnable runImpDoc = new Runnable()

{

public void run()

{

BannerDialog dialog = new BannerDialog(getCurrUI());

dialog.start();

try

{

importData();

}

catch (Exception e)

{

dialog.end();

e.printStackTrace();

return;

}

dialog.end();// 销毁系统运行提示框

}

};

new Thread(runImpDoc).start();

}

/**

* 系统运行提示框

*/

private Container getCurrUI()

{

return this.getSelfUI();

}

17.自定义按钮

1 接口

Public package nc.ui.testkh.mybotton; public interface IButDef { public static final int boExcel = 300; } 2.定义按钮 clientlis package nc.ui.pub.buttonImp;

import nc.ui.pub.button.IButton; import nc.ui.trade.base.IBillOperate; import nc.vo.trade.button.ButtonVO;

public cla PorjectButtonDeft {

public ButtonVO getButtonVO(){

ButtonVO btnVo=new ButtonVO();

btnVo.setBtnNo(IButton.POJECTBUTTON);

btnVo.setBtnCode(\"boProjectBtn\"); btnVo.setBtnName(\"项目调整\");

btnVo.setOperateStatus(

new

int[]{IBillOperate.OP_INIT,IBillOperate.OP_NOTEDIT}//IBillOperate.OP_NOTEDIT 设置按钮在编辑状态下可用

);// 设置那个状态可用

return btnVo; } } 3.注册按钮

.....ClientUICtrl IButton.POJECTBUTTON 4.注册按钮

....ClientUI 重写方法 @Override

protected void initPrivateButton() {

// TODO Auto-generated method stub

super.initPrivateButton();

PorjectButtonDeft pbd = new PorjectButtonDeft();

addPrivateButton(pbd.getButtonVO()); } 5写按钮的方法

MyEventHandler类

@Override

protected void onBoElse(int intBtn) throws Exception {

// TODO Auto-generated method stub

super.onBoElse(intBtn);

if(intBtn == IButton.POJECTBUTTON){ //业务方法

System.out.println(\"业务方法\");

} }

第二种: @Override

protected void onBoElse(int intBtn) throws Exception {

// TODO Auto-generated method stub

super.onBoElse(intBtn);

switch(intBtn){

case CreateEntryBill.CREATEBUTTON:

creatEntryBill(intBtn);

break;

} } public void creatEntryBill(int intBtn){

} 业务方法在下面写;上面直接调用方法就行‘;

18.建立项目不要在集团下建立; 19.

字段类型不匹配; PDM里面看看是否能不为空;

20,权限分配的时候没有你想要的那个节点;就要建立公司帐分配那个节点; 21.获取服务器时间;

getBillCardPanelWrapper().getBillCardPanel().setHeadItem(\"\",ClientEnvironment.getServerTime().toString()); 22.获取当前时间

getBillCardPanel().getHeadItem(\"dmakedate\").setValue(new UFDate(new Date()));

23.下拉菜单存索引;用IX,集收,分收 24.如果导包出错误;试试把包放在NC/ufjdk/lib下然后在导入;

25、怎样编写代码在待办事务中发送一条消息? 答:可以参考下, 后台代码,就是往数据库插入一条记录

////////////////////////////// PFMeageBO pfm = new PFMeageBO(); CommonMeageVO comvo = new CommonMeageVO(); UserNameObject usvo = new UserNameObject(\"a\"); usvo.setUserPK(\"0001ZZ100000000000VJ\"); usvo.setUserCode(\"a\"); usvo.setUserName(\"a\");

comvo.setSender(\"a\"); comvo.setReceiver(new UserNameObject[]{usvo}); comvo.setMeageContent(\"导入数据演示\"); comvo.setTitle(\"外部平台导入数据\"); comvo.setType(MeageTypes.MSG_TYPE_INFO); pfm.insertCommonMeage(comvo);

25.不能修改的参照(时间)就写日期就行 ;不用设置参照;

26.如果PDM和单据建立好了;发现PDM字段不行或类型不行;可以解决;

答:首先把PDM改好;在导入数据字典表里面同时在数据库里面在生成一下

找到那个字段 把它删掉 ;然后从右边的字段里面找到在拖过去;就ok; 然后在代码里面改改VO;

27.一个节点;从一个系统导入到另一个系统; 答选择命令窗口;点击绿色执行;红色回滚;

有可能出现错误;就是语句里面两个单引号之间要有个空格例如:‘ ’

2 把自己创建的节点(文件夹) 例如9100 放的nchome下的modules里面;

3.建立公司帐

4.审批流重新配;权限重新配;

28.建立用户;然后分配角色;在分配权限;如果没有这个节点;就建立公司帐;

29.PDM画表小工具的然后选择palette

30.在private里面怎么获得主键 可以通过方法把这个主键传过去;

31.在后台得到VO? //后台得到VO BaseDAO bo = new BaseDAO(); bo.executeQuery(\"select * from ty_bz where pk_tybz = \'\"+pk_tybz+\"\' \", new BeanProceor(nc.vo.ty.TyBzVO.cla));

32.调用接口; Order od =(Order)NCLocator.getInstance().lookup(Order.cla.getName());

public List queryFieldSingleSql(String sql) throws BusineException, SQLException, DbException {

if (sql == null || sql.equals(\"\")) {

return null;

}

List values = new ArrayList();

Connection con = null;

PreparedStatement stmt = null;

ResultSet rs = null;

ResultSetMetaData rsmd = null;

try {

con = getConnection();

stmt = con.prepareStatement(sql);

rs = stmt.executeQuery();

rsmd = rs.getMetaData();

while(rs.next()){

List value = new ArrayList();

for(int

String columnValue

value.add(columnValue);

}

values.add(value);

}

} finally {

try {

if (rs != null)

rs.close();

} catch (Exception e) {

}

try {

if (stmt != null)

stmt.close();

} catch (Exception e) {

}

try {

if (con != null)

con.close();

} catch (Exception e) {

}

}

return values; }

33.自定义接口时要部署EJB;报错:

= i=1;i

加个文件件;

dxty.module;然后生成EJB中间34.按钮的动作脚本;要导入到项目的private里面新建包

Nc.bs.pub.action下面 35.要在接口里面写好注释;;;;;; 36.编写参照类时

//这段代码是UI类初始化参照类的,不写 参照就出不来了

BillItem item = (BillItem ) getBillCardPanelWrapper().getBillCardPanel().getHeadItem(\"relatekey\");

BillStatusRefModel defModel = new BillStatusRefModel( );

UIRefPane refPane = (UIRefPane) item

.getComponent();

refPane.setEditable(true);

item.setDataType(BillItem.UFREF);

refPane.setRefModel(defModel);

item.setComponent(refPane); 35.表体增行方法getBillCardPanel().getBillModel().addLine()

36.清空缓存: UIRefPane ref = getRefSubject(); ref.getRefModel().clearCacheData(); 37.查询方法的重写:

交谈中请勿轻信汇款、中奖信息,勿轻易拨打陌生电话。

//重写查询按钮 @Override protected void onBoQuery() throws Exception { // TODO Auto-generated method stub // b-------------2009-11-04 荆茂英 修改

String strWherePart = \"\"; UIDialog querydialog = getQueryUI(); if (querydialog.showModal() != UIDialog.ID_OK) return; //用户取消查询

INormalQuery query = (INormalQuery) getQueryUI(); if(query.getWhereSql()!= null && !query.getWhereSql().equals(\"\")){ strWherePart = query.getWhereSql() +\" and \"; }else{ strWherePart += \"\"; }

String isNegotiations = \"\";//是否洽商

if(getMCode() != null && getMCode().equals(\"工程洽商\")){ isNegotiations = \"Y\"; }else{ isNegotiations = \"N\"; } strWherePart = strWherePart + \" pm_lm_designchange.vdef1=\'\"+isNegotiations+\"\'\";

SuperVO[] queryVos = getBusiDelegator().queryHeadAllData( Cla.forName(getUIController().getBillVoName()[1]), getUIController().getBillType(), strWherePart.toString());

getBufferData().clear(); addDataToBuffer(queryVos); updateBuffer();

// super.onBoQuery(); //end------------------ } dfa 设置按钮状态 getButtonManager().getButton(nc.ui.trade.button.IBillButton.Add).setEnabled(false); this.getBillUI().updateButtonUI(); 38.怎么得到下拉菜单的值

int index = getJComboBoxBillType().getSelectedIndex();//得到调拨类型

String typecode = \"\";

if(index == 0){

typecode = \"5C\"; }else if(index == 1){ typecode = \"5D\"; }else if(index == 2){ typecode = \"5E\"; }else if(index == 3){ typecode = \"5I\"; } 39.随机生成主键:select substr((sys_guid()),1,20) 40.Not in not exists 在oracle中用法;如果not in查询上百条的时候会崩溃。 and not exists (select distinct ladings_bill.pk_purchaseordercode from ladings_bill where nvl(dr, 0) = 0 and po_order.corderid =ladings_bill.pk_purchaseordercode )

41.

//根据系统先有的规则来生成单据号

nc.vo.pub.billcodemanage.BillCodeObjValueVO vvo =new nc.vo.pub.billcodemanage.BillCodeObjValueVO(); String billcode=(new BillcodeGenerater()).getBillCode(headVO.getPk_billtype(),headVO.getPk_corp(),null,vvo);//第一个参数:单据类型,第二个参数:公司主键,第三个参数传null,第四个参数:vvo 42 new SequenceGenerator().generate(pk_corp); 生成主键的

43.类型转换异常-解决;在ts那个用String类型;模板和VO要一致。

44.List和hashmap一起连用; String sql = select cinvbasid, cgeneralbid from ic_general_b where cfirstbillhid = \'\"+pk_relaterkey+\" setEnabled List list = (List)iuap.executeQuery(sql, new MapListProceor());} HashMap Mapp = new HashMap();

Mapp = (HashMap)list.get(i); 如果想取得cinvbasid的值:Mapp.get(\"cinvbasid\"); 45.审核之后其他按钮才能执行;代码放到自定义按钮的类里面;注有按钮名称的那个

btnVo.setBusineStatus(new

int[] { nc.vo.trade.pub.IBillStatus.CHECKPASS } 46.获得表体字段的值:(下面的是获得多个表体的值)如果只获得一个表体 就把 New HYBillVO().getTableCodes()[5]String

。pk_afterrecord=getBillCardPanelWrapper().getBillCardPanel().getBillModel(new HYBillVO().getTableCodes()[5]).getValueAt(0,\"pk_afterrecord\").toString(); 47.如果前台报错可以放到后台输出获抛出; try {

super.onBoCommit();

} catch (Exception e) {

// TODO: handle exception

}

48.得到表头一共多少行 int rows = getBillCardPanelWrapper().getBillCardPanel().getBillTable().getRowCount();//得到表体一共多少行 49. 获取时间戳

String dateline=new SimpleDateFormat(\"yyyy-MM-dd HH:mm:\").format(Calendar.getInstance().getTime());

50.//选择对话框,点是继续,点否取消

if(MeageDialog.showOkCancelDlg(this.getBillUI(),\"确认\",\"点击筛选按钮后,会先把现在页面的值保存到数据库,确认执行吗?\")==MeageDialog.ID_OK){ filterSellAndGroup();//点击确定要实现的方法; } else{ return; } 51.// 当前登录人

UserVO coperator ClientEnvironment.getInstance().getUser();

52.弹出一个UI;并设置页面为卡片形式

ToftPanel toft = SFClientUtil.showNode(\"H4H2H5\", IFuncWindow.WINDOW_TYPE_DLG);

WarningSetClientUI ui = (WarningSetClientUI) toft;

ui.onButtonClicked(ui.getButtonManager().getButton(IBillButton.Card));

ui.onButtonClicked(ui.getButtonManager().getButton(IBillButton.Add)); ui.setCardUIData(vo); 53.单据号释放 @Override

protected void onBoDelete() throws Exception {

// TODO Auto-generated method stub super.onBoCard();// 卡片状态下

=

IBillcodeRuleService codeservice = (IBillcodeRuleService) NCLocator.getInstance().lookup(

IBillcodeRuleService.cla.getName());

BillCodeObjValueVO voBill=new BillCodeObjValueVO();

String vbillno = getBillCardPanelWrapper().getBillCardPanel()

.getHeadItem(\"vbillno\").getValueObject().toString();

codeservice.returnBillCodeOnDelete(_getCorp().getPrimaryKey(), \"9103\", vbillno,

voBill);

try

{

//申请特定内存区域

SFAppServiceUtil.getBillcodeRuleService().requireNewRegion(vbillno);

//做独立事务业务操作

//释放申请的内存区域

SFAppServiceUtil.getBillcodeRuleService().releaseRegion(vbillno);

}

catch (Exception e)

{ //停止申请的内存区域

SFAppServiceUtil.getBillcodeRuleService().stopRegion(vbillno); //异常处理代码

}

super.onBoDelete(); } 54.让文本框表头不可编辑

getBillCardPanel().getHeadItem(\"vdef3\").setEnabled(false); 表体不可编辑

this.getBillCardPanelWrapper().getBillCardPanel().getBillModel().setCellEditable(i, \"totalmoneyzong\", true);

55.//审批未通过

public static final int NOPASS = 0; //审批通过

public static final int CHECKPASS = 1; //审批进行中

public static final int CHECKGOING = 2; //提交状态

public static final int COMMIT = 3; //作废状态

public static final int DELETE = 4; //冲销状态

public static final int CX = 5; //终止(结算)态

public static final int ENDED = 6; //冻结状态

public static final int FREEZE = 7; //自由态

public static final int FREE = 8; 56.更新update(sql) IPubBillUpdate BaseDAO baseDAO=new BaseDAO();

baseDAO.executeUpdate(sql);

57.参照显示

那个类 有三个字段设置方法分别表示主键 编码 名称的

@Override public String getPkFieldCode() {

return \"billbid\"; }

@Override public String getPkValue() {

return (String) getValue(\"billbid\"); }

@Override public String getRefCodeField() {

return \"def2\"; }

@Override public String getRefNameField() {

return \"aetname\"; } 58.强制执行公式所有地方都执行

//表头公式默认不执行,初始化的时候把这两行加进去

getBillCardPanel().setAutoExecHeadEditFormula(true)

,getBillCardPanel().execHeadEditFormulas() /* *实现 切换到 卡片模式 数据为0时 显示为 0 或者为 空 的问题

*/ @Override protected void onBoCard() throws Exception {

// 设置显示零

this.getBillCardPanelWrapper().getBillCardPanel().getBodyPanel()

.getRendererVO().setShowZeroLikeNull(false);

super.onBoCard(); } 59.内存益处

-vm F:\\JAVA\\Projects\\dxty\\tyfwnchome\\nchome\\ufjdk\\bin\\javaw.exe 60.部门档案 nc.ui.bd.ref.busi.DeptdocDefaultRefModel 61.人员档案 nc.ui.bd.ref.busi.getBillListPanel().hideHeadTableCol(\"headitem\"); PsndocDefaulRefModel 列表隐藏字段

62.控制后台输出sql 语句

在Eclipse中按shift+Ctrl+r 打开后台日志logger-config.properties 把里面的这些代码注释掉,就可以在控制台看到相关信息,如不注释,就是写到日志中;zh anonymous.level=DEBUG (把这里的ERROR改为DEBUG)

#anonymous.file=./nclogs/${server}/anony-log.log #anonymous.size.maxSize=5MB #anonymous.size.maxIndex=20 nclog.level=DEBUG (把这里的ERROR改为DEBUG) #nclog.file=./nclogs/${server}/nc-log.log #nclog.size.maxSize=5MB #nclog.size.maxIndex=5 # iufo logs # iufoRepCalc logs #iufoRepCalcResult logs #SQL监控日志 63.重写增行方法

protected void onAddLine() { super.onAddLine();

********** 在这里设置表体不可以编辑就可以了 ********** } 63.修改数据库字段长度alter table bd_psnbasdoc modify bp varchar2(1000) ;

alter

table

your_table

add

(column1

col_ ,clumn2 col_type2...); your_table :表名

column1/column2 :字段名

col_type1/col_type2 :字段类型

64.参照表IBusiType public java.lang.String[] getFieldCode() { return new String[] {\"(select vname from jgpm_cm_contract where jgpm_cm_contract.pk_cont = jgpm_cm_measure.pk_cont)\",\"vbillno\",\"dmeapprodate\",\"nmeaapprorigmny\",\"pk_measure\"}; 65.}

66.获取表尾的getBillCardPanel().getTailItem(\"dmakedate\").setValue(new UFDate(new Date())); 67.刷新this.getBufferData().refresh(); 68.实现类里面执行提交动作脚本

MyBillVO mbillvo = new MyBillVO();

mbillvo.setM_billField(BillField.getInstance());

mbillvo.setParentVO(ich);

mbillvo.setChildrenVO(icb);

commit(dmaked,mbillvo,userid);

return xmlMeage;

值 }

public void commit(String dmaked,MyBillVO mbillvo,String userid) throws Exception {

UserVO user = (UserVO)getBaseDAO().retrieveByPK((UserVO.cla), userid);

IWorkflowMachine bsWorkflow = (IWorkflowMachine) NCLocator.getInstance().lookup(

IWorkflowMachine.cla.getName());

PfUtilWorkFlowVO wfVo = bsWorkflow.checkWorkFlow(\"SAVE\", \"HHSQ\", dmaked, mbillvo);

if(wfVo != null){

PfUtilBO pf = new PfUtilBO();

pf.proceAction(\"SAVE\", \"HHSQ\", dmaked, wfVo, (HYBillVO)mbillvo, user);

} 69.Plsql无法识别问题

在orcl的安装目录下:

在oracle的安装路径下\\product\\10.2.0\\client_1\\NETWORK\\ADMIN有一个tnsnames.ora编辑状态打开,里面有连接的数据库的信息;

天门溪水 10:54:19 然后呢

李鑫 10:56:04 \\product\\10.2.0\\db_1\\NETWORK\\ADMIN在服务端也有这么个文件,你打开,看一下,应该是这两个文件里有一个文件没有你当前数据库的连接信息 李鑫 10:56:21 然后从那个里面复制过来 李鑫 10:56:34 这两个文件里的内容是一致的

修改自定义不能改名称的问题

this.getBillCardPanel().getHeadItem(\"ccustomerid\").setName(\"客商名称\"); this.getBillListPanel().getHeadItem(\"ccustomerid\").setName(\"客商名称\"); this.getBillCardPanel().getHeadItem(\"ccustomerid\").setName(\"客商名称\"); this.getBillListPanel().getHeadItem(\"ccustomerid\").setName(\"客商名称\"); this.getBillCardPanel().setBillData(getBillCardPanel().getBillData()); this.getBillListPanel().setListData(getBillListPanel().getBillListData()); 69 抛异常

if (listbasdoc == null || listbasdoc.size()

if(this.getBillListPanel().isShowing()) 查询模板公司默认 Sys_CurrCorp 71.命令

ls 是显示当前文件夹里面的文件; cd 打开文件夹

cd .. 返回上一个目录

72.通过sql语句查询VO的具体几个字段;

String[] names = {\"cfirstid\",\"cfirstbid\",\"cfirsttypecode\",\"vfirstcode\",\"vfirstrowno\"};

String bodywhere = \" dr = 0 and cbill_bid = \'\"+bvo.getVsourcebillrowid()+\"\'\";

BillItemVO[] tobvo = ClientBillHelper.queryBodyBySQL(names, bodywhere);

if(tobvo!=null&&tobvo.length >0){

itemVO.setCfirstbillhid(tobvo[0].getCfirstid());

itemVO.setCfirstbillbid(tobvo[0].getCfirstbid());

itemVO.setCfirsttype(tobvo[0].getCfirsttypecode());

itemVO.setVfirstbillcode(tobvo[0].getVfirstcode());

itemVO.setVfirstrowno(tobvo[0].getVfirstrowno());

} 73.获取配置文件的值;关闭流 74.private BaseDAO dao;

public String getINFO(String flag) { FileInputStream fis = null; try { Properties props = new Properties(); fis = new FileInputStream(new File(RuntimeEnv.getInstance().getNCHome() + System.getProperty(\"file.separator\") + \"resources\" + System.getProperty(\"file.separator\") + \"db-config.properties\")); props.load(fis); return props.get(flag).toString(); } catch (Exception e) { e.printStackTrace(); return \"ERROR\"; } finally{ if(fis!=null){ try{ fis.close(); }catch(Exception ex){ ex.printStackTrace(); } } } } private BaseDAO getBaseDAO() { if (dao == null) { dao = new BaseDAO(getINFO(\"defaultDataSource\")); } return dao; } 75.}

/opt/IBM/WebSphere/AppServer/profiles/AppSrv01

获取查询框下拉值

// 获取合同类别对应的sql查询条件

String sqlString = event.getFilter().getSqlString();

参照手动输入和参照

nc.ui.pub.beans.UIRefPane getBillCardPanel() .getBodyItem(ExAggCpFinalinfoVO.TABLECODE_MATERIAL, \"vcheckpsn\") .getComponent(); ry_ref.setRefNodeName(\"人员档案\"); /* -=notranslate=- */ ry_ref.setButtonVisible(true);

ry_ref

=

(nc.ui.pub.beans.UIRefPane)

List 转化成VO ArrayList ArrayList(); filterTempletBvosVos.toArray(new BillTempletBodyVO[0])

编辑前事件监听

implements BillCardBeforeEditListener 在构造方法里面添加

getBillCardPanel().setBillBeforeEditListenerHeadTail(this);

弹出卡片界面

private void onBoLinkQry() throws UifException { if (getBufferData().getCurrentVO() == null) return;

filterTempletBvosVos

=

new

if (getBufferData().getCurrentVO().getParentVO() == null) return; String pk_singleplan = ((SmClarifyVO)getBufferData().getCurrentVO().getParentVO()).getPk_singleplan();

获取查询模板默认值条件 String fixcondition = getBillManageUI().getFixCondition();

if(fixcondition!=null&&fixcondition.length()>0) sb.append(\" and \").append(fixcondition).append(\" \");

} private cla BillLinkData implements ILinkMaintainData {

} private String real_pk_bill = null; public String getBillID() { } public void setBillID(String billId) { } public Object getUserObject() {

} // TODO Auto-generated method stub return null; real_pk_bill = billId; return real_pk_bill; BillLinkData billLinkData = new BillLinkData(); billLinkData.setBillID(pk_singleplan); SFClientUtil.openLinkedMaintainDialog(\"H0K10302\", billLinkData); if (pk_singleplan == null || pk_singleplan.equals(\"\")) return; ((ClientUI)getBillUI()).getBillCardPanel(), /** * 调用存储过程

* @param HashMap * @throws Exception */ public MeageVO Callsp(String Partnaccounts,String Sp) throws Exception {

MeageVO msgvo = new MeageVO();

LoginDate = LoginDate.replace(\"-\", \"\");

msgvo.setMsgflag(-1); // 调用存储过程

LoginDate,String

Connection con = null; CallableStatement stmt = null; try {

con = getConnection();

stmt = con.prepareCall(\"{ call \"+Sp+\"(?,?,?,?) }\");

stmt.setString(1, LoginDate);

stmt.setString(2, Partnaccounts); stmt.registerOutParameter(3, Types.NUMERIC); stmt.registerOutParameter(4, Types.VARCHAR);

stmt.execute();

int RET_FLAG = stmt.getInt(3);

String msg = stmt.getString(4);

msgvo.setMsg(msg);

msgvo.setMsgflag(RET_FLAG);

} catch (Exception e) {

e.getMeage();

} msgvo.setMsg(\" 末找到 \"+Sp+\",或参数设置错误。\");

} finally { try {

if (stmt != null) {

stmt.close();

} } catch (Exception e) { } try {

if (con != null) {

con.close();

} } catch (Exception e) { } }

return msgvo; 鼠标监听

cla MyMouseListener implements MouseListener { // // public void mouseClicked(MouseEvent arg0) { //

// TODO Auto-generated method stub // } // // public void mouseEntered(MouseEvent arg0) { //

// TODO Auto-generated method stub // } // // public void mouseExited(MouseEvent arg0) { //

// TODO Auto-generated method stub //

System.out.println(\"mouseExited========================\"); // } // // /** // // // // // * 鼠标单击事件 */ public void mousePreed(MouseEvent arg0) { // TODO Auto-generated method stub InvbasdocDefaultRefModel inbase

= new InvbasdocDefaultRefModel(\"存货基本档案\"); //

Object pk_invcl = getRefSubject().getRefPK(); //

if(pk_invcl != null){ //

inbase.setWherePart(\"and bd_invbasdoc.pk_invcl \'\"+pk_invcl+\"\'\"); //

} //

refBas = new UIRefPane(); // //new 一个主体账簿参照类

//// refMainAcc.setRefModel(arg0); // // // // refBas.setRefNodeName(\"存货基本档案\");//系统参照 refBas.setVisible(true); refBas.setRefModel(inbase); refBas.onButtonClicked();

= //

System.out.println(\"参照pk:\" + refSubject.getRefPK()); //

getRefBas().setPK(refBas.getRefPK()); // } // // public void mouseReleased(MouseEvent arg0) { //

// TODO Auto-generated method stub //

System.out.println(\"mouseReleased========================\"); // } // }

清除部署的文件

进入ufsoft下的dist、history、temp 夹下的东西都删除,这几个文件夹保留

-Xms500m -Xmx1024m

/** * @方法说明:下载Excel模板 * @author :niuxd * @date :2012-11-30 下午03:55:56 */ protected void downloadExcel() { String path = ClientEnvironment.getInstance().getServerURL()

+ \"download/metercomptemplate.xls\"; URL url = null; try {

url = new URL(path); } catch (MalformedURLException e) {

Logger.error(e); } ClientAistant.showDocument(url, \"_blank\"); } 校验非空

需要在单据类型管理里面配置ROLE规则那个类到自定义3里面

try {

}

super.onBoSave(); dataNotNullValidate(); throw new BusineException(e.getMeage()); } catch (ValidationException e) {

protected void dataNotNullValidate() throws ValidationException {

StringBuffer meage = null; BillItem[] headtailitems =

.getBillData().getHeadTailItems(); getBillCardPanelWrapper().getBillCardPanel() if (headtailitems != null) { for (int i = 0; i

if (headtailitems[i].isNull())

if (isNULL(headtailitems[i].getValueObject())

&& headtailitems[i].isShow()) { meage = new StringBuffer(); if (meage == null) meage.append(\"[\");

meage.append(headtailitems[i].getName());

}

}

}

meage.append(\"]\"); meage.append(\",\"); if (meage != null) {

} // 增加多子表的循环

String[] tableCodes =

.getBillData().getTableCodes(BillData.BODY); meage.deleteCharAt(meage.length()1); if (meage != null) break; if (meage != null) { } throw new NullFieldException(meage.toString()); public void setCardPanelBodyColor() throws Exception { // 卡片状态下 表体颜色控制

String tabcode = ....;//如果是多页签的.这里加上页签名称

BillModel bm = getBillCardPanel().getBillModel(tabcode);

int row = bm.getRowCount();

for (int i = 0; i

BillItem[] items_body = getBillCardPanel().getBillModel(tabcode)

.getBodyItems();

if (items_body != null && items_body.length > 0) {

for (int j = 0, len = items_body.length; j

BillItem item = items_body[j];

if (item == null)

continue;

if (!item.isBaseTableCodeShow())

continue;

String name = item.getKey();

if (\"2\".equals(bm.getValueAt(i, \"vb2def4\"))) {//根据行中某个列的值进行判断,其它地方的也可以

getBillCardPanel().getBodyPanel(tabcode)

.setCellBackGround(i, name,

new Color(149, 161, 219));

} else {

getBillCardPanel().getBodyPanel(tabcode)

.setCellBackGround(i, name, Color.WHITE);

}

}

}

}

}

NC系统管理员岗位职责

用友NC系统操作培训总结

会计信息系统NC实验报告总结(版)

用友nc供应链销售1.销售参数总结

学习NC读取心得

用友NC系统简介

用友ERP—NC管理软件

NC年底结账操作手册

NC儿童乐趣多

用友NC基本介绍

NC方法总结
《NC方法总结.doc》
将本文的Word文档下载到电脑,方便编辑。
推荐度:
点击下载文档
相关专题 nc方法总结 方法
点击下载本文文档