Client 前端:
IMDPersistenceQueryService service=NCLocator.getInstance().lookup(IMDPersistenceQueryService.class);
ArriveVO arriveVO=(ArriveVO) service.queryBillOfNCObjectByPK(ArriveVO.class,"1001A110000000B3ACOT").getContainmentObject();
后端:
BillQuery<OrderVO> billquery = new BillQuery(OrderVO.class);
OrderVO[] aggvo=billquery.query(new String[] {pk});
return aggvo;
/*待测试*/
AggGaugeVO[] resultVos = (AggGaugeVO[])getServiceTemplate().queryByCondition(AggGaugeVO.class, extraCond.toString());
测试未通过的方法(前段)
ArriveVO arriveVO =(ArriveVO) HYPubBO_Client.queryBillVOByPrimaryKey(new String[]{ArriveVO.class.getName(),ArriveHeaderVO.class.getName(),ArriveItemVO.class.getName()},"1001A110000000B3ACOT");
client查询aggvo
nc.itf.pubapp.pub.smart.IBillQueryService
IBillQueryService billquery = NCLocator.getInstance().lookup(IBillQueryService.class);
AbstractBill[] fill_dataVOS = (AbstractBill[]) billquery.queryAbstractBillsByPks(src_class, pk_list.toArray(new String[pk_list.size()]));
System.out.println(fill_dataVOS);
根据查询条件查询AGGVO
String[] headwhere=headgroup.split(",");
String sqlwhere=" 1=1 ";
for(int i=0;i<headwhere.length;i++){
sqlwhere=sqlwhere+" and "+ headwhere[i]+" ='"+(String) (list.get(0).getAttributeValue(group[i])==null?"":list.get(0).getAttributeValue(group[i]))+"' ";
// cond.addCondition(Restrictions.eq (headwhere[i],(String) (list.get(0).getAttributeValue(group[i])==null?"":list.get(0).getAttributeValue(group[i]))));
}
sqlwhere =sqlwhere+ " and btogoldtaxflag!='Y' and vdef16='Y'";
IMDPersistenceQueryService qryService = NCLocator.getInstance().lookup(IMDPersistenceQueryService.class);
Collection<AggArap_invoice> colVOs = qryService.queryBillOfVOByCond(AggArap_invoice.class,
sqlwhere , true, false);
根据编码查询AGGVO
IMDPersistenceQueryService service=NCLocator.getInstance().lookup(IMDPersistenceQueryService.class);
QueryCondition queryCondition=new QueryCondition(src_class);
queryCondition.addCondition(Restrictions.and(Restrictions.eq("vbillcode", billcode), Restrictions.eq("dr", 0)));
return service.queryBillOfVOByCond(queryCondition, false);
//根据查询SQL查
String condition = null;
Collection bills = null;
try {
condition = SqlUtils.getInStr("top_itemid", keys, new boolean[]{true});
String sql = "pk_recbill in( select ar_recitem.pk_recbill from ar_recitem where ar_recitem.dr = 0 and ("
+ condition + ")) and ar_recbill.dr = 0";
bills = MDPersistenceService.lookupPersistenceQueryService().queryBillOfVOByCond(AggReceivableBillVO.class,
sql, false);
} catch (SQLException var14) {
throw ExceptionHandler.handleException(var14);
}