package com.tenwa.reckon.help; import java.util.List; import com.amarsoft.are.jbo.BizObject; import com.amarsoft.are.jbo.JBOFactory; import com.amarsoft.are.jbo.JBOTransaction; import com.tenwa.reckon.bean.FundRentPlanBean; import com.tenwa.reckon.bean.TabCalBean; import com.tenwa.reckon.util.NumberUtils; public class RentPlanContrCalDAOImpl { /** * * ( 根据表信息,从数据库中读取租金计划信息,合同的) * * @param tcb * @return * @throws Exception */ @SuppressWarnings("unchecked") public FundRentPlanBean getRentAndDateByTcb(TabCalBean tcb, int startList,JBOTransaction tx) throws Exception { List rentList=JBOFactory.createBizObjectQuery(tcb.getRentPlan_tb(),"select * from O where flowunid=:flowunid and "+tcb.getPlanCName()+"=:plannumber and plan_list>=:startlist order by plan_date asc") .setParameter("flowunid", tcb.getDocId()) .setParameter("plannumber",tcb.getPlanCValue()) .setParameter("startlist", startList).getResultList(false); FundRentPlanBean frpb = new FundRentPlanBean(); for (BizObject rent : rentList) { frpb.getPlanDateList().add(rent.getAttribute("plan_date").getString()); frpb.getRentList().add( NumberUtils.nullToZero(rent.getAttribute("rent").getString()) ); frpb.getCorpusBusinessList().add( NumberUtils.nullToZero(rent.getAttribute("corpus").getString() ) ); //frpb.getCorpusOverageBusinessList().add( NumberUtils.nullToZero(rent.getAttribute("corpus_overage").getString()) ); frpb.getInterestBusinessList().add( NumberUtils.nullToZero(rent.getAttribute("interest").getString()) ); frpb.getRentAdjustList().add( NumberUtils.nullToZero(rent.getAttribute("rent_adjust").getString()) ); //frpb.getCorpusFinacList().add( NumberUtils.nullToZero(rent.getAttribute("corpus_finac").getString() ) ); //frpb.getCorpusOverageFinacList().add( NumberUtils.nullToZero(rent.getAttribute("corpus_overage_finac").getString()) ); //frpb.getInterestFinacList().add( NumberUtils.nullToZero(rent.getAttribute("interest_finac").getString()) ); frpb.getYearRateList().add( NumberUtils.nullToZero(rent.getAttribute("year_rate").getString()) ); frpb.getColumn_1().add( NumberUtils.nullToZero(rent.getAttribute("CORPUS_BUSINESS").getString()) ); frpb.getColumn_2().add( NumberUtils.nullToZero(rent.getAttribute("INTEREST_BUSINESS").getString()) ); frpb.getInterestDateList().add(rent.getAttribute("INTEREST_DATE").getString()); frpb.getYearRateList().add( NumberUtils.nullToZero(rent.getAttribute("YEAR_RATE").getString())); frpb.getCorpusOverageBusinessList().add( NumberUtils.nullToZero(rent.getAttribute("ALL_REMAIN_CORPUS").getString())); //frpb.getAllRemainRentList().add( NumberUtils.nullToZero(rent.getAttribute("all_remain_rent").getString()) );// } return frpb; } }