根据PK数组,批量查询VO

本文介绍使用VOQuery进行批量查询OrderHeaderVO对象的方法,展示了如何通过传递字符串数组作为参数来获取特定OrderHeaderVO实例的过程。
VOQuery<OrderHeaderVO> queryhead =
	        new VOQuery<OrderHeaderVO>(OrderHeaderVO.class);
	    OrderHeaderVO[] headvos =
	        queryhead.query(bodysmap.keySet().toArray(new String[0]));
/* */ package nc.impl.fdcprcm.feelist; /* */ /* */ import java.util.ArrayList; /* */ import java.util.Collection; /* */ import java.util.HashMap; /* */ import java.util.HashSet; /* */ import java.util.LinkedHashMap; /* */ import java.util.LinkedList; /* */ import java.util.List; /* */ import java.util.Map; /* */ import java.util.Set; /* */ import nc.bs.dao.BaseDAO; /* */ import nc.bs.fdcpr.plugin.bpplugin.JZFDCPluginPoint; /* */ import nc.bs.framework.common.InvocationInfoProxy; /* */ import nc.bs.framework.common.NCLocator; /* */ import nc.impl.pubapp.pattern.data.bill.BillQuery; /* */ import nc.impl.pubapp.pattern.data.bill.template.UpdateBPTemplate; /* */ import nc.impl.pubapp.pattern.data.vo.VOQuery; /* */ import nc.impl.pubapp.pattern.data.vo.VOUpdate; /* */ import nc.impl.pubapp.pattern.data.vo.tool.VOConcurrentTool; /* */ import nc.impl.pubapp.pattern.database.IDQueryBuilder; /* */ import nc.itf.fdcprcm.feelist.ICmFeeListManager; /* */ import nc.itf.uap.pf.IPFBusiAction; /* */ import nc.itf.uap.pf.IPfExchangeService; /* */ import nc.pubitf.initgroup.InitGroupQuery; /* */ import nc.pubitf.para.SysInitQuery; /* */ import nc.vo.fdcpr.pub.tool.CommonUtilObj; /* */ import nc.vo.fdcpr.pub.tool.DefaultPsnAndDeptTool; /* */ import nc.vo.fdcpr.pub.tool.SafeCompute; /* */ import nc.vo.fdcprcm.bd.bill.AggBillVO; /* */ import nc.vo.fdcprcm.bd.bill.BillVO; /* */ import nc.vo.fdcprcm.bd.bill.DetailVO; /* */ import nc.vo.fdcprcm.bd.sevrecord.SevRecordVO; /* */ import nc.vo.fdcprcm.feecalc.FeeCalcParam; /* */ import nc.vo.fdcprcm.feelist.AggCmFeeListVO; /* */ import nc.vo.fdcprcm.feelist.CmFeeListVO; /* */ import nc.vo.fdcprcu.customer.BdCustomerVO; /* */ import nc.vo.fdcprmm.apportcalc.ApportCalculateVO; /* */ import nc.vo.fdcprmm.meterrecord.MeterRecordVO; /* */ import nc.vo.pub.AggregatedValueObject; /* */ import nc.vo.pub.BusinessException; /* */ import nc.vo.pub.CircularlyAccessibleValueObject; /* */ import nc.vo.pub.ISuperVO; /* */ import nc.vo.pub.lang.UFBoolean; /* */ import nc.vo.pub.lang.UFDateTime; /* */ import nc.vo.pub.lang.UFDouble; /* */ import nc.vo.pubapp.pattern.exception.ExceptionUtils; /* */ import nc.vo.pubapp.pattern.model.entity.bill.AbstractBill; /* */ /* */ /* */ /* */ /* */ /* */ public class CmFeeListManagerImpl /* */ implements ICmFeeListManager /* */ { /* */ public AggCmFeeListVO[] queryFeeListBySrc(String srcBilltype, String[] srcPKs) /* */ { /* 59 */ StringBuilder sql = new StringBuilder(); /* 60 */ sql.append(" and isnull(dr,0)=0 "); /* 61 */ sql.append(" and ").append("vsrctype").append("='"); /* 62 */ sql.append(srcBilltype).append("'"); /* 63 */ sql.append(" and "); /* 64 */ IDQueryBuilder builder = new IDQueryBuilder(); /* 65 */ builder.buildSQL("csrcbid", srcPKs); /* 66 */ sql.append(builder.buildSQL("csrcbid", srcPKs)); /* 67 */ CmFeeListVO[] vos = (CmFeeListVO[])new VOQuery(CmFeeListVO.class).query(sql.toString(), null); /* */ /* */ /* 70 */ if ((vos != null) && (vos.length > 0)) { /* 71 */ AggCmFeeListVO[] result = new AggCmFeeListVO[vos.length]; /* 72 */ for (int i = 0; i < result.length; i++) { /* 73 */ result[i] = new AggCmFeeListVO(); /* 74 */ result[i].setParentVO(vos[i]); /* */ } /* 76 */ return result; /* */ } /* 78 */ return null; /* */ } /* */ /* */ /* */ public boolean queryFeeListByBillPlan(String[] pk_billplans) /* */ { /* 84 */ StringBuilder sql = new StringBuilder(); /* 85 */ sql.append(" and isnull(dr,0)=0 "); /* 86 */ sql.append(" and isnull(bgenebill,'N')='Y' "); /* 87 */ sql.append(" and "); /* 88 */ IDQueryBuilder builder = new IDQueryBuilder(); /* 89 */ sql.append(builder.buildSQL("pk_billplan", pk_billplans)); /* 90 */ CmFeeListVO[] vos = (CmFeeListVO[])new VOQuery(CmFeeListVO.class).query(sql.toString(), null); /* */ /* */ /* */ /* 94 */ if ((vos != null) && (vos.length > 0)) { /* 95 */ return true; /* */ } /* 97 */ return false; /* */ } /* */ /* */ /* */ /* */ /* */ public AggCmFeeListVO[] pushFees(AggCmFeeListVO[] fees) /* */ throws BusinessException /* */ { /* 106 */ if (CommonUtilObj.isEmpty(fees)) { /* 107 */ return null; /* */ } /* */ /* 110 */ for (AggCmFeeListVO aggFee : fees) { /* 111 */ CmFeeListVO fee = aggFee.getParentVO(); /* */ /* 113 */ fee.setCbilltypecode("H33K"); /* 114 */ fee.setFstatusflag(Integer.valueOf(-1)); /* */ } /* */ /* */ /* 118 */ AggCmFeeListVO[] result = (AggCmFeeListVO[])((IPFBusiAction)NCLocator.getInstance().lookup(IPFBusiAction.class)).processBatch("SAVEBASE", "H33K", fees, null, null, null); /* */ /* */ /* */ /* 122 */ return result; /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ public AggCmFeeListVO[] generateArapRecBillBill(AggCmFeeListVO[] fees) /* */ throws BusinessException /* */ { /* 133 */ LockAndCheckTs(fees); /* */ /* */ /* 136 */ return generateGathRevivableBill(fees); /* */ } /* */ /* */ /* */ /* */ /* */ /* */ private AggCmFeeListVO[] generateGathRevivableBill(AggCmFeeListVO[] fees) /* */ throws BusinessException /* */ { /* 146 */ if (!paramIsTransfer2Arapthrows()) { /* 147 */ return fees; /* */ } /* */ /* */ /* 151 */ if (!isInstallArap()) /* */ { /* 153 */ AggregatedValueObject[] retbills = ((IPfExchangeService)NCLocator.getInstance().lookup(IPfExchangeService.class)).runChangeDataAry("H33K", "F0", fees, null); /* */ /* */ /* */ /* 157 */ ((IPFBusiAction)NCLocator.getInstance().lookup(IPFBusiAction.class)).processBatch("SAVETEMP", "F0", retbills, null, null, null); /* */ /* */ /* */ /* 161 */ List<CmFeeListVO> cmFeeListVOs = new ArrayList(); /* 162 */ Set<String> pks = new HashSet(); /* 163 */ for (AggCmFeeListVO aggvo : fees) { /* 164 */ CmFeeListVO headvo = aggvo.getParentVO(); /* 165 */ headvo.setStatus(1); /* */ /* 167 */ headvo.setBgenarrecbill(UFBoolean.TRUE); /* */ /* 169 */ cmFeeListVOs.add(headvo); /* 170 */ pks.add(headvo.getPrimaryKey()); /* */ } /* */ /* 173 */ AggCmFeeListVO[] originBills = queryFeeBillByPks(pks); /* */ /* */ /* 176 */ UpdateBPTemplate<AggCmFeeListVO> bp = new UpdateBPTemplate(JZFDCPluginPoint.UPDATE); /* 177 */ return (AggCmFeeListVO[])bp.update(fees, originBills); /* */ } /* */ /* */ /* */ /* 182 */ ExceptionUtils.wrappBusinessException("没有找到应收应付模块!"); /* 183 */ return null; /* */ } /* */ /* */ /* */ /* */ public void removeFeesBySrc(String srcBilltype, String[] srcPKs) /* */ throws BusinessException /* */ { /* 191 */ AggCmFeeListVO[] toDeleteVOs = queryFeeListBySrc(srcBilltype, srcPKs); /* 192 */ ((IPFBusiAction)NCLocator.getInstance().lookup(IPFBusiAction.class)).processBatch("DELETE", "H33K", toDeleteVOs, null, null, null); /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ private void LockAndCheckTs(AggCmFeeListVO[] fees) /* */ throws BusinessException /* */ { /* 204 */ VOConcurrentTool tool = new VOConcurrentTool(); /* 205 */ Set<CmFeeListVO> feevos = new HashSet(); /* 206 */ for (AggCmFeeListVO aggvo : fees) { /* 207 */ feevos.add(aggvo.getParentVO()); /* */ } /* 209 */ tool.lock((ISuperVO[])feevos.toArray(new CmFeeListVO[feevos.size()])); /* */ /* 211 */ tool.checkTSWithDB((ISuperVO[])feevos.toArray(new CmFeeListVO[feevos.size()])); /* */ } /* */ /* */ /* */ /* */ /* */ public AggCmFeeListVO[] generateGathRecviedBill(AggCmFeeListVO[] fees) /* */ throws BusinessException /* */ { /* 220 */ if (CommonUtilObj.isEmpty(fees)) { /* 221 */ return null; /* */ } /* */ /* 224 */ LockAndCheckTs(fees); /* */ /* */ /* 227 */ checkHasNotSelectdFees(fees); /* */ /* 229 */ if (isSrcBillChanged(fees)) { /* 230 */ ExceptionUtils.wrappBusinessException("提示消息:上游单据已经发生变化!请重新计算!"); /* */ } /* */ /* */ /* */ /* 235 */ AggregatedValueObject[] retaggvos = ((IPfExchangeService)NCLocator.getInstance().lookup(IPfExchangeService.class)).runChangeDataAry("H33K", "H33J", fees, null); /* */ /* */ /* */ /* 239 */ AggBillVO[] billvos = merge2AggBillVOByCustomer((AggBillVO[])retaggvos); /* */ /* 241 */ if (!CommonUtilObj.isEmpty(billvos)) /* */ { /* 243 */ ((IPFBusiAction)NCLocator.getInstance().lookup(IPFBusiAction.class)).processBatch("GENERATE", "H33J", billvos, null, null, null); /* */ /* */ /* 246 */ Set<String> pks = new HashSet(); /* 247 */ List<CmFeeListVO> cmFeeListVOs = new ArrayList(); /* 248 */ for (AggCmFeeListVO fee : fees) { /* 249 */ CmFeeListVO feeListVO = fee.getParentVO(); /* 250 */ feeListVO.setBgenebill(new UFBoolean(true)); /* 251 */ feeListVO.setStatus(1); /* 252 */ cmFeeListVOs.add(feeListVO); /* 253 */ pks.add(feeListVO.getPrimaryKey()); /* */ } /* */ /* 256 */ AggCmFeeListVO[] originBills = queryFeeBillByPks(pks); /* */ /* */ /* 259 */ UpdateBPTemplate<AggCmFeeListVO> bp = new UpdateBPTemplate(JZFDCPluginPoint.UPDATE); /* 260 */ return (AggCmFeeListVO[])bp.update(fees, originBills); /* */ } /* */ /* */ /* 264 */ return null; /* */ } /* */ /* */ private AggCmFeeListVO[] queryFeeBillByPks(Set<String> pks) throws BusinessException { /* 268 */ if (CommonUtilObj.isEmpty(pks)) { /* 269 */ return null; /* */ } /* */ /* 272 */ BillQuery<AggCmFeeListVO> query = new BillQuery(AggCmFeeListVO.class); /* 273 */ return (AggCmFeeListVO[])query.query((String[])pks.toArray(new String[pks.size()])); /* */ } /* */ /* */ private void checkHasNotSelectdFees(AggCmFeeListVO[] fees) throws BusinessException { /* 277 */ Set<String> infos = new HashSet(); /* 278 */ StringBuilder info = new StringBuilder(); /* 279 */ Set<String> pks_cus = new HashSet(); /* 280 */ Set<String> pks = new HashSet(); /* */ /* 282 */ for (AggCmFeeListVO aggvo : fees) { /* 283 */ info.setLength(0); /* */ /* 285 */ CmFeeListVO vo = aggvo.getParentVO(); /* 286 */ info.append(vo.getPk_servicecenter()).append("_"); /* 287 */ info.append(vo.getPk_customer()).append("_"); /* 288 */ info.append(vo.getDchargemonth()); /* */ /* 290 */ infos.add(info.toString()); /* */ /* 292 */ pks_cus.add(vo.getPk_customer()); /* 293 */ pks.add(vo.getPk_fee()); /* */ } /* */ /* 296 */ info.setLength(0); /* 297 */ info.append(" isnull(dr,0)=0 and ").append(CommonUtilObj.convertArray2SQL("pk_servicecenter||'_'||pk_customer||'_'||dchargemonth", (String[])infos.toArray(new String[infos.size()]))); /* 298 */ info.append(" and isnull(bgenebill,'N')='N' and isnull(bisreceived,'N')='N' "); /* 299 */ info.append(" and ").append(CommonUtilObj.buildNotInSQL("pk_fee", (String[])pks.toArray(new String[pks.size()]))); /* */ /* */ /* 302 */ Collection<CmFeeListVO> ctn = getDao().retrieveByClause(CmFeeListVO.class, info.toString(), new String[] { "pk_fee", "pk_customer" }); /* 303 */ if (CommonUtilObj.isEmpty(ctn)) { /* 304 */ return; /* */ } /* */ /* 307 */ Set<String> customers = new HashSet(); /* 308 */ for (CmFeeListVO vo : ctn) { /* 309 */ customers.add(vo.getPk_customer()); /* */ } /* */ /* 312 */ info.setLength(0); /* 313 */ info.append(" isnull(dr,0)=0 and ").append(CommonUtilObj.convertArray2SQL("pk_customer", (String[])customers.toArray(new String[customers.size()]))); /* */ /* 315 */ Collection<BdCustomerVO> ctn_cus = getDao().retrieveByClause(BdCustomerVO.class, info.toString(), new String[] { "name" }); /* 316 */ if (CommonUtilObj.isEmpty(ctn_cus)) { /* 317 */ return; /* */ } /* */ /* 320 */ Set<String> errorinfos = new HashSet(); /* 321 */ for (BdCustomerVO vo : ctn_cus) { /* 322 */ errorinfos.add(vo.getName()); /* */ } /* */ /* 325 */ //ExceptionUtils.wrappBusinessException("以下客户" + errorinfos.toString() + "存在业务应收月未勾选的收费清单"); /* */ } /* */ /* */ /* */ /* */ /* */ /* */ private AggBillVO[] merge2AggBillVOByCustomer(AggBillVO[] clientFullVOs) /* */ throws BusinessException /* */ { /* 335 */ if (CommonUtilObj.isEmpty(clientFullVOs)) { /* 336 */ return clientFullVOs; /* */ } /* */ /* */ /* 340 */ Map<String, AggBillVO> retMap = new HashMap(); /* 341 */ Map<String, Map<String, List<DetailVO>>> customer_months = new HashMap(); /* 342 */ StringBuilder info = new StringBuilder(); /* */ /* 344 */ for (AggBillVO aggvo : clientFullVOs) { /* 345 */ BillVO headvo = aggvo.getParentVO(); /* 346 */ if (!CommonUtilObj.isEmpty(headvo.getPk_customer())) /* */ { /* */ /* 349 */ info.setLength(0); /* */ /* 351 */ info.append(headvo.getPk_customer()).append("_").append(headvo.getDbillmonth()); /* */ /* 353 */ if (customer_months.containsKey(info.toString())) /* */ { /* 355 */ Map<String, List<DetailVO>> bill_map = (Map)customer_months.get(info.toString()); /* */ /* 357 */ if (!CommonUtilObj.isEmpty(aggvo.getChildren(DetailVO.class))) /* */ { /* */ /* */ /* 361 */ DetailVO[] detailvos = (DetailVO[])aggvo.getChildren(DetailVO.class); /* 362 */ String pk_house = null; /* 363 */ for (DetailVO vo : detailvos) { /* 364 */ if (pk_house == null) { /* 365 */ pk_house = vo.getPk_house(); /* 366 */ break; /* */ } /* */ } /* */ /* */ /* 371 */ if (bill_map.containsKey(pk_house)) { /* 372 */ List<DetailVO> detail_list = (List)bill_map.get(pk_house); /* 373 */ for (DetailVO vo : detailvos) { /* 374 */ vo.setPk_parent(pk_house); /* 375 */ detail_list.add(vo); /* */ } /* */ } /* */ else { /* 379 */ List<DetailVO> detail_list = new LinkedList(); /* 380 */ for (DetailVO vo : detailvos) { /* 381 */ vo.setPk_parent(pk_house); /* 382 */ detail_list.add(vo); /* */ } /* 384 */ bill_map.put(pk_house, detail_list); /* */ } /* */ } /* */ } /* */ else { /* 389 */ Map<String, List<DetailVO>> bill_map = new LinkedHashMap(); /* 390 */ List<DetailVO> detail_list = new LinkedList(); /* */ /* 392 */ if (!CommonUtilObj.isEmpty(aggvo.getChildren(DetailVO.class))) /* */ { /* */ /* */ /* 396 */ if (!retMap.containsKey(info.toString())) { /* 397 */ retMap.put(info.toString(), aggvo); /* */ } /* */ /* 400 */ DetailVO[] detailvos = (DetailVO[])aggvo.getChildren(DetailVO.class); /* 401 */ String pk_house = null; /* 402 */ for (DetailVO vo : detailvos) { /* 403 */ if (pk_house == null) { /* 404 */ pk_house = vo.getPk_house(); /* */ } /* */ /* 407 */ vo.setPk_parent(pk_house); /* 408 */ detail_list.add(vo); /* */ } /* */ /* 411 */ bill_map.put(pk_house, detail_list); /* 412 */ customer_months.put(info.toString(), bill_map); /* */ } /* */ } /* */ } /* */ } /* */ /* 418 */ List<AggBillVO> retList = new LinkedList(); /* 419 */ for (String key : retMap.keySet()) { /* 420 */ AggBillVO finalAggvo = (AggBillVO)retMap.get(key); /* 421 */ retList.add(finalAggvo); /* 422 */ BillVO headvo = finalAggvo.getParentVO(); /* 423 */ headvo.setStatus(2); /* */ /* 425 */ UFDouble norigreceivablemny = null; /* */ /* 427 */ List<DetailVO> details = new LinkedList(); /* */ /* 429 */ Map<String, List<DetailVO>> middleMap = (Map)customer_months.get(key); /* 430 */ for (String pk_house : middleMap.keySet()) /* */ { /* 432 */ DetailVO rootdetail = new DetailVO(); /* 433 */ rootdetail.setStatus(2); /* 434 */ rootdetail.setPk_house(pk_house); /* 435 */ rootdetail.setPk_item(pk_house); /* 436 */ details.add(rootdetail); /* */ /* 438 */ UFDouble norigreceivemny = null; /* */ /* 440 */ List<DetailVO> detailList = (List)middleMap.get(pk_house); /* 441 */ for (DetailVO vo : detailList) { /* 442 */ norigreceivemny = SafeCompute.addWithNull(norigreceivemny, vo.getNorigreceivemny()); /* 443 */ vo.setStatus(2); /* 444 */ details.add(vo); /* */ } /* */ /* 447 */ rootdetail.setNorigreceivemny(norigreceivemny); /* */ /* 449 */ norigreceivablemny = SafeCompute.addWithNull(norigreceivablemny, norigreceivemny); /* */ } /* */ /* 452 */ headvo.setNorigreceivablemny(norigreceivablemny); /* 453 */ headvo.setNorigyuemny(norigreceivablemny); /* 454 */ headvo.setFstatusflag(Integer.valueOf(-1)); /* */ /* 456 */ finalAggvo.setChildren(DetailVO.class, (ISuperVO[])details.toArray(new DetailVO[details.size()])); /* */ } /* */ /* */ /* */ /* */ /* */ /* 463 */ DefaultPsnAndDeptTool tool = new DefaultPsnAndDeptTool(); /* 464 */ tool.setDefaultPsnAndDept((AbstractBill[])retList.toArray(new AggBillVO[retList.size()])); /* */ /* 466 */ return (AggBillVO[])retList.toArray(new AggBillVO[retList.size()]); /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ private boolean isInstallArap() /* */ throws BusinessException /* */ { /* 477 */ return !InitGroupQuery.isEnabled(InvocationInfoProxy.getInstance().getGroupId(), "2006"); /* */ } /* */ /* */ private boolean paramIsTransfer2Arapthrows() throws BusinessException { /* 481 */ UFBoolean param = SysInitQuery.getParaBoolean(InvocationInfoProxy.getInstance().getGroupId(), "FDCPRCM004"); /* 482 */ if (param == null) { /* 483 */ return false; /* */ } /* 485 */ return param.booleanValue(); /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ private boolean isSrcBillChanged(AggCmFeeListVO[] fees) /* */ { /* 496 */ List<String> merecordmainPks = new ArrayList(); /* 497 */ List<String> sevrecordPks = new ArrayList(); /* 498 */ List<String> apportcalcPks = new ArrayList(); /* */ /* 500 */ Map<String, String> tsMap = new HashMap(); /* 501 */ for (AggCmFeeListVO aggVo : fees) { /* 502 */ CmFeeListVO feeListVO = aggVo.getParentVO(); /* 503 */ String billType = feeListVO.getVsrctype(); /* 504 */ if ("H31N".equals(billType)) { /* 505 */ merecordmainPks.add(feeListVO.getCsrcid()); /* 506 */ } else if ("H33H".equals(billType)) { /* 507 */ sevrecordPks.add(feeListVO.getCsrcid()); /* 508 */ } else if ("H31Q".equals(billType)) { /* 509 */ apportcalcPks.add(feeListVO.getCsrcid()); /* */ } /* 511 */ tsMap.put(feeListVO.getCsrcid(), feeListVO.getVsrcts()); /* */ } /* */ /* 514 */ MeterRecordVO[] recordVOs = null; /* 515 */ if (merecordmainPks.size() > 0) { /* 516 */ recordVOs = (MeterRecordVO[])new VOQuery(MeterRecordVO.class).query((String[])merecordmainPks.toArray(new String[merecordmainPks.size()])); /* 517 */ if (!CommonUtilObj.isEmpty(recordVOs)) { /* 518 */ for (MeterRecordVO recordVO : recordVOs) { /* 519 */ String srcTs = tsMap.get(recordVO.getPk_merecordmain()) == null ? "" : (String)tsMap.get(recordVO.getPk_merecordmain()); /* 520 */ if (!srcTs.equals(recordVO.getTs().toString())) { /* 521 */ return true; /* */ } /* */ } /* */ } /* */ } /* 526 */ SevRecordVO[] sevRecords = null; /* 527 */ if (sevrecordPks.size() > 0) { /* 528 */ sevRecords = (SevRecordVO[])new VOQuery(SevRecordVO.class).query((String[])sevrecordPks.toArray(new String[sevrecordPks.size()])); /* 529 */ if (!CommonUtilObj.isEmpty(sevRecords)) { /* 530 */ for (SevRecordVO sevRecordVO : sevRecords) { /* 531 */ String srcTs = tsMap.get(sevRecordVO.getPk_sevrecord()) == null ? "" : (String)tsMap.get(sevRecordVO.getPk_sevrecord()); /* 532 */ if (!srcTs.equals(sevRecordVO.getTs().toString())) { /* 533 */ return true; /* */ } /* */ } /* */ } /* */ } /* 538 */ ApportCalculateVO[] apportCalcs = null; /* 539 */ if (apportcalcPks.size() > 0) { /* 540 */ apportCalcs = (ApportCalculateVO[])new VOQuery(ApportCalculateVO.class).query((String[])apportcalcPks.toArray(new String[apportcalcPks.size()])); /* 541 */ if (!CommonUtilObj.isEmpty(apportCalcs)) { /* 542 */ for (ApportCalculateVO calculateVO : apportCalcs) { /* 543 */ String srcTs = tsMap.get(calculateVO.getPk_apportcalc()) == null ? "" : (String)tsMap.get(calculateVO.getPk_apportcalc()); /* 544 */ if (!srcTs.equals(calculateVO.getTs().toString())) { /* 545 */ return true; /* */ } /* */ } /* */ } /* */ } /* 550 */ return false; /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public Map<String, CmFeeListVO> getAlreadyGeneBillFeesByParam(FeeCalcParam param) /* */ throws BusinessException /* */ { /* 564 */ StringBuffer sql = new StringBuffer(); /* 565 */ sql.append(" and ").append("pk_org").append(" = '").append(param.getOrgId()).append("'"); /* 566 */ sql.append(" and ").append("pk_servicecenter").append(" = '").append(param.getCenterId()).append("'"); /* 567 */ sql.append(" and ").append("pk_project").append(" = '").append(param.getProjectId()).append("'"); /* 568 */ sql.append(" and ").append("dchargemonth").append(" = '").append(param.getYearMonth()).append("'"); /* 569 */ sql.append(" and ").append("bgenebill").append(" = '").append(new UFBoolean(true)).append("'"); /* */ /* 571 */ VOQuery<CmFeeListVO> query = new VOQuery(CmFeeListVO.class); /* 572 */ CmFeeListVO[] feeListVOs = (CmFeeListVO[])query.query(sql.toString(), ""); /* */ /* 574 */ Map<String, CmFeeListVO> feeMap = new HashMap(); /* 575 */ for (CmFeeListVO listVO : feeListVOs) { /* 576 */ String key = listVO.getPk_house() + "_" + listVO.getDchargemonth() + "_" + listVO.getPk_feetype(); /* 577 */ if (!CommonUtilObj.isEmpty(listVO.getCsrcbid())) { /* 578 */ key = key + "_" + listVO.getCsrcbid(); /* */ } /* 580 */ feeMap.put(key, listVO); /* */ } /* 582 */ return feeMap; /* */ } /* */ /* 585 */ private BaseDAO dao = null; /* */ /* 587 */ private BaseDAO getDao() { if (dao == null) { /* 588 */ dao = new BaseDAO(); /* */ } /* 590 */ return dao; /* */ } /* */ /* */ /* */ /* */ /* */ public void arapRecbillDeleteWriteback2FeeList(AggregatedValueObject[] aggvos) /* */ throws BusinessException /* */ { /* 599 */ if (CommonUtilObj.isEmpty(aggvos)) { /* 600 */ return; /* */ } /* */ /* 603 */ Set<String> fees_pk = new HashSet(); /* 604 */ for (AggregatedValueObject aggvo : aggvos) { /* 605 */ CircularlyAccessibleValueObject[] bodyvos = aggvo.getChildrenVO(); /* 606 */ if (!CommonUtilObj.isEmpty(bodyvos)) /* */ { /* */ /* */ /* 610 */ for (CircularlyAccessibleValueObject bodyvo : bodyvos) { /* 611 */ fees_pk.add(CommonUtilObj.initStr(bodyvo.getAttributeValue("top_billid"))); /* */ } /* */ } /* */ } /* */ /* 616 */ if (fees_pk.size() < 1) { /* 617 */ return; /* */ } /* */ /* 620 */ VOQuery<CmFeeListVO> query = new VOQuery(CmFeeListVO.class); /* 621 */ CmFeeListVO[] queryFeeVos = (CmFeeListVO[])query.query((String[])fees_pk.toArray(new String[fees_pk.size()])); /* */ /* 623 */ VOConcurrentTool tool = new VOConcurrentTool(); /* 624 */ tool.lock(queryFeeVos); /* 625 */ tool.checkTSWithDB(queryFeeVos); /* */ /* 627 */ for (CmFeeListVO feevo : queryFeeVos) { /* 628 */ feevo.setStatus(1); /* 629 */ feevo.setBgenarrecbill(UFBoolean.FALSE); /* */ } /* */ /* 632 */ new VOUpdate().update(queryFeeVos, new String[] { "bgenarrecbill" }); /* */ } /* */ } 哪个方法是 生成费用清单的
最新发布
10-15
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值