һ - רҵ·ĵϷƽ̨

NC-总结 - 百度文库

Դû ʱ䣺2025/8/6 5:44:54 loading ƪĵֻ
˵ݽԤݿܲȫҪĵҪݣwordʹáword΢ź:xxxxxxxQQxxxxxx ܸṩĵл֧½⡣

һ һ

1.1ڲ

1.1.1ϵͳ

ҪSQLʱͱ޸ϵͳIJ,:ա

ֻղƷӦĶࡱĴ༰ĴòΪգд

UIеsetDefaultDataӶԲմ޸,: // ղѯд

// Ҫ޸ĵıĿ,˴ΪҪ޸ıͷIJƷ

UIRefPane pane = (UIRefPane) getBillCardPanel().getHeadItem(

HpCostcardVO.PK_INVMANDOC).getComponent();

// øòյĸ,Ա޸getClassWherePart

AbstractRefGridTreeModel model = (AbstractRefGridTreeModel) pane.getRefModel();

// øĿPKֵ

if (SysInitBO_Client.getPkValue(this._getCorp().getPk_corp(), \) != null) {

// ͨ

PֵѯҪK

String sPkValue = SysInitBO_Client.getPkValue(this._getCorp().getPk_corp(), \); String sWhere = model.getClassWherePart(); if (!sPkValue.equals(\)) { // ѯı

SuperVO vo = HYPubBO_Client.queryByPrimaryKey(InvclVO.class,sPkValue);

}

}

sWhere = sWhere + \

+ vo.getAttributeValue(\).toString()+ \;

// µWHEREsetClassWherePart

model.setClassWherePart(sWhere);

1.1.2Զ

ϵͳṩIJղʱҪԶ. ԶһΪԶļ¡

2. ѯ

2.1 ѯģеԶ

ڲѯģһЩԶ,ǸõݵӱжûиӦֶʱ,Ҫ޸IJѯģIJѯ.

MyDelegator.java޸queryByCondition()漰Ҫ

drΪ+dr£

public SuperVO[] queryByCondition(Class voClass, String strWhere)

throws Exception {

strWhere = strWhere.replace(\, \); strWhere = strWhere + \ +ClientEnvironment.getInstance().getCorporation().getPk_corp()

+ \;SuperVO[] queryVos = nc.ui.hp.pub.ServiceFactory.getIHPPubService()

.queryCostgather(strWhere);

// return super.queryByCondition(voClass, strWhere);

return queryVos; }

Ҫ뱾˾ҪMyEventHandler.javaonBoQuery()

protected void onBoQuery() throws Exception { }

StringBuffer strWhere = new StringBuffer(); if (askForQueryCondition(strWhere) == false)

return;// û˲ѯ

// SuperVO[] queryVos = queryHeadVOs(strWhere.toString()); getBufferData().clear(); // ݵBuffer // addDataToBuffer(queryVos);

strWhere.append(\ + strWhere + \

+ getUI()._getCorp().getPk_corp() + \);

doBodyQuery(strWhere.toString()); updateBuffer();

getUI().getBillCardPanel().setEnabled(true);

ͬʱѯģеĿΪ+Ŀ 磺pk_costcard޸Ϊhp_costcard. pk_costcard

2.2 ˢԶ

ҳԶĿʱ浽ݿ⣬ôɺĬDzЩģҪؾͱAbstractMyDelegator()

/**

* ݲѯ(д) Ž

*/

public SuperVO[] queryHeadAllData(Class headClass, String strBillType,

String strWhere) throws Exception {

BilltypeVO billVo = PfUIDataCache.getBillType(strBillType); if (billVo.getWherestring() != null }

&& billVo.getWherestring().length() != 0) {

if (strWhere != null)

strWhere = strWhere + \ + billVo.getWherestring() + \;

else

strWhere = billVo.getWherestring();

SuperVO[] vo = HYPubBO_Client.queryByCondition(headClass, strWhere); // ˴voϵͳձѯvo, Ҫvoд // GetcostcardotherǴvoķ

vo = nc.ui.hp.pub.ServiceFactory.getIHPPubService()

.Getcostcardother(vo);

return vo; }

MyEventHandler.javaonBoSave()һ仰

super.onBoRefresh();

Getcostcardother(vo)οCostCardDAO.java

עUIвֱBSε࣬ҪӿڴӶá

3.

3.1 ʱʹ

NC-总结 - 百度文库.doc ĵWordĵصԣ㸴ơ༭ղغʹӡ
Ƽ
Copyright © 2012-2023 һ Ȩ | ϵ
:վز֪ʶȨݡϢ紫ȨתصƷַȨ,һ֪ͨǣǻἰʱɾ
ͷQQxxxxxx 䣺xxxxxx@qq.com
ICP2023013149
Top