| @@ -260,8 +260,35 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService | |||||
| wxBillRent.setPropertyContractId(id); | wxBillRent.setPropertyContractId(id); | ||||
| wxBillRent.setSortColumns(BaseEntity.SortField.Period_ASC); | wxBillRent.setSortColumns(BaseEntity.SortField.Period_ASC); | ||||
| wxBillRent.updateTenantInfo(tenantEntity); | wxBillRent.updateTenantInfo(tenantEntity); | ||||
| return wxBillPropertyMapper.findList(wxBillRent); | |||||
| //TODO 1111111 | |||||
| //一次性的和非一次性的都有这个属性,过滤掉,就是物业主账单 | |||||
| wxBillRent.setHasFeesStardarsId(EnumYesOrNo.NO.getCode()); | |||||
| List<WxBillProperty> retList = wxBillPropertyMapper.findList(wxBillRent); | |||||
| //非一次性的有这个属性 | |||||
| wxBillRent.setHasParentBillId(EnumYesOrNo.YES.getCode()); | |||||
| List<WxBillProperty> unFixedList = wxBillPropertyMapper.findList(wxBillRent); | |||||
| Map<Long,List<WxBillProperty>> childMap = null; | |||||
| if (null != unFixedList && unFixedList.size() > 0 ) { | |||||
| childMap = new HashMap<Long,List<WxBillProperty>>(); | |||||
| for (int i = 0 ; i < unFixedList.size(); i++) { | |||||
| WxBillProperty ub = unFixedList.get(i); | |||||
| if (null != ub) { | |||||
| List<WxBillProperty> childList = childMap.get(ub.getParentBillId()); | |||||
| if (null == childList) { | |||||
| childList = new ArrayList<WxBillProperty>(); | |||||
| } | |||||
| childList.add(ub); | |||||
| } | |||||
| } | |||||
| } | |||||
| if (null != childMap ) { | |||||
| for (int i = 0 ; i < retList.size(); i ++) { | |||||
| WxBillProperty ub = retList.get(i); | |||||
| List<WxBillProperty> childList = childMap.get(ub.getId()); | |||||
| ub.setChildList(childList); | |||||
| } | |||||
| } | |||||
| return retList; | |||||
| } | } | ||||
| /** | /** | ||||